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AMgC,QAAQiL,IAAInM,OAAOu+C,qCAElC51C,KAAKzJ,MAAMgC,QAAQiL,IAAInM,OAAOw+C,qCACzC,CAmBQnC,sCAAmC,IAAAoC,EAAAC,EACvC,MAAM5hD,EAAQ6+C,EAAAA,GAAuBC,SAASjzC,KAAKzJ,MAAMgC,QAAQI,QAA2C,QAApCm9C,EAAE91C,KAAKzJ,MAAMsF,KAAK+yC,0BAAkB,IAAAkH,OAAA,EAAlCA,EAAoC/5C,QAAQ5H,MAChH4+C,GAAYiD,EAAAA,EAAAA,IAAah2C,KAAKzJ,MAAMgC,QAAQI,SAElD,OADoF,QAA5Do9C,EAAG5hD,aAAK,EAALA,EAAO6yB,QAAO7Z,GAAWA,EAAQ4lC,YAAcA,WAAU,IAAAgD,EAAAA,EAAI,EAE5F,EAoBJ,uJC1NO,MAAME,EAA8F1/C,IACvG,MAAM,wBAAE8+C,EAAuB,yBAAEf,GAA6B/9C,EAE9D,OACInC,EAAAA,cAACkD,EAAAA,OAAMhD,OAAAC,OAAA,GAAKgC,EAAMqN,aACbyxC,EACAf,EACI,EAIjB","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/checkout-shipping-address.view.tsx?5402","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/media-gallery.view.tsx?87fd","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/checkout-shipping-address.view.tsx?885a","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/media-gallery.view.tsx?0cc7","webpack://Msdyn365.Commerce.Online/./src/modules/loyalty-sign-up/components/loyalty-sign-up-small-components.tsx?7106","webpack://Msdyn365.Commerce.Online/./src/modules/loyalty-sign-up/loyalty-sign-up.tsx?fd89","webpack://Msdyn365.Commerce.Online/./src/modules/loyalty-sign-up/loyalty-sign-up.view.tsx?45ec","webpack://Msdyn365.Commerce.Online/./src/modules/loyalty-terms/components/loyalty-terms-modal.tsx?1b8b","webpack://Msdyn365.Commerce.Online/./src/modules/loyalty-terms/loyalty-terms.tsx?babd","webpack://Msdyn365.Commerce.Online/./src/modules/loyalty-terms/loyalty-terms.view.tsx?b3e6","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.tsx?797a","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/rng.js?7d39","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/regex.js?255d","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/validate.js?f4cd","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/stringify.js?688d","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/v4.js?0bec","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/proactive-chat-trigger.ts?ab51","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-amount-trigger.ts?b0a3","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-number-of-items-trigger.ts?5c1e","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-specific-product-trigger.ts?5985","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/consts.ts?4dc3","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/date-range-trigger.ts?d574","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/from-specific-page-trigger.ts?37c0","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/page-visits-trigger.ts?66a6","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/specific-CountryRegion-trigger.ts?5c72","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/specific-page-trigger.ts?9295","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/wait-on-time-trigger.ts?63fd","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/index.ts?ef6c","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/ContextProvider.ts?20ff","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/StyleComposers.ts?0cc6","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/CommerceChatStore.ts?9abc","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/components/ChatCore.tsx?1b5f","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/components/Chat.tsx?5004","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.view.tsx?cb2f","webpack://Msdyn365.Commerce.Online/../../src/checkout-state-data-action.ts?8344","webpack://Msdyn365.Commerce.Online/../../src/checkout-state.ts?acd8","webpack://Msdyn365.Commerce.Online/../../src/checkout-utilities.data.ts?b2cc","webpack://Msdyn365.Commerce.Online/../../../src/module-state-manager/module-state.ts?7579","webpack://Msdyn365.Commerce.Online/../../../src/module-state-manager/with-module-state.tsx?61ca","webpack://Msdyn365.Commerce.Online/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://Msdyn365.Commerce.Online/./src/common/error.tsx?096f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-edit-mode.tsx?83e6","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-summary-mode.tsx?5675","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.tsx?de67","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.view.tsx?79c6","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-group.tsx?9de7","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-utility.ts?b7eb","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-date-dropdown.tsx?e5a3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-timeslot-dropdown.tsx?aef8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/checkout-pickup.tsx?28aa","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/checkout-pickup.view.tsx?d64e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.check-box.tsx?3b17","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-message.tsx?c6a5","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-title.tsx?f908","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.tsx?9243","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.view.tsx?26e8","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/header.view.tsx?6d84","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-view-mode-selector.component.tsx?6452","webpack://Msdyn365.Commerce.Online/./src/modules/product-comparison-button/product-comparison-button.tsx?9384","webpack://Msdyn365.Commerce.Online/./src/modules/product-comparison-button/product-comparison-button.view.tsx?94a7"],"sourcesContent":["/*!\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address';\r\nimport { ICheckoutShippingAddressViewProps } from '@msdyn365-commerce-modules/address';\r\nimport {\r\n ICheckoutShippingAddressConfig,\r\n ICheckoutShippingAddressProps\r\n} from '../definition-extensions/checkout-shipping-address.ext.props.autogenerated';\r\n// import AdressDropdownComponent from './address-dropdown';\r\n\r\ninterface IAddressAddUpdateExtProps extends IAddressAddUpdateProps {\r\n shipUsaOnlyMessageText: string;\r\n allowInternationalShipping: boolean;\r\n}\r\n\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return <>{item.description};\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Select Component.\r\n * @param param0 - Root param.\r\n * @param param0.SelectAddress - Select address.\r\n * @param param0.addButton - Add button.\r\n * @param param0.items - IAddressSelectItem[].\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns - SelectAddress Node.\r\n */\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n return (\r\n \r\n {addButton}\r\n {items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n \r\n {item.input}\r\n \r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Add Update Component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressForm - Address form.\r\n * @param param0.heading - Address heading.\r\n * @param param0.items - IAddressAddItem[].\r\n * @param param0.hasError - Boolean.\r\n * @param param0.error - Error message.\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns Address add update component node.\r\n */\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton,\r\n shipUsaOnlyMessageText,\r\n allowInternationalShipping\r\n}) => {\r\n return (\r\n \r\n {heading}\r\n {!allowInternationalShipping && renderDeliveryLimitationMessage(shipUsaOnlyMessageText)}\r\n {items.map((item: IAddressAddItem) => {\r\n const { AddressItem, key, label, alert, input } = item;\r\n // if the address item is the country input, do not render.\r\n if (!allowInternationalShipping) {\r\n if (key === 'ThreeLetterISORegionName') return <>;\r\n } else {\r\n // filter to only USA and Canada\r\n if (key === 'ThreeLetterISORegionName') {\r\n if (React.isValidElement(input)) {\r\n const filteredCountries = [\r\n { key: 'CAN', value: 'Canada' },\r\n { key: 'USA', value: 'United States' }\r\n ];\r\n const clonedInput = React.cloneElement(input, { ...input.props, displayData: filteredCountries });\r\n return (\r\n \r\n {label}\r\n {alert}\r\n {clonedInput}\r\n \r\n );\r\n }\r\n }\r\n }\r\n return (\r\n \r\n {label}\r\n {alert}\r\n {input}\r\n \r\n );\r\n })}\r\n {hasError && (\r\n \r\n {error.title}\r\n {error.message}\r\n \r\n )}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nconst renderDeliveryLimitationMessage = (shipUsaOnlyMessageText: string) => (\r\n
\r\n
\r\n \r\n {shipUsaOnlyMessageText}\r\n
\r\n
\r\n);\r\n\r\n/**\r\n * Checkout Shipping Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutShippingAddress Module.\r\n */\r\nconst CheckoutShippingAddressView: React.FC> = props => {\r\n const {\r\n CheckoutShippingAddress,\r\n checkoutErrorRef,\r\n alert,\r\n viewState,\r\n showAddress,\r\n showAddressSelect,\r\n showAddOrUpdateAddress,\r\n cartLineImages,\r\n resources,\r\n config\r\n } = props;\r\n\r\n return (\r\n \r\n {alert}\r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {viewState.isShowAddOrUpdateAddress && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\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 { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { IMediaGalleryThumbnailItemViewProps,\r\n IMediaGalleryThumbnailsViewProps,\r\n IMediaGalleryViewProps\r\n} from '@msdyn365-commerce-modules/media-gallery';\r\nimport { Button, KeyCodes, Module, Node, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React from 'react';\r\n\r\n/**\r\n * Render the thumbnail item images.\r\n * @param thumbnail - The carousel thumbnail line props.\r\n * @returns Return HTML having thumnailcontainer props with image.\r\n */\r\nconst renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\r\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\r\n\r\n return (\r\n \r\n {Picture}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Gets the thumbnail item to display media gallery images.\r\n * @param image - The media gallery images.\r\n * @param imageSettings - Image settings for the image gallery items.\r\n * @param imageId - Image id.\r\n * @param modifiedActiveIndex - Modified Index of the images when selection changes.\r\n * @param props - The Media gallery view props from business layer.\r\n * @returns Return thumbnail view props which will be used to render images.\r\n */\r\nconst GetThumbnailItemComponent = (\r\n image: IImageData,\r\n imageSettings: IImageSettings,\r\n imageId: number,\r\n modifiedActiveIndex: number,\r\n props: IMediaGalleryViewProps\r\n): IMediaGalleryThumbnailItemViewProps => {\r\n\r\n /**\r\n * OnClick method of media gallery item.\r\n * */\r\n const onClick = () => {\r\n props.callbackToggle?.();\r\n props.callbackThumbnailClick?.(imageId);\r\n props.state.activeIndex = imageId;\r\n };\r\n\r\n const classes = classnames(\r\n 'ms-media-gallery__thumbnail-item',\r\n modifiedActiveIndex === imageId ? 'ms-media-gallery__thumbnail-item-active' : ''\r\n );\r\n\r\n /**\r\n * Keydown event of media gallery item.\r\n * @param event - React.KeyboardEvent.\r\n * */\r\n const handleKeyDown = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === KeyCodes.Enter) {\r\n event.preventDefault();\r\n onClick();\r\n }\r\n };\r\n\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: classes,\r\n role: 'presentation',\r\n key: imageId\r\n },\r\n Picture: (\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 * Gets the empty thumbnail item to display media gallery images.\r\n * @param imageSettings - Image settings for the image gallery items.\r\n * @param props - The Media gallery view props from business layer.\r\n * @returns Return thumbnail view props which will be used to render empty images.\r\n */\r\nconst GetEmptyThumbnailItemComponent = (imageSettings: IImageSettings, props: IMediaGalleryViewProps): IMediaGalleryThumbnailItemViewProps => {\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: 'ms-media-gallery__thumbnail-item',\r\n role: 'tab',\r\n tabIndex: 0,\r\n key: 0,\r\n 'aria-label': '',\r\n 'aria-selected': true\r\n },\r\n Picture: (\r\n \r\n )\r\n };\r\n};\r\n\r\n/**\r\n * Update media gallery items method.\r\n * @param items - The media gallery thumbnail item view props.\r\n * @returns The IImageData array.\r\n */\r\nconst getMediaGalleryItems = (items?: IMediaGalleryThumbnailItemViewProps[]): IImageData[] | undefined => {\r\n return items?.map(item => {\r\n return {\r\n altText: item.Picture.props.altText,\r\n src: item.Picture.props.src\r\n };\r\n });\r\n};\r\n\r\nconst defaultThumbnailImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=295&h=295&q=80&m=6&f=jpg', w: 295, h: 295 },\r\n xl: { q: 'w=295&h=295&q=80&m=6&f=jpg', w: 295, h: 295 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n};\r\n\r\n/**\r\n * Render the Media gallery thumbnails to represent images in grid view.\r\n * @param thumbnails - The thumbnail view props.\r\n * @param props - The media gallery view props.\r\n * @returns - The single slide carousel component to render as media gallery image.\r\n */\r\nconst renderThumbnails = (\r\n thumbnails: IMediaGalleryThumbnailsViewProps,\r\n props: IMediaGalleryViewProps\r\n): JSX.Element => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\r\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps } = thumbnails;\r\n const { state, Thumbnails } = props;\r\n const mediaGalleryItems = getMediaGalleryItems(Thumbnails.items);\r\n\r\n const items: IMediaGalleryThumbnailItemViewProps[] | undefined =\r\n // eslint-disable-next-line multiline-ternary -- need multiline for easy code reading\r\n state.lastUpdate && mediaGalleryItems && mediaGalleryItems[0].src === 'empty' ? [GetEmptyThumbnailItemComponent(defaultThumbnailImageSettings, props)] :\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery\r\n mediaGalleryItems?.map((item: IImageData, id: number) => GetThumbnailItemComponent(item,\r\n defaultThumbnailImageSettings, id, state.activeIndex, props));\r\n\r\n return (\r\n \r\n \r\n {items?.map(renderThumbnailItem)}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render the Media gallery items using viewprops.\r\n * @param props - The media gallery view props.\r\n * @returns The media gallery module wrapping up images node.\r\n */\r\nconst mediaGalleryView: React.FC = props => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\r\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\r\n return (\r\n \r\n \r\n {Modal}\r\n {renderThumbnails(Thumbnails, props)}\r\n \r\n );\r\n};\r\n\r\nexport default mediaGalleryView;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-add';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-select';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-show';\r\nimport { ICheckoutShippingAddressViewProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/./checkout-shipping-address';\r\nimport GetProductEligibilityAction, {\r\n GetProductEligibilityInput\r\n} from \"../../../actions/get-product-eligibility.action\";\r\nimport { CommercePropertyValueEnum } from \"../../../modules/allowable-freight/utils/CommercePropertyValueEnum\";\r\nimport { CommerceProperty } from \"@msdyn365-commerce/retail-proxy\";\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({\r\n AddressDetail,\r\n items\r\n}) => {\r\n\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return (\r\n <>\r\n {item.description}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Select Component.\r\n * @param param0 - Root param.\r\n * @param param0.SelectAddress - Select address.\r\n * @param param0.addButton - Add button.\r\n * @param param0.items - IAddressSelectItem[].\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns - SelectAddress Node.\r\n */\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {addButton}\r\n {items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n {item.input}\r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Add Update Component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressForm - Address form.\r\n * @param param0.heading - Address heading.\r\n * @param param0.items - IAddressAddItem[].\r\n * @param param0.hasError - Boolean.\r\n * @param param0.error - Error message.\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns Address add update component node.\r\n */\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {heading}\r\n {items.map((item: IAddressAddItem) => {\r\n const { AddressItem, key, label, alert, input } = item;\r\n return (\r\n {label}\r\n {alert}\r\n {input}\r\n );\r\n })}\r\n {hasError && \r\n {error.title}\r\n {error.message}\r\n }\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Checkout Shipping Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutShippingAddress Module.\r\n */\r\nconst CheckoutShippingAddressView: React.FC = props => {\r\n const { CheckoutShippingAddress, viewState, showAddress, showAddressSelect, showAddOrUpdateAddress, cartLineImages } = props;\r\n const address = props.data.checkout.result?.shippingAddress;\r\n const [ nonEligibleItems, setnonEligibleItems ] = React.useState([]);\r\n React.useEffect(() => {\r\n void checkEligibilityForShippingAddress();\r\n }, [address])\r\n React.useEffect(() => {\r\n props.moduleState.setHasError(true);\r\n }, [])\r\n\r\n const _getExtensionPropertyValueByKey = (\r\n properties: CommerceProperty[] | undefined,\r\n key: string,\r\n valueType: CommercePropertyValueEnum\r\n ) => {\r\n const property = properties?.find(p => p.Key === key)?.Value;\r\n\r\n // eslint-disable-next-line security/detect-object-injection\r\n const val = property ? property[valueType] : null;\r\n return val;\r\n };\r\n\r\n\r\n const checkEligibilityForShippingAddress = async () => {\r\n const notEligibleList: string[] = [];\r\n const cart = props.data.checkout.result?.checkoutCart?.cart;\r\n if (cart && address) {\r\n const itemIds = cart.CartLines?.map(cl => cl.ItemId!) || [];\r\n const addressCountry = address.ThreeLetterISORegionName || null;\r\n const addressState = address.State || null;\r\n const addressRegion = address.County || null;\r\n const input = new GetProductEligibilityInput(itemIds, true, cart.Id || '', addressCountry, addressState, addressRegion);\r\n const eligibilityData = await GetProductEligibilityAction(input, props.context.actionContext);\r\n if (eligibilityData.length) {\r\n eligibilityData.forEach((i: any) => {\r\n const id = _getExtensionPropertyValueByKey(i.ExtensionProperties, 'ItemId', CommercePropertyValueEnum.string);\r\n if (!i.IsEligible) {\r\n notEligibleList.push(id as string);\r\n }\r\n });\r\n }\r\n }\r\n setnonEligibleItems(notEligibleList);\r\n props.moduleState.setHasError(notEligibleList.length > 0);\r\n }\r\n\r\n const renderCartError = () => {\r\n if (!nonEligibleItems.length) {\r\n return null;\r\n }\r\n return (\r\n
\r\n

\r\n The following items are not eligible for your current shipping address. Please remove them from the cart or change your address:\r\n

\r\n {nonEligibleItems.map(i => {\r\n const item = getCartLineFromItemId(i);\r\n return

{item?.ItemId} - {item?.Description}

\r\n })}\r\n \r\n
\r\n )\r\n }\r\n\r\n const removeIneligibleItems = async () => {\r\n const cartState = props.data.cart.result;\r\n const checkoutState = props.data.checkout.result;\r\n const badCartLines: string[] = [];\r\n cartState!.cart.CartLines!.forEach(cl => {\r\n if (nonEligibleItems.includes(cl.ItemId!)) {\r\n badCartLines.push(cl.LineId!);\r\n }\r\n })\r\n await checkoutState!.checkoutCart.removeCartLines({cartLineIds: badCartLines});\r\n await cartState!.removeCartLines({cartLineIds: badCartLines});\r\n window.location.reload();\r\n }\r\n\r\n const getCartLineFromItemId = (itemId: string) => props.data.checkout.result?.checkoutCart.cart.CartLines?.find(i => i.ItemId === itemId)\r\n return (\r\n \r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {viewState.isShowAddOrUpdateAddress && }\r\n {renderCartError()}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\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 { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { IMediaGalleryThumbnailItemViewProps,\r\n IMediaGalleryThumbnailsViewProps,\r\n IMediaGalleryViewProps\r\n} from '@msdyn365-commerce-modules/media-gallery';\r\nimport { Button, KeyCodes, Module, Node, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React from 'react';\r\n\r\n/**\r\n * Render the thumbnail item images.\r\n * @param thumbnail - The carousel thumbnail line props.\r\n * @returns Return HTML having thumnailcontainer props with image.\r\n */\r\nconst renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\r\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\r\n\r\n return (\r\n \r\n {Picture}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Gets the thumbnail item to display media gallery images.\r\n * @param image - The media gallery images.\r\n * @param imageSettings - Image settings for the image gallery items.\r\n * @param imageId - Image id.\r\n * @param modifiedActiveIndex - Modified Index of the images when selection changes.\r\n * @param props - The Media gallery view props from business layer.\r\n * @returns Return thumbnail view props which will be used to render images.\r\n */\r\nconst GetThumbnailItemComponent = (\r\n image: IImageData,\r\n imageSettings: IImageSettings,\r\n imageId: number,\r\n modifiedActiveIndex: number,\r\n props: IMediaGalleryViewProps\r\n): IMediaGalleryThumbnailItemViewProps => {\r\n\r\n /**\r\n * OnClick method of media gallery item.\r\n * */\r\n const onClick = () => {\r\n props.callbackToggle?.();\r\n props.callbackThumbnailClick?.(imageId);\r\n props.state.activeIndex = imageId;\r\n };\r\n\r\n const classes = classnames(\r\n 'ms-media-gallery__thumbnail-item',\r\n modifiedActiveIndex === imageId ? 'ms-media-gallery__thumbnail-item-active' : ''\r\n );\r\n\r\n /**\r\n * Keydown event of media gallery item.\r\n * @param event - React.KeyboardEvent.\r\n * */\r\n const handleKeyDown = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === KeyCodes.Enter) {\r\n event.preventDefault();\r\n onClick();\r\n }\r\n };\r\n\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: classes,\r\n role: 'presentation',\r\n key: imageId\r\n },\r\n Picture: (\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 * Gets the empty thumbnail item to display media gallery images.\r\n * @param imageSettings - Image settings for the image gallery items.\r\n * @param props - The Media gallery view props from business layer.\r\n * @returns Return thumbnail view props which will be used to render empty images.\r\n */\r\nconst GetEmptyThumbnailItemComponent = (imageSettings: IImageSettings, props: IMediaGalleryViewProps): IMediaGalleryThumbnailItemViewProps => {\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: 'ms-media-gallery__thumbnail-item',\r\n role: 'tab',\r\n tabIndex: 0,\r\n key: 0,\r\n 'aria-label': '',\r\n 'aria-selected': true\r\n },\r\n Picture: (\r\n \r\n )\r\n };\r\n};\r\n\r\n/**\r\n * Update media gallery items method.\r\n * @param items - The media gallery thumbnail item view props.\r\n * @returns The IImageData array.\r\n */\r\nconst getMediaGalleryItems = (items?: IMediaGalleryThumbnailItemViewProps[]): IImageData[] | undefined => {\r\n return items?.map(item => {\r\n return {\r\n altText: item.Picture.props.altText,\r\n src: item.Picture.props.src\r\n };\r\n });\r\n};\r\n\r\nconst defaultThumbnailImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=295&h=295&q=80&m=6&f=jpg', w: 295, h: 295 },\r\n xl: { q: 'w=295&h=295&q=80&m=6&f=jpg', w: 295, h: 295 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n};\r\n\r\n/**\r\n * Render the Media gallery thumbnails to represent images in grid view.\r\n * @param thumbnails - The thumbnail view props.\r\n * @param props - The media gallery view props.\r\n * @returns - The single slide carousel component to render as media gallery image.\r\n */\r\nconst renderThumbnails = (\r\n thumbnails: IMediaGalleryThumbnailsViewProps,\r\n props: IMediaGalleryViewProps\r\n): JSX.Element => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\r\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps } = thumbnails;\r\n const { state, Thumbnails } = props;\r\n const mediaGalleryItems = getMediaGalleryItems(Thumbnails.items);\r\n\r\n const items: IMediaGalleryThumbnailItemViewProps[] | undefined =\r\n // eslint-disable-next-line multiline-ternary -- need multiline for easy code reading\r\n state.lastUpdate && mediaGalleryItems && mediaGalleryItems[0].src === 'empty' ? [GetEmptyThumbnailItemComponent(defaultThumbnailImageSettings, props)] :\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery\r\n mediaGalleryItems?.map((item: IImageData, id: number) => GetThumbnailItemComponent(item,\r\n defaultThumbnailImageSettings, id, state.activeIndex, props));\r\n\r\n return (\r\n \r\n \r\n {items?.map(renderThumbnailItem)}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render the Media gallery items using viewprops.\r\n * @param props - The media gallery view props.\r\n * @returns The media gallery module wrapping up images node.\r\n */\r\nconst mediaGalleryView: React.FC = props => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\r\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\r\n return (\r\n \r\n \r\n {Modal}\r\n {renderThumbnails(Thumbnails, props)}\r\n \r\n );\r\n};\r\n\r\nexport default mediaGalleryView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\n\nexport const SignUpText: React.FC<{ text: string }> = (props: { text: string }) => {\n return

{props.text}

;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { SignUpText } from './components/loyalty-sign-up-small-components';\nimport { ILoyaltySignUpData } from './loyalty-sign-up.data';\nimport { ILoyaltySignUpProps } from './loyalty-sign-up.props.autogenerated';\n\nexport interface IAccountLoyaltyJoinState {\n clicked: boolean;\n}\nexport interface ILoyaltySignUpViewProps extends ILoyaltySignUpProps {\n LoyaltySignUp: IModuleProps;\n heading: React.ReactNode;\n memberHeading: React.ReactNode;\n signInLink: React.ReactElement;\n signUpText: React.ReactElement;\n signUpButton: React.ReactElement;\n detailsLink: React.ReactElement;\n termsLink: React.ReactElement;\n loading: boolean;\n infoMessageBar?: React.ReactNode;\n}\n\n/**\n *\n * LoyaltySignUp component.\n * @extends {React.Component>}\n */\n@observer\nclass LoyaltySignUp extends React.Component, IAccountLoyaltyJoinState> {\n private readonly telemetryContent?: ITelemetryContent;\n private readonly loyaltySignInAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltySignUpAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltyDetailsLinkAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltyTermsLinkAttributes: Msdyn365.IDictionary | undefined;\n\n constructor(props: ILoyaltySignUpProps) {\n super(props);\n this.state = { clicked: false };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n this.loyaltySignInAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.SignUp;\n this.loyaltySignUpAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyDetailLink;\n this.loyaltyDetailsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsLink;\n this.loyaltyTermsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltySignUpProps, nextState: IAccountLoyaltyJoinState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, heading, memberHeading },\n resources,\n context: {\n actionContext,\n request: {\n user: { signInUrl, isAuthenticated }\n }\n },\n data\n } = this.props;\n\n const termsUrl = Msdyn365.getUrlSync('loyaltyTerms', actionContext);\n let loyaltyJoinUrl = `${Msdyn365.getUrlSync('loyaltyJoin', actionContext)}?joiningLoyalty=true`;\n if (MsDyn365.isBrowser) {\n loyaltyJoinUrl = `${window.location.origin}${loyaltyJoinUrl}`;\n }\n const signInurl = `${signInUrl}?ru=${loyaltyJoinUrl}`;\n const completeClass = classname('ms-loyalty-signup', className);\n const loyaltyCard = data.loyaltyCard;\n const hasLoyaltyAccount = loyaltyCard.result && loyaltyCard.result.CardTenderTypeValue !== undefined;\n const customerInformation = data.customerInformation?.result;\n\n const invalidAsyncCustomerState: boolean =\n (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (customerInformation?.IsAsyncCustomer || false);\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltySignUp: {\n moduleProps: this.props,\n className: completeClass\n },\n infoMessageBar: invalidAsyncCustomerState && (\n \n ),\n loading: !this.props.context.request.params.isEditor && loyaltyCard?.status === 'LOADING',\n heading: !hasLoyaltyAccount && heading && heading.text && (\n \n ),\n memberHeading: hasLoyaltyAccount && memberHeading && memberHeading.text && (\n \n ),\n signInLink: !isAuthenticated && (\n \n ),\n signUpText: !hasLoyaltyAccount && ,\n signUpButton: !hasLoyaltyAccount && isAuthenticated && (\n \n {this.props.resources.joinLoyaltyButtonText}\n \n ),\n detailsLink: hasLoyaltyAccount && (\n \n {this.props.resources.viewLoyaltyPageText}\n \n ),\n termsLink: !hasLoyaltyAccount && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public handleMemberHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.memberHeading!.text = event.target.value);\n\n private readonly _issueLoyalty = () => {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(() => {\n if (MsDyn365.isBrowser) {\n window.location.assign(Msdyn365.getUrlSync('loyalty', this.props.context.actionContext) || '');\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n };\n}\n\nexport default LoyaltySignUp;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILoyaltySignUpViewProps } from './loyalty-sign-up';\n\nconst LoyaltySignUpView: React.FC = props => {\n const {\n LoyaltySignUp,\n heading,\n memberHeading,\n signInLink,\n signUpText,\n signUpButton,\n detailsLink,\n termsLink,\n loading,\n infoMessageBar\n } = props;\n\n if (loading) {\n props.context.telemetry.error('LoyaltySignUp data is empty, module wont render');\n return null;\n }\n\n return (\n \n {infoMessageBar}\n {memberHeading}\n {heading}\n {detailsLink}\n {signUpText}\n {termsLink}\n {signUpButton}\n {signInLink}\n \n );\n};\n\nexport default LoyaltySignUpView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ILoyaltyTermsModalProps {\n resources: ILoyaltyTermsModalResources;\n returnRef: React.RefObject | undefined;\n checked: boolean;\n isOpen: boolean;\n terms: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n onToggle(): void;\n onSubmit(): void;\n onCheck(): void;\n}\n\nexport interface ILoyaltyTermsModalResources {\n loyaltyTermsHeading: string;\n loyaltyAgreeToTerms: string;\n joinLoyaltyTermsText: string;\n cancelLoyaltyTermsText: string;\n}\n\nexport interface ILoyaltyTermsModalViewProps {\n modal: INodeProps;\n modalHeader: INodeProps;\n modalFooter: INodeProps;\n modalBody: INodeProps;\n heading: React.ReactElement;\n cancelButton: React.ReactElement;\n submitButton: React.ReactElement;\n terms: React.ReactNode;\n checkbox: React.ReactElement;\n agreeText: React.ReactElement;\n agreeSection: INodeProps;\n}\n\nexport const LoyaltyTermsModal = (props: ILoyaltyTermsModalProps): ILoyaltyTermsModalViewProps => {\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.LoyaltyTermsCancel);\n const loyaltyTermCancelAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsSubmit;\n const loyaltyTermSubmitAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsAgree;\n const loyaltyTermCheckboxAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return {\n modal: {\n tag: Modal,\n className: 'ms-loyalty-terms__modal',\n toggle: props.onToggle,\n applicationNode: 'renderPage',\n isOpen: props.isOpen,\n returnFocusRef: props.returnRef\n },\n modalHeader: { tag: ModalHeader, className: 'ms-loyalty-terms__modal-header', toggle: props.onToggle },\n modalFooter: { tag: ModalFooter, className: 'ms-loyalty-terms__modal-footer' },\n modalBody: { tag: ModalBody, className: 'ms-loyalty-terms__modal-body' },\n cancelButton: (\n \n ),\n submitButton: (\n \n {props.resources.joinLoyaltyTermsText}\n \n ),\n heading:

{props.resources.loyaltyTermsHeading}

,\n terms: props.terms,\n agreeSection: { className: 'ms-loyalty-terms__agree-section' },\n checkbox: (\n \n ),\n agreeText:

{props.resources.loyaltyAgreeToTerms}

\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { getLoyaltyCardAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { GetLoyaltyCardInput, issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport * as React from 'react';\n\nimport { ILoyaltyTermsModalViewProps, LoyaltyTermsModal } from './components/loyalty-terms-modal';\nimport { ILoyaltyTermsData } from './loyalty-terms.data';\nimport { ILoyaltyTermsProps } from './loyalty-terms.props.autogenerated';\n\nexport interface ILoyaltyTermsState {\n checked: boolean;\n clicked: boolean;\n isModalOpen: boolean;\n}\nexport interface ILoyaltyTermsViewProps extends ILoyaltyTermsProps {\n LoyaltyTerms: IModuleProps;\n modalToggle: React.ReactElement;\n modal: ILoyaltyTermsModalViewProps;\n loading: boolean;\n}\n\n/**\n *\n * LoyaltyTerms component.\n * @extends {React.Component>}\n */\nclass LoyaltyTerms extends React.Component, ILoyaltyTermsState> {\n private readonly toggleRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: ILoyaltyTermsProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this._submit = this._submit.bind(this);\n this._checkboxChecked = this._checkboxChecked.bind(this);\n this.toggleRef = React.createRef();\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n let search = this.props.context.request.url.requestUrl.search;\n let isJoining = false;\n if (search) {\n search = search.substring(1);\n const qsps = search.split('&');\n for (const qsp of qsps) {\n const splitQsp = qsp.split('=');\n isJoining = splitQsp[0] === 'joiningLoyalty' && splitQsp[1] === 'true';\n if (isJoining) {\n break;\n }\n }\n }\n\n this.state = {\n isModalOpen: isJoining,\n checked: false,\n clicked: false\n };\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltyTermsProps, nextState: ILoyaltyTermsState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, hideToggle },\n resources,\n slots: { serviceTerms },\n data: { loyaltyCard },\n context: {\n request: {\n user: { isAuthenticated }\n }\n }\n } = this.props;\n const completeClass = classname('ms-loyalty-terms', className);\n\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltyTerms: {\n moduleProps: this.props,\n className: completeClass\n },\n loading: loyaltyCard.status === 'LOADING',\n modalToggle: hideToggle !== true && (\n \n ),\n modal:\n isAuthenticated &&\n loyaltyCard.result &&\n loyaltyCard.result.CardNumber === undefined &&\n LoyaltyTermsModal({\n resources: { ...resources },\n returnRef: this.toggleRef,\n checked: this.state.checked,\n isOpen: this.state.isModalOpen,\n terms: serviceTerms,\n telemetryContent: this.telemetryContent,\n onToggle: this._toggle,\n onSubmit: this._submit,\n onCheck: this._checkboxChecked\n })\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _toggle(): void {\n this.setState({ isModalOpen: !this.state.isModalOpen, checked: false });\n }\n\n private _submit(): void {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(card => {\n if (this.props.config.redirectToLoyalty) {\n window.location.assign(getUrlSync('loyalty', this.props.context.actionContext) || '');\n } else {\n getLoyaltyCardAsync({ callerContext: this.props.context.actionContext }, card.CardNumber || '')\n .then(fullCard => {\n this.props.context.actionContext.update(\n new GetLoyaltyCardInput(this.props.context.request.apiSettings),\n fullCard\n );\n })\n .catch((error: Error) => {\n this.props.context.actionContext.update(\n new GetLoyaltyCardInput(this.props.context.request.apiSettings),\n card\n );\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to fetch loyalty card');\n });\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n }\n\n private _checkboxChecked(): void {\n this.setState({ checked: !this.state.checked });\n }\n}\n\nexport default LoyaltyTerms;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILoyaltyTermsViewProps } from './loyalty-terms';\n\nconst LoyaltyTermsView: React.FC = props => {\n const { LoyaltyTerms, modalToggle, modal, loading } = props;\n\n return !loading && modal ? (\n \n {modalToggle}\n \n {modal.heading}\n \n {modal.terms}\n \n {modal.checkbox}\n {modal.agreeText}\n \n \n \n {modal.submitButton}\n {modal.cancelButton}\n \n \n \n ) : null;\n};\n\nexport default LoyaltyTermsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport { isOboRequest } from '@msdyn365-commerce/core-internal';\nimport { IMsdyn365PvaChatConnectorData } from './msdyn365-pva-chat-connector.data';\nimport { IMsdyn365PvaChatConnectorConfig, IMsdyn365PvaChatConnectorProps } from './msdyn365-pva-chat-connector.props.autogenerated';\n\nexport interface IPvaChatConnectorViewProps extends IMsdyn365PvaChatConnectorProps {\n config: IMsdyn365PvaChatConnectorConfig;\n}\n\n/**\n * PvaChatConnector component\n * @extends {React.PureComponent>}\n */\nclass PvaChatConnector extends React.PureComponent> {\n // Loads CDN version of Botframework-Webchat library\n public componentDidMount(): void {\n if (isOboRequest(this.props.context.request)) {\n return;\n }\n\n const url = this.props.config.botFrameworkCDNURL || this.props.context.app.config.pvaChatConnectorBotFrameworkCDNURL;\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.crossOrigin = 'anonymous';\n document.body.appendChild(script);\n }\n\n public render(): JSX.Element | null {\n if (isOboRequest(this.props.context.request)) {\n return null;\n }\n\n return this.props.renderView(this.props);\n }\n}\n\nexport default PvaChatConnector;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProactiveChatTrigger } from '../../interfaces';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\n\n/**\n * ProactiveChatTrigger class - checks if Proactive Chat should be triggered, starts the chat and sets context\n */\nabstract class ProactiveChatTrigger implements IProactiveChatTrigger {\n public props: IPvaChatConnectorViewProps;\n public context: IChatContext;\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n this.props = props;\n this.context = context;\n }\n\n /**\n * Generates Chat Context with included properties related to Proactive Chat\n * @returns TContextProvider - Chat Context\n */\n public abstract getContextProvider(): TContextProvider;\n\n /**\n * Generates chat welcome message to be used if Proactive Chat is triggered\n * @returns string - chat welcome message\n */\n public abstract getMessage(): string;\n\n /**\n * Validate specific trigger conditions if Proactive Chat should be initiated\n * @returns boolean (TRUE if Proactive Chat should be triggered)\n */\n public abstract validate(): Promise;\n}\n\nexport default ProactiveChatTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartAmountTrigger class - proactive chat is triggered if cArt amount is in preset boundaries (config.proactiveOnCartAmountMin, config.proactiveOnCartAmountMax)\n */\nclass CartAmountTrigger extends ProactiveChatTrigger {\n private min?: number;\n private max?: number;\n private totalInCart: number = 0;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.min = this.props.config.proactiveOnCartAmountMin;\n this.max = this.props.config.proactiveOnCartAmountMax;\n this.props.context.telemetry.debug(\n `[Chat][${CartAmountTrigger.name}] Cart amount proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\n );\n }\n\n public async validate(): Promise {\n const cart = await this._getCart();\n if (cart.isEmpty) {\n this.props.context.telemetry.debug(`[Chat][${CartAmountTrigger.name}] Cart was empty. Validation returning 'false'.`);\n return false;\n }\n\n this.totalInCart = cart.cart.TotalAmount || 0;\n let retVal = false;\n if (this.min) {\n if (this.max) {\n retVal = this.min <= this.totalInCart && this.totalInCart <= this.max;\n } else {\n retVal = this.min <= this.totalInCart;\n }\n } else {\n if (this.max) {\n retVal = this.totalInCart <= this.max;\n } else {\n retVal = false;\n }\n }\n this.props.context.telemetry.debug(\n `[Chat][${CartAmountTrigger.name}] Validation result: '${retVal}'; Cart total: '${this.totalInCart}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Amount',\n eCommerceCustProactiveShoppingCartAmount: `${this.totalInCart}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartAmountMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartAmountTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartNumberOfItemsTrigger class - proactive chat is triggered if Cart Number of Items is in preset boundaries (config.proactiveOnCartNoOfItemsMin, config.proactiveOnCartNoOfItemsMax)\n */\nclass CartNumberOfItemsTrigger extends ProactiveChatTrigger {\n private min?: number;\n private max?: number;\n private numberOfItems: number = 0;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.min = this.props.config.proactiveOnCartNoOfItemsMin;\n this.max = this.props.config.proactiveOnCartNoOfItemsMax;\n\n this.props.context.telemetry.debug(\n `[${CartNumberOfItemsTrigger.name}] Cart number of items proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\n );\n }\n\n public async validate(): Promise {\n const cart = await this._getCart();\n if (cart.isEmpty) {\n this.props.context.telemetry.debug(`[Chat][${CartNumberOfItemsTrigger.name}] Cart was empty. Validation returning 'false'.`);\n return false;\n }\n\n this.numberOfItems = cart.cart.TotalItems || 0;\n\n let retVal = false;\n if (this.min) {\n if (this.max) {\n retVal = this.min <= this.numberOfItems && this.numberOfItems <= this.max;\n } else {\n retVal = this.min <= this.numberOfItems;\n }\n } else {\n if (this.max) {\n retVal = this.numberOfItems <= this.max;\n } else {\n retVal = false;\n }\n }\n this.props.context.telemetry.debug(\n `[${CartNumberOfItemsTrigger.name}] Validation result: '${retVal}'; Number of items in cart: '${this.numberOfItems}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Number of Items',\n eCommerceCustProactiveShoppingCartNumberOfItems: `${this.numberOfItems}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartNoOfItemsMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartNumberOfItemsTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartSpecificProductTrigger class - proactive chat is triggered if a Product in the Cart is in preset list of products (config.proactiveOnCartSpecificProductList)\n */\nclass CartSpecificProductTrigger extends ProactiveChatTrigger {\n private product: string = '';\n\n public async validate(): Promise {\n let isValid = false;\n const cart = await this._getCart();\n if (!cart.isEmpty) {\n if (cart.cart.CartLines) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Number of cart line items was '${cart.cart.CartLines?.length}'`\n );\n for (let i = 0; i < cart.cart.CartLines?.length; i++) {\n if (cart.cart.CartLines[i]) {\n if (this.props.config.proactiveOnCartSpecificProductList) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Number of cart specific products was configured for proactive chat was '${this.props.config.proactiveOnCartSpecificProductList?.length}'`\n );\n // Find first item, from user-defined list of products, that matches the cart lines' itemId in the cart.\n for (let j = 0; j < (this.props.config.proactiveOnCartSpecificProductList?.length || 0); j++) {\n if (\n this.props.config.proactiveOnCartSpecificProductList &&\n cart.cart.CartLines[i].ItemId &&\n this.props.config.proactiveOnCartSpecificProductList[j] === cart.cart.CartLines[i].ItemId\n ) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Matched cart line item ID '${cart.cart.CartLines[i].ItemId}' against user-defined list of specific products for proactive chat.`\n );\n isValid = true;\n break;\n }\n }\n }\n } else {\n // Rest of the CartLines are undefined\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart did not contain any cart lines.`);\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart was empty.`);\n }\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Specific Product',\n eCommerceCustProactiveShoppingCartSpecificProduct: `${this.product}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartSpecificProductMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartSpecificProductTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport enum ProactiveChatNames {\n DateRange = 'Date Range',\n FromSpecificPage = 'From Specific Page',\n PageVisits = 'Page Visits',\n SpecificLocation = 'Specific Location',\n SpecificPage = 'Specific Page',\n WaitOnTime = 'Wait On Time'\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * DateRangeTrigger class - proactive chat is triggered if current date is in preset date boundaries (config.proactiveOnDateRangeStart, config.proactiveOnDateRangeEnd)\n */\nclass DateRangeTrigger extends ProactiveChatTrigger {\n private start?: Date;\n private end?: Date;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.start = this._toDate(this.props.config.proactiveOnDateRangeStart);\n this.end = this._toDate(this.props.config.proactiveOnDateRangeEnd);\n\n this.props.context.telemetry.debug(\n `[${DateRangeTrigger.name}] Proactive chat initialized with startDate: '${this.start}'; max: '${this.end}'.`\n );\n }\n\n public async validate(): Promise {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n\n let retVal = false;\n if (this.start) {\n if (this.end) {\n retVal = this.start.getTime() <= now.getTime() && now.getTime() <= this.end.getTime();\n } else {\n retVal = this.start.getTime() <= now.getTime();\n }\n } else if (this.end) {\n retVal = now.getTime() <= this.end.getTime();\n }\n\n this.props.context.telemetry.debug(\n `[${DateRangeTrigger.name}] Validation result: '${retVal}'; Current date used to compare: '${now}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.DateRange,\n eCommerceCustProactiveFromDate: this.start ? this.start.toUTCString() : '',\n eCommerceCustProactiveToDate: this.end ? this.end.toUTCString() : ''\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnDateRangeMessage || this.props.config.proactiveDefaultMessage;\n }\n\n /**\n * Converts string(us-en) to date\n * @param date string (mm/dd/yyyy)\n * @returns Date or undefined\n */\n private _toDate(date?: string): Date | undefined {\n if (date) {\n const dateParts = date.split('/');\n return new Date(+dateParts[2], +dateParts[1] - 1, +dateParts[0]);\n } else {\n return undefined;\n }\n }\n}\n\nexport default DateRangeTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * FromSpecificPageTrigger class - proactive chat is triggered if user has come from specific page (the one listed in config.proactiveOnFromSpecificPageList)\n */\nclass FromSpecificPageTrigger extends ProactiveChatTrigger {\n public async validate(): Promise {\n let isValid = false;\n if (this.props.config.proactiveOnFromSpecificPageList) {\n this.props.context.telemetry.debug(\n `[${FromSpecificPageTrigger.name}] Number of items in user-defined list of 'From Specific Page' was '${this.props.config.proactiveOnFromSpecificPageList?.length}'.`\n );\n for (let i = 0; i < (this.props.config.proactiveOnFromSpecificPageList?.length || 0); i++) {\n const fromSpecificPageTrimmed: string = this.props.config.proactiveOnFromSpecificPageList[i].trim();\n this.props.context.telemetry.debug(\n `[Chat][${FromSpecificPageTrigger.name}] Current page URL: '${window.document.referrer}'.`\n );\n this.props.context.telemetry.debug(\n `[${FromSpecificPageTrigger.name}] Current item from user-defined list of 'From Specific Page': '${fromSpecificPageTrimmed}'.`\n );\n\n if (window.document.referrer.indexOf(fromSpecificPageTrimmed) > -1) {\n isValid = true;\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(\n `[Chat][${FromSpecificPageTrigger.name}] User-defined 'From Specific Page' list was undefined.`\n );\n }\n this.props.context.telemetry.debug(`[Chat][${FromSpecificPageTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.FromSpecificPage,\n eCommerceCustProactiveCameFromPage: window.document.referrer\n };\n };\n }\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnFromSpecificPageMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default FromSpecificPageTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICookieContext } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/ICookieContext';\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * PageVisitTrigger class - proactive chat is triggered if user has visited current page for (config.proactiveOnPageVisitNumber) or more times\n */\nclass PageVisitTrigger extends ProactiveChatTrigger {\n public visits: number = 0;\n private cookieName: string = 'TimesPageVisited';\n private expdate: Date;\n private cookies: ICookieContext;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.cookies = this.props.context.request.cookies;\n this.expdate = new Date();\n // Set expiry date to 365 days.\n this.expdate.setTime(this.expdate.getTime() + 24 * 60 * 60 * 1000 * 365);\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie expiry date set to: '${this.expdate}'.`);\n\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie context is given: '${this.cookies.isConsentGiven()}'.`);\n if (this.cookies.isConsentGiven()) {\n this.cookies.setConsentCookie();\n }\n\n this._updateVisitCounter();\n }\n\n public async validate(): Promise {\n let retVal: boolean = false;\n\n if (this.props.config.proactiveOnPageVisitNumber) {\n retVal = this.visits >= this.props.config.proactiveOnPageVisitNumber;\n }\n\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Validation result: '${retVal}'.`);\n return retVal;\n }\n\n public clear(): void {\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Clearing cookie for page visit counter.`);\n this.cookies.set(this.cookieName, 0, {\n domain: window.location.hostname,\n path: window.location.pathname,\n expires: this.expdate\n });\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.PageVisits,\n eCommerceCustProactiveNumberOfVisits: `${this.visits}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnPageVisitMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private _updateVisitCounter(): void {\n this.visits = this.cookies.get(this.cookieName).value || 0;\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter BEFORE update: '${this.visits}.`);\n ++this.visits;\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter AFTER update: '${this.visits}.`);\n\n this.cookies.set(this.cookieName, this.visits, {\n domain: window.location.hostname,\n path: window.location.pathname,\n expires: this.expdate\n });\n }\n}\n\nexport default PageVisitTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IExtendedRequest } from '../../interfaces';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * SpecificPageTrigger class - proactive chat is triggered if user geographically uses the website from specific country/regions(config.proactiveOnSpecificCountryRegionCountry)\n */\nclass SpecificCountryRegionTrigger extends ProactiveChatTrigger {\n private customerCountryCode: string;\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.customerCountryCode = (this.props.context.request).suggestedMarket || 'n/a';\n this.props.context.telemetry.debug(\n `[${SpecificCountryRegionTrigger.name}] Customer country code set to: '${this.customerCountryCode}.'`\n );\n }\n\n public async validate(): Promise {\n const retVal: boolean = this.props.config.proactiveOnSpecificLocation\n ? this.props.config.proactiveOnSpecificLocation.toLowerCase().indexOf(this.customerCountryCode.toLowerCase()) > -1\n : false;\n this.props.context.telemetry.debug(`[Chat][${SpecificCountryRegionTrigger.name}] Validation returning '${retVal}'.`);\n return retVal;\n }\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveCountryCode: this.props.config.proactiveOnSpecificLocation || '',\n eCommerceCustProactiveType: ProactiveChatNames.SpecificLocation\n };\n };\n }\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnSpecificCountryRegionMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default SpecificCountryRegionTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * SpecificPageTrigger class - proactive chat is triggered if current page is listed in config.proactiveOnSpecificPageList\n */\nclass SpecificPageTrigger extends ProactiveChatTrigger {\n public async validate(): Promise {\n let isValid = false;\n if (this.props.config.proactiveOnSpecificPageList) {\n this.props.context.telemetry.debug(\n `[${SpecificPageTrigger.name}] Number of items in user-defined list of 'Specific Pages' was '${this.props.config.proactiveOnSpecificPageList?.length}'.`\n );\n for (let i = 0; i < (this.props.config.proactiveOnSpecificPageList?.length || 0); i++) {\n const specificPageTrimmed: string = this.props.config.proactiveOnSpecificPageList[i].trim();\n this.props.context.telemetry.debug(`[] Current location URL: ${window.location.href}.`);\n this.props.context.telemetry.debug(`[] Current item from user-defined list of 'Specific Page': ${specificPageTrimmed}.`);\n if (window.location.href.indexOf(specificPageTrimmed) > -1) {\n isValid = true;\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] User-defined 'Specific Page' list was undefined.`);\n }\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.SpecificPage\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnSpecificPageMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default SpecificPageTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * WaitOnTimeTrigger - proactive chat is triggered if user stays on current page for more than (config.proactiveOnWaitTimeSeconds) seconds\n */\nclass WaitOnTimeTrigger extends ProactiveChatTrigger {\n private waitTimeInMilliseconds: number | undefined;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n if (this.props.config.proactiveOnWaitTimeSeconds && !isNaN(this.props.config.proactiveOnWaitTimeSeconds)) {\n this.waitTimeInMilliseconds = Number(this.props.config.proactiveOnWaitTimeSeconds) * 1000;\n this.props.context.telemetry.debug(\n `[Chat][${WaitOnTimeTrigger.name}] Wait time (ms) set to: '${this.waitTimeInMilliseconds}'.`\n );\n }\n }\n\n public async validate(): Promise {\n const retVal: boolean = this.waitTimeInMilliseconds !== undefined;\n this.props.context.telemetry.debug(`[Chat][${WaitOnTimeTrigger.name}] Validation returning '${retVal}'.`);\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n const triggerTime = Date.now() + (this.waitTimeInMilliseconds || 0);\n return () => {\n return triggerTime > Date.now()\n ? this.context\n : {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.WaitOnTime,\n eCommerceCustProactiveTimeOnPage: `${this.waitTimeInMilliseconds ? this.waitTimeInMilliseconds : 0}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnWaitTimeMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default WaitOnTimeTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport CartAmountTrigger from './triggers/cart-amount-trigger';\nimport CartNumberOfItemsTrigger from './triggers/cart-number-of-items-trigger';\nimport CartSpecificProductTrigger from './triggers/cart-specific-product-trigger';\nimport DateRangeTrigger from './triggers/date-range-trigger';\nimport FromSpecificPageTrigger from './triggers/from-specific-page-trigger';\nimport PageVisitTrigger from './triggers/page-visits-trigger';\nimport SpecificCountryRegionTrigger from './triggers/specific-CountryRegion-trigger';\nimport SpecificPageTrigger from './triggers/specific-page-trigger';\nimport WaitOnTimeTrigger from './triggers/wait-on-time-trigger';\n\ntype ProactiveChat =\n | typeof DateRangeTrigger\n | typeof SpecificPageTrigger\n | typeof FromSpecificPageTrigger\n | typeof PageVisitTrigger\n | typeof SpecificCountryRegionTrigger\n | typeof CartAmountTrigger\n | typeof CartNumberOfItemsTrigger\n | typeof CartSpecificProductTrigger\n | typeof WaitOnTimeTrigger;\n\n/**\n * List of Proactive Chat Validators in order of validation (first proactive chat that pass validation is triggered, the rest are ommited)\n */\nexport const ProactiveTriggers: ProactiveChat[] = [\n DateRangeTrigger,\n SpecificPageTrigger,\n FromSpecificPageTrigger,\n PageVisitTrigger,\n SpecificCountryRegionTrigger,\n CartAmountTrigger,\n CartNumberOfItemsTrigger,\n CartSpecificProductTrigger,\n WaitOnTimeTrigger\n];\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IRequestContextUser } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/IRequestContext';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ProactiveTriggers } from '../proactive';\nimport ProactiveChatTrigger from '../proactive/triggers/proactive-chat-trigger';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\nimport { IProactiveData } from './../interfaces';\nimport { IChatContext, TContextProvider } from '../../interfaces';\n\n/**\n *\n * ContextProvider class - generates chat context, and checks for proactive triggers\n */\nclass ContextProvider {\n public data: IProactiveData;\n public props: IPvaChatConnectorViewProps;\n private user: IRequestContextUser;\n private userId: string;\n private context: IChatContext;\n private provider: TContextProvider | undefined;\n\n constructor(props: IPvaChatConnectorViewProps) {\n this.props = props;\n this.user = this.props.context.request.user;\n this.userId = `dl_${uuidv4()}`;\n this.context = this._getContext();\n // Proactive Chat related data\n this.data = {\n enabled: false,\n timeout: this.props.config.proactiveOnWaitTimeSeconds || 0,\n message: this.props.config.proactiveDefaultMessage\n };\n }\n\n /**\n * Executes Proactive Chat validation\n * @returns TContextProvider - a function returning IChatContext object\n */\n public async init(): Promise {\n try {\n await this._proactiveCheck();\n } catch (e) {\n // Use ?debug=true to see telemetry\n // If previous block fails, chat will still be available (no need to display any errors to user)\n this.props.telemetry.exception(e);\n }\n return this.provider || this._getProvider();\n }\n\n /**\n * Returns TContextProvider - a function returning IChatContext object\n */\n private _getProvider(): TContextProvider {\n return () => {\n return {\n eCommerceOperatingUnitNumber: this.props.context.request.apiSettings.oun,\n eCommerceBaseUrl: this.props.context.request.apiSettings.baseUrl,\n eCommerceDataAreaId: this.props.context.request.channel?.InventLocationDataAreaId,\n UserId: this.userId,\n // eCommerceCust...\n AccountNumber: this.user.customerAccountNumber ? this.user.customerAccountNumber : 'N/A',\n Email: this.user.emailAddress ? this.user.emailAddress : 'N/A',\n FirstName: this.user.firstName ? this.user.firstName : this.props.config.anonymousUserName,\n LastName: this.user.lastName ? this.user.lastName : 'N/A',\n Name: this.user.name ? this.user.name : this.props.config.anonymousUserName,\n eCommerceCustPageURL: window.location.href,\n eCommerceCustChatType: 'pva',\n // Proactive chat\n eCommerceCustIsProactiveChat: 'False',\n eCommerceCustProactiveType: 'N/A',\n // Date Range\n eCommerceCustProactiveFromDate: 'N/A',\n eCommerceCustProactiveToDate: 'N/A',\n // From Specific Page\n eCommerceCustProactiveCameFromPage: 'N/A',\n // No. Page Visits\n eCommerceCustProactiveNumberOfVisits: 'N/A',\n // Specific CountryRegion\n eCommerceCustProactiveCountryCode: 'N/A',\n // Specific Page => eCommerceCustPageURL\n // eCommerceCustProactiveSpecificPage: 'N/A',\n // Wait On Time\n eCommerceCustProactiveTimeOnPage: 'N/A',\n // Shopping cart amount\n eCommerceCustProactiveShoppingCartAmount: 'N/A',\n // Shopping cart number of items\n eCommerceCustProactiveShoppingCartNumberOfItems: 'N/A',\n // Shopping cart specific product\n eCommerceCustProactiveShoppingCartSpecificProduct: 'N/A'\n };\n };\n }\n\n /**\n * Returns default IChatContext object\n */\n private _getContext(): IChatContext {\n return this._getProvider()();\n }\n\n /**\n * Validates proactive triggers to check if proactive chat should be initialized\n */\n private async _proactiveCheck(): Promise {\n if (this.props.config.proactiveChatEnabled) {\n for (let i = 0; i < ProactiveTriggers.length; i++) {\n const proactive = new ProactiveTriggers[i](this.props, this.context);\n // Only first detected proactive trigger gets executed\n if (await this._isProactive(proactive)) {\n this.props.context.telemetry.debug(`First detected proactive trigger to be executed: ${proactive}`);\n break;\n }\n }\n }\n }\n\n /**\n * Validates if proactive chat should be triggered for given ProactiveTrigger\n * @param proactive ProactiveChatTrigger\n * @returns boolean\n */\n private async _isProactive(proactive: ProactiveChatTrigger): Promise {\n this.data.enabled = await proactive.validate();\n if (this.data.enabled) {\n this.provider = proactive.getContextProvider();\n this.data.message = proactive.getMessage();\n }\n return this.data.enabled;\n }\n}\n\nexport default ContextProvider;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Style generating functions\n */\nimport { IAvatarStyling, IBubbleStyling, IChatCustomStyle, IChatStyling, IOtherStyling, ISuggestedActionStyling } from '../interfaces';\nimport { IMsdyn365PvaChatConnectorConfig } from '../msdyn365-pva-chat-connector.props.autogenerated';\n\nconst getChatWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n position: config.position || 'inherit',\n top: config.top ? config.top : 'inherit',\n right: config.right ? config.right : 'inherit',\n bottom: config.bottom ? config.bottom : 'inherit',\n left: config.left ? config.left : 'inherit',\n zIndex: 1000,\n display: 'flex',\n justifyContent: 'flex-end'\n };\n};\n\nconst getMaximizedChatWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig, isMobileDevice: boolean): React.CSSProperties => {\n if (isMobileDevice) {\n return {\n height: '90%',\n width: '100%',\n bottom: '0.5em',\n right: '0',\n padding: '5px'\n };\n }\n return {\n height: config.chatHeight ? config.chatHeight : '80%',\n width: config.chatWidth ? config.chatWidth : 'inherit'\n };\n};\n\nconst getChatButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n display: 'flex',\n alignItems: 'center',\n backgroundColor: config.startChatButtonBackgroundColor || 'white',\n color: config.startChatButtonTextColor || 'inherit',\n borderColor: config.startChatButtonBorderColor || 'inherit',\n borderRadius: config.startChatButtonBorderRadius || '0px',\n borderStyle: config.startChatButtonBorderStyle || 'solid',\n borderWidth: config.startChatButtonBorderWidth ? config.startChatButtonBorderWidth : '0px',\n padding: config.storeLogoURL ? '2px 20px 2px 2px' : '10px 20px 10px 20px',\n cursor: 'pointer',\n outlineStyle: 'none',\n alignSelf: 'flex-end',\n boxShadow: '0 0 4px rgba(102,102,102,.5)',\n WebkitBoxShadow: '0 0 4px rgba(102,102,102,.5)',\n MozBoxShadow: '0 0 4px rgba(102,102,102,.5)'\n };\n};\n\nconst getButtonStoreLogoStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n color: config.headerTextColor || 'inherit',\n borderRadius: '50%',\n padding: '11px',\n width: '30px',\n height: '30px',\n marginRight: '12px',\n borderStyle: 'solid',\n borderWidth: '1px',\n boxSizing: 'content-box'\n };\n};\n\nconst getChatStoreLogoStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n color: config.headerTextColor || 'inherit',\n borderRadius: '50%',\n padding: '11px',\n width: '30px',\n height: '30px',\n margin: '5px 12px 5px 5px',\n alignSelf: 'center',\n borderStyle: 'solid',\n borderWidth: '1px',\n boxSizing: 'content-box'\n };\n};\n\nconst getChatMessagesStyle = (config: IMsdyn365PvaChatConnectorConfig, minimized: boolean): React.CSSProperties => {\n return {\n display: minimized ? 'none' : 'block',\n backgroundColor: config.backgroundColor || 'White',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n };\n};\n\nconst getChatMessageHeader = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\n color: config.headerTextColor || 'inherit',\n backgroundRepeat: 'no-repeat',\n display: 'flex',\n alignItems: 'flex-start',\n flexDirection: 'row',\n width: '100%',\n position: 'absolute',\n top: config.chatHeaderHeight ? `-${config.chatHeaderHeight}` : '',\n height: config.chatHeaderHeight,\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getMinimizeButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n borderTop: 'none',\n borderLeft: 'none',\n borderRight: 'none',\n borderBottom: `solid 2px ${config.headerTextColor || 'White'}`,\n backgroundColor: 'transparent',\n padding: '5px 10px 3px 10px',\n cursor: 'pointer',\n outlineStyle: 'none',\n marginTop: '7px',\n marginRight: '7px'\n };\n};\n\nconst getCloseButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n border: 'none',\n color: config.headerTextColor || 'White',\n backgroundColor: 'transparent',\n padding: '0px 0px 0px 7px',\n cursor: 'pointer',\n outlineStyle: 'none',\n marginTop: '7px',\n marginRight: '7px'\n };\n};\n\nconst getChatMessageContent = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n height: '100%',\n width: '100%',\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n flexDirection: 'column',\n display: 'flex',\n justifyContent: 'flex-end',\n backgroundColor: config.backgroundColor || 'White'\n };\n};\n\nconst getProactiveMessageHeader = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\n color: config.headerTextColor || 'inherit',\n backgroundRepeat: 'no-repeat',\n display: 'flex',\n alignItems: 'flex-start',\n flexDirection: 'row',\n boxSizing: 'border-box',\n width: '100%',\n height: config.chatHeaderHeight,\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveMessageContent = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n width: '100%',\n padding: '10px 20px',\n boxSizing: 'border-box',\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n color: config.headerTextColor || 'inherit',\n cursor: 'pointer',\n padding: '5px 10px',\n outline: 'none',\n border: 'none',\n backgroundColor: config.headerBackgroundColor || 'inherit',\n borderRadius: '25px'\n };\n};\n\nconst getRedDotStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n background: 'Red',\n borderRadius: '50%',\n height: '5px',\n width: '5px',\n position: 'absolute',\n right: '10px',\n bottom: '33px'\n };\n};\n\n/**\n * Generates styles for the chat wrapper, and proactive chat parts\n * @param config IMsdyn365PvaChatConnectorConfig\n * @param minimized boolean\n * @returns IChatCustomStyle\n */\nexport const getChatStyling = (config: IMsdyn365PvaChatConnectorConfig, minimized: boolean, isMobileDevice: boolean): IChatCustomStyle => {\n return {\n ChatWrapperStyle: getChatWrapperStyle(config),\n MaximizedChatWrapperStyle: getMaximizedChatWrapperStyle(config, isMobileDevice),\n ChatButtonStyle: getChatButtonStyle(config),\n ButtonStoreLogoStyle: getButtonStoreLogoStyle(config),\n ChatStoreLogoStyle: getChatStoreLogoStyle(config),\n ChatMessagesStyle: getChatMessagesStyle(config, minimized),\n ChatMessageHeader: getChatMessageHeader(config),\n MinimizeButtonStyle: getMinimizeButtonStyle(config),\n CloseButtonStyle: getCloseButtonStyle(config),\n ChatMessageContent: getChatMessageContent(config),\n ProactiveWrapperStyle: getProactiveWrapperStyle(config),\n ProactiveMessageHeader: getProactiveMessageHeader(config),\n ProactiveMessageContent: getProactiveMessageContent(config),\n ProactiveButtonStyle: getProactiveButtonStyle(config),\n RedDotStyle: getRedDotStyle(config)\n };\n};\n\nconst fontFormat = (font?: string): string | undefined => {\n if (font && font.length > 0) {\n const arr = font.split(',');\n for (let i = 0; i < arr.length; i++) {\n arr[i] = `'${arr[i].trim()}'`;\n }\n font = arr.join(', ');\n } else {\n font = \"'Calibri', 'Helvetica Neue', 'Arial', 'sans-serif'\";\n }\n\n return font;\n};\n\nconst getBubbleStyling = (config: IMsdyn365PvaChatConnectorConfig): IBubbleStyling => {\n return {\n bubbleBackground: config.bubbleBackground || 'White',\n bubbleTextColor: config.bubbleTextColor || 'Black',\n bubbleBorderColor: config.bubbleBorderColor || '#e6e6e6',\n bubbleBorderRadius: config.bubbleBorderRadius || '2',\n bubbleBorderStyle: config.bubbleBorderStyle || 'solid',\n bubbleBorderWidth: config.bubbleBorderWidth || '1',\n bubbleFromUserBackground: config.bubbleFromUserBackground || 'White',\n bubbleFromUserTextColor: config.bubbleFromUserTextColor || 'Black',\n bubbleFromUserBorderColor: config.bubbleFromUserBorderColor || '#e6e6e6',\n bubbleFromUserBorderRadius: config.bubbleFromUserBorderRadius || '2',\n bubbleFromUserBorderStyle: config.bubbleFromUserBorderStyle || 'solid',\n bubbleFromUserBorderWidth: config.bubbleFromUserBorderWidth || '1'\n };\n};\n\n// eslint-disable-next-line complexity\nconst getOtherStyling = (config: IMsdyn365PvaChatConnectorConfig): IOtherStyling => {\n return {\n groupTimestamp: config.groupTimestamp || true,\n sendTimeout: config.sendTimeout || '20000',\n sendTimeoutForAttachments: config.sendTimeoutForAttachments || '120000',\n timestampColor: config.timestampColor || 'undefined',\n timestampFormat: config.timestampFormat || 'undefined',\n notificationDebounceTimeout: config.notificationDebounceTimeout || '400',\n hideToaster: config.hideToaster || true,\n toasterHeight: config.toasterHeight || '32',\n toasterMaxHeight: config.toasterMaxHeight || '32 * 5',\n toasterSingularMaxHeight: config.toasterSingularMaxHeight || '50',\n toastFontSize: config.toastFontSize || '87.5%',\n toastIconWidth: config.toastIconWidth || '36',\n toastSeparatorColor: config.toastSeparatorColor || '#E8EAEC',\n toastTextPadding: config.toastTextPadding || '6',\n toastErrorBackgroundColor: config.toastErrorBackgroundColor || '#FDE7E9',\n toastErrorColor: config.toastErrorColor || '#A80000',\n toastInfoBackgroundColor: config.toastInfoBackgroundColor || '#CEF1FF',\n toastInfoColor: config.toastInfoColor || '#105E7D',\n toastSuccessBackgroundColor: config.toastSuccessBackgroundColor || '#DFF6DD',\n toastSuccessColor: config.toastSuccessColor || '#107C10',\n toastWarnBackgroundColor: config.toastWarnBackgroundColor || '#FFF4CE',\n toastWarnColor: config.toastWarnColor || '#3B3A39',\n typingAnimationBackgroundImage: config.typingAnimationBackgroundImage || 'undefined',\n typingAnimationDuration: config.typingAnimationDuration || '5000',\n typingAnimationHeight: config.typingAnimationHeight || '20',\n typingAnimationWidth: config.typingAnimationWidth || '64',\n videoHeight: config.videoHeight || '270',\n mark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MjEyMTIxIiAvPjwvc3ZnPg==)',\n markdownRespectCRLF: config.markdownRespectCRLF || 'true',\n internalLiveRegionFadeAfter: config.internalLiveRegionFadeAfter || '1000',\n accent: config.accent || '#0063B1',\n subtle: config.subtle || '#767676'\n };\n};\n\nconst getAvatarStyling = (config: IMsdyn365PvaChatConnectorConfig): IAvatarStyling => {\n return {\n avatarBorderRadius: config.avatarBorderRadius || '50%',\n avatarSize: config.avatarSize || '40',\n botAvatarBackgroundColor: config.botAvatarBackgroundColor || 'undefined',\n botAvatarImage: config.botAvatarImage || '',\n botAvatarInitials: config.botAvatarInitials || '',\n userAvatarBackgroundColor: config.userAvatarBackgroundColor || 'undefined',\n userAvatarImage: config.userAvatarImage || '',\n userAvatarInitials: config.userAvatarInitials || '',\n showAvatarInGroup: config.showAvatarInGroup || 'status'\n };\n};\n\nconst getSuggestedActionStyling = (config: IMsdyn365PvaChatConnectorConfig): ISuggestedActionStyling => {\n return {\n suggestedActionLayout: config.suggestedActionLayout || 'carousel',\n suggestedActionBackground: config.suggestedActionBackground || 'White',\n suggestedActionTextColor: config.suggestedActionTextColor || '',\n suggestedActionBorderColor: config.suggestedActionBorderColor || '',\n suggestedActionBorderRadius: config.suggestedActionBorderRadius || '0',\n suggestedActionBorderStyle: config.suggestedActionBorderStyle || 'solid',\n suggestedActionBorderWidth: config.suggestedActionBorderWidth || '2',\n suggestedActionDisabledBorderStyle: config.suggestedActionDisabledBorderStyle || 'solid',\n suggestedActionDisabledBorderWidth: config.suggestedActionDisabledBorderWidth || '2',\n suggestedActionDisabledTextColor: config.suggestedActionDisabledTextColor || '',\n suggestedActionHeight: config.suggestedActionHeight || '40',\n suggestedActionImageHeight: config.suggestedActionImageHeight || '20',\n suggestedActionsCarouselFlipperCursor: config.suggestedActionsCarouselFlipperCursor || '',\n suggestedActionsCarouselFlipperBoxWidth: config.suggestedActionsCarouselFlipperBoxWidth || '40',\n suggestedActionsCarouselFlipperSize: config.suggestedActionsCarouselFlipperSize || '20',\n suggestedActionsFlowMaxHeight: config.suggestedActionsFlowMaxHeight || '',\n suggestedActionsStackedHeight: config.suggestedActionsStackedHeight || '',\n suggestedActionsStackedOverflow: config.suggestedActionsStackedOverflow || '2',\n suggestedActionsStackedLayoutButtonMaxHeight: config.suggestedActionsStackedLayoutButtonMaxHeight || '',\n suggestedActionsStackedLayoutButtonTextWrap: config.suggestedActionsStackedLayoutButtonTextWrap || false\n };\n};\n\n/**\n * Generates style options for the Botframework-WebChat widget\n * @param config IMsdyn365PvaChatConnectorConfig\n * @returns IChatStyling\n */\nexport const getChatStyleOptions = (config: IMsdyn365PvaChatConnectorConfig): IChatStyling => {\n const bubbleStyling = getBubbleStyling(config);\n const avatarStyling = getAvatarStyling(config);\n const suggestedActionStyling = getSuggestedActionStyling(config);\n const otherStyling = getOtherStyling(config);\n return {\n hideUploadButton: true,\n primaryFont: fontFormat(config.primaryFont),\n backgroundColor: config.backgroundColor || 'White',\n ...bubbleStyling,\n ...avatarStyling,\n ...suggestedActionStyling,\n ...otherStyling\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { IAction, IDispatch, INext } from '../interfaces';\nimport { TContextProvider } from '../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\n\nexport class CommerceChatStore {\n private props: IPvaChatConnectorViewProps;\n private setNewMessageAction: React.Dispatch>;\n private provider?: TContextProvider;\n\n /**\n * Gets conversation token\n * @param props IPvaChatConnectorViewProps\n */\n public static async getDirectLineToken(props: IPvaChatConnectorViewProps): Promise {\n if (props.config.powervaDirectlineTokenURL && props.config.botID && props.config.tenantID) {\n // use direct line token url, bot id and tenant id from module config to get conversation token\n const url = `${props.config.powervaDirectlineTokenURL}?botId=${props.config.botID}&tenantId=${props.config.tenantID}`;\n const options = { method: 'GET' };\n return fetch(url, options)\n .then(r => r.json())\n .then(r => {\n if (r.token) {\n return r.token;\n } else {\n throw r;\n }\n });\n }\n\n // use direct line token url, bot id and tenant id from app config to get conversation token\n const url = `${props.context.app.config.pvaChatConnectorPowervaDirectlineTokenURL}?botId=${props.context.app.config.pvaChatConnectorBotID}&tenantId=${props.context.app.config.pvaChatConnectorTenantID}`;\n const options = {\n method: 'GET'\n };\n return fetch(url, options)\n .then(r => r.json())\n .then(r => {\n if (r.token) {\n return r.token;\n } else {\n throw r;\n }\n });\n }\n\n /**\n * Creates a new instance of commerce store for WebChat\n * @param props IPvaChatConnectorViewProps\n * @param provider TContextProvider\n * @param setNewMessage React.Dispatch>\n */\n constructor(\n props: IPvaChatConnectorViewProps,\n provider: TContextProvider | undefined,\n setNewMessage: React.Dispatch>\n ) {\n this.props = props;\n this.provider = provider;\n this.setNewMessageAction = setNewMessage;\n }\n\n /**\n * Handles custom chat actions\n * @param param0 {\n * dispatch: IDispatch;\n * next: INext;\n * action: IAction;\n * }\n */\n public async actionHandler({ dispatch, next, action }: { dispatch: IDispatch; next: INext; action: IAction }): Promise {\n const atype = action.type;\n\n switch (atype) {\n case 'DIRECT_LINE/CONNECT_FULFILLED': {\n // sets language\n dispatch({\n type: 'WEB_CHAT/SEND_EVENT',\n payload: {\n name: 'webchat/join',\n value: { language: window.navigator.language }\n }\n });\n break;\n }\n case 'DIRECT_LINE/INCOMING_ACTIVITY': {\n const activity = action.payload.activity;\n if (activity?.from?.role === 'bot') {\n // Sets flag for new message (will be use to indicate new messages from bot when chat is minimized)\n this.setNewMessageAction(true);\n }\n break;\n }\n case 'DIRECT_LINE/POST_ACTIVITY_FULFILLED': {\n switch (action.payload.activity.name) {\n case 'webchat/join':\n {\n if (this.provider !== undefined) {\n // Sets Chat Context\n dispatch({\n type: 'WEB_CHAT/SEND_EVENT',\n payload: {\n name: 'pvaSetContext',\n value: this.provider()\n }\n });\n }\n }\n break;\n case 'pvaSetContext':\n {\n if (this.props.config.triggerQuery) {\n // Initialize chat after Chat Context is set\n dispatch({\n type: 'WEB_CHAT/SEND_MESSAGE_BACK',\n payload: {\n text: this.props.config.triggerQuery\n }\n });\n }\n }\n break;\n default: {\n // default nothing\n }\n }\n break;\n }\n default: {\n // default nothing\n }\n }\n\n return next(action);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { FunctionComponent, useMemo, useState } from 'react';\nimport { getChatStyleOptions } from '../helpers/StyleComposers';\nimport { IChatCoreProps, IAction, IDispatch } from '../interfaces';\nimport { CommerceChatStore } from '../helpers/CommerceChatStore';\n\n/**\n * Just a core Chat component\n * @param props\n */\n\nconst ChatCore: FunctionComponent = (props: IChatCoreProps) => {\n const { ReactWebChat } = window.WebChat;\n\n const [userId, setUserId] = useState('');\n useMemo(() => {\n if (props.provider) {\n const ctx = props.provider();\n if (ctx.UserId) {\n setUserId(typeof ctx.UserId === 'string' ? ctx.UserId : ctx.UserId.value.toString());\n }\n }\n }, [props.provider]);\n\n const directLine = useMemo(() => {\n return window.WebChat.createDirectLine({ token: props.directLineToken });\n }, [props.directLineToken]);\n\n const commerceChatStore = useMemo(() => {\n if (directLine && props.provider) {\n return new CommerceChatStore(props.config, props.provider, props.setNewMessage);\n }\n return undefined;\n }, [props.provider, directLine]);\n\n const store = useMemo(() => {\n return window.WebChat.createStore(\n {},\n ({ dispatch }: { dispatch: IDispatch }) => (next: (action: IAction) => IDispatch) => (action: IAction) => {\n commerceChatStore?.actionHandler({ dispatch, next, action });\n }\n );\n }, [commerceChatStore]);\n const styleOptions = getChatStyleOptions(props.config.config);\n\n return props.directLineToken !== '' ? (\n \n ) : (\n

Please wait while we are connecting.

\n );\n};\n\nexport default ChatCore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport ContextProvider from '../helpers/ContextProvider';\nimport { getChatStyling } from '../helpers/StyleComposers';\nimport { TContextProvider } from '../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\nimport { CommerceChatStore } from '../helpers';\nimport ChatCore from './ChatCore';\n\nconst INVALID_TOKEN = 'INVALID_TOKEN';\nconst CLOSE_IMG_DATA =\n 'M443.6,387.1L312.4,255.4l131.5-130c5.4-5.4,5.4-14.2,0-19.6l-37.4-37.6c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4 L256,197.8L124.9,68.3c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4L68,105.9c-5.4,5.4-5.4,14.2,0,19.6l131.5,130L68.4,387.1 c-2.6,2.6-4.1,6.1-4.1,9.8c0,3.7,1.4,7.2,4.1,9.8l37.4,37.6c2.7,2.7,6.2,4.1,9.8,4.1c3.5,0,7.1-1.3,9.8-4.1L256,313.1l130.7,131.1 c2.7,2.7,6.2,4.1,9.8,4.1c3.5,0,7.1-1.3,9.8-4.1l37.4-37.6c2.6-2.6,4.1-6.1,4.1-9.8C447.7,393.2,446.2,389.7,443.6,387.1z';\n\n/**\n * Outer chat component, displays chat button, and proactive chat, and handles custom actions\n * @param props IPvaChatConnectorViewProps\n */\nconst Chat: FunctionComponent = (props: IPvaChatConnectorViewProps) => {\n const [loaded, setLoaded] = useState(false); // loaded & minimized are needed as ChatWidget should not be removed from DOM (it resets chat)\n const [minimized, setMinimized] = useState(true);\n const [newMessage, setNewMessage] = useState(false); // TODO: use this to indicate new message in minimized chat\n const [token, setToken] = useState(''); // holds conversation token for WebChat\n const [isProactive, setIsProactive] = useState(false); // if proactive chat is triggered\n const [proactiveMessage, setProactiveMessage] = useState(props.config.proactiveDefaultMessage);\n const [closed, setClosed] = useState(false);\n const [provider, setProvider] = useState();\n const isMobileDevice =\n isMobile({ variant: VariantType.Browser, context: props.context.request }) === 'xs' ||\n isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\n const chatStyle = getChatStyling(props.config, minimized, isMobileDevice); // generates chat style objects based on configuration\n const handleMaximizeButtonClick = () => {\n setLoaded(true);\n setMinimized(false);\n setNewMessage(false);\n };\n const handleMinimizeButtonClick = () => {\n setMinimized(true);\n setNewMessage(false);\n };\n const handleCloseButtonClick = () => {\n setClosed(true);\n setLoaded(false);\n setMinimized(true);\n setNewMessage(false);\n setIsProactive(false);\n };\n useEffect(() => {\n if (loaded) {\n CommerceChatStore.getDirectLineToken(props)\n .then(directLineToken => {\n setToken(directLineToken);\n })\n .catch(e => {\n setToken(INVALID_TOKEN);\n props.telemetry.exception(e);\n });\n }\n }, [loaded]);\n useEffect(() => {\n (async () => {\n const contextProvider = new ContextProvider(props); // Generates context (provider) and checks for proactive chat triggers\n const prov = await contextProvider.init();\n if (contextProvider.data.enabled) {\n props.context.telemetry.debug(`[Chat] Proactive chat was enabled: '${contextProvider.data.enabled}'.`);\n // if proactive chat is triggered\n const timeout = contextProvider.data.timeout * 1000; // timeout is there only for WaitOnTime trigger\n setTimeout(() => {\n if (!loaded) {\n props.context.telemetry.debug(`[Chat] Proactive chat was loaded: ${loaded}.`);\n setProactiveMessage(contextProvider.data.message);\n setIsProactive(true);\n }\n }, timeout);\n }\n setProvider(() => prov);\n })().catch(e => props.telemetry.exception(e));\n }, []);\n useEffect(() => {\n if (closed) {\n setClosed(false);\n }\n }, [token, provider]);\n const isValidToken = (): boolean => {\n return `${token}` !== INVALID_TOKEN;\n };\n return (\n \n {minimized && (!isProactive || (isProactive && loaded)) && (\n \n )}\n {minimized && isProactive && !loaded && (\n
\n
\n {props.config.storeLogoURL && (\n logo\n )}\n
\n
\n
\n

{proactiveMessage}

\n \n
\n
\n )}\n {loaded && isValidToken() && (\n
\n
\n {props.config.storeLogoURL && (\n logo\n )}\n
\n \n
\n
\n \n
\n
\n )}\n {!isValidToken() &&
{props.config.unableToLoadChatMessage}
}\n
\n );\n};\n\nexport default Chat;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport { Chat, IPvaChatConnectorViewProps } from './index';\n\nexport default (props: IPvaChatConnectorViewProps) => {\n // Only for CDN loading check, won't be needed with npm package of Botframework-WebChat\n const [loaded, setLoaded] = React.useState(false);\n const p = {\n ...props\n };\n\n // Just to verify that CDN Chat Widget js lib is loaded\n // Remove this block if moving to npm package of Botframework-WebChat\n const interval = setInterval(() => {\n const t = typeof window;\n if (t !== 'undefined' && window.WebChat) {\n setLoaded(true);\n clearInterval(interval);\n }\n }, 100);\n\n return
{loaded && }
;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { CheckoutState } from './checkout-state';\n\n/**\n * CheckoutState - action input.\n */\nexport class CheckoutStateInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey('CheckoutState', this.apiSettings);\n\n public getCacheObjectType = () => 'CheckoutState';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CheckoutState - action.\n * @param input\n * @param ctx\n */\nexport async function checkoutStateAction(input: CheckoutStateInput, ctx: IActionContext): Promise {\n return new CheckoutState();\n}\n\n/**\n * CheckoutState - create new input for create action.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\n return new CheckoutStateInput(inputData.requestContext.apiSettings);\n};\n\n/**\n * CheckoutState - create action.\n */\nexport const checkoutStateActionDataAction = createObservableDataAction({\n action: >checkoutStateAction,\n input: createInput\n});\n\nexport default checkoutStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, GiftCard, Note, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { action, computed, observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class CheckoutState {\n @observable private _tokenizedPaymentCard: TokenizedPaymentCard | undefined;\n\n @computed public get tokenizedPaymentCard(): Readonly | undefined {\n return this._tokenizedPaymentCard;\n }\n\n @observable private _tenderLine: TenderLine | undefined;\n\n @computed public get tenderLine(): Readonly | undefined {\n return this._tenderLine;\n }\n\n @observable private _billingAddress: Address | undefined;\n\n @computed public get billingAddress(): Readonly
| undefined {\n return this._billingAddress;\n }\n\n @observable private _shippingAddress: Address | undefined;\n\n @computed public get shippingAddress(): Readonly
| undefined {\n return this._shippingAddress;\n }\n\n @observable private _cardPrefix: string | undefined;\n\n @computed public get cardPrefix(): Readonly | undefined {\n return this._cardPrefix;\n }\n\n @observable private _giftCards: GiftCard[] = [];\n\n @computed public get giftCards(): readonly GiftCard[] {\n return this._giftCards;\n }\n\n @observable private _giftCardExtends: IGiftCardExtend[] = [];\n\n @computed public get giftCardExtends(): readonly IGiftCardExtend[] {\n return this._giftCardExtends;\n }\n\n @observable private _loyaltyCardNumber?: string;\n\n @computed public get loyaltyCardNumber(): Readonly | undefined {\n return this._loyaltyCardNumber;\n }\n\n @observable private _loyaltyAmount: number = 0;\n\n @computed public get loyaltyAmount(): Readonly | number {\n return this._loyaltyAmount;\n }\n\n @observable private _guestCheckoutEmail: string = '';\n @observable private _customerReference: string = '';\n @observable private _customerRequisition: string = '';\n @observable private _note: Note = {};\n\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\n }\n\n @computed public get customerReference(): Readonly | string {\n return this._customerReference;\n }\n\n @computed public get customerRequisition(): Readonly | string {\n return this._customerRequisition;\n }\n\n @computed public get note(): Readonly | Note[] {\n return this._note;\n }\n\n @observable private _isTermsAndConditionAccepted: boolean = false;\n\n @computed public get isTermsAndConditionAccepted(): Readonly | boolean {\n return this._isTermsAndConditionAccepted;\n }\n\n @observable private _customerAccountAmount: number = 0;\n\n @computed public get customerAccountAmount(): Readonly | number {\n return this._customerAccountAmount;\n }\n\n @action\n public updateTokenizedPaymentCard(newTokenizedPaymentCard: TokenizedPaymentCard): void {\n this._tokenizedPaymentCard = newTokenizedPaymentCard;\n }\n\n @action\n public updateTenderLine(newTenderLine: TenderLine | undefined): void {\n this._tenderLine = newTenderLine;\n }\n\n @action\n public updateShippingAddress(newShippingAddress: Address): void {\n this._shippingAddress = newShippingAddress;\n }\n\n @action\n public updateBillingAddress(newBillingAddress: Address): void {\n this._billingAddress = newBillingAddress;\n }\n\n @action\n public updateCardPrefix(newCardPrefix: string): void {\n this._cardPrefix = newCardPrefix;\n }\n\n @action\n public removeGiftCard(giftCardNumber: string): void {\n this._giftCards = this._giftCards.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public removeGiftCardExtend(giftCardNumber: string): void {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public addGiftCard(giftCard: GiftCard): void {\n this._giftCards = [giftCard, ...this._giftCards];\n }\n\n @action\n public addGiftCardExtend(giftCard: IGiftCardExtend): void {\n this._giftCardExtends = [giftCard, ...this._giftCards];\n }\n\n @action\n public updateLoyaltyCardNumber(newLoyaltyCardNumber: string): void {\n this._loyaltyCardNumber = newLoyaltyCardNumber;\n }\n\n @action\n public updateLoyaltyAmount(newAmount: number): void {\n this._loyaltyAmount = newAmount;\n }\n\n @action\n public updateGuestCheckoutEmail(\n newGuestCheckoutEmail: string,\n customerReference: string,\n customerRequisition: string,\n note: Note\n ): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\n this._customerReference = customerReference;\n this._customerRequisition = customerRequisition;\n this._note = note;\n }\n\n @action\n public updateTermsAndConditionsAcceptance(newIsTermsAndConditionAccepted: boolean): void {\n this._isTermsAndConditionAccepted = newIsTermsAndConditionAccepted;\n }\n\n @action\n public updateCustomerAccountAmount(newAmount: number): void {\n this._customerAccountAmount = newAmount;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/**\n * EnabledPaymentsForOBO enum.\n */\n export enum EnabledPaymentsForOBO {\n OnCustomerAccount = 1,\n ExpressPayment = 0,\n Loyalty = 0,\n GiftCard = 0,\n PaymentInstrument = 0,\n ApplePay = 0\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n public getCacheKey = () => 'ModuleState';\n\n public getCacheObjectType = () => 'ModuleState';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n const cacheKey = new ModuleStatesCacheKey();\n\n let moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n if (moduleStates) {\n return moduleStates;\n }\n ctx.update(cacheKey, {});\n moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n const cacheKey = new ModuleStatesCacheKey();\n ctx.update(cacheKey, value);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState =

(WrappedComponent: React.ComponentType

): React.ComponentType

=> {\n /**\n *\n * ModuleState component.\n * @extends {React.Component

}\n */\n @observer\n class ModuleState extends React.Component

{\n constructor(props: P) {\n super(props);\n this.initializeState();\n }\n\n public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { id } = this.props;\n return ;\n }\n\n private readonly initializeState = (): void => {\n const { id, typeName, context } = this.props;\n const states = getModuleStates(context.actionContext);\n if (!states) {\n this.props.telemetry.error('withModuleState initializeState() - states not found');\n return;\n }\n\n if (states[id]) {\n // State has been initialized\n return;\n }\n\n updateModuleStates(\n {\n ...states,\n [id]: {\n id,\n typeName,\n hasInitialized: false,\n hasError: false,\n isRequired: true,\n isCancellable: true,\n isSubmitContainer: false,\n status: undefined,\n childIds: []\n }\n },\n context.actionContext\n );\n };\n\n /**\n * GetModuleStateManager\n * Get module state manager by id.\n * @param id\n */\n private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n const moduleState = this.get()[id];\n return {\n ...moduleState!,\n hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n hasError: this.validate(id, { hasError: true }), // Partial has error is error\n isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n hasModuleState: this.hasModuleState(id),\n setIsRequired: (value: boolean): void => {\n this.update(id, { isRequired: value });\n },\n setIsCancellable: (value: boolean): void => {\n this.update(id, { isCancellable: value });\n },\n setIsSubmitContainer: (value: boolean): void => {\n this.update(id, { isSubmitContainer: value });\n },\n setHasError: (value: boolean): void => {\n this.update(id, { hasError: value });\n },\n onReady: (): void => {\n this.update(id, { status: 'ready' });\n },\n onUpdating: (): void => {\n this.update(id, { status: 'updating' });\n },\n onPending: (): void => {\n this.update(id, { status: 'pending' });\n },\n onSkip: (): void => {\n this.update(id, { status: 'skipped' });\n },\n onDisable: (): void => {\n this.update(id, { status: 'disabled' });\n },\n getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n init: (options?: Partial): void => {\n if (moduleState?.hasInitialized) {\n // State has been initialized\n return;\n }\n this.update(id, {\n hasInitialized: true,\n ...options\n });\n }\n };\n };\n\n /**\n * GetModuleStateManagerByTypeName\n * Get module state manager by type name.\n * @param typeName\n */\n private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n const moduleStates = getModuleStates(this.props.context.actionContext);\n const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n return this.getModuleStateManager((moduleState && moduleState.id) || '');\n };\n\n /**\n * Get\n * Get all module states.\n */\n private readonly get = (): IModuleStates => {\n return getModuleStates(this.props.context.actionContext);\n };\n\n /**\n * Update\n * Update module state.\n * @param id\n * @param value\n */\n private readonly update = (id: string, value: Partial): void => {\n // Console.log('withModuleState - update', id, value);\n const modules = this.get();\n if (!modules[id]) {\n this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n return;\n }\n modules[id] = {\n ...modules[id]!,\n ...value\n };\n };\n\n private readonly _validateLeaf = (id: string, source: Partial): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n return isMatch(module, source);\n };\n\n private readonly _validateContainer = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n // Module doesn't has module state\n return !!allMatched;\n }\n\n if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n // Skip disabled or skipped modules\n return !!allMatched;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n let childIds = module.childIds;\n\n if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n }\n\n // It is container module\n const method = allMatched ? 'every' : 'some';\n return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n if (!moduleId.includes(sectionContainerModuleId)) {\n return false;\n }\n\n const modules = this.get();\n const module = modules[moduleId];\n\n if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Validate\n * Validate current module and all its child module match the provided condition.\n * @param id\n * @param source\n * @param allMatched\n * @param skipSkippableItem\n */\n private readonly validate = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n // It is container module\n return this._validateContainer(id, source, allMatched, skipSkippableItem);\n };\n\n /**\n * HasExternalSubmitGroup\n * Module will use external submit group.\n */\n private readonly hasExternalSubmitGroup = (): boolean => {\n return !!this.props.enableControl;\n };\n\n /**\n * HasModuleState\n * Module is using module state manager.\n * @param id\n */\n private readonly hasModuleState = (id: string): boolean => {\n const modules = this.get();\n const module = modules[id];\n return !!module;\n };\n }\n\n return ModuleState;\n};\n\nexport default withModuleState;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport {\n CheckoutModule,\n ErrorCode,\n ErrorLocation,\n ErrorMessageResource,\n getCheckoutState,\n ICheckoutError,\n ICheckoutState\n} from '@msdyn365-commerce/global-state/';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class -- create global class\nexport class CheckoutErrors {\n public static readonly ActionError: ICheckoutError = {\n errorCode: ErrorCode.ActionError,\n errorMessageResource: ErrorMessageResource.checkoutTimeoutErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n errorMessageResource: ErrorMessageResource.blockedLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n errorMessageResource: ErrorMessageResource.customerAccountLimitSignDifferentFromAmountDueErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsAvailableCreditLimitErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_FraudRisk: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n errorMessageResource: ErrorMessageResource.fraudRiskErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n errorMessageResource: ErrorMessageResource.giftCardBalanceInquiryFailedErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n errorMessageResource: ErrorMessageResource.giftCardCurrencyMismatchErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n errorMessageResource: ErrorMessageResource.invalidCartVersionErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n errorMessageResource: ErrorMessageResource.invalidLoyaltyCardNumberErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n errorMessageResource: ErrorMessageResource.missingRequiredCartTenderLinesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n errorMessageResource: ErrorMessageResource.multipleCustomerAccountPaymentsNotAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n errorMessageResource: ErrorMessageResource.noMoreThanOneLoyaltyTenderErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n errorMessageResource: ErrorMessageResource.noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n errorMessageResource: ErrorMessageResource.noTenderLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n errorMessageResource: ErrorMessageResource.notEnoughRewardPointsErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n errorMessageResource: ErrorMessageResource.paymentAlreadyVoidedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n errorMessageResource: ErrorMessageResource.paymentAmountExceedsGiftBalanceErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n errorMessageResource: ErrorMessageResource.paymentUsingUnauthorizedAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n errorMessageResource: ErrorMessageResource.refundAmountMoreThanAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n errorMessageResource: ErrorMessageResource.unableToCancelPaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n errorMessageResource: ErrorMessageResource.unableToReadCardTokenInfoErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult,\n errorMessageResource: ErrorMessageResource.unableToRetrieveCardPaymentAcceptResultErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly checkoutErrorsList: ICheckoutError[] = [\n CheckoutErrors.ActionError,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult\n ];\n}\n\nexport async function setCheckoutErrors(\n errorCode: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n resources: any,\n isExpressCheckoutApplied: boolean,\n ctx: IActionContext,\n apiError?: string | undefined\n): Promise {\n let clientCheckoutError: ICheckoutError | undefined;\n const consoleCheckoutErrors: ICheckoutError[] = [];\n\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n // find the checkout errors\n for (const checkoutError of CheckoutErrors.checkoutErrorsList) {\n if (errorCode === checkoutError.errorCode) {\n if (checkoutError.errorLocation === ErrorLocation.Console) {\n const consoleCheckoutError: ICheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n consoleCheckoutErrors.push(consoleCheckoutError);\n } else {\n if (clientCheckoutError) {\n ctx.telemetry.exception(new Error('Invalid number of client checkout errors.'));\n throw new Error('Invalid number of client checkout errors.');\n } else {\n clientCheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n }\n }\n }\n }\n\n // log the console checkout errors\n for (const consoleCheckoutError of consoleCheckoutErrors) {\n consoleCheckoutError.errorMessage = getCheckoutErrorMessage(resources, consoleCheckoutError.errorMessageResource!, apiError!);\n console.log(consoleCheckoutError.errorMessage);\n }\n\n // handle the client checkout error\n if (clientCheckoutError) {\n clientCheckoutError.errorMessage = getCheckoutErrorMessage(resources, clientCheckoutError.errorMessageResource!, apiError!);\n\n if (isExpressCheckoutApplied && clientCheckoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument) {\n clientCheckoutError.errorLocation = ErrorLocation.Checkout;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: clientCheckoutError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n } else {\n // if could not map to any checkout error(s), show the API error message over generic error\n if (consoleCheckoutErrors.length === 0) {\n const genericError = {\n errorLocation: ErrorLocation.Checkout\n };\n if (apiError) {\n genericError['errorMessage'] = apiError;\n } else {\n genericError['errorMessage'] = resources.genericErrorMessage;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: genericError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n }\n }\n}\n\nexport async function focusOnCheckoutError(checkoutErrorRef: React.RefObject, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n checkoutErrorRef.current && checkoutErrorRef.current.scrollIntoView();\n\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: false });\n}\n\nexport async function setCheckoutErrorFocus(checkoutModuleId: string, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n for (const checkoutModule of Object.keys(CheckoutModule)) {\n if (checkoutModuleId.includes(CheckoutModule[checkoutModule])) {\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule[checkoutModule] });\n return;\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getCheckoutErrorMessage(resources: any, errorMessageResource: ErrorMessageResource, errorMessageFromAPI: string): string {\n const errorResource = Object.keys(resources).find(resource => resource === errorMessageResource);\n // return API error when error resource string is not found in checkout definition file\n return errorResource !== undefined ? resources[errorResource] : errorMessageFromAPI;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * The payment error.\n */\nexport interface IPaymentError {\n title: string;\n message: string;\n className?: string;\n}\n\n/**\n * The payment error.\n * @param param0 - First param.\n * @param param0.title - Title.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const ErrorComponent: React.FC = ({ title, message, className = 'ms-checkout-payment-instrument' }) => (\n

\n

{title}

\n

{message}

\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { Alert, Button, INodeProps, NodeTag, getLocaleBasedCustomizedPrice, ILocalizedPrice } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentEditViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n customizedAmt: string;\n amount: number;\n amountVariable: string;\n maxAmount: number;\n customer: Customer | undefined;\n customerCreatedDate: string;\n availableCredit: string;\n showCreditLimit: boolean;\n errorMessage: string | undefined;\n creditSectionIsExpanded: boolean;\n orderTotal: string;\n excessCredit: string | undefined;\n appliedAmount: string | undefined;\n locale: string;\n onAddPayment(): Promise;\n onChangePaymentAmount(customizedAmt: string, paymentAmount: number, amountVariable: string): void;\n onToggleCreditSection(): void;\n onRemovePayment(): Promise;\n skipOnChangeLogic?: boolean;\n}\n\nexport interface IAccountPaymentEditViewForm {\n formProps: INodeProps;\n inputLabel: React.ReactNode;\n inputAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n customerName: React.ReactNode;\n customerAccountNumber: React.ReactNode;\n customerSince: React.ReactNode;\n accountCredit: React.ReactNode;\n alert: React.ReactNode;\n accountDetails: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n}\n\n/**\n * On Add Account Payment Function.\n * @param onAddPayment -On Add Payment Function.\n * @returns Call of Add payment function.\n */\nconst onAddAccountPayment = (onAddPayment: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onAddPayment();\n};\n\n/**\n * On Change Amount Function.\n * @param onChangePaymentAmount -On Change Payment Amount Function.\n * @returns Call of Change payment Amount function.\n */\nconst onChangeAmountHandler = (\n customizedAmt: string,\n paymentAmount: number,\n amountVariable: string,\n locale: string,\n onChangePaymentAmount: (customizedAmt: string, paymentAmount: number, amountVariable: string) => void\n) => (event: React.ChangeEvent) => {\n const value = event.target.value;\n const customState: ILocalizedPrice = {\n customizedAmount: customizedAmt,\n amountVariable: amountVariable,\n paymentAmount: paymentAmount\n };\n const returnModifiedState = getLocaleBasedCustomizedPrice(value, customState, locale, keyCode);\n customizedAmt = returnModifiedState.customizedAmount as string;\n paymentAmount = returnModifiedState.paymentAmount as number;\n amountVariable = returnModifiedState.amountVariable as string;\n onChangePaymentAmount(customizedAmt, paymentAmount, amountVariable);\n keyCode = 0;\n};\n\nlet keyCode: number = 0;\nexport const getAccountPaymentFormEditMode = (options: IGetAccountPaymentEditViewFormInput): IAccountPaymentEditViewForm => {\n const {\n resources,\n onAddPayment,\n amount,\n customizedAmt,\n amountVariable,\n onChangePaymentAmount,\n maxAmount,\n customer,\n customerCreatedDate,\n availableCredit,\n showCreditLimit,\n errorMessage,\n onToggleCreditSection,\n creditSectionIsExpanded,\n orderTotal,\n excessCredit,\n onRemovePayment,\n appliedAmount,\n locale,\n skipOnChangeLogic\n } = options;\n\n const {\n addPaymentButtonLabel,\n inputAmountLabel,\n inputAmountAriaLabel,\n customerSinceLabel,\n accountCreditLabel,\n creditDetailsSectionLabel,\n orderTotalLabel,\n availableCreditLabel,\n creditExcessLabel,\n appliedCustomerAccountPaymentLabel,\n removeCustomerAccountPaymentLabel,\n accountCreditDetails\n } = resources;\n\n const inputLabel = (\n \n {inputAmountLabel}\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-edit',\n onSubmit: onAddAccountPayment(onAddPayment),\n tag: 'form' as NodeTag\n };\n\n const addPaymentButton = (\n maxAmount || amount < 0 || Number.isNaN(amount)}\n >\n {addPaymentButtonLabel}\n \n );\n\n const inputAmount = (\n onChangePaymentAmount(value, Number(value), value)\n : onChangeAmountHandler(customizedAmt, amount, amountVariable, locale, onChangePaymentAmount)\n }\n onKeyDown={event => (keyCode = event.which)}\n aria-label={inputAmountAriaLabel}\n aria-valuemin={0}\n aria-valuemax={maxAmount}\n aria-valuenow={amount}\n min={0}\n max={maxAmount}\n />\n );\n\n const customerName =
{customer?.Name}
;\n\n const customerAccountNumber =
#{customer?.AccountNumber}
;\n\n const customerSince = (\n
\n {customerSinceLabel}\n {customerCreatedDate}\n
\n );\n\n const accountCredit = (\n <>\n {accountCreditLabel}\n {showCreditLimit && {availableCredit}}\n \n \n );\n\n const accountDetails = creditSectionIsExpanded ? (\n
\n <>\n
\n \n \n {creditDetailsSectionLabel}\n \n
\n \n
\n {availableCreditLabel}\n {availableCredit}\n
\n
\n {orderTotalLabel}\n {orderTotal}\n
\n
\n {creditExcessLabel}\n {excessCredit ?? '0'}\n
\n
\n ) : (\n undefined\n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n \n {removeCustomerAccountPaymentLabel}\n \n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentSummaryViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n amount: number;\n appliedAmount: string | undefined;\n}\n\nexport interface IAccountPaymentSummaryViewForm {\n formProps: INodeProps;\n label: React.ReactNode;\n paymentAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n alert?: React.ReactNode;\n paymentAmountInput?: React.ReactNode;\n}\n\nexport const getAccountPaymentFormSummaryMode = (options: IGetAccountPaymentSummaryViewFormInput): IAccountPaymentSummaryViewForm => {\n const { resources, amount, appliedAmount } = options;\n\n const { addPaymentButtonLabel, inputAmountSummaryLabel, appliedCustomerAccountPaymentLabel, inputAmountAriaLabel } = resources;\n\n const label = (\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-summary',\n tag: 'form' as NodeTag\n };\n\n const paymentAmount = ;\n\n const paymentAmountInput = (\n \n );\n\n const addPaymentButton = (\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder,\n paymentAmountInput\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateManager, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentData } from './checkout-customer-account-payment.data';\nimport { ICheckoutCustomerAccountPaymentProps } from './checkout-customer-account-payment.props.autogenerated';\nimport { getAccountPaymentFormEditMode, IAccountPaymentEditViewForm } from './components/get-account-payment-form-edit-mode';\nimport { getAccountPaymentFormSummaryMode, IAccountPaymentSummaryViewForm } from './components/get-account-payment-form-summary-mode';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutCustomerAccountPaymentViewProps\n extends ICheckoutCustomerAccountPaymentProps {\n checkoutCustomerAccount: IModuleProps;\n summaryView: IAccountPaymentSummaryViewForm;\n editView: IAccountPaymentEditViewForm;\n moduleState: IModuleStateManager;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\nexport interface ICheckoutCustomerAccountPaymentState {\n paymentAmount: number;\n isCreditSectionExpanded: boolean;\n customizedAmt: string;\n amountVariable: string;\n errorMessage?: string;\n handleSaveAndContinue?: boolean;\n}\n\n/**\n *\n * CheckoutCustomerAccount component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nexport class CheckoutCustomerAccountPayment extends React.Component<\n ICheckoutCustomerAccountPaymentViewProps,\n ICheckoutCustomerAccountPaymentState\n> {\n private readonly defaultLocale: string = 'en-us';\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerInfo = get(this.props, 'data.customerInformation.result');\n const request = get(this.props, 'context.request');\n const b2bChannel = isChannelTypeB2B(request);\n const platform = get(this.props, 'context.request.app.platform');\n\n return (\n customerInfo &&\n customerInfo.AllowOnAccountPayment === true &&\n platform &&\n (platform.enableCustomerAccountPayment === 'all' ||\n (platform.enableCustomerAccountPayment === 'b2b' && b2bChannel) ||\n (platform.enableCustomerAccountPayment === 'b2c' && !b2bChannel))\n );\n }\n\n @computed get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.loyaltyAmount) {\n return 0;\n }\n return checkoutState.loyaltyAmount;\n }\n\n @computed get maxPaymentAmount(): number {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return 0;\n }\n\n // Use customer account after loyalty.\n const amountDue = Math.max(0, (cart.TotalAmount || 0) - this.getLoyaltyAmount);\n\n // If the user has a mandatory credit limit, then the max amount must not be more than that\n if (this.props.data.customerInformation?.result?.MandatoryCreditLimit) {\n return Math.min(this.getAvailableCredit(this.props.data.creditBalances?.result), amountDue);\n }\n return amountDue;\n }\n\n @computed get errorMessage(): string | undefined {\n if (this.state.paymentAmount > this.maxPaymentAmount) {\n return this.props.resources.invalidAmountExceedAmountDueMessage;\n }\n\n if (this.state.paymentAmount < 0) {\n return this.props.resources.invalidAmountNegativeMessage;\n }\n\n return undefined;\n }\n\n @computed get currencyCode(): string | undefined {\n return get(this.props, 'context.request.channel.Currency');\n }\n\n @computed get availableCredit(): number {\n const creditBalances = get(this.props, 'data.creditBalances.result');\n\n return creditBalances ? this.getAvailableCredit(creditBalances) : 0;\n }\n\n @computed get orderTotal(): number {\n const orderTotal = get(this.props, 'data.checkout.result.checkoutCart.cart.TotalAmount');\n\n return orderTotal ? orderTotal : 0;\n }\n\n @computed get formattedExcessCredit(): string | undefined {\n const excessCredit = this.availableCredit - this.orderTotal;\n return excessCredit < 0 ? this.props.context.cultureFormatter.formatCurrency(excessCredit, this.currencyCode) : undefined;\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n private readonly baseClassName: string = 'ms-checkout-customer-account';\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutCustomerAccountPaymentViewProps) {\n super(props);\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n this.state = {\n paymentAmount: this.maxPaymentAmount,\n isCreditSectionExpanded: false,\n customizedAmt: new Intl.NumberFormat(locale).format(this.maxPaymentAmount),\n amountVariable: this.maxPaymentAmount.toString(),\n handleSaveAndContinue: false\n };\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n // When the cart.TotalAmount gets updated (like if selecting the delivery option adds a charge) we need to update the amount based on the new total amount.\n reaction(\n () =>\n this.props.data.checkout.result &&\n this.props.data.checkout.result.checkoutCart.cart &&\n this.props.data.checkout.result.checkoutCart.cart.TotalAmount,\n totalAmount => {\n this.updateMaxAmount(this.maxPaymentAmount);\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutCustomerAccountPayment &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutCustomerAccountPayment) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutCustomerAccountPaymentProps,\n nextState: ICheckoutCustomerAccountPaymentState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const customerInfo = this.props.data.customerInformation?.result;\n\n if (!this.isCustomerAccountPaymentEnabled) {\n this.props.context.telemetry.information(\n 'customer account payments will not display, because the feature is disabled or not enabled for this type of customer'\n );\n return null;\n }\n\n const checkoutState = this.props.data.checkout.result;\n const cart = checkoutState ? checkoutState.checkoutCart.cart : undefined;\n const hasInvoiceLine = checkoutState?.checkoutCart.hasInvoiceLine;\n const creditBalances = this.props.data.creditBalances.result;\n\n if (!cart || hasInvoiceLine) {\n return null;\n }\n const resources = this.props.resources;\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n\n const customerSinceDate = new Date(customerInfo?.CreatedDateTime || 0).toLocaleDateString(locale);\n\n const hasError = this.props.moduleState.hasError;\n const errorMessage = this.state.errorMessage;\n\n const props = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n checkoutCustomerAccount: {\n moduleProps: this.props,\n className: classnames(this.baseClassName)\n },\n alert: hasError && errorMessage && (\n \n ),\n editView: getAccountPaymentFormEditMode({\n onAddPayment: this.addPayment,\n resources,\n customizedAmt: this.state.customizedAmt,\n amountVariable: this.state.amountVariable,\n amount: this.state.paymentAmount,\n onChangePaymentAmount: this.onChangePaymentAmount,\n maxAmount: this.maxPaymentAmount,\n customer: customerInfo,\n customerCreatedDate: customerSinceDate,\n availableCredit: this.props.context.cultureFormatter.formatCurrency(\n this.getAvailableCredit(creditBalances),\n this.currencyCode\n ),\n showCreditLimit: customerInfo?.MandatoryCreditLimit || false,\n errorMessage: this.errorMessage,\n onToggleCreditSection: this.toggleCreditSection,\n creditSectionIsExpanded: this.state.isCreditSectionExpanded,\n orderTotal: this.props.context.cultureFormatter.formatCurrency(this.orderTotal, this.currencyCode),\n excessCredit: this.formattedExcessCredit,\n onRemovePayment: this.removePayment,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined,\n locale:\n this.props.context && this.props.context.request && this.props.context.request.locale\n ? this.props.context.request.locale\n : this.defaultLocale,\n skipOnChangeLogic: this.props.context.request.features?.skipCheckoutOnChangeLogic\n }),\n summaryView: getAccountPaymentFormSummaryMode({\n resources,\n amount: this.state.paymentAmount,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined\n })\n };\n\n return this.props.renderView(props) as React.ReactElement;\n }\n\n private readonly getAvailableCredit = (creditBalances: CustomerBalances | undefined) => {\n let availableCredit = 0;\n\n if (!creditBalances) {\n return 0;\n }\n\n if (creditBalances.InvoiceAccountCreditLimit === 0) {\n availableCredit = creditBalances.CreditLimit - creditBalances.Balance - creditBalances.PendingBalance;\n } else {\n availableCredit =\n creditBalances.InvoiceAccountCreditLimit -\n creditBalances.InvoiceAccountBalance -\n creditBalances.InvoiceAccountPendingBalance;\n }\n\n return availableCredit;\n };\n\n private readonly addPayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({ handleSaveAndContinue: true });\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: this.state.paymentAmount });\n this.props.context.telemetry.information('customer account payment amount updated');\n };\n\n private readonly toggleCreditSection = (): void => {\n this.setState({\n isCreditSectionExpanded: !this.state.isCreditSectionExpanded\n });\n };\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onCancel: this.handleCancelOrSubmit,\n onSubmit: this.handleCancelOrSubmit,\n onEdit: this.onEdit\n });\n\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount !== 0) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onChangePaymentAmount = (customizedAmt: string, paymentAmount: number, amountVariable: string): void => {\n this.setState({\n customizedAmt: customizedAmt,\n paymentAmount: paymentAmount,\n amountVariable: amountVariable\n });\n };\n\n private readonly updateMaxAmount = (newAmount: number): void => {\n // If the user has already set an amount, we should not override that in the UI because it will be confusing.\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount === 0) {\n this.setState({\n // We should never allow a negative amount.\n paymentAmount: Math.max(0, newAmount),\n customizedAmt: Math.max(0, newAmount).toString()\n });\n }\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Payment section customer account payment onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.customerAccountAmount > 0) {\n this.setState({ handleSaveAndContinue: false });\n this.props.telemetry.information('Payment section customer account payment onSubmit is called.');\n\n if (\n Msdyn365.isOboRequest(this.props.context.request) &&\n checkoutState?.customerAccountAmount !== checkoutState?.checkoutCart.cart.TotalAmount\n ) {\n this._setErrorMessage(this.props.resources.invalidAmountForOBOMessage);\n } else {\n this.props.moduleState.onReady();\n }\n } else if (\n checkoutState?.customerAccountAmount === 0 &&\n !this.state.handleSaveAndContinue &&\n this.props.config.isCheckoutCustomerAccountPaymentRequired\n ) {\n this._setErrorMessage(this.props.resources.customerAccountCreditErrorMessage);\n } else {\n this.props.telemetry.information('Payment section customer account payment onCancel is called.');\n\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly removePayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({\n paymentAmount: 0\n });\n\n this.onChangePaymentAmount('', NaN, '0');\n\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: 0 });\n this.props.context.telemetry.information('customer account payment removed');\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutCustomerAccountPayment;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentViewProps, IAccountPaymentEditViewForm, IAccountPaymentSummaryViewForm } from './index';\n\nexport const SummaryForm: React.FC = ({\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder\n}) => (\n \n <>\n {label}\n {paymentAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nexport const EditForm: React.FC = ({\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\n}) => (\n \n <>\n {customerName}\n {customerAccountNumber}\n {customerSince}\n {accountCredit}\n {accountDetails}\n {inputLabel}\n {alert}\n {inputAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nconst CheckoutCustomerAccountView: React.FC = props => {\n const { checkoutCustomerAccount, checkoutErrorRef, summaryView, editView, moduleState, alert } = props;\n return (\n \n {alert}\n {moduleState.isReady && summaryView && }\n {!moduleState.isReady && editView && }\n \n );\n};\n\nexport default CheckoutCustomerAccountView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageProps, IImageSettings, Image, IModule } from '@msdyn365-commerce/core';\nimport {\n Address,\n CartLine,\n LineDeliverySpecification,\n PickupTimeslotAvailability,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface ICheckoutPickupGroupKey {\n pickupStoreId: string;\n deliveryMode: string;\n}\n\nexport interface ICheckoutPickupGroup extends ICheckoutPickupGroupKey {\n pickupModeName: string;\n storeName: string;\n pickupAddress?: Address;\n availabilityState: PickupTimeslotAvailabilityState;\n groupErrorMessage?: string;\n dateErrorMessage?: string;\n timeslotErrorMessage?: string;\n lineDeliverySpecs: LineDeliverySpecification[];\n cartLines: ICartLineWithProduct[];\n\n availableDates: Date[];\n availableTimeslots: PickupTimeslotAvailability[];\n\n selectedDate?: Date;\n selectedTimeslot?: PickupTimeslotAvailability;\n}\n\nexport enum PickupTimeslotAvailabilityState {\n None,\n Available,\n NotDefined,\n NotAvailable // All slots occupied\n}\n\nexport interface ICartLineWithProduct {\n cartLine: CartLine;\n product?: SimpleProduct;\n}\n\nexport interface ICheckoutPickupGroupViewProps {\n moduleProps: IModule;\n\n pickupGroupContainer: INodeProps;\n dateTimeslotContainer: INodeProps;\n\n pickupStoreId: string;\n pickupModeName: string;\n deliveryMode: string;\n\n groupDivider: React.ReactNode;\n groupHeader: React.ReactNode;\n groupErrorMessage: React.ReactNode;\n cartLineImages: React.ReactNode;\n pickupDateDropdown: React.ReactNode;\n pickupTimeslotDropdown: React.ReactNode;\n\n selectedDateTimeslot: React.ReactNode;\n pickupAddress: React.ReactNode;\n}\n\nexport interface ICheckoutPickupErrorProps {\n errorMessage?: string;\n}\n\nexport const CheckoutPickupError: React.FC = ({ errorMessage }) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \n \n );\n};\n\nexport interface ICheckoutPickupGroupHeaderProps {\n moduleClassName: string;\n storeInfo: string;\n items: string;\n}\n\nexport const CheckoutPickupGroupHeader: React.FC = ({ moduleClassName, storeInfo, items }) => {\n return (\n
\n
{storeInfo}
\n
{items}
\n
\n );\n};\n\nexport interface ICheckoutPickupTimeslotInfoProps {\n moduleClassName: string;\n title: string;\n content: string;\n}\n\nexport const CheckoutPickupTimeslotInfo: React.FC = ({ moduleClassName, title, content }) => {\n return (\n
\n
{title}
\n
{content}
\n
\n );\n};\n\nexport interface ICheckoutPickupAddressProps {\n moduleClassName: string;\n title: string;\n address?: Address;\n}\n\nexport const CheckoutPickupAddress: React.FC = ({ moduleClassName, title, address }) => {\n if (!address) {\n return null;\n }\n\n return (\n
\n
{title}
\n {address.Name && {address.Name}}\n <>\n {address.Street && {address.Street}}\n {address.City && {address.City}}\n {address.State && {`, ${address.State}`}}\n {address.County && {`, ${address.County}`}}\n {address.ZipCode && {` ${address.ZipCode}`}}\n {address.ThreeLetterISORegionName && (\n \n {` ${address.ThreeLetterISORegionName}`}\n \n )}\n \n
\n );\n};\n\nexport interface ICheckoutPickupCartLineInfo {\n lineId: string;\n imageProps: IImageProps;\n quantity: number;\n}\n\nexport interface ICheckoutPickupCartLinesProps {\n moduleClassName: string;\n cartLines: ICheckoutPickupCartLineInfo[];\n}\n\nexport const CheckoutPickupCartLines: React.FC = ({ moduleClassName, cartLines }) => {\n if (!ArrayExtensions.hasElements(cartLines)) {\n return null;\n }\n return (\n
\n {cartLines.map(prop => {\n const showQty = prop.quantity > 1;\n let className = `${moduleClassName}__group-product-image`;\n if (showQty) {\n className = classnames(className, ' product-image-wide');\n }\n return (\n
\n \n {showQty &&
{prop.quantity}
}\n
\n );\n })}\n
\n );\n};\n\nexport const DefaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=108&h=108&q=80&m=6&f=jpg\"', w: 108, h: 108 },\n lg: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n xl: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 }\n },\n lazyload: true,\n quality: 80\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { format } from '@msdyn365-commerce-modules/utilities';\n\nexport function getDate(date: Date | undefined, locale: string): string {\n if (!date) {\n return '';\n }\n const options: Intl.DateTimeFormatOptions = {\n timeZone: 'UTC'\n };\n const formatter = new Intl.DateTimeFormat(locale, options);\n return formatter.format(new Date(date));\n}\n\nexport const getTimeslot = (\n placeHolder: string,\n startDate: Date | undefined,\n endDate: Date | undefined,\n locale: string,\n useHour12TimeFormat?: boolean\n): string => {\n if (!startDate || !endDate) {\n return '';\n }\n let options: Intl.DateTimeFormatOptions = { hour: 'numeric', minute: 'numeric' };\n options = useHour12TimeFormat\n ? { hour: 'numeric', minute: 'numeric', timeZone: 'UTC' }\n : { hour: 'numeric', minute: 'numeric', timeZone: 'UTC', hour12: true };\n const formatter = new Intl.DateTimeFormat(locale, options);\n return format(placeHolder, formatter.format(new Date(startDate)), formatter.format(new Date(endDate)));\n};\n\nexport const getUTCDateWithoutTime = (input: Date): Date => {\n const date: Date = new Date(input);\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0));\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { LabeledDropdown } from '@msdyn365-commerce-modules/utilities';\nimport {\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption\n} from '@msdyn365-commerce-modules/utilities/dist/types/labeled-dropdown/LabeledDropdown.props';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { CheckoutPickupError } from './checkout-pickup-group';\nimport { getDate } from './checkout-pickup-utility';\n\nexport interface IPickupDropdownProps {\n pickupStoreId: string;\n deliveryMode: string;\n\n className: string;\n labelClassname?: string;\n labelText: string;\n defaultText: string;\n errorMessage?: string;\n\n locale: string;\n\n // Props for the LabeledDropdown component\n dropdownId: string;\n controlledByParent: boolean;\n toggleColor?: string;\n dropdownClassname?: string;\n}\n\nexport interface IPickupDateDropdownProps extends IPickupDropdownProps {\n availableDates: Date[];\n selectedDate?: Date;\n setDateHandler(pickupStoreId: string, deliveryMode: string, pickupDate: Date | undefined): void;\n}\n\n/**\n *\n * CheckoutPickupDateDropdown component.\n * @extends {React.Component}\n */\nexport class CheckoutPickupDateDropdown extends React.PureComponent {\n private readonly defaultKey: number = -1;\n\n private readonly defaultOption: ILabeledDropdownOption;\n\n // As the LabeledDropdown control only offers key and value, we need to map the key with date and timeslot data\n @computed get getDateMap(): Map {\n const map = new Map();\n this.props.availableDates.forEach((value, index) => {\n map.set(index.toString(), value);\n });\n return map;\n }\n\n constructor(props: IPickupDateDropdownProps) {\n super(props);\n this.defaultOption = { key: this.defaultKey.toString(), value: props.defaultText };\n this.updateDateSelection = this.updateDateSelection.bind(this);\n }\n\n public render(): JSX.Element | null {\n const {\n className,\n labelClassname,\n labelText,\n errorMessage,\n dropdownId,\n availableDates,\n selectedDate,\n controlledByParent,\n toggleColor,\n dropdownClassname\n } = this.props;\n\n const { dropdownOptions, selectedOption } = this.mapDatesToOptions(availableDates, selectedDate);\n\n return (\n
\n \n \n \n
\n );\n }\n\n private readonly updateDateSelection = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { pickupStoreId, deliveryMode, setDateHandler } = this.props;\n const date: Date | undefined = this.getDate(notification);\n setDateHandler(pickupStoreId, deliveryMode, date);\n };\n\n private readonly getDate = (notification: ILabeledDropdownOnChangeNotification): Date | undefined => {\n const key: string = notification.selectedOption.key;\n if (key === this.defaultKey.toString() || !this.getDateMap.has(key)) {\n return undefined;\n }\n return this.getDateMap.get(key);\n };\n\n private readonly mapDatesToOptions = (\n dates: Date[],\n selectedDate: Date | undefined\n ): { dropdownOptions: ILabeledDropdownOption[]; selectedOption: ILabeledDropdownOption | undefined } => {\n const { locale } = this.props;\n let options: ILabeledDropdownOption[] = [];\n let selectedOption: ILabeledDropdownOption = this.defaultOption;\n\n options = dates.map((value: Date, index: number) => {\n return {\n key: index.toString(),\n value: getDate(value, locale)\n };\n });\n options.unshift(this.defaultOption);\n\n const index: number = dates.findIndex((value: Date) => selectedDate !== undefined && selectedDate.getTime() === value.getTime());\n if (index >= 0 && selectedDate) {\n selectedOption = {\n key: index.toString(),\n value: getDate(selectedDate, locale)\n };\n }\n\n return {\n dropdownOptions: options,\n selectedOption\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PickupTimeslotAvailability } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { LabeledDropdown } from '@msdyn365-commerce-modules/utilities';\nimport {\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption\n} from '@msdyn365-commerce-modules/utilities/dist/types/labeled-dropdown/LabeledDropdown.props';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { IPickupDropdownProps } from './checkout-pickup-date-dropdown';\nimport { CheckoutPickupError } from './checkout-pickup-group';\nimport { getTimeslot } from './checkout-pickup-utility';\n\nexport interface IPickupTimeslotDropdownProps extends IPickupDropdownProps {\n availableTimeslots: PickupTimeslotAvailability[];\n selectedTimeslot?: PickupTimeslotAvailability;\n timeslotPlaceHolder: string;\n setTimeslotHandler(pickupStoreId: string, deliveryMode: string, pickupTimeslot: PickupTimeslotAvailability | undefined): void;\n useHour12TimeFormat?: boolean;\n}\n\n/**\n *\n * CheckoutPickupTimeslotDropdown component.\n * @extends {React.Component}\n */\nexport class CheckoutPickupTimeslotDropdown extends React.PureComponent {\n private readonly defaultKey: number = -1;\n\n private readonly defaultOption: ILabeledDropdownOption;\n\n // As the LabeledDropdown control only offers key and value, we need to map the key with date and timeslot data\n @computed get getTimeslotMap(): Map {\n const map = new Map();\n this.props.availableTimeslots.forEach((value, index) => {\n map.set(index.toString(), value);\n });\n return map;\n }\n\n constructor(props: IPickupTimeslotDropdownProps) {\n super(props);\n this.defaultOption = { key: this.defaultKey.toString(), value: props.defaultText };\n this.updateTimeslotSelection = this.updateTimeslotSelection.bind(this);\n }\n\n public render(): JSX.Element | null {\n const {\n className,\n labelClassname,\n labelText,\n errorMessage,\n dropdownId,\n availableTimeslots,\n selectedTimeslot,\n controlledByParent,\n toggleColor,\n dropdownClassname\n } = this.props;\n\n const { dropdownOptions, selectedOption } = this.mapTimeslotsToOptions(availableTimeslots, selectedTimeslot);\n\n return (\n
\n \n \n \n
\n );\n }\n\n private readonly updateTimeslotSelection = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { pickupStoreId, deliveryMode, setTimeslotHandler } = this.props;\n const timeslot: PickupTimeslotAvailability | undefined = this.getTimeslot(notification);\n setTimeslotHandler(pickupStoreId, deliveryMode, timeslot);\n };\n\n private readonly getTimeslot = (notification: ILabeledDropdownOnChangeNotification): PickupTimeslotAvailability | undefined => {\n const key: string = notification.selectedOption.key;\n if (key === this.defaultKey.toString() || !this.getTimeslotMap.has(key)) {\n return undefined;\n }\n return this.getTimeslotMap.get(key);\n };\n\n private readonly mapTimeslotsToOptions = (\n timeslots: PickupTimeslotAvailability[],\n selectedTimeslot: PickupTimeslotAvailability | undefined\n ): { dropdownOptions: ILabeledDropdownOption[]; selectedOption: ILabeledDropdownOption | undefined } => {\n const { timeslotPlaceHolder, locale, useHour12TimeFormat } = this.props;\n let options: ILabeledDropdownOption[] = [];\n let selectedOption: ILabeledDropdownOption = this.defaultOption;\n\n options = timeslots.map((value: PickupTimeslotAvailability, index: number) => {\n return {\n key: index.toString(),\n value: getTimeslot(timeslotPlaceHolder, value.StartDateTime, value.EndDateTime, locale, useHour12TimeFormat)\n };\n });\n options.unshift(this.defaultOption);\n\n const index: number = timeslots.findIndex(\n value =>\n selectedTimeslot !== undefined &&\n selectedTimeslot.StartDateTime?.getTime() === value.StartDateTime?.getTime() &&\n selectedTimeslot.EndDateTime?.getTime() === value.EndDateTime?.getTime()\n );\n if (index >= 0 && selectedTimeslot) {\n selectedOption = {\n key: index.toString(),\n value: getTimeslot(\n timeslotPlaceHolder,\n selectedTimeslot.StartDateTime,\n selectedTimeslot.EndDateTime,\n locale,\n useHour12TimeFormat\n )\n };\n }\n\n return {\n dropdownOptions: options,\n selectedOption\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { getEstimatedPickupTimeslotAvailabilitiesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CartLine,\n LineDeliverySpecification,\n OrgUnitLocation,\n PickupTimeslotAvailability,\n PickupTimeslotAvailabilitySearchCriteria,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getFallbackImageUrl,\n getSimpleProducts,\n ObjectExtensions,\n ProductInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { format, IModuleProps, isNullOrWhiteSpace, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutPickupData } from './checkout-pickup.data';\nimport { ICheckoutPickupProps } from './checkout-pickup.props.autogenerated';\nimport {\n CheckoutPickupDateDropdown,\n CheckoutPickupError,\n CheckoutPickupTimeslotDropdown,\n getDate,\n getTimeslot,\n getUTCDateWithoutTime\n} from './components';\nimport {\n CheckoutPickupAddress,\n CheckoutPickupCartLines,\n CheckoutPickupGroupHeader,\n CheckoutPickupTimeslotInfo,\n DefaultImageSettings,\n ICheckoutPickupAddressProps,\n ICheckoutPickupCartLineInfo,\n ICheckoutPickupCartLinesProps,\n ICheckoutPickupGroup,\n ICheckoutPickupGroupHeaderProps,\n ICheckoutPickupGroupViewProps,\n ICheckoutPickupTimeslotInfoProps,\n PickupTimeslotAvailabilityState\n} from './components/checkout-pickup-group';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutPickupModuleProps extends ICheckoutPickupProps, IModuleStateProps {}\n\nexport interface ICheckoutPickupState {\n pickupGroups: ICheckoutPickupGroup[];\n}\n\nexport interface ICheckoutPickupViewState {\n isLoading: boolean;\n isHeaderError: boolean;\n isShowDropdown: boolean;\n isShowSelected: boolean;\n}\n\nexport interface ICheckoutPickupViewProps extends ICheckoutPickupProps<{}> {\n checkoutPickup: IModuleProps;\n viewState: ICheckoutPickupViewState;\n headerError: React.ReactNode;\n waiting: React.ReactNode;\n pickupGroups: ICheckoutPickupGroupViewProps[];\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutPickup component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutPickup extends React.Component {\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isLoading: boolean = false;\n\n @observable private headerErrorMessage?: string;\n\n @computed get isDataReady(): boolean {\n return (\n (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS' &&\n (this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.status) === 'SUCCESS'\n );\n }\n\n constructor(props: ICheckoutPickupModuleProps) {\n super(props);\n this.state = { pickupGroups: [] };\n\n this.setDateHandler = this.setDateHandler.bind(this);\n this.setTimeslotHandler = this.setTimeslotHandler.bind(this);\n }\n\n public componentDidMount(): void {\n when(\n () => this.isDataReady,\n async () => {\n await this.initPickupGroup();\n this.initModuleState();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutPickup && checkoutError.errorMessage) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutPickup) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutPickupModuleProps, nextState: ICheckoutPickupState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n if (!this.isDataReady || !this.canPickup()) {\n return null;\n }\n\n const { resources, config, context } = this.props;\n\n const {\n pickupDateLabel,\n pickupTimeslotLabel,\n pickupDateDefaultText,\n pickupTimeslotDefaultText,\n itemsText,\n singleItemText,\n pickupDateTimeslotText,\n pickupTimeslotPlaceHolder,\n pickupLocationLabel\n } = resources;\n\n const { locale } = context.request;\n const { className, imageSettings, useHour12TimeFormat } = config;\n const defaultClassName = 'ms-checkout-pickup';\n const groupsViewProps: ICheckoutPickupGroupViewProps[] = [];\n\n this.state.pickupGroups.forEach((value, index) => {\n // Divider line for each pickup group\n const groupDivider: React.ReactNode = index !== 0 &&
;\n\n // Line images\n const cartlines: ICheckoutPickupCartLineInfo[] = value.cartLines\n .filter(x => !ObjectExtensions.isNullOrUndefined(x.product))\n .map(line => ({\n lineId: line.cartLine.LineId || '',\n imageProps: {\n requestContext: context.actionContext.requestContext,\n className: `${defaultClassName}__group-line-image`,\n altText: line.product?.Name,\n src: line.product?.PrimaryImageUrl || '',\n fallBackSrc: getFallbackImageUrl(\n line.product?.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n ),\n gridSettings: context.request.gridSettings!,\n imageSettings: imageSettings || DefaultImageSettings,\n loadFailureBehavior: 'empty'\n },\n quantity: line.cartLine.Quantity || 0\n }));\n\n // Heading for each group\n const numberOfCartLines = this._countItems(cartlines);\n const itemText = numberOfCartLines > 1 ? itemsText : singleItemText;\n const itemTitle = `(${format(itemText, numberOfCartLines)})`;\n const headerProps: ICheckoutPickupGroupHeaderProps = {\n moduleClassName: defaultClassName,\n storeInfo: `${value.pickupModeName}, ${value.storeName}`,\n items: itemTitle\n };\n const groupHeader: React.ReactNode = ;\n\n const lineImageProps: ICheckoutPickupCartLinesProps = {\n moduleClassName: defaultClassName,\n cartLines: cartlines.filter(x => !ObjectExtensions.isNullOrUndefined(x))\n };\n const cartLineImages: React.ReactNode = ;\n\n // Selected pickup date and timeslot node\n const dateString = getDate(value.selectedDate, locale);\n const timeslotString = getTimeslot(\n pickupTimeslotPlaceHolder,\n value.selectedTimeslot?.StartDateTime,\n value.selectedTimeslot?.EndDateTime,\n locale,\n useHour12TimeFormat\n );\n const timeslotInfoProps: ICheckoutPickupTimeslotInfoProps = {\n moduleClassName: defaultClassName,\n title: pickupDateTimeslotText,\n content: `${dateString} ${timeslotString}`\n };\n const selectedDateTimeslotNode: React.ReactNode = ;\n\n // Pickup address\n const addressProps: ICheckoutPickupAddressProps = {\n moduleClassName: defaultClassName,\n title: pickupLocationLabel,\n address: value.pickupAddress\n };\n const pickupAddress: React.ReactNode = ;\n\n // Pickup date and timeslot dropdown list\n const dropdownClassName = `${defaultClassName}__group-datetime-dropdown`;\n const labelClassName = `${dropdownClassName}-label`;\n const dropdownSelectClassName = `${dropdownClassName}-select`;\n const dateDropdownNode: React.ReactNode = (\n \n );\n\n const timeslotDropdownNode: React.ReactNode = (\n \n );\n\n const viewProp: ICheckoutPickupGroupViewProps = {\n moduleProps: { ...this.props },\n pickupGroupContainer: { className: `${defaultClassName}__group` },\n dateTimeslotContainer: { className: `${defaultClassName}__group-datetime` },\n pickupStoreId: value.pickupStoreId,\n pickupModeName: value.pickupModeName,\n deliveryMode: value.deliveryMode,\n groupDivider,\n groupHeader,\n groupErrorMessage: ,\n cartLineImages,\n pickupDateDropdown: dateDropdownNode,\n pickupTimeslotDropdown: timeslotDropdownNode,\n selectedDateTimeslot: selectedDateTimeslotNode,\n pickupAddress\n };\n\n groupsViewProps.push(viewProp);\n });\n\n const {\n moduleState: { isReady, hasError }\n } = this.props;\n const isHeaderError = !this.isLoading && this.headerErrorMessage !== undefined;\n const isShowDropdown = !this.isLoading && !isReady;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n\n const viewProps: ICheckoutPickupViewProps = {\n ...this.props,\n checkoutPickup: {\n moduleProps: this.props,\n className: classname(defaultClassName, className)\n },\n viewState: {\n isLoading: this.isLoading,\n isHeaderError,\n isShowSelected,\n isShowDropdown\n },\n headerError: ,\n waiting: ,\n pickupGroups: groupsViewProps,\n checkoutErrorRef: this.checkoutErrorRef\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n public async setDateHandler(pickupStoreId: string, deliveryMode: string, pickupDate: Date | undefined): Promise {\n const oldGroup = this.state.pickupGroups.find(\n group => group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode\n );\n if (!oldGroup) {\n return;\n }\n\n const newGroup: ICheckoutPickupGroup = { ...oldGroup };\n newGroup.selectedDate = pickupDate;\n newGroup.selectedTimeslot = undefined; // Clear the selected timeslot in any case\n newGroup.timeslotErrorMessage = undefined; // Clear the timeslot error message if any\n newGroup.lineDeliverySpecs.forEach((lineSpec: LineDeliverySpecification) => {\n if (lineSpec.DeliverySpecification) {\n lineSpec.DeliverySpecification.PickupTimeslotStartDateTime = undefined;\n lineSpec.DeliverySpecification.PickupTimeslotEndDateTime = undefined;\n }\n });\n\n if (pickupDate) {\n // Date is set\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n StartDate: pickupDate,\n EndDate: pickupDate,\n SearchOptionValue: 2 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.All\n };\n const timeslotResults: PickupTimeslotAvailability[] = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {}, bypassCache: 'get' },\n searchCriteria\n );\n\n newGroup.availableTimeslots = timeslotResults.filter(value => (value.AvailableCapacity || 0) > 0);\n newGroup.dateErrorMessage =\n newGroup.availableTimeslots.length === 0 ? this.props.resources.noAvailableTimeslotError : undefined;\n } else {\n // Date is not set\n newGroup.availableTimeslots = [];\n newGroup.dateErrorMessage = undefined;\n }\n\n const groups = this.state.pickupGroups.map(group => {\n if (group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode) {\n return newGroup;\n }\n return group;\n });\n\n this.setState({ pickupGroups: groups });\n }\n\n @action\n public setTimeslotHandler(pickupStoreId: string, deliveryMode: string, pickupTimeslot: PickupTimeslotAvailability | undefined): void {\n const oldGroup = this.state.pickupGroups.find(\n group => group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode\n );\n if (!oldGroup) {\n return;\n }\n\n const newGroup: ICheckoutPickupGroup = { ...oldGroup };\n\n newGroup.selectedTimeslot = pickupTimeslot;\n newGroup.lineDeliverySpecs.forEach((lineSpec: LineDeliverySpecification) => {\n if (lineSpec.DeliverySpecification) {\n lineSpec.DeliverySpecification.PickupTimeslotStartDateTime = pickupTimeslot?.StartDateTime;\n lineSpec.DeliverySpecification.PickupTimeslotEndDateTime = pickupTimeslot?.EndDateTime;\n }\n });\n\n if (pickupTimeslot) {\n newGroup.timeslotErrorMessage = undefined;\n }\n\n const groups = this.state.pickupGroups.map(group => {\n if (group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode) {\n return newGroup;\n }\n return group;\n });\n\n this.setState({ pickupGroups: groups });\n }\n\n @action\n private readonly initModuleState = (): void => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onSubmit: this.onSubmit,\n status: this.canPickup() ? (this.isPickupTimeSlotSet() ? 'ready' : 'updating') : 'disabled'\n });\n };\n\n private readonly onEdit = (): void => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly onReady = (): void => {\n this.props.moduleState.onReady();\n };\n\n private readonly onPending = (): void => {\n this.props.moduleState.onPending();\n };\n\n private readonly onSubmit = async (): Promise => {\n await this.updateCartLinePickupDateTimeslot();\n };\n\n private readonly setError = (errorMessage: string, isHeaderError: boolean = true): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n if (isHeaderError) {\n this.headerErrorMessage = errorMessage;\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.headerErrorMessage = undefined;\n };\n\n @action\n private readonly initPickupGroup = async (): Promise => {\n const pickupCartLines: CartLine[] = this.getCartLinesforPickup();\n let products: SimpleProduct[] = [];\n try {\n products = await this.getProductsByCartLines(\n this.props.data.checkout.result?.checkoutCart.cart.ChannelId || 0,\n pickupCartLines\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n const pickupGroups: ICheckoutPickupGroup[] = [];\n const locations: OrgUnitLocation[] = this.props.data.orgUnitLocations.result || [];\n this.isLoading = true;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { featureState, deliveryOptions } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n for (const line of pickupCartLines) {\n const group: ICheckoutPickupGroup | undefined = pickupGroups.find(\n x => x.pickupStoreId === line.FulfillmentStoreId && x.deliveryMode === line.DeliveryMode\n );\n const product: SimpleProduct | undefined = products.find(x => x.RecordId === line.ProductId);\n const lineDeliverySpecification: LineDeliverySpecification = {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: line.DeliveryMode,\n DeliveryPreferenceTypeValue: 2,\n PickUpStoreId: line.FulfillmentStoreId,\n PickupTimeslotStartDateTime: line.PickupTimeslotStartDateTime,\n PickupTimeslotEndDateTime: line.PickupTimeslotEndDateTime,\n DeliveryAddress: line.ShippingAddress\n }\n };\n if (group) {\n group.lineDeliverySpecs.push(lineDeliverySpecification);\n group.cartLines.push({ cartLine: line, product });\n } else {\n // Group not exists yet\n const location: OrgUnitLocation | undefined = locations.find(x => x.OrgUnitNumber === line.FulfillmentStoreId);\n const storeName: string = this.getStoreName(location, line);\n const selectedDate: Date | undefined =\n line.PickupTimeslotStartDateTime && getUTCDateWithoutTime(line.PickupTimeslotStartDateTime);\n const selectedTimeslot =\n line.PickupTimeslotStartDateTime && line.PickupTimeslotEndDateTime\n ? { StartDateTime: line.PickupTimeslotStartDateTime, EndDateTime: line.PickupTimeslotEndDateTime }\n : undefined;\n const newGroup: ICheckoutPickupGroup = {\n pickupModeName: retailMultiplePickUpOptionEnabled\n ? this.getPickupModeDescription(\n this.props.resources.generalPickupText,\n line.DeliveryMode,\n deliveryOptions?.result,\n product\n )\n : this.props.resources.generalPickupText,\n pickupStoreId: line.FulfillmentStoreId || '',\n deliveryMode: line.DeliveryMode || '',\n storeName,\n pickupAddress: line.ShippingAddress,\n availabilityState: PickupTimeslotAvailabilityState.None,\n lineDeliverySpecs: [lineDeliverySpecification],\n cartLines: [{ cartLine: line, product }],\n availableDates: [],\n availableTimeslots: [],\n selectedDate,\n selectedTimeslot\n };\n\n let dailyGroupingResults: PickupTimeslotAvailability[] = [];\n try {\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n SearchOptionValue: 1 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.DailyGroupingTimeslotOnly\n };\n dailyGroupingResults = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n searchCriteria\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n newGroup.availabilityState = this.getPickupTimeslotAvailabilityState(dailyGroupingResults);\n if (newGroup.availabilityState === PickupTimeslotAvailabilityState.NotAvailable) {\n newGroup.groupErrorMessage = this.props.resources.noAvailableDateError;\n this.setError(newGroup.groupErrorMessage, false);\n }\n dailyGroupingResults.forEach(value => {\n if (value.StartDateTime && (value.AvailableCapacity || 0) > 0) {\n newGroup.availableDates.push(getUTCDateWithoutTime(value.StartDateTime));\n }\n });\n\n if (selectedDate) {\n let timeslotResults: PickupTimeslotAvailability[] = [];\n try {\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n StartDate: selectedDate,\n EndDate: selectedDate,\n SearchOptionValue: 2 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.All\n };\n timeslotResults = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {}, bypassCache: 'get' },\n searchCriteria\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n newGroup.availableTimeslots = timeslotResults.filter(value => (value.AvailableCapacity || 0) > 0);\n }\n pickupGroups.push(newGroup);\n }\n }\n\n const filteredPickupGroups = pickupGroups.filter(\n group =>\n group.availabilityState === PickupTimeslotAvailabilityState.Available ||\n group.availabilityState === PickupTimeslotAvailabilityState.NotAvailable\n );\n\n if (!ArrayExtensions.hasElements(filteredPickupGroups)) {\n this.props.context.telemetry.error('Data is not ready or pickup group is empty, module wont render.');\n }\n this.isLoading = false;\n this.setState({ pickupGroups: filteredPickupGroups });\n };\n\n @action\n private readonly updateCartLinePickupDateTimeslot = async (): Promise => {\n if (!this.validateTimeslot()) {\n return;\n }\n const { resources } = this.props;\n let lineSpecs: LineDeliverySpecification[] = [];\n\n this.state.pickupGroups.forEach(group => {\n lineSpecs = lineSpecs.concat(group.lineDeliverySpecs);\n });\n\n this.clearError();\n this.onPending();\n\n try {\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const response = await checkoutState.checkoutCart.updateCartLinePickupDateTimeslot({ lineDeliverySpecifications: lineSpecs });\n\n if (response.status === 'FAILED') {\n this.setError(resources.genericErrorMessage);\n } else {\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n };\n\n private readonly getProductsByCartLines = async (channelId: number, cartLines: CartLine[]): Promise => {\n const actionContext = this.props.context.actionContext;\n const productInputs = cartLines\n .filter(line => !ObjectExtensions.isNullOrUndefined(line.ProductId))\n .map(\n line =>\n new ProductInput(\n line.ProductId || 0,\n actionContext.requestContext.apiSettings,\n channelId,\n undefined,\n actionContext.requestContext\n )\n );\n return getSimpleProducts(productInputs, actionContext);\n };\n\n private readonly validateTimeslot = (): boolean => {\n let validationResult = true;\n this.state.pickupGroups.forEach(group => {\n switch (group.availabilityState) {\n case PickupTimeslotAvailabilityState.NotAvailable:\n // Need customer to select another store in this case\n validationResult = false;\n break;\n case PickupTimeslotAvailabilityState.Available:\n if (!group.selectedDate || !group.selectedTimeslot) {\n if (!group.selectedDate) {\n group.dateErrorMessage = this.props.resources.pickupDateRequired;\n }\n if (!group.selectedTimeslot) {\n group.timeslotErrorMessage = this.props.resources.pickupTimeslotRequired;\n }\n this.setError(this.props.resources.pickupDateTimeslotRequired, false);\n validationResult = false;\n } else {\n group.dateErrorMessage = undefined;\n group.timeslotErrorMessage = undefined;\n }\n break;\n\n // We consider timeslot not defined as fallback case\n case PickupTimeslotAvailabilityState.NotDefined:\n default:\n }\n });\n\n return validationResult;\n };\n\n private readonly getStoreName = (orgUnitLocation: OrgUnitLocation | undefined, cartLine: CartLine): string => {\n return orgUnitLocation?.OrgUnitName || cartLine.ShippingAddress?.Name || cartLine.FulfillmentStoreId || '';\n };\n\n private readonly canPickup = (): boolean => {\n return ArrayExtensions.hasElements(this.state.pickupGroups);\n };\n\n private readonly isPickupTimeSlotSet = (): boolean => {\n return (\n ArrayExtensions.hasElements(this.state.pickupGroups) &&\n this.state.pickupGroups.every(\n group =>\n !ObjectExtensions.isNullOrUndefined(group.selectedTimeslot?.StartDateTime) &&\n !ObjectExtensions.isNullOrUndefined(group.selectedTimeslot?.EndDateTime)\n )\n );\n };\n\n private readonly getCartLinesforPickup = (): CartLine[] => {\n return this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(line => this.isPickupLine(line)) || [];\n };\n\n private readonly isPickupMode = (deliveryMode: string | undefined): boolean => {\n const pickupDeliveryModeCode = this.props.context.request.channel?.PickupDeliveryModeCode;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n if (retailMultiplePickUpOptionEnabled && deliveryMode !== undefined) {\n const pickupDeliveryMode = channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.includes(deliveryMode);\n return pickupDeliveryMode !== undefined ? pickupDeliveryMode : false;\n }\n return deliveryMode !== undefined && pickupDeliveryModeCode !== undefined && deliveryMode === pickupDeliveryModeCode;\n };\n\n private readonly isPickupLine = (line: CartLine): boolean => {\n return (\n this.isPickupMode(line.DeliveryMode) && line.FulfillmentStoreId !== undefined && !isNullOrWhiteSpace(line.FulfillmentStoreId)\n );\n };\n\n private readonly getPickupModeDescription = (\n resourceString: string,\n deliveryMode?: string,\n deliveryOptions?: ProductDeliveryOptions[],\n product?: SimpleProduct\n ): string => {\n let deliveryOption: string = resourceString;\n if (ArrayExtensions.hasElements(deliveryOptions) && product !== undefined) {\n let foundProductDeliveryOption;\n foundProductDeliveryOption = deliveryOptions?.find(deliveryO => {\n return deliveryO && deliveryO.ProductId === product.RecordId;\n });\n const deliveryDesc = foundProductDeliveryOption?.DeliveryOptions\n ? foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === deliveryMode)?.Description\n : resourceString;\n if (deliveryDesc !== undefined) {\n deliveryOption = deliveryDesc;\n }\n }\n return deliveryOption;\n };\n\n private readonly getPickupTimeslotAvailabilityState = (dailyResult: PickupTimeslotAvailability[]) => {\n let state: PickupTimeslotAvailabilityState = PickupTimeslotAvailabilityState.None;\n if (!ArrayExtensions.hasElements(dailyResult)) {\n state = PickupTimeslotAvailabilityState.NotDefined;\n } else if (dailyResult.every(date => (date.AvailableCapacity || 0) <= 0)) {\n state = PickupTimeslotAvailabilityState.NotAvailable;\n } else {\n state = PickupTimeslotAvailabilityState.Available;\n }\n return state;\n };\n\n /**\n * Returns count of products.\n * @param cartLine - The checkout pickup cart line info props.\n * @returns Number of products.\n */\n private readonly _countItems = (cartlines: ICheckoutPickupCartLineInfo[]): number => {\n return cartlines.reduce((count, line) => {\n return count + (line.quantity || 0);\n }, 0);\n };\n}\n\nexport default CheckoutPickup;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutPickupGroupViewProps, ICheckoutPickupViewProps } from './index';\n\nconst CheckoutPickupView: React.FC = props => {\n const { checkoutPickup, checkoutErrorRef, viewState, headerError, waiting, pickupGroups } = props;\n\n return (\n \n {viewState.isLoading && waiting}\n {viewState.isHeaderError && headerError}\n {pickupGroups.map(\n (pickupGroupViewProps: ICheckoutPickupGroupViewProps, index: number): React.ReactElement => {\n const {\n pickupGroupContainer,\n dateTimeslotContainer,\n groupDivider,\n groupHeader,\n groupErrorMessage,\n cartLineImages,\n pickupDateDropdown,\n pickupTimeslotDropdown,\n selectedDateTimeslot,\n pickupAddress\n } = pickupGroupViewProps;\n\n return (\n \n {groupDivider}\n {groupHeader}\n {groupErrorMessage}\n {cartLineImages}\n {viewState.isShowDropdown && (\n \n {pickupDateDropdown}\n {pickupTimeslotDropdown}\n \n )}\n {viewState.isShowSelected && pickupAddress}\n {viewState.isShowSelected && selectedDateTimeslot}\n \n );\n }\n )}\n \n );\n};\n\nexport default CheckoutPickupView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsCheckboxProps {\n isChecked: boolean;\n ariaLabel?: string;\n disabled: boolean;\n id?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.ariaLabel\n * @param root0.disabled\n * @param root0.telemetryContent\n * @param root0.onChange\n * @param root0.id\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsCheckbox: React.FC = ({\n isChecked,\n ariaLabel,\n disabled,\n telemetryContent,\n onChange,\n id\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n <>\n \n \n );\n};\n\nexport default CheckoutTermsAndConditionsCheckbox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorMessage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsErrorTitleProps {\n title?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.title\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorTitle: React.FC = ({ title }) => {\n if (!title) {\n return null;\n }\n\n return

{title}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutTermsAndConditionsData } from './checkout-terms-and-conditions.data';\nimport { ICheckoutTermsAndConditionsProps } from './checkout-terms-and-conditions.props.autogenerated';\nimport CheckboxComponent from './components/checkout-terms-and-conditions.check-box';\nimport ErrorMessageComponent from './components/checkout-terms-and-conditions.error-message';\nimport ErrorTitleComponent from './components/checkout-terms-and-conditions.error-title';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutTermsAndConditionsModuleProps\n extends ICheckoutTermsAndConditionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutTermsAndConditions {\n termsAndConditionAcceptance: INodeProps;\n checkBox: React.ReactNode;\n description: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsError {\n error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsViewState {\n isError: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutTermsAndConditionsViewProps extends ICheckoutTermsAndConditionsProps<{}> {\n checkoutTermsAndConditions: IModuleProps;\n isTermsAccepted: boolean;\n errorMessageData: string;\n viewState: ICheckoutTermsAndConditionsViewState;\n termsAndConditionsContent: ICheckoutTermsAndConditions;\n errorMessage?: ICheckoutTermsAndConditionsError;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutTermsAndConditions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutTermsAndConditions extends React.Component {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isTermsAccepted: boolean = true;\n\n @observable private errorMessage?: string;\n\n constructor(props: ICheckoutTermsAndConditionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get isShowButtons(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && (showControlButtons || false);\n }\n\n @computed get isAutoSave(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && !showControlButtons;\n }\n\n @computed get defaultTermsAndConditionAcceptedValue(): boolean {\n const { showCheckbox } = this.props.config;\n return !showCheckbox;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.isTermsAndConditionAccepted,\n async () => {\n this.isTermsAccepted =\n this.props.data.checkout.result?.isTermsAndConditionAccepted || this.defaultTermsAndConditionAcceptedValue;\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutTermsAndConditions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutTermsAndConditions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutTermsAndConditionsModuleProps,\n nextState: ICheckoutTermsAndConditionsViewState\n ): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n moduleState: { isReady, hasError },\n config: { className }\n } = this.props;\n const isTermsAndConditionAccepted = this.props.data.checkout.result?.isTermsAndConditionAccepted;\n const isError = hasError;\n const isShowContent = !isReady;\n const isShowSelected = !hasError && isReady;\n\n const viewProps = {\n ...this.props,\n ...this.state,\n isTermsAccepted: this.isTermsAccepted,\n errorMessageData: this.errorMessage,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isError,\n isShowSaveButton: isShowContent && this.isShowButtons,\n isShowEditButton: isShowSelected && this.isShowButtons,\n isShowCancelButton: isShowContent && this.isShowButtons && isTermsAndConditionAccepted\n },\n checkoutTermsAndConditions: {\n moduleProps: this.props,\n className: classname('ms-checkout-terms-and-conditions', className)\n },\n termsAndConditionsContent: this.getTermsAndConditions(),\n errorMessage: this.getErrorMessage(),\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSubmit,\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onChange: this.onChange\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.description = event.target.value);\n\n private readonly getTermsAndConditions = (): ICheckoutTermsAndConditions => {\n const {\n moduleState: { isReady },\n config: { showCheckbox, description }\n } = this.props;\n const isDisabled = isReady && !this.isAutoSave;\n const isTermsAndConditionAccepted = this.isTermsAccepted;\n const { checkboxAriaLabel } = this.props.resources;\n return {\n termsAndConditionAcceptance: { className: 'ms-checkout-terms-and-conditions__container' },\n checkBox: showCheckbox && (\n \n ),\n description: (\n \n )\n };\n };\n\n @action\n private readonly init = async (): Promise => {\n const {\n data,\n config: { showCheckbox }\n } = this.props;\n\n const hasInvoiceLine = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n\n // If hasInvoiceLine is true, this is for b2b and isTermsAccepted should be true\n if (hasInvoiceLine || data.checkout.result?.isTermsAndConditionAccepted || !showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(true);\n this.isTermsAccepted = true;\n } else if (showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(false);\n this.isTermsAccepted = false;\n }\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n status: hasInvoiceLine ? 'disabled' : this.isTermsAccepted ? 'ready' : 'updating'\n });\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly getErrorMessage = (): ICheckoutTermsAndConditionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n error: { tag: 'div', className: 'ms-checkout-terms-and-conditions__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel', cancelBtnAriaLabel } = this.props.resources;\n return (\n \n {cancelBtnLabel}\n \n );\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save', saveBtnAriaLabel } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change', editBtnAriaLabel } = this.props.resources;\n return (\n \n {editBtnLabel}\n \n );\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Terms and conditions onEdit is called.');\n\n this.onUpdating();\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Terms and conditions onSubmit is called.');\n\n if (!this.isTermsAccepted) {\n if (this.isAutoSave) {\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n } else {\n this.setError(this.props.resources.errorMessage);\n this.props.moduleState.setHasError(true);\n }\n } else {\n this.clearError();\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Terms and conditions onCancel is called.');\n\n // Reset to the saved value\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const isTermsAccepted = this.props.data.checkout.result.isTermsAndConditionAccepted;\n if (!isTermsAccepted) {\n // It has no saved email, set to status updating and request user to fill the email form\n this.props.moduleState.onUpdating();\n } else {\n // It has saved email, set to status ready\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly updateTermsAndConditionsAcceptance = async (isTermsAccepted: boolean): Promise => {\n if (this.props.data.checkout.result) {\n await this.props.data.checkout.result.updateTermsAndConditionsAcceptance({ newIsTermsAndConditionAccepted: isTermsAccepted });\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onChange = async (event: React.ChangeEvent) => {\n const checked = event.target.checked;\n this.isTermsAccepted = checked;\n\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\n await this.props.data.checkout.result.updateIsTermsAndConditionsChecked({ newIsTermsAndConditionChecked: checked });\n }\n\n if (this.isAutoSave) {\n await this.onSubmit();\n }\n };\n}\n\nexport default CheckoutTermsAndConditions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutTermsAndConditions,\n ICheckoutTermsAndConditionsError,\n ICheckoutTermsAndConditionsViewProps\n} from './checkout-terms-and-conditions';\n\nconst TermsAndCondition: React.FC = ({ termsAndConditionAcceptance, checkBox, description }) => {\n return (\n \n {checkBox}\n {description}\n \n );\n};\n\nconst ErrorMessage: React.FC = ({ error, title, message }) => {\n return (\n \n {title}\n {message}\n \n );\n};\n\nconst CheckoutTermsAndConditionsView: React.FC = props => {\n const {\n checkoutTermsAndConditions,\n checkoutErrorRef,\n viewState,\n termsAndConditionsContent,\n errorMessage,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isError && errorMessage && }\n \n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutTermsAndConditionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport {\n Button,\n ITelemetryContent,\n TelemetryConstant,\n getPayloadObject,\n getTelemetryAttributes\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\n/**\n * Class names used in component.\n */\nconst componentClassName = 'ms-order-history-with-search-and-filters-view-mode-selector';\nconst detailsViewClassName = `${componentClassName}__detailed-view`;\nconst listViewClassName = `${componentClassName}__list-view`;\nconst viewSelectedClassName = `${componentClassName}__selected`;\n\n/**\n * IOrderHistoryWithSearchAndFiltersViewModeResources interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersViewModeResources {\n listViewOptionAriaLabel?: string;\n detailedViewOptionAriaLabel?: string;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersViewModeState interface.\n */\nexport enum OrderHistoryWithSearchAndFiltersViewModeState {\n DetailedView,\n ListView\n}\n\n/**\n * IOrderHistoryWithSearchAndFiltersViewModeProps interface.\n */\nexport interface IOrderHistoryWithSearchAndFiltersViewModeProps extends IComponentProps<{}> {\n className?: string;\n resources?: IOrderHistoryWithSearchAndFiltersViewModeResources;\n currentViewModeState: OrderHistoryWithSearchAndFiltersViewModeState;\n telemetryContent?: ITelemetryContent;\n onClick(state: OrderHistoryWithSearchAndFiltersViewModeState): void;\n}\n\n/**\n * OrderHistoryWithSearchAndFiltersViewMode component.\n * @param props - Configuration of the component.\n * @returns React node.\n */\nconst OrderHistoryWithSearchAndFiltersViewModeFunctionalComponent: React.FC = (\n props: IOrderHistoryWithSearchAndFiltersViewModeProps\n) => {\n const [viewModeState, setViewModeState] = React.useState(props.currentViewModeState);\n\n const onClickHandler = (newViewModeState: OrderHistoryWithSearchAndFiltersViewModeState) => {\n setViewModeState(newViewModeState);\n props.onClick(newViewModeState);\n };\n\n // define telemetry attributes\n const viewModeDetailedViewAttributes = getTelemetryAttributes(\n props.telemetryContent!,\n getPayloadObject('click', props.telemetryContent!, `${TelemetryConstant.ViewMode} - Detailed view`)\n );\n const viewModeListViewAttributes = getTelemetryAttributes(\n props.telemetryContent!,\n getPayloadObject('click', props.telemetryContent!, `${TelemetryConstant.ViewMode} - List view`)\n );\n\n return (\n
\n onClickHandler(OrderHistoryWithSearchAndFiltersViewModeState.DetailedView)}\n {...viewModeDetailedViewAttributes}\n />\n onClickHandler(OrderHistoryWithSearchAndFiltersViewModeState.ListView)}\n {...viewModeListViewAttributes}\n />\n
\n );\n};\n\n/**\n * OrderHistoryWithSearchAndFiltersViewMode component.\n */\nexport const OrderHistoryWithSearchAndFiltersViewModeComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IOrderHistoryWithSearchAndFiltersViewModeProps\n>('OrderHistoryWithSearchAndFiltersViewModeComponent', { component: OrderHistoryWithSearchAndFiltersViewModeFunctionalComponent });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult, Customer, ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCatalogId } from '@msdyn365-commerce/core';\nimport { ProductComparisonItem, ProductComparisonState } from '../product-comparison-state';\nimport { IProductComparisonButtonProps } from './product-comparison-button.props.autogenerated';\n\n/**\n * Represents product comparison view props.\n */\nexport interface IProductComparisonButtonViewProps extends IProductComparisonButtonProps<{}> {\n moduleProps: IModuleProps;\n productComparisonButton?: React.ReactNode;\n productComparisonPreview?: React.ReactNode;\n}\n\n/**\n * Represents the data which is required for the product comparison button to be rendered.\n */\nexport interface IProductComparisonButtonData {\n accountInformation?: AsyncResult;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonFullProps extends IProductComparisonButtonProps {\n product: ProductSearchResult | SimpleProduct;\n catalogId: number;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonState {\n canProductBeAddedToProductComparison: boolean;\n currentProductsCount: number;\n comparisonItemId: string;\n}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductComparisonButton extends React.PureComponent {\n private static _productComparisonPreview?: React.ReactNode;\n\n private readonly _className: string;\n\n private readonly _instanceId: string;\n\n private readonly _shouldUsePreview: boolean;\n\n private static _renderProductComparisonPreview(props: IProductComparisonButtonFullProps): React.ReactNode {\n if (!ProductComparisonButton._productComparisonPreview && ArrayExtensions.hasElements(props.slots.productComparisonPreview)) {\n ProductComparisonButton._productComparisonPreview = props.slots.productComparisonPreview[0];\n }\n\n return ProductComparisonButton._productComparisonPreview;\n }\n\n private static _renderProductComparisonButton(\n className: string,\n buttonText: string | undefined,\n title: string,\n onClickHandler?: () => void\n ): React.ReactNode {\n const isDisabled = ObjectExtensions.isNullOrUndefined(onClickHandler);\n let content: React.ReactNode;\n if (buttonText) {\n content = (\n <>\n
\n
{buttonText}
\n \n );\n }\n return (\n \n );\n }\n\n public constructor(props: IProductComparisonButtonFullProps) {\n super(props);\n\n this._className = 'ms-product-comparison-button';\n this._instanceId = `${this._className}-${this.props.id}-${Random.Guid.generateGuid()}`;\n\n this.state = this._getNewState();\n\n this._shouldUsePreview = !ProductComparisonButton._productComparisonPreview;\n ProductComparisonButton._renderProductComparisonPreview(this.props);\n }\n\n public componentDidMount(): void {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).listModifiedEvent.subscribe(\n {\n instanceId: this._instanceId,\n\n /**\n * Updates the state in case the state for the particular product was changed.\n */\n handler: () => {\n this.setState(this._getNewState());\n }\n }\n );\n }\n\n public getSnapshotBeforeUpdate(previousProps: Readonly): void {\n if (previousProps.product.RecordId !== this.props.product.RecordId || previousProps.catalogId !== this.props.catalogId) {\n this.setState(this._getNewState());\n }\n }\n\n public componentWillUnmount(): void {\n ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).listModifiedEvent.unsubscribe(this._instanceId);\n }\n\n public render(): React.ReactNode | null {\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n if (!isConsentGiven) {\n return null;\n }\n\n const viewProps: IProductComparisonButtonViewProps = {\n ...this.props,\n moduleProps: {\n moduleProps: this.props,\n className: this._className\n }\n };\n\n if (this._shouldUsePreview) {\n viewProps.productComparisonPreview = ProductComparisonButton._productComparisonPreview;\n }\n\n const buttonClassName = this.props.config.shouldDisplayText ? `${this._className}__button` : `${this._className}__icon`;\n\n if (!this.state.canProductBeAddedToProductComparison) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.removeFromComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n classnames(`${buttonClassName}__removing`, buttonClassName),\n buttonText,\n this.props.resources.removeFromComparisonButtonText,\n this._removeFromProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n const productsLimit = this._getProductsLimit();\n if (!ObjectExtensions.isNullOrUndefined(productsLimit) && productsLimit <= this.state.currentProductsCount) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonLimitReachedButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonLimitReachedButtonText\n );\n return this.props.renderView(viewProps);\n }\n\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonButtonText,\n this._addToProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n private _getProductsLimit(): number | undefined | null {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n if (viewport === 'xs' || viewport === 'sm') {\n return this.props.context.app.config.productComparisonMobileProductsLimit;\n }\n return this.props.context.app.config.productComparisonDesktopProductsLimit;\n }\n\n /**\n * Adds current product to a product comparison list.\n */\n private readonly _addToProductComparison: () => void = () => {\n const item = new ProductComparisonItem(this.props.product.RecordId, this.props.catalogId);\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).addItem(item);\n };\n\n /**\n * Removes current product from the product comparison list where it was added earlier.\n */\n private readonly _removeFromProductComparison: () => void = () => {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).removeItemById(\n this.state.comparisonItemId\n );\n };\n\n private _getProdutComparisonDataByCatalogId(): ProductComparisonItem[] {\n const items = ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).items;\n const catalogId = getCatalogId(this.props.context.request);\n const productByCatalogId = items?.filter(product => product.catalogId === catalogId) ?? [];\n return productByCatalogId;\n }\n\n /**\n * Retrieves the state of the component based on the comparison data.\n * @returns State object for the component.\n */\n private readonly _getNewState: () => IProductComparisonButtonState = () => {\n const comparisonItemId = ProductComparisonItem.getItemId(this.props.product.RecordId, this.props.catalogId);\n const products = this._getProdutComparisonDataByCatalogId();\n return {\n comparisonItemId,\n canProductBeAddedToProductComparison: !ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).hasItemById(comparisonItemId),\n currentProductsCount: products.length\n };\n };\n}\n\nexport default ProductComparisonButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductComparisonButtonViewProps } from './product-comparison-button';\n\n/**\n * Represents product comparison button view.\n * @param props - View props for product comparison button.\n * @returns Functional component of product comparison button.\n */\nexport const ProductComparisonButtonViewFunctionalComponent: React.FC = props => {\n const { productComparisonButton, productComparisonPreview } = props;\n\n return (\n \n {productComparisonButton}\n {productComparisonPreview}\n \n );\n};\n\nexport default ProductComparisonButtonViewFunctionalComponent;\n"],"names":["AddressShow","_ref","AddressDetail","items","React","Node","Object","assign","map","item","description","AddressSelect","_ref2","SelectAddress","addButton","isShowSaveButton","saveButton","isShowCancelButton","cancelButton","SelectItem","key","input","showItems","AddressAddUpdate","_ref3","AddressForm","heading","hasError","error","shipUsaOnlyMessageText","allowInternationalShipping","renderDeliveryLimitationMessage","AddressItem","label","alert","filteredCountries","value","clonedInput","_objectSpread","props","displayData","AddressError","title","message","className","CheckoutShippingAddress","checkoutErrorRef","viewState","showAddress","showAddressSelect","showAddOrUpdateAddress","cartLineImages","resources","config","Module","ref","isShowAddress","isShowAddresList","isShowAddOrUpdateAddress","renderThumbnailItem","thumbnail","ThumbnailItemContainerProps","Picture","GetEmptyThumbnailItemComponent","imageSettings","_props$config$thumbna2","tag","role","tabIndex","Image","requestContext","context","actionContext","src","gridSettings","request","thumbnailImageSettings","loadFailureBehavior","defaultThumbnailImageSettings","viewports","xs","q","w","h","xl","lazyload","cropFocalRegion","renderThumbnails","thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","state","Thumbnails","mediaGalleryItems","altText","getMediaGalleryItems","lastUpdate","id","GetThumbnailItemComponent","image","imageId","modifiedActiveIndex","_props$config$thumbna","onClick","_props$callbackToggle","_props$callbackThumbn","callbackToggle","call","callbackThumbnailClick","activeIndex","handleKeyDown","event","keyCode","KeyCodes","Enter","preventDefault","classnames","Button","onKeyDown","fullScreenTitleText","CarouselProps","MediaGallery","Modal","_props$data$checkout$","address","data","checkout","result","shippingAddress","nonEligibleItems","setnonEligibleItems","checkEligibilityForShippingAddress","moduleState","setHasError","async","_props$data$checkout$2","notEligibleList","cart","checkoutCart","_cart$CartLines","itemIds","CartLines","cl","ItemId","addressCountry","ThreeLetterISORegionName","addressState","State","addressRegion","County","GetProductEligibilityInput","Id","eligibilityData","GetProductEligibilityAction","length","forEach","i","_getExtensionPropertyValueByKey","properties","valueType","_properties$find","property","find","p","Key","Value","ExtensionProperties","CommercePropertyValueEnum","string","IsEligible","push","removeIneligibleItems","cartState","checkoutState","badCartLines","includes","LineId","removeCartLines","cartLineIds","window","location","reload","getCartLineFromItemId","itemId","_props$data$checkout$3","Description","SignUpText","text","LoyaltySignUp","constructor","super","handleHeadingChange","this","target","handleMemberHeadingChange","memberHeading","_issueLoyalty","user","isAuthenticated","clicked","setState","IssueLoyaltyInput","apiSettings","issueLoyalty","then","MsDyn365","isBrowser","Msdyn365","catch","telemetry","debug","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","payLoad","getPayloadObject","TelemetryConstant","SignIn","loyaltySignInAttributes","getTelemetryAttributes","contentAction","etext","SignUp","loyaltySignUpAttributes","LoyaltyDetailLink","loyaltyDetailsLinkAttributes","LoyaltyTermsLink","loyaltyTermsLinkAttributes","shouldComponentUpdate","nextProps","nextState","render","_data$customerInforma","_this$props$context$a","signInUrl","termsUrl","loyaltyJoinUrl","origin","signInurl","completeClass","classname","loyaltyCard","hasLoyaltyAccount","undefined","CardTenderTypeValue","customerInformation","invalidAsyncCustomerState","app","canRenderAsyncCustomerDataAsUnmodifiable","IsAsyncCustomer","viewProps","moduleProps","infoMessageBar","accountProcessingPendingInfoMessage","loading","params","isEditor","status","editProps","onEdit","signInLink","href","joinLoyaltyButtonText","signUpText","loyaltyProgramText","signUpButton","disabled","detailsLink","viewLoyaltyPageText","termsLink","loyaltyTermsLinkText","renderView","__decorate","observer","LoyaltyTermsModal","LoyaltyTermsCancel","loyaltyTermCancelAttributes","LoyaltyTermsSubmit","loyaltyTermSubmitAttributes","LoyaltyTermsAgree","loyaltyTermCheckboxAttributes","modal","toggle","onToggle","applicationNode","isOpen","returnFocusRef","returnRef","modalHeader","ModalHeader","modalFooter","ModalFooter","modalBody","ModalBody","cancelLoyaltyTermsText","submitButton","onSubmit","checked","joinLoyaltyTermsText","loyaltyTermsHeading","terms","agreeSection","checkbox","type","onChange","onCheck","agreeText","loyaltyAgreeToTerms","LoyaltyTerms","_toggle","bind","_submit","_checkboxChecked","toggleRef","search","url","requestUrl","isJoining","substring","qsps","split","qsp","splitQsp","isModalOpen","hideToggle","slots","serviceTerms","modalToggle","innerRef","joinLoyaltytermsToggleText","CardNumber","card","redirectToLoyalty","getUrlSync","getLoyaltyCardAsync","callerContext","fullCard","update","GetLoyaltyCardInput","PvaChatConnector","componentDidMount","isOboRequest","botFrameworkCDNURL","pvaChatConnectorBotFrameworkCDNURL","script","document","createElement","crossOrigin","body","appendChild","getRandomValues","rnds8","Uint8Array","rng","crypto","msCrypto","Error","uuid","REGEX","test","byteToHex","toString","substr","arr","offset","arguments","toLowerCase","validate","TypeError","options","buf","rnds","random","stringify","CartAmountTrigger","ProactiveChatTrigger","totalInCart","min","proactiveOnCartAmountMin","max","proactiveOnCartAmountMax","name","_getCart","isEmpty","TotalAmount","retVal","getContextProvider","eCommerceCustIsProactiveChat","eCommerceCustProactiveType","eCommerceCustProactiveShoppingCartAmount","getMessage","proactiveOnCartAmountMessage","proactiveDefaultMessage","getCartState","CartNumberOfItemsTrigger","numberOfItems","proactiveOnCartNoOfItemsMin","proactiveOnCartNoOfItemsMax","TotalItems","eCommerceCustProactiveShoppingCartNumberOfItems","proactiveOnCartNoOfItemsMessage","CartSpecificProductTrigger","product","isValid","_cart$cart$CartLines","_cart$cart$CartLines2","proactiveOnCartSpecificProductList","_this$props$config$pr","j","_this$props$config$pr2","eCommerceCustProactiveShoppingCartSpecificProduct","proactiveOnCartSpecificProductMessage","ProactiveChatNames","DateRangeTrigger","start","_toDate","proactiveOnDateRangeStart","end","proactiveOnDateRangeEnd","now","Date","setHours","getTime","DateRange","eCommerceCustProactiveFromDate","toUTCString","eCommerceCustProactiveToDate","proactiveOnDateRangeMessage","date","dateParts","FromSpecificPageTrigger","proactiveOnFromSpecificPageList","fromSpecificPageTrimmed","trim","referrer","indexOf","FromSpecificPage","eCommerceCustProactiveCameFromPage","proactiveOnFromSpecificPageMessage","PageVisitTrigger","visits","cookieName","cookies","expdate","setTime","isConsentGiven","setConsentCookie","_updateVisitCounter","proactiveOnPageVisitNumber","clear","set","domain","hostname","path","pathname","expires","PageVisits","eCommerceCustProactiveNumberOfVisits","proactiveOnPageVisitMessage","get","SpecificCountryRegionTrigger","customerCountryCode","suggestedMarket","proactiveOnSpecificLocation","eCommerceCustProactiveCountryCode","SpecificLocation","proactiveOnSpecificCountryRegionMessage","SpecificPageTrigger","proactiveOnSpecificPageList","specificPageTrimmed","SpecificPage","proactiveOnSpecificPageMessage","WaitOnTimeTrigger","proactiveOnWaitTimeSeconds","isNaN","waitTimeInMilliseconds","Number","triggerTime","WaitOnTime","eCommerceCustProactiveTimeOnPage","proactiveOnWaitTimeMessage","ProactiveTriggers","userId","uuidv4","_getContext","enabled","timeout","_proactiveCheck","e","exception","provider","_getProvider","_this$props$context$r","eCommerceOperatingUnitNumber","oun","eCommerceBaseUrl","baseUrl","eCommerceDataAreaId","channel","InventLocationDataAreaId","UserId","AccountNumber","customerAccountNumber","Email","emailAddress","FirstName","firstName","anonymousUserName","LastName","lastName","Name","eCommerceCustPageURL","eCommerceCustChatType","proactiveChatEnabled","proactive","_isProactive","getChatWrapperStyle","position","top","right","bottom","left","zIndex","display","justifyContent","getMaximizedChatWrapperStyle","isMobileDevice","height","width","padding","chatHeight","chatWidth","getChatButtonStyle","alignItems","backgroundColor","startChatButtonBackgroundColor","color","startChatButtonTextColor","borderColor","startChatButtonBorderColor","borderRadius","startChatButtonBorderRadius","borderStyle","startChatButtonBorderStyle","borderWidth","startChatButtonBorderWidth","storeLogoURL","cursor","outlineStyle","alignSelf","boxShadow","WebkitBoxShadow","MozBoxShadow","getButtonStoreLogoStyle","headerBackgroundColor","headerTextColor","marginRight","boxSizing","getChatStoreLogoStyle","margin","getChatMessagesStyle","minimized","getChatMessageHeader","chatHeaderHeight","backgroundImage","headerBackgroundImageURL","backgroundRepeat","flexDirection","chatBorderStyle","chatBorderWidth","getMinimizeButtonStyle","borderTop","borderLeft","borderRight","borderBottom","marginTop","getCloseButtonStyle","border","getChatMessageContent","chatBorderColor","getProactiveWrapperStyle","getProactiveMessageHeader","getProactiveMessageContent","getProactiveButtonStyle","outline","fontFormat","font","join","CommerceChatStore","setNewMessage","setNewMessageAction","static","powervaDirectlineTokenURL","botID","tenantID","fetch","method","r","json","token","pvaChatConnectorPowervaDirectlineTokenURL","pvaChatConnectorBotID","pvaChatConnectorTenantID","dispatch","next","action","payload","language","navigator","_activity$from","activity","from","triggerQuery","ReactWebChat","WebChat","setUserId","useState","useMemo","ctx","directLine","createDirectLine","directLineToken","commerceChatStore","store","createStore","actionHandler","styleOptions","bubbleStyling","bubbleBackground","bubbleTextColor","bubbleBorderColor","bubbleBorderRadius","bubbleBorderStyle","bubbleBorderWidth","bubbleFromUserBackground","bubbleFromUserTextColor","bubbleFromUserBorderColor","bubbleFromUserBorderRadius","bubbleFromUserBorderStyle","bubbleFromUserBorderWidth","getBubbleStyling","avatarStyling","avatarBorderRadius","avatarSize","botAvatarBackgroundColor","botAvatarImage","botAvatarInitials","userAvatarBackgroundColor","userAvatarImage","userAvatarInitials","showAvatarInGroup","getAvatarStyling","suggestedActionStyling","suggestedActionLayout","suggestedActionBackground","suggestedActionTextColor","suggestedActionBorderColor","suggestedActionBorderRadius","suggestedActionBorderStyle","suggestedActionBorderWidth","suggestedActionDisabledBorderStyle","suggestedActionDisabledBorderWidth","suggestedActionDisabledTextColor","suggestedActionHeight","suggestedActionImageHeight","suggestedActionsCarouselFlipperCursor","suggestedActionsCarouselFlipperBoxWidth","suggestedActionsCarouselFlipperSize","suggestedActionsFlowMaxHeight","suggestedActionsStackedHeight","suggestedActionsStackedOverflow","suggestedActionsStackedLayoutButtonMaxHeight","suggestedActionsStackedLayoutButtonTextWrap","getSuggestedActionStyling","otherStyling","groupTimestamp","sendTimeout","sendTimeoutForAttachments","timestampColor","timestampFormat","notificationDebounceTimeout","hideToaster","toasterHeight","toasterMaxHeight","toasterSingularMaxHeight","toastFontSize","toastIconWidth","toastSeparatorColor","toastTextPadding","toastErrorBackgroundColor","toastErrorColor","toastInfoBackgroundColor","toastInfoColor","toastSuccessBackgroundColor","toastSuccessColor","toastWarnBackgroundColor","toastWarnColor","typingAnimationBackgroundImage","typingAnimationDuration","typingAnimationHeight","typingAnimationWidth","videoHeight","markdownExternalLinkIconImage","markdownRespectCRLF","internalLiveRegionFadeAfter","accent","subtle","getOtherStyling","hideUploadButton","primaryFont","getChatStyleOptions","userID","INVALID_TOKEN","loaded","setLoaded","setMinimized","newMessage","setToken","isProactive","setIsProactive","proactiveMessage","setProactiveMessage","closed","setClosed","setProvider","isMobile","variant","VariantType","Browser","Viewport","chatStyle","getChatStyling","ChatWrapperStyle","MaximizedChatWrapperStyle","ChatButtonStyle","ButtonStoreLogoStyle","ChatStoreLogoStyle","ChatMessagesStyle","ChatMessageHeader","MinimizeButtonStyle","CloseButtonStyle","ChatMessageContent","ProactiveWrapperStyle","ProactiveMessageHeader","ProactiveMessageContent","ProactiveButtonStyle","RedDotStyle","background","handleMaximizeButtonClick","useEffect","getDirectLineToken","contextProvider","ContextProvider","prov","init","setTimeout","isValidToken","style","alt","fontWeight","fontSize","chatButtonHeader","chatButtonText","flexGrow","handleMinimizeButtonClick","handleCloseButtonClick","version","viewBox","xmlSpace","d","fill","ChatCore","unableToLoadChatMessage","interval","setInterval","clearInterval","Chat","CheckoutStateInput","_this","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","createObservableDataAction","CheckoutState","inputData","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_customerReference","_customerRequisition","_note","_isTermsAndConditionAccepted","_customerAccountAmount","defineProperty","prototype","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","updateShippingAddress","newShippingAddress","updateBillingAddress","newBillingAddress","updateCardPrefix","newCardPrefix","removeGiftCard","giftCardNumber","filter","giftCard","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","updateGuestCheckoutEmail","newGuestCheckoutEmail","customerReference","customerRequisition","note","updateTermsAndConditionsAcceptance","newIsTermsAndConditionAccepted","updateCustomerAccountAmount","observable","computed","EnabledPaymentsForOBO","ModuleStatesCacheKey","getModuleStates","cacheKey","moduleStates","updateModuleStates","WrappedComponent","_super","ModuleState","initializeState","_b","typeName","states","__assign","_a","hasInitialized","isRequired","isCancellable","isSubmitContainer","childIds","getModuleStateManager","isReady","isUpdating","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasExternalSubmitGroup","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","onReady","onUpdating","onPending","onSkip","onDisable","getModule","moduleId","getModuleByTypeName","getModuleStateManagerByTypeName","values","_moduleState","modules","_validateLeaf","source","module","isMatch","_validateContainer","allMatched","skipSkippableItem","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","ArrayExtensions","hasElements","enableControl","__extends","CheckoutErrors","setCheckoutErrors","errorCode","isExpressCheckoutApplied","apiError","clientCheckoutError","consoleCheckoutErrors","getCheckoutState","checkoutError","checkoutErrorsList","errorLocation","ErrorLocation","Console","consoleCheckoutError","errorMessageResource","errorMessage","getCheckoutErrorMessage","console","log","CheckoutPaymentInstrument","Checkout","updateCheckoutError","newCheckoutError","updateShouldFocusOnCheckoutError","newShouldFocusOnCheckoutError","genericError","genericErrorMessage","focusOnCheckoutError","current","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","CheckoutModule","None","setCheckoutErrorFocus","checkoutModuleId","checkoutModule","keys","errorMessageFromAPI","errorResource","resource","ActionError","ErrorCode","ErrorMessageResource","checkoutTimeoutErrorMessage","Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard","blockedLoyaltyCardErrorMessage","CheckoutLoyalty","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue","customerAccountLimitSignDifferentFromAmountDueErrorMessage","CheckoutCustomerAccountPayment","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit","customerAccountPaymentExceedsAvailableCreditLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit","customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems","customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount","customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices","customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_FraudRisk","fraudRiskErrorMessage","Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed","giftCardBalanceInquiryFailedErrorMessage","CheckoutGiftCard","Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch","giftCardCurrencyMismatchErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion","invalidCartVersionErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber","invalidLoyaltyCardNumberErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest","invalidPaymentRequestErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console","invalidPaymentRequestConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines","missingRequiredCartTenderLinesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed","multipleCustomerAccountPaymentsNotAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender","noMoreThanOneLoyaltyTenderErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry","noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard","noTenderLoyaltyCardErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints","notEnoughRewardPointsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided","paymentAlreadyVoidedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance","paymentAmountExceedsGiftBalanceErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties","paymentRequiresMerchantPropertiesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console","paymentRequiresMerchantPropertiesConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount","paymentUsingUnauthorizedAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed","refundAmountMoreThanAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","unableToAuthorizePaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired","unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported","unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment","unableToCancelPaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo","unableToReadCardTokenInfoErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult","unableToRetrieveCardPaymentAcceptResultErrorMessage","ErrorComponent","onAddAccountPayment","onAddPayment","onChangeAmountHandler","customizedAmt","paymentAmount","amountVariable","locale","onChangePaymentAmount","customState","customizedAmount","returnModifiedState","getLocaleBasedCustomizedPrice","getAccountPaymentFormEditMode","amount","maxAmount","customer","customerCreatedDate","availableCredit","showCreditLimit","onToggleCreditSection","creditSectionIsExpanded","orderTotal","excessCredit","onRemovePayment","appliedAmount","skipOnChangeLogic","addPaymentButtonLabel","inputAmountLabel","inputAmountAriaLabel","customerSinceLabel","accountCreditLabel","creditDetailsSectionLabel","orderTotalLabel","availableCreditLabel","creditExcessLabel","appliedCustomerAccountPaymentLabel","removeCustomerAccountPaymentLabel","accountCreditDetails","inputLabel","formProps","addPaymentButton","inputAmount","onInput","currentTarget","which","customerName","customerSince","accountCredit","accountDetails","Alert","assertive","fade","includeAlertClass","appliedLine","bottomBorder","getAccountPaymentFormSummaryMode","inputAmountSummaryLabel","paymentAmountInput","defaultLocale","baseClassName","getAvailableCredit","creditBalances","InvoiceAccountCreditLimit","CreditLimit","Balance","PendingBalance","InvoiceAccountBalance","InvoiceAccountPendingBalance","addPayment","handleSaveAndContinue","_clearError","information","toggleCreditSection","isCreditSectionExpanded","onCancel","handleCancelOrSubmit","customerAccountAmount","updateMaxAmount","Math","_setErrorMessage","invalidAmountForOBOMessage","isCheckoutCustomerAccountPaymentRequired","customerAccountCreditErrorMessage","removePayment","NaN","maxPaymentAmount","Intl","NumberFormat","format","isCustomerAccountPaymentEnabled","customerInfo","b2bChannel","isChannelTypeB2B","platform","AllowOnAccountPayment","enableCustomerAccountPayment","getLoyaltyAmount","loyaltyAmount","_this$props$data$cust","amountDue","_this$props$data$cred","MandatoryCreditLimit","invalidAmountExceedAmountDueMessage","invalidAmountNegativeMessage","currencyCode","formattedExcessCredit","cultureFormatter","formatCurrency","isDataReady","_this$props$data$chec","when","reaction","totalAmount","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec2","_this$props$data$chec3","checkoutErrorFocus","_this$props$data$cust2","hasInvoiceLine","customerSinceDate","CreatedDateTime","toLocaleDateString","checkoutCustomerAccount","errorMessageTitle","editView","features","skipCheckoutOnChangeLogic","summaryView","withModuleState","SummaryForm","EditForm","PickupTimeslotAvailabilityState","CheckoutPickupError","CheckoutPickupGroupHeader","moduleClassName","storeInfo","CheckoutPickupTimeslotInfo","content","CheckoutPickupAddress","_ref4","Street","City","ZipCode","CheckoutPickupCartLines","_ref5","cartLines","prop","showQty","quantity","lineId","imageProps","DefaultImageSettings","lg","quality","getDate","DateTimeFormat","timeZone","getTimeslot","placeHolder","startDate","endDate","useHour12TimeFormat","hour","minute","hour12","formatter","getUTCDateWithoutTime","UTC","getUTCFullYear","getUTCMonth","getUTCDate","CheckoutPickupDateDropdown","defaultKey","updateDateSelection","notification","pickupStoreId","deliveryMode","setDateHandler","selectedOption","getDateMap","has","mapDatesToOptions","dates","selectedDate","defaultOption","index","unshift","findIndex","dropdownOptions","defaultText","Map","availableDates","labelClassname","labelText","dropdownId","controlledByParent","toggleColor","dropdownClassname","htmlFor","LabeledDropdown","onSelectOption","CheckoutPickupTimeslotDropdown","updateTimeslotSelection","setTimeslotHandler","getTimeslotMap","mapTimeslotsToOptions","timeslots","selectedTimeslot","timeslotPlaceHolder","StartDateTime","EndDateTime","_selectedTimeslot$Sta","_value$StartDateTime","_selectedTimeslot$End","_value$EndDateTime","availableTimeslots","CheckoutPickup","isLoading","initModuleState","canPickup","isPickupTimeSlotSet","updateCartLinePickupDateTimeslot","setError","isHeaderError","headerErrorMessage","clearError","initPickupGroup","_this$props","_featureState$result","pickupCartLines","getCartLinesforPickup","products","getProductsByCartLines","ChannelId","pickupGroups","locations","orgUnitLocations","featureState","deliveryOptions","retailMultiplePickUpOptionEnabled","feature","IsEnabled","line","group","x","FulfillmentStoreId","DeliveryMode","RecordId","ProductId","lineDeliverySpecification","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","PickUpStoreId","PickupTimeslotStartDateTime","PickupTimeslotEndDateTime","DeliveryAddress","ShippingAddress","lineDeliverySpecs","cartLine","OrgUnitNumber","storeName","getStoreName","newGroup","pickupModeName","getPickupModeDescription","generalPickupText","pickupAddress","availabilityState","dailyGroupingResults","searchCriteria","DeliveryModeCode","StoreId","SearchOptionValue","getEstimatedPickupTimeslotAvailabilitiesAsync","queryResultSettings","getPickupTimeslotAvailabilityState","NotAvailable","groupErrorMessage","noAvailableDateError","AvailableCapacity","timeslotResults","StartDate","EndDate","bypassCache","filteredPickupGroups","Available","validateTimeslot","lineSpecs","concat","lineDeliverySpecifications","_unused","channelId","productInputs","ObjectExtensions","isNullOrUndefined","ProductInput","getSimpleProducts","validationResult","dateErrorMessage","timeslotErrorMessage","pickupDateRequired","pickupTimeslotRequired","pickupDateTimeslotRequired","NotDefined","orgUnitLocation","_cartLine$ShippingAdd","OrgUnitName","every","_group$selectedTimesl","_group$selectedTimesl2","isPickupLine","isPickupMode","_this$props2","_featureState$result2","pickupDeliveryModeCode","PickupDeliveryModeCode","channelDeliveryOptionConfig","_channelDeliveryOptio","pickupDeliveryMode","PickupDeliveryModeCodes","isNullOrWhiteSpace","resourceString","deliveryOption","_foundProductDelivery","_foundProductDelivery2","foundProductDeliveryOption","deliveryO","deliveryDesc","DeliveryOptions","option","Code","dailyResult","_countItems","cartlines","reduce","count","_this$props$data$chec4","_this$props$data$chec5","pickupDateLabel","pickupTimeslotLabel","pickupDateDefaultText","pickupTimeslotDefaultText","itemsText","singleItemText","pickupDateTimeslotText","pickupTimeslotPlaceHolder","pickupLocationLabel","defaultClassName","groupsViewProps","_value$selectedTimesl","_value$selectedTimesl2","groupDivider","_line$product","_line$product2","_line$product3","_context$request$app","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","OmniChannelMedia","Quantity","numberOfCartLines","itemText","itemTitle","headerProps","groupHeader","lineImageProps","dateString","timeslotString","timeslotInfoProps","selectedDateTimeslotNode","addressProps","dropdownClassName","labelClassName","dropdownSelectClassName","dateDropdownNode","timeslotDropdownNode","viewProp","pickupGroupContainer","dateTimeslotContainer","pickupDateDropdown","pickupTimeslotDropdown","selectedDateTimeslot","isShowDropdown","isShowSelected","checkoutPickup","headerError","waiting","Waiting","pickupDate","oldGroup","lineSpec","noAvailableTimeslotError","groups","pickupTimeslot","pickupGroupViewProps","isChecked","ariaLabel","attribute","CheckoutTermsAndConditions","isTermsAccepted","handleTextChange","getTermsAndConditions","showCheckbox","isAutoSave","isTermsAndConditionAccepted","checkboxAriaLabel","termsAndConditionAcceptance","checkBox","CheckboxComponent","_data$checkout$result","isPaymentVerificationRedirection","getErrorMessage","ErrorTitleComponent","ErrorMessageComponent","getCancelButton","cancelBtnLabel","cancelBtnAriaLabel","getSaveButton","saveBtnLabel","saveBtnAriaLabel","getEditButton","editBtnLabel","editBtnAriaLabel","updateIsTermsAndConditionsChecked","newIsTermsAndConditionChecked","isShowButtons","showControlButtons","defaultTermsAndConditionAcceptedValue","_this$props$data$chec6","_this$props$data$chec7","_this$props$data$chec8","isError","isShowContent","errorMessageData","isShowEditButton","checkoutTermsAndConditions","termsAndConditionsContent","editButton","onSave","TermsAndCondition","ErrorMessage","renderCustomerName","accountInformation","_renderReactFragment","slot","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","navIcon","logo","preferredStore","renderForMobile","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","accountLinks","accountClassName","link","_renderAccountBlock","wishListIconDesktop","cartIcon","siteOptions","MobileMenuLinksContainer","mobileMenuCollapsed","Collapse","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","wishListIconMobile","menuBar","_renderCollapseMenu","componentClassName","detailsViewClassName","listViewClassName","viewSelectedClassName","OrderHistoryWithSearchAndFiltersViewModeState","OrderHistoryWithSearchAndFiltersViewModeComponent","msdyn365Commerce","createComponent","component","_props$resources$deta","_props$resources","_props$resources$deta2","_props$resources2","_props$resources$list","_props$resources3","_props$resources$list2","_props$resources4","viewModeState","setViewModeState","currentViewModeState","onClickHandler","newViewModeState","viewModeDetailedViewAttributes","ViewMode","viewModeListViewAttributes","DetailedView","detailedViewOptionAriaLabel","ListView","listViewOptionAriaLabel","ProductComparisonButton","_addToProductComparison","_this$props$data$acco","ProductComparisonItem","catalogId","ProductComparisonState","instance","addItem","_removeFromProductComparison","_this$props$data$acco2","removeItemById","comparisonItemId","_getNewState","_this$props$data$acco3","getItemId","_getProdutComparisonDataByCatalogId","canProductBeAddedToProductComparison","hasItemById","currentProductsCount","_className","_instanceId","Random","Guid","generateGuid","_shouldUsePreview","_productComparisonPreview","_renderProductComparisonPreview","productComparisonPreview","buttonText","_this$props$data$acco4","listModifiedEvent","subscribe","instanceId","handler","getSnapshotBeforeUpdate","previousProps","componentWillUnmount","_this$props$data$acco5","unsubscribe","buttonClassName","shouldDisplayText","removeFromComparisonButtonText","productComparisonButton","_renderProductComparisonButton","productsLimit","_getProductsLimit","addToComparisonLimitReachedButtonText","addToComparisonButtonText","viewport","productComparisonMobileProductsLimit","productComparisonDesktopProductsLimit","_this$props$data$acco6","_items$filter","getCatalogId","ProductComparisonButtonViewFunctionalComponent"],"sourceRoot":""}