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EAAYC,GAJ5C3F,EAAKqF,cAAcxiB,EAAIyiB,KAWrBtF,EAAA7Y,uBAAyB,WACtC,QAAS6Y,EAAKvb,MAAMshB,eAQP/F,EAAAwE,eAAiB,SAAC3hB,GAG/B,QAFgBmd,EAAK8C,MACEjgB,IA/PvBmd,EAAKqD,kBAAiB,EAkQ9B,OArQ0B2C,EAAAA,EAAAA,IAAA7C,EAAAD,GAMfC,EAAA1C,UAAAvF,sBAAP,SAA6BC,GACzB,OAAIja,KAAKuD,QAAU0W,GAMhBgI,EAAA1C,UAAApF,OAAP,WACY,IAAAxY,EAAO3B,KAAKuD,MAAK5B,GACzB,OAAOuB,EAAAA,cAAC6e,GAAgBQ,EAAAA,EAAAA,IAAA,GAAKviB,KAAKuD,MAAK,CAAEgN,YAAavQ,KAAK8iB,sBAAsBnhB,OAfnFsgB,GAAWtE,EAAAA,EAAAA,IAAA,CADhBI,EAAAA,IAAQ,uCACHkE,GAAN,CAA0B/e,EAAAA","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/get-country-state.ts?3ecd","webpack://Msdyn365.Commerce.Online/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://Msdyn365.Commerce.Online/./src/common/components/address-error-alert.tsx?bcde","webpack://Msdyn365.Commerce.Online/./src/common/components/address-select.tsx?c1df","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-shipping-address/components/checkout-shipping-cartlines-images.tsx?c635","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-shipping-address/checkout-shipping-address.tsx?de3a","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-shipping-address/checkout-shipping-address.view.tsx?3386","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"],"sourcesContent":["/*!\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 { CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { getCountryRegionsAction, GetCountryRegionsInput } from './get-country-regions';\nimport { getStateProvinceAction, GetStateProvincesInput } from './get-state-provinces';\n\n/**\n * Input class for get country regions data action.\n */\nexport class GetCountryStateInput implements IActionInput {\n public locale: string;\n\n public apiSettings: ICommerceApiSettings;\n\n constructor(locale: string, apiSettings: ICommerceApiSettings) {\n this.locale = locale;\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey(`CountryStateInfo-${this.locale}`, this.apiSettings);\n\n public getCacheObjectType = () => 'StateProvinceInfo';\n\n public dataCacheType = (): CacheType => 'application';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): GetCountryStateInput => {\n const { locale, apiSettings } = inputData.requestContext;\n if (!(inputData.requestContext && locale)) {\n throw new Error('Unable to create country regions input. Locale is not provided.');\n }\n return new GetCountryStateInput(locale, apiSettings);\n};\n\nexport async function getCountryStateAction(input: GetCountryStateInput, ctx: IActionContext): Promise {\n const countryInput = new GetCountryRegionsInput(input.locale, input.apiSettings);\n const countryRegionsInfo = await getCountryRegionsAction(countryInput, ctx);\n\n const channelConfiguration = ctx.requestContext.channel;\n\n const marketISOCode = (channelConfiguration && channelConfiguration.ChannelCountryRegionISOCode) || 'US';\n const currentCountryRegion = countryRegionsInfo.find(countryRegion => (countryRegion.ISOCode || '') === marketISOCode);\n const countryRegionId = (currentCountryRegion && currentCountryRegion.CountryRegionId) || 'USA';\n\n const stateInput = new GetStateProvincesInput(countryRegionId, input.apiSettings);\n return getStateProvinceAction(stateInput, ctx);\n}\n\nexport const getCountryStateActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/address/get-country-state',\n action: >getCountryStateAction,\n input: createInput\n});\n\nexport default getCountryStateActionDataAction;\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 { CheckoutModule, getCheckoutState, ICheckoutState } from '@msdyn365-commerce/global-state/';\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 await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\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 { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { format, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { AddressFormat } from '../address-format';\nimport { IAddressResource } from '../address-module.data';\nimport AddressButtonComponent from './address-button';\nimport AddressInputComponent from './address-input';\nimport { AddressShow, IAddressShowProps } from './address-show';\n\nexport interface IAddressSelectInputProps {\n hasExternalSubmitGroup?: boolean;\n addressFormat: AddressFormat;\n addresses: Address[];\n addressPurposes: AddressPurpose[];\n resources: IAddressResource;\n selectedAddress: Address;\n telemetryContent?: ITelemetryContent;\n onAddressOptionChange(event: React.ChangeEvent): void;\n onAddAddress(): void;\n onSave(): void;\n onCancel(): void;\n}\n\nexport interface IAddressSelectItem {\n key: number;\n SelectItem: INodeProps;\n input: React.ReactNode;\n showItems: IAddressShowProps;\n}\n\nexport interface IAddressSelectProps {\n SelectAddress: INodeProps;\n addButton: React.ReactNode;\n items: IAddressSelectItem[];\n isShowSaveButton: boolean;\n saveButton: React.ReactNode;\n isShowCancelButton: boolean;\n cancelButton: React.ReactNode;\n}\n\nconst getInput = (index: number, address: Address, props: IAddressSelectInputProps): React.ReactNode => {\n const { addresses, onAddressOptionChange, selectedAddress, resources, addressPurposes } = props;\n const addressTypeDescription = address.AddressTypeValue\n ? addressPurposes.find(purpose => purpose.AddressType === address.AddressTypeValue)?.Description || ''\n : '';\n const ichecked = address.RecordId === selectedAddress.RecordId;\n const additionalAttributes = {\n checked: ichecked,\n 'aria-checked': ichecked,\n 'aria-setsize': addresses.length,\n 'aria-posinset': index + 1,\n 'aria-label': format(resources.addressChangeCheckboxAriaLabel, addressTypeDescription)\n };\n\n return (\n \n );\n};\n\nconst getAddressSelectItems = (props: IAddressSelectInputProps): IAddressSelectItem[] => {\n const { addresses, addressFormat, addressPurposes } = props;\n\n return addresses.map((address, index) => {\n return {\n key: address.RecordId || 0,\n SelectItem: { className: 'msc-address-select__item' },\n input: getInput(index, address, props),\n showItems: AddressShow({\n addressFormat: addressFormat.getAddressFormat(address.ThreeLetterISORegionName || ''),\n address,\n addressPurposes\n })\n };\n });\n};\n\nexport const AddressSelect = (props: IAddressSelectInputProps): IAddressSelectProps => {\n const { resources, onCancel, onSave, onAddAddress, hasExternalSubmitGroup } = props;\n\n return {\n SelectAddress: { className: 'msc-address-select' },\n addButton: (\n \n ),\n isShowSaveButton: !hasExternalSubmitGroup,\n saveButton: (\n \n ),\n isShowCancelButton: !hasExternalSubmitGroup,\n cancelButton: (\n \n ),\n items: getAddressSelectItems(props)\n };\n};\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, IRequestContext } from '@msdyn365-commerce/core';\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICheckoutShippingAddressResources } from '../checkout-shipping-address.props.autogenerated';\n\n/**\n * The cartline product interface.\n */\nexport interface ICartLineWithProduct {\n cartLine: CartLine;\n product?: SimpleProduct;\n}\n\n/**\n * The checkout shipping cartline interface.\n */\nexport interface ICheckoutShippingCartLineInfo {\n lineId: string;\n imageProps: IImageProps;\n quantity: number;\n}\n\n/**\n * The checkout shipping cartline props.\n */\nexport interface ICheckoutShippingCartLinesProps {\n moduleClassName: string;\n cartLines: ICheckoutShippingCartLineInfo[];\n title: string;\n itemTitle: string;\n resources: ICheckoutShippingAddressResources;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Following as per module\nexport const CheckoutPickupCartLines: React.FC = ({\n moduleClassName,\n cartLines,\n title,\n itemTitle,\n resources\n}) => {\n const context = ({\n gridSettings: {\n xs: { w: 767 },\n sm: { w: 991 },\n md: { w: 1199 },\n lg: { w: 1599 },\n xl: { w: 1600 }\n }\n } as unknown) as IRequestContext;\n const isMobileCheck = isMobile({ variant: VariantType.Browser, context });\n const isMobileView = isMobileCheck === 'xs' || isMobileCheck === 'sm';\n\n if (!ArrayExtensions.hasElements(cartLines)) {\n return null;\n }\n const quantity = 1;\n return (\n
\n
\n
{title}
\n
{itemTitle}
\n
\n
\n {cartLines.map((cartLine: ICheckoutShippingCartLineInfo) => {\n const isShowQty = cartLine.quantity > quantity;\n let className = `${moduleClassName}__group-images-lines-product`;\n const role = 'text';\n if (isShowQty) {\n className = classnames(className, ' product-image-wide');\n }\n return (\n
\n \n {isMobileView\n ? isShowQty && (\n \n {cartLine.quantity}\n
\n )\n : isShowQty && (\n
\n )}\n {!isMobileView && isShowQty && (\n \n {format(resources.productQuantityInfo, cartLine.quantity, cartLine.imageProps.altText)}\n \n )}\n
\n );\n })}\n \n \n );\n};\n\n/**\n * The checkout shipping cartline image settings.\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 {\n Address,\n AddressPurpose,\n CartLine,\n CountryRegionInfo,\n SimpleProduct,\n StateProvinceInfo,\n TenderLine,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy';\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, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, set } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AutoSuggest } from '../../common/address-autosuggest';\nimport { IAutoSuggestOptions } from '../../common/address-autosuggest.data';\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemType } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { AddressSelect, IAddressSelectProps } from '../../common/components/address-select';\nimport { AddressShow, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutShippingAddressData } from './checkout-shipping-address.data';\nimport { ICheckoutShippingAddressProps } from './checkout-shipping-address.props.autogenerated';\nimport {\n CheckoutPickupCartLines,\n defaultImageSettings,\n ICartLineWithProduct,\n ICheckoutShippingCartLineInfo,\n ICheckoutShippingCartLinesProps\n} from './components/checkout-shipping-cartlines-images';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport { ErrorComponent } from '../../common/components/address-error-alert';\nimport { focusOnCheckoutError } from '../../checkout-errors/checkout-errors';\n\n/**\n * The checkout address props interface.\n */\nexport interface ICheckoutAddressProps extends ICheckoutShippingAddressProps, IModuleStateProps {}\n\n/**\n * The checkout shipping address view state.\n */\nexport interface ICheckoutShippingAddressViewState {\n isShowAddress: boolean;\n isShowAddresList: boolean;\n isShowAddOrUpdateAddress: boolean;\n}\n\n/**\n * The checkout shipping address state.\n */\nexport interface ICheckoutAddresState {\n shippingGroups: ICartLineWithProduct[];\n errorMessage?: string;\n}\n\n/**\n * The checkout shipping address view props.\n */\nexport interface ICheckoutShippingAddressViewProps extends ICheckoutAddressProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n addressListSelectedAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: ICheckoutShippingAddressViewState;\n CheckoutShippingAddress: IModuleProps;\n isUpdating: boolean;\n hasError: boolean;\n showAddress: IAddressShowProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n cartLineImages?: React.ReactNode;\n showAddressSelect: IAddressSelectProps;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n showAddOrUpdateAddressHandler?(onSaveHandler?: () => void, onCancelHandler?: () => void): IAddressAddUpdateProps;\n showAddressSelectHandler?(\n onAddAddressHandler?: () => void,\n onSaveHandler?: () => void,\n onCancelHandler?: () => void\n ): IAddressSelectProps;\n}\n\n/**\n * IExpressPaymentDetail interface.\n */\ninterface IExpressPaymentDetails {\n email?: string;\n tenderLine?: TenderLine;\n tokenizedPaymentCard?: TokenizedPaymentCard;\n paymentTenderType?: string;\n address?: Address;\n isExpressCheckoutAppliedInCartPage: boolean;\n isExpressAddressAppliedInCartPage?: boolean;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutShippingAddress extends React.Component {\n @observable private currentOperation: AddressOperation;\n\n @observable private selectedAddress?: Address;\n\n @observable private addUpdateAddress: Address;\n\n @observable private countryRegionId: string = 'USA';\n\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n\n @observable private customerAddresses: Address[] = [];\n\n @observable private validationError: object;\n\n @observable private addressActionResponse?: IAddressResponse;\n\n @observable private isUpdating?: boolean;\n\n @observable private hasError?: boolean;\n\n @observable private addressListSelectedAddress: Address = {};\n\n private readonly addressCommon: AddressCommon;\n\n private addressFormat!: AddressFormat;\n\n private countryRegions: CountryRegionInfo[] = [];\n\n private addressPurposes: AddressPurpose[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly defaultAddressType: number = 6; // Default to Home\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private autoSuggest?: AutoSuggest;\n\n private readonly multiplePickupStoreSwitchName: string = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutAddressProps) {\n super(props);\n this.state = { shippingGroups: [] };\n const { context, data, resources, telemetry } = this.props;\n\n this.addUpdateAddress = {};\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.customerAddresses = data.address.result || [];\n this.stateProvinceInfo = data.countryStates.result || [];\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n this.validationError = {};\n this.retailMultiplePickUpOptionEnabled = data.featureState.result?.find(\n feature => feature.Name === this.multiplePickupStoreSwitchName\n )?.IsEnabled;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled, autoSuggestOptions },\n resources\n } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\n\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n\n this.props.data.checkout.then(() => {\n this._setDefaultCountryRegionId();\n this._initModuleState();\n });\n\n reaction(\n () => this.countryRegionId,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.currentOperation,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.shippingAddressFromExpressCheckout,\n () => {\n if (!this.expressPaymentDetailsFromCartPage && this._canShip()) {\n let address = this.props.data.checkout.result?.shippingAddressFromExpressCheckout;\n\n if (address?.TwoLetterISORegionName) {\n const threeLetterIsoRegionName = this.getThreeLetterIsoRegionName(address.TwoLetterISORegionName);\n\n address = { ...address, ThreeLetterISORegionName: threeLetterIsoRegionName };\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n }\n\n this._updateCurrentOperation(AddressOperation.Add, address);\n this._onAddressAddUpdateSubmit();\n }\n }\n );\n\n if (autoSuggestionEnabled) {\n if (channel && !channel.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n return;\n }\n\n if (channel && !channel.BingMapsEnabled) {\n telemetry.error('Map is disabled from HQ.');\n return;\n }\n\n const options: IAutoSuggestOptions = { ...autoSuggestOptions };\n this.autoSuggest = new AutoSuggest(\n telemetry,\n options,\n channel?.BingMapsApiKey,\n channel?.ChannelCountryRegionISOCode,\n channel?.DefaultLanguageId\n );\n\n // Customer doesn't have any address. Then add view will be loaded directly. Code for the same to handle that\n if (\n this.props.data.storeSelectorStateManager.result &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n await this.autoSuggest._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager.result?.loadMapApi &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\n async () => {\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isMapApiLoaded,\n async () => {\n await this._attachMapAutoSuggest();\n }\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.CheckoutShippingAddress &&\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.CheckoutShippingAddress) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n\n await this._initPickupGroup();\n }\n\n public async componentDidUpdate(): Promise {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n await this._attachMapAutoSuggest();\n }\n } else {\n this.autoSuggest?.disposeAutoSuggest();\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutAddressProps, nextState: ICheckoutAddresState): 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._canShip()) {\n return null;\n }\n\n const {\n config,\n context,\n renderView,\n resources,\n moduleState: { hasError }\n } = this.props;\n const { headingImages, itemsText, singleItemText, errorMessageTitle } = resources;\n const { imageSettings } = config;\n\n // Line images\n const cartlines: ICheckoutShippingCartLineInfo[] = this.state.shippingGroups\n .filter(x => !ObjectExtensions.isNullOrUndefined(x.product))\n .map(line => ({\n lineId: line.cartLine.LineId ?? '',\n imageProps: {\n requestContext: context.actionContext.requestContext,\n className: 'ms-checkout-shipping-address__group-images-lines-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 const numberOfCartLines = this._countItems(cartlines);\n const itemText = numberOfCartLines > 1 ? itemsText : singleItemText;\n const itemTitle = `(${format(itemText, numberOfCartLines)})`;\n\n const lineImageProps: ICheckoutShippingCartLinesProps = {\n moduleClassName: 'ms-checkout-shipping-address',\n cartLines: cartlines.filter(x => !ObjectExtensions.isNullOrUndefined(x)),\n itemTitle: itemTitle,\n title: headingImages,\n resources: this.props.resources\n };\n\n const cartLineImages: React.ReactNode = ;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { featureState } = this.props.data;\n const isRetailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const errorMessage = this.state.errorMessage;\n\n const viewProps = {\n ...this.props,\n currentOperation: this.currentOperation,\n selectedAddress: this.selectedAddress,\n addUpdateAddress: this.addUpdateAddress,\n addressListSelectedAddress: this.addressListSelectedAddress,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n customerAddresses: this.customerAddresses,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n isUpdating: this.isUpdating,\n hasError: this.hasError,\n className: config.className,\n viewState: {\n isShowAddress: this.currentOperation === AddressOperation.Show && this.selectedAddress,\n isShowAddresList: this.currentOperation === AddressOperation.List && this.customerAddresses.length > 0,\n isShowAddOrUpdateAddress:\n this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update\n },\n CheckoutShippingAddress: {\n moduleProps: this.props,\n className: classnames('ms-checkout-shipping-address', config.className)\n },\n showAddress: this._renderShowAddress(),\n alert: hasError && errorMessage && ,\n checkoutErrorRef: this.checkoutErrorRef,\n\n /**\n * Show address select.\n * @param onAddAddressHandler - On add address click function.\n * @param onSaveHandler - On save click function.\n * @param onCancelHandler - On cancel click function.\n * @returns - Renders select address.\n */\n showAddressSelectHandler: (onAddAddressHandler?: () => void, onSaveHandler?: () => void, onCancelHandler?: () => void) =>\n this._renderSelectAddress(onAddAddressHandler, onSaveHandler, onCancelHandler),\n\n /**\n * Show add/update address.\n * @param onSaveHandler - On save click function.\n * @param onCancelHandler - On cancel click function.\n * @returns - Renders select address.\n */\n showAddOrUpdateAddressHandler: (onSaveHandler?: () => void, onCancelHandler?: () => void) =>\n this._renderAddOrUpdateAddress(onSaveHandler, onCancelHandler),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress(),\n cartLineImages: isRetailMultiplePickUpOptionEnabled ? cartLineImages : undefined,\n showAddressSelect: this._renderSelectAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Initialize pickup group.\n */\n @action\n private readonly _initPickupGroup = async (): Promise => {\n const pickupCartLines: CartLine[] = this._getCartLinesforDelivery();\n const cartLines: ICartLineWithProduct[] = [];\n\n try {\n const products = await this._getProductsByCartLines(\n this.props.data.checkout.result?.checkoutCart.cart.ChannelId || 0,\n pickupCartLines\n );\n for (const line of pickupCartLines) {\n const product: SimpleProduct | undefined = products.find(x => x.RecordId === line.ProductId);\n cartLines.push({ cartLine: line, product });\n }\n this.setState({ shippingGroups: cartLines });\n } catch (error) {\n this.props.telemetry.error(error);\n this.setState({ shippingGroups: [] });\n }\n };\n\n /**\n * On suggestion selected.\n * @param result - Suggestion result interface.\n */\n @action\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n this._clearAddressFields();\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\n const timeout = 0;\n set(this.addUpdateAddress, { Street: '' });\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\n set(this.addUpdateAddress, { CountyName: address.CountyName });\n set(this.addUpdateAddress, { City: address.City });\n set(this.addUpdateAddress, { State: address.State });\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\n\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\n setTimeout(() => {\n set(this.addUpdateAddress, { Street: address.Street });\n }, timeout);\n };\n\n /**\n * Method to clear address fields.\n */\n @action\n private readonly _clearAddressFields = (): void => {\n const addressFormatItem = this.addressFormat.getAddressFormat(\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n );\n for (const formatAddress of addressFormatItem) {\n if (\n this.addUpdateAddress[formatAddress.name] !== undefined &&\n !this.autoSuggest?.excludedAddressFields.includes(formatAddress.name)\n ) {\n this.addressFormat[formatAddress.name] = '';\n }\n }\n this._clearValidation();\n };\n\n /**\n * Method to clear validation.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n /**\n * Method data initialization.\n * @param props -The checkout address properties.\n */\n private readonly _dataInitialize = (props: ICheckoutAddressProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.address.result,\n () => {\n this.customerAddresses = data.address.result ?? [];\n }\n );\n\n reaction(\n () => data.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n\n reaction(\n () => data.featureState.result,\n () => {\n this.retailMultiplePickUpOptionEnabled = data.featureState.result?.find(\n feature => feature.Name === this.multiplePickupStoreSwitchName\n )?.IsEnabled;\n }\n );\n };\n\n /**\n * Method to get cart lines for delivery.\n * @returns The cart line collection.\n */\n private readonly _getCartLinesforDelivery = (): CartLine[] => {\n return this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(line => this._isDelivery(line)) ?? [];\n };\n\n /**\n * Method to check cart line for delivery.\n * @param line -The cart line.\n * @returns True/false as per cart line delivery mode.\n */\n private readonly _isDelivery = (line: CartLine): boolean => {\n return this._isNotPickupMode(line.DeliveryMode) && (line.FulfillmentStoreId === undefined || line.FulfillmentStoreId === '');\n };\n\n /**\n * Method to check cart line for delivery.\n * @param deliveryMode -The delivery mode.\n * @returns True/false as per cart line delivery mode.\n */\n private readonly _isNotPickupMode = (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?.some(\n pickupMode => pickupMode !== deliveryMode\n );\n return pickupDeliveryMode !== undefined ? pickupDeliveryMode : false;\n }\n return deliveryMode !== undefined && pickupDeliveryModeCode !== undefined && deliveryMode !== pickupDeliveryModeCode;\n };\n\n /**\n * Method to check cart line for delivery.\n * @param channelId - The channelId.\n * @param cartLines - Cart line collections.\n * @returns Collection of SimpleProduct.\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 line.CatalogId || 0\n )\n );\n return getSimpleProducts(productInputs, actionContext);\n };\n\n /**\n * Method to render add/update address.\n * @param onSaveHandler -- Handles onsave functionality.\n * @param onCancelHandler -- Handles oncancel functionality.\n * @returns Address app/update props.\n */\n private readonly _renderAddOrUpdateAddress = (onSaveHandler?: () => void, onCancelHandler?: () => void): IAddressAddUpdateProps => {\n const addressFormat =\n this.currentOperation === AddressOperation.Add && this.addressCommon.isAuthenticatedFlow()\n ? this.addressFormat\n : this.addressFormat;\n\n /**\n * On Cancel Button Function.\n */\n const onCancelButtonHandler = () => {\n this._resetView();\n onCancelHandler?.();\n };\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Shipping,\n addressFormat: addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n hasError: this.hasError,\n addressActionResponse: this.addressActionResponse,\n telemetryContent: this.telemetryContent,\n dropdownDisplayData: addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n\n /**\n * On Save Function.\n */\n onSave: () => {\n this.onSubmit();\n onSaveHandler?.();\n },\n\n onCancel: !this.selectedAddress && !this.addressCommon.isAuthenticatedFlow() ? () => {} : onCancelButtonHandler\n });\n };\n\n /**\n * Method to render select address.\n * @param onAddAddressHandler - To handle add address button click.\n * @param onSaveHandler - To handle save button click.\n * @param onCancelHandler - To handle cancel button click.\n * @returns Select address props.\n */\n private readonly _renderSelectAddress = (\n onAddAddressHandler?: () => void,\n onSaveHandler?: () => void,\n onCancelHandler?: () => void\n ): IAddressSelectProps => {\n /**\n * On Cancel Button Function.\n */\n const onCancelButtonHandler = () => {\n this._resetView();\n onCancelHandler?.();\n };\n return AddressSelect({\n addressFormat: this.addressFormat,\n addresses: this.customerAddresses,\n resources: this.resources,\n addressPurposes: this.addressPurposes,\n selectedAddress: this.addressListSelectedAddress,\n onAddressOptionChange: this._onAddressOptionChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n telemetryContent: this.telemetryContent,\n\n /**\n * On Add Address Function.\n */\n onAddAddress: () => {\n this._goToAddAddress();\n onAddAddressHandler?.();\n },\n\n /**\n * On Save Function.\n */\n onSave: () => {\n this._onSelectAddress();\n onSaveHandler?.();\n },\n\n onCancel: !this.selectedAddress ? () => {} : onCancelButtonHandler\n });\n };\n\n /**\n * Method to render show address.\n * @returns Show address props.\n */\n private _renderShowAddress(): IAddressShowProps | null {\n if (this.selectedAddress) {\n return AddressShow({\n address: this.selectedAddress,\n addressFormat: this.addressFormat.getAddressFormat(this.selectedAddress.ThreeLetterISORegionName || ''),\n addressPurposes: this.addressPurposes\n });\n }\n\n return null;\n }\n\n /**\n * Method to render map auto suggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.autoSuggest?.attachAutoSuggest('#shipping_addressstreet', '#shipping_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * Method gets called on address option change.\n * @param event - To get current option.\n */\n private readonly _onAddressOptionChange = (event: React.ChangeEvent) => {\n const addressRecordId = event.currentTarget.value;\n const selectedAddress = this.customerAddresses.find(address => (address.RecordId || '').toString() === addressRecordId);\n if (selectedAddress) {\n this.addressListSelectedAddress = selectedAddress;\n }\n };\n\n /**\n * Method to render map auto suggest.\n * @param name - Address name field.\n * @param value - Address name value field.\n */\n private readonly onAddressAddUpdate = (name: string, value: string | boolean) => {\n set(this.addUpdateAddress, { [name]: value });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * Method to get called on address update change.\n * @param event - Input element.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n if (event.target.type === 'checkbox') {\n this.onAddressAddUpdate(event.target.name, event.target.checked);\n } else {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n }\n };\n\n /**\n * Method to get called on address update dropdown change.\n * @param event - Select element.\n */\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\n this.onAddressAddUpdate(event.target.name, event.target.value);\n\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n this._onCountryChange(event.target.value);\n }\n };\n\n /**\n * Method to get called on address update submit.\n */\n private readonly _onAddressAddUpdateSubmit = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n return;\n }\n\n let response: Promise;\n if (this.addressCommon.isAuthenticatedFlow() && this._isNewAddress(this.addUpdateAddress)) {\n response =\n this.currentOperation === AddressOperation.Update\n ? this.addressCommon.updateCustomerAddress(this.addUpdateAddress)\n : this.addressCommon.addCustomerAddress(this.addUpdateAddress);\n } else {\n response = Promise.resolve({ address: this.addUpdateAddress });\n }\n\n this.isUpdating = true;\n this._updateModuleState();\n\n response.then(\n (result: IAddressResponse) => {\n this.isUpdating = false;\n\n if (result.address) {\n this.hasError = false;\n this._clearError();\n if (result.customerAddresses) {\n this._onAddOrUpdateSuccess({ customerAddresses: result.customerAddresses, address: result.address });\n } else {\n this._onAddOrUpdateSuccess({ address: result.address });\n }\n } else {\n this.hasError = true;\n this.addressActionResponse = result;\n this._updateModuleState();\n }\n },\n () => {\n this.hasError = true;\n this.isUpdating = false;\n this._updateModuleState();\n }\n );\n };\n\n /**\n * Method to get called on country change.\n * @param countryRegionId - Country region id.\n */\n private readonly _onCountryChange = (countryRegionId: string) => {\n this.countryRegionId = countryRegionId;\n const twoLetterIsoRegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterIsoRegionName });\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterIsoRegionName);\n this._clearAddressFields();\n };\n\n /**\n * Method to get all address format exclude list.\n * @returns Collection of address items.\n */\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\n const { config } = this.props;\n const addressFormatExcludeList: AddressItemType[] = [];\n\n if (!config.showAddressType) {\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\n }\n\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\n\n return addressFormatExcludeList;\n };\n\n /**\n * Method to get all state/provinces.\n */\n private readonly _getStateProvinces = (): void => {\n if (\n !this.countryRegionId ||\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n return;\n }\n\n this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n set(this.addUpdateAddress, { State: '' });\n }\n\n this.stateProvinceInfo = result;\n });\n };\n\n /**\n * Method to set default country region id.\n */\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * Method to get default address region id.\n * @returns - Address object from existing addresses.\n */\n private readonly _getDefaultAddress = (): Address | undefined => {\n if (this.customerAddresses) {\n const primaryAddress = this.customerAddresses.find((address: Address) => address.IsPrimary);\n return primaryAddress || (this.customerAddresses.length > 0 ? this.customerAddresses[0] : undefined);\n }\n return undefined;\n };\n\n /**\n * Method to get address from express payment details from cart page.\n * @returns - Address.\n */\n private readonly _getAddressFromCartExpressPaymentDetails = (): Address | undefined => {\n if (this.expressPaymentDetailsFromCartPage) {\n const { tokenizedPaymentCard, address, isExpressAddressAppliedInCartPage } = this.expressPaymentDetailsFromCartPage;\n\n let addressFromCartExpress: Address | undefined;\n\n if (isExpressAddressAppliedInCartPage) {\n addressFromCartExpress = address ? this.getExpressAddress(address) : undefined;\n } else {\n addressFromCartExpress = tokenizedPaymentCard ? this.getAddressFromTokenizedPaymentCard(tokenizedPaymentCard) : undefined;\n }\n\n return addressFromCartExpress;\n }\n return undefined;\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const twoLetterIsoRegionName = tokenizedPaymentCard.Country;\n\n const threeLetterIsoRegionName = twoLetterIsoRegionName ? this.getThreeLetterIsoRegionName(twoLetterIsoRegionName) : undefined;\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n\n const address: Address = {\n TwoLetterISORegionName: twoLetterIsoRegionName,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone,\n ThreeLetterISORegionName: threeLetterIsoRegionName,\n AddressTypeValue: this.defaultAddressType\n };\n\n return address;\n };\n\n /**\n * Get address from expressAddress.\n * @param expressAddress -- The expressAddress.\n * @returns The address.\n */\n private readonly getExpressAddress = (expressAddress: Address): Address => {\n const twoLetterIsoRegionName = expressAddress.TwoLetterISORegionName;\n\n const threeLetterIsoRegionName = twoLetterIsoRegionName ? this.getThreeLetterIsoRegionName(twoLetterIsoRegionName) : undefined;\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n\n const address: Address = {\n ...expressAddress,\n ThreeLetterISORegionName: threeLetterIsoRegionName,\n AddressTypeValue: this.defaultAddressType\n };\n\n return address;\n };\n\n /**\n * Get three letter ISO region name from two letter ISO region name.\n * @param twoLetterIsoRegionName -- The three letter ISO region name.\n * @returns The three letter ISO region name.\n */\n private readonly getThreeLetterIsoRegionName = (twoLetterIsoRegionName: string): string | undefined => {\n const countryRegion = this.countryRegions.find(country => {\n return country.ISOCode?.toLowerCase() === twoLetterIsoRegionName.toLowerCase();\n });\n\n return countryRegion?.CountryRegionId;\n };\n\n /**\n * Method to initialize all module state.\n */\n private readonly _initModuleState = (): void => {\n this.props.moduleState.init({\n status: this._canShip() ? 'updating' : 'disabled',\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit\n });\n\n const checkoutState = this.props.data.checkout.result;\n\n if (this._canShip()) {\n let defaultAddress;\n const shippingCartLines: CartLine[] = this._getCartLinesforDelivery();\n\n if (checkoutState?.checkoutCart.cart.ShippingAddress) {\n defaultAddress = checkoutState.checkoutCart.cart.ShippingAddress;\n } else if (\n ArrayExtensions.hasElements(shippingCartLines) &&\n shippingCartLines[0].ShippingAddress !== undefined &&\n shippingCartLines[0].ShippingAddress.FullAddress !== ''\n ) {\n defaultAddress = shippingCartLines[0].ShippingAddress;\n } else if (this._getAddressFromCartExpressPaymentDetails()) {\n defaultAddress = this._getAddressFromCartExpressPaymentDetails();\n } else if (this._getDefaultAddress()) {\n defaultAddress = this._getDefaultAddress();\n } else {\n defaultAddress = checkoutState?.isExpressCheckoutApplied ? checkoutState.shippingAddressFromExpressCheckout : undefined;\n }\n\n if (defaultAddress && !this.addressCommon.isEmpty(defaultAddress)) {\n this._updateCurrentOperation(AddressOperation.Show, defaultAddress);\n this._setShippingAddress(defaultAddress);\n this._updateModuleState();\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: true });\n } else {\n this._updateCurrentOperation(AddressOperation.Add);\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: false });\n }\n }\n };\n\n /**\n * Method get called on submit address.\n */\n private readonly onSubmit = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Shipping address submit for Add or Update operation.');\n this._onAddressAddUpdateSubmit();\n break;\n case AddressOperation.List:\n this.props.telemetry.information('Shipping address submit for List operation.');\n this._onSelectAddress();\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * Method get called on cancel.\n */\n private readonly onCancel = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Shipping address cancel for Add or Update operation.');\n this._clearAddressFields();\n if (!(!this.selectedAddress && !this.addressCommon.isAuthenticatedFlow())) {\n this._resetView();\n }\n\n break;\n case AddressOperation.List:\n this.props.telemetry.information('Shipping address cancel for List operation.');\n if (this.selectedAddress) {\n this._resetView();\n }\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * Method get called on edit address.\n */\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Shipping address onEdit is called.');\n\n if (this.addressCommon.isAuthenticatedFlow() && this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.List, this.shippingAddress);\n } else if (this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.Update, this.shippingAddress);\n }\n\n this._updateModuleState();\n };\n\n /**\n * Method to check if checkout cartlines are available fro shipping.\n * @returns - True/false as per the delivery mode.\n */\n private readonly _canShip = (): boolean => {\n const { checkout, channelDeliveryOptionConfig } = this.props.data;\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n if (!checkout.result || !request.channel || checkout.result.checkoutCart.isEmpty || checkout.result.checkoutCart.hasInvoiceLine) {\n return false;\n }\n\n // @ts-expect-error: Type-checker not realizing above request.channel check\n return this.retailMultiplePickUpOptionEnabled\n ? checkout.result.checkoutCart.cart.CartLines?.some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : checkout.result.checkoutCart.cart.CartLines?.some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n /**\n * Method get called on select address.\n */\n private readonly _onSelectAddress = () => {\n this._updateCurrentOperation(AddressOperation.Show, this.addressListSelectedAddress);\n this._setShippingAddress(this.addressListSelectedAddress);\n this._updateModuleState();\n };\n\n /**\n * Method get called on goto add address.\n */\n private readonly _goToAddAddress = () => {\n this._setDefaultCountryRegionId();\n this._updateCurrentOperation(AddressOperation.Add);\n };\n\n /**\n * Method get called on add/update success.\n * @param response - Retail api response.\n */\n private readonly _onAddOrUpdateSuccess = (response: IAddressResponse) => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n\n if (response.address) {\n this._updateCurrentOperation(AddressOperation.Show, response.address);\n this._setShippingAddress(response.address);\n this._updateModuleState();\n }\n };\n\n /**\n * Method get called on set Shipping Address.\n * @param address - Retail Api address result.\n */\n private readonly _setShippingAddress = (address: Address): void => {\n if (this.props.data.checkout.result) {\n const newShippingAddress = { ...address };\n\n if (address.ThreeLetterISORegionName && !newShippingAddress.TwoLetterISORegionName) {\n newShippingAddress.TwoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(address.ThreeLetterISORegionName);\n }\n\n this.props.data.checkout.result.updateShippingAddress({ newShippingAddress });\n this.props.data.checkout.result.checkoutCart.updateShippingAddress({ newShippingAddress }).catch(error => {\n this.props.telemetry.error(error);\n });\n }\n };\n\n @computed private get shippingAddress(): Address | undefined {\n return this.props.data.checkout.result?.shippingAddress;\n }\n\n /**\n * Method get called on reset view.\n */\n private readonly _resetView = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this._updateCurrentOperation(\n this.addressCommon.isAuthenticatedFlow() ? AddressOperation.List : AddressOperation.Show,\n this.shippingAddress\n );\n break;\n default:\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n }\n this._updateModuleState();\n };\n\n /**\n * Update current operation.\n * @param operation - The address operation.\n * @param selectedAddress - The selected address.\n */\n private readonly _updateCurrentOperation = (operation: AddressOperation, selectedAddress?: Address) => {\n this.currentOperation = operation;\n this.selectedAddress = selectedAddress;\n\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n this.addUpdateAddress = { ...this.selectedAddress } || {};\n set(this.addUpdateAddress, {\n ThreeLetterISORegionName: this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n });\n set(this.addUpdateAddress, {\n AddressTypeValue: this.addUpdateAddress.AddressTypeValue || this.defaultAddressType\n });\n } else if (this.currentOperation === AddressOperation.List) {\n this.addressListSelectedAddress = { ...this.selectedAddress } || {};\n }\n };\n\n /**\n * Update module state.\n */\n private readonly _updateModuleState = () => {\n if (this.currentOperation === AddressOperation.Show) {\n this.props.moduleState.onReady();\n } else if (this.isUpdating) {\n this.props.moduleState.onPending();\n } else {\n this.props.moduleState.onUpdating();\n }\n };\n\n /**\n * Method to check if the customer already has the address.\n * @param address - The address.\n */\n private readonly _isNewAddress = (address: Address): boolean => {\n for (const existingAddress of this.customerAddresses) {\n if (\n (address.Name ?? '') === existingAddress.Name &&\n (address.Street ?? '') === existingAddress.Street &&\n (address.StreetNumber ?? '') === existingAddress.StreetNumber &&\n (address.City ?? '') === existingAddress.City &&\n (address.State ?? '') === existingAddress.State &&\n (address.ZipCode ?? '') === existingAddress.ZipCode &&\n (address.Phone ?? '') === existingAddress.Phone &&\n (address.ThreeLetterISORegionName ?? '') === existingAddress.ThreeLetterISORegionName &&\n (address.AddressTypeValue ?? '') === existingAddress.AddressTypeValue\n ) {\n return false;\n }\n }\n\n return true;\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 /**\n * Returns count of products.\n * @param cartLine - The checkout shipping cart line info props.\n * @returns Number of products.\n */\n private readonly _countItems = (cartlines: ICheckoutShippingCartLineInfo[]): number => {\n return cartlines.reduce((count, line) => {\n return count + (line.quantity || 0);\n }, 0);\n };\n}\n\nexport default CheckoutShippingAddress;\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 { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IAddressSelectItem, IAddressSelectProps } from '../../common/components/address-select';\nimport { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutShippingAddressViewProps } from './checkout-shipping-address';\n\n/**\n * Address show component.\n * @param param0 - Root param.\n * @param param0.AddressDetail - Address detail.\n * @param param0.items - IAddressShowItem[].\n * @returns - Address Node.\n */\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\n return (\n \n {items.map((item: IAddressShowItem) => {\n return <>{item.description};\n })}\n \n );\n};\n\n/**\n * Address Select Component.\n * @param param0 - Root param.\n * @param param0.SelectAddress - Select address.\n * @param param0.addButton - Add button.\n * @param param0.items - IAddressSelectItem[].\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns - SelectAddress Node.\n */\nconst AddressSelect: React.FC = ({\n SelectAddress,\n addButton,\n items,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {addButton}\n {items.map((item: IAddressSelectItem) => {\n const SelectItem = item.SelectItem;\n return (\n \n {item.input}\n \n \n );\n })}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Address Add Update Component.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - Error message.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns Address add update component node.\n */\nconst AddressAddUpdate: React.FC = ({\n AddressForm,\n heading,\n items,\n hasError,\n error,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Checkout Shipping Address View Component.\n * @param props - Props.\n * @returns - CheckoutShippingAddress Module.\n */\nconst CheckoutShippingAddressView: React.FC = props => {\n const {\n CheckoutShippingAddress,\n checkoutErrorRef,\n alert,\n viewState,\n showAddress,\n showAddressSelect,\n showAddOrUpdateAddress,\n cartLineImages\n } = props;\n\n return (\n \n {alert}\n {cartLineImages}\n {viewState.isShowAddress && }\n {viewState.isShowAddresList && }\n {viewState.isShowAddOrUpdateAddress && }\n \n );\n};\n\nexport default CheckoutShippingAddressView;\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, 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\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\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(newGuestCheckoutEmail: string): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\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"],"names":["GetCountryStateInput","constructor","locale","apiSettings","getCacheKey","buildCacheKey","this","getCacheObjectType","dataCacheType","async","getCountryStateAction","input","ctx","countryInput","GetCountryRegionsInput","countryRegionsInfo","getCountryRegionsAction","channelConfiguration","requestContext","channel","marketISOCode","ChannelCountryRegionISOCode","currentCountryRegion","find","countryRegion","ISOCode","countryRegionId","CountryRegionId","stateInput","GetStateProvincesInput","getStateProvinceAction","getCountryStateActionDataAction","createObservableDataAction","id","action","inputData","Error","focusOnCheckoutError","checkoutErrorRef","checkoutState","getCheckoutState","catch","error","telemetry","exception","current","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","CheckoutModule","None","ErrorComponent","_ref","title","message","className","React","role","getInput","index","address","props","_addressPurposes$find","addresses","onAddressOptionChange","selectedAddress","resources","addressPurposes","addressTypeDescription","AddressTypeValue","purpose","AddressType","Description","ichecked","RecordId","additionalAttributes","checked","length","format","addressChangeCheckboxAriaLabel","AddressInputComponent","Object","assign","name","type","value","toString","onChange","additionalAddributes","telemetryContent","getAddressSelectItems","addressFormat","map","key","SelectItem","showItems","AddressShow","getAddressFormat","ThreeLetterISORegionName","AddressSelect","onCancel","onSave","onAddAddress","hasExternalSubmitGroup","SelectAddress","addButton","AddressButtonComponent","text","addressAddButtonText","ariaLabel","addressAddButtonAriaLabel","onClick","isShowSaveButton","saveButton","addressSaveButtonText","addressSaveButtonAriaLabel","isShowCancelButton","cancelButton","addressCancelButtonText","addressCancelButtonAriaLabel","items","CheckoutPickupCartLines","moduleClassName","cartLines","itemTitle","isMobileCheck","isMobile","variant","VariantType","Browser","context","gridSettings","xs","w","sm","md","lg","xl","isMobileView","ArrayExtensions","hasElements","cartLine","isShowQty","quantity","classnames","lineId","Image","imageProps","productQuantityInfo","altText","defaultImageSettings","viewports","q","h","lazyload","quality","CheckoutShippingAddress","_data$featureState$re2","super","customerAddresses","addressListSelectedAddress","countryRegions","defaultAddressType","multiplePickupStoreSwitchName","retailMultiplePickUpOptionEnabled","_initPickupGroup","pickupCartLines","_getCartLinesforDelivery","_this$props$data$chec","products","_getProductsByCartLines","data","checkout","result","checkoutCart","cart","ChannelId","line","product","x","ProductId","push","setState","shippingGroups","_onSuggestionSelected","_clearAddressFields","getTranformedAddress","stateProvinceInfo","set","addUpdateAddress","Street","ZipCode","CountyName","City","State","DistrictName","FullAddress","setTimeout","addressFormatItem","formatAddress","_this$autoSuggest","undefined","autoSuggest","excludedAddressFields","includes","_clearValidation","validationError","_dataInitialize","reaction","_data$countryRegions$","_data$addressPurposes","_data$address$result","countryStates","_data$countryStates$r","featureState","_data$featureState$re","feature","Name","IsEnabled","_this$props$data$chec2","_this$props$data$chec3","CartLines","filter","_isDelivery","_isNotPickupMode","DeliveryMode","FulfillmentStoreId","deliveryMode","_this$props$context$r","_featureState$result","pickupDeliveryModeCode","request","PickupDeliveryModeCode","channelDeliveryOptionConfig","_channelDeliveryOptio","pickupDeliveryMode","PickupDeliveryModeCodes","some","pickupMode","channelId","actionContext","productInputs","ObjectExtensions","isNullOrUndefined","ProductInput","CatalogId","getSimpleProducts","_renderAddOrUpdateAddress","onSaveHandler","onCancelHandler","currentOperation","AddressOperation","Add","addressCommon","isAuthenticatedFlow","AddressAddUpdate","isUpdating","addressType","Shipping","defaultCountryRegionId","hasError","addressActionResponse","dropdownDisplayData","getPrefilledAddressDropdownData","addressStateDefaultSelectionText","onInputChange","_onAddressAddUpdateInputChange","onDropdownChange","_onAddressAddUpdateDropdownChange","moduleState","onSubmit","onCancelButtonHandler","_resetView","_renderSelectAddress","onAddAddressHandler","_onAddressOptionChange","_goToAddAddress","_onSelectAddress","_attachMapAutoSuggest","storeSelectorStateManager","_this$autoSuggest2","isMapApiLoaded","attachAutoSuggest","event","addressRecordId","currentTarget","onAddressAddUpdate","validateAddressFormat","target","replace","RegExp","AddressItemType","_onCountryChange","_onAddressAddUpdateSubmit","response","_isNewAddress","Update","updateCustomerAddress","addCustomerAddress","Promise","resolve","_updateModuleState","then","_clearError","_onAddOrUpdateSuccess","_this$autoSuggest3","twoLetterIsoRegionName","getTwoLetterISORegionName","TwoLetterISORegionName","changeAutoSuggestionCountryCode","_getAddressFormatExcludeList","config","addressFormatExcludeList","showAddressType","IsPrimary","_getStateProvinces","getStateProvinces","state","StateId","_getDefaultAddress","_getAddressFromCartExpressPaymentDetails","expressPaymentDetailsFromCartPage","tokenizedPaymentCard","isExpressAddressAppliedInCartPage","addressFromCartExpress","getExpressAddress","getAddressFromTokenizedPaymentCard","Country","threeLetterIsoRegionName","getThreeLetterIsoRegionName","NameOnCard","Address1","StreetNumber","Address2","Zip","Phone","expressAddress","_objectSpread","country","_country$ISOCode","toLowerCase","_initModuleState","init","status","_canShip","onEdit","defaultAddress","shippingCartLines","ShippingAddress","isExpressCheckoutApplied","shippingAddressFromExpressCheckout","isEmpty","_updateCurrentOperation","Show","_setShippingAddress","updateHasShippingAddress","newHasShippingAddress","information","List","shippingAddress","_checkout$result$chec","_checkout$result$chec2","emailDeliveryModeCode","EmailDeliveryModeCode","hasInvoiceLine","_channelDeliveryOptio2","_setDefaultCountryRegionId","newShippingAddress","updateShippingAddress","operation","onReady","onPending","onUpdating","existingAddress","_address$Name","_address$Street","_address$StreetNumber","_address$City","_address$State","_address$ZipCode","_address$Phone","_address$ThreeLetterI","_address$AddressTypeV","_setErrorMessage","errorMessage","setHasError","_countItems","cartlines","reduce","count","AddressCommon","AddressFormat","AddressMetaData","getTelemetryObject","telemetryPageName","friendlyName","_this$props$data$chec6","autoSuggestionEnabled","autoSuggestOptions","_this$props$data$chec4","_this$props$data$chec5","_address","BingMapsApiKey","BingMapsEnabled","options","AutoSuggest","DefaultLanguageId","_loadMapAPI","_this$props$data$stor","loadMapApi","_this$autoSuggest4","_this$props$data$stor2","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec7","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec8","checkoutErrorFocus","_this$props$data$stor3","_this$autoSuggest5","disposeAutoSuggest","shouldComponentUpdate","nextProps","nextState","render","_featureState$result2","renderView","headingImages","itemsText","singleItemText","errorMessageTitle","imageSettings","_line$cartLine$LineId","_line$product","_line$product$Primary","_line$product2","_line$product3","_context$request$app","_line$cartLine$Quanti","LineId","src","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","ItemId","app","OmniChannelMedia","loadFailureBehavior","Quantity","numberOfCartLines","itemText","lineImageProps","cartLineImages","isRetailMultiplePickUpOptionEnabled","viewState","isShowAddress","isShowAddresList","isShowAddOrUpdateAddress","moduleProps","showAddress","_renderShowAddress","alert","showAddressSelectHandler","showAddOrUpdateAddressHandler","showAddOrUpdateAddress","showAddressSelect","_this$props$data$cart","_this$props$data$cart2","properties","ExtensionProperties","property","Key","Value","StringValue","JSON","parse","_request$channel","market","getDefaultCountryRegionId","_this$props$data$chec9","__decorate","observable","computed","withModuleState","observer","AddressDetail","Node","item","description","_ref2","_ref3","AddressForm","heading","AddressItem","label","AddressError","Module","ref","CheckoutStateInput","_this","CheckoutState","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_isTermsAndConditionAccepted","_customerAccountAmount","defineProperty","prototype","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","updateBillingAddress","newBillingAddress","updateCardPrefix","newCardPrefix","removeGiftCard","giftCardNumber","giftCard","Id","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","updateGuestCheckoutEmail","newGuestCheckoutEmail","updateTermsAndConditionsAcceptance","newIsTermsAndConditionAccepted","updateCustomerAccountAmount","EnabledPaymentsForOBO","ModuleStatesCacheKey","getModuleStates","cacheKey","moduleStates","get","update","updateModuleStates","WrappedComponent","_super","ModuleState","call","initializeState","_b","typeName","states","__assign","_a","hasInitialized","isRequired","isCancellable","isSubmitContainer","childIds","getModuleStateManager","validate","isReady","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","onSkip","onDisable","getModule","moduleId","getModuleByTypeName","getModuleStateManagerByTypeName","values","_moduleState","modules","_validateLeaf","source","module","isMatch","_validateContainer","allMatched","skipSkippableItem","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","enableControl","__extends"],"sourceRoot":""}