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AAAuF,eAAiB,SAACxU,GAG/B,QAFgBiP,EAAK0D,MACE3S,IA/PvBiP,EAAKiE,kBAAiB,EAkQ9B,OArQ0BwD,EAAAA,EAAAA,IAAA1D,EAAAD,GAMfC,EAAAnD,UAAA8G,sBAAP,SAA6BC,GACzB,OAAIvY,KAAKuD,QAAUgV,GAMhB5D,EAAAnD,UAAAtJ,OAAP,WACY,IAAAvG,EAAO3B,KAAKuD,MAAK5B,GACzB,OAAOuB,EAAAA,cAACuR,GAAgBO,EAAAA,EAAAA,IAAA,GAAKhV,KAAKuD,MAAK,CAAEmS,YAAa1V,KAAKyV,sBAAsB9T,OAfnFgT,GAAWb,EAAAA,EAAAA,IAAA,CADhB0E,EAAAA,IAAQ,uCACH7D,GAAN,CAA0BzR,EAAAA","sources":["webpack://Dobbies.Commerce/./src/actions/get-country-state.ts?3ecd","webpack://Dobbies.Commerce/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://Dobbies.Commerce/./src/common/components/address-error-alert.tsx?bcde","webpack://Dobbies.Commerce/./src/common/components/address-select.tsx?c1df","webpack://Dobbies.Commerce/./src/common/components/address-ship-multiple-heading.tsx?5d65","webpack://Dobbies.Commerce/./src/common/components/address-ship-multiple-lines.tsx?ce68","webpack://Dobbies.Commerce/./src/common/components/address-ship-multiple.tsx?136d","webpack://Dobbies.Commerce/../../src/checkout-state-data-action.ts?8344","webpack://Dobbies.Commerce/../../src/checkout-state.ts?acd8","webpack://Dobbies.Commerce/../../src/checkout-utilities.data.ts?b2cc","webpack://Dobbies.Commerce/../../../src/module-state-manager/module-state.ts?7579","webpack://Dobbies.Commerce/../../../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 onShipMultipleAddresses?(): void;\n onAddAddress(): void;\n onSave(): void;\n onCancel(): void;\n multipleAddressShippingEnabled?: boolean;\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 shipMultipleAddressesButton?: React.ReactNode;\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 {\n resources,\n onCancel,\n onSave,\n onAddAddress,\n onShipMultipleAddresses,\n hasExternalSubmitGroup,\n multipleAddressShippingEnabled\n } = props;\n\n return {\n SelectAddress: { className: 'msc-address-select' },\n addButton: (\n
\n \n
\n ),\n shipMultipleAddressesButton: multipleAddressShippingEnabled && onShipMultipleAddresses && (\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 * as React from 'react';\n\nexport interface IShipMultipleAddressesTableHeadingProps {\n selectAllRowsText?: string;\n productNumber: string;\n productName: string;\n productUnitPrice: string;\n productQuantity: string;\n clickHandler(isChecked: boolean): void;\n productImage?: string;\n productAddress?: string;\n isAllSelected: boolean;\n isMobile: boolean;\n clearSelectionButton: React.ReactNode;\n}\n\nexport interface IShipMultipleAddressesTableHeadingState {\n isChecked: boolean;\n}\n\nexport interface IShipMultipleAddressesTableShortHeading {\n productNumber: string;\n productActions: string;\n}\n\n/**\n * Ship multiple addresses table heading.\n */\nexport class ShipMultipleAddressesTableHeading extends React.PureComponent {\n public state: IShipMultipleAddressesTableHeadingState = {\n isChecked: false\n };\n\n private readonly componentClassName: string = 'ms-table';\n\n public getOnChange = () => (event: React.ChangeEvent) => {\n this.setState(\n {\n isChecked: !this.state.isChecked\n },\n () => {\n this.props.clickHandler(this.state.isChecked);\n }\n );\n };\n\n public render(): JSX.Element {\n if (!this.props.isMobile) {\n return (\n \n \n \n \n \n {this.props.productNumber}\n {{this.props.productName}}\n {\n \n {this.props.productUnitPrice}\n \n }\n {\n \n {this.props.productQuantity}\n \n }\n {{this.props.productAddress}}\n \n \n );\n } else {\n return (\n \n \n \n \n\n {/* Clear Selection Button */}\n
\n {this.props.clearSelectionButton}\n
\n \n \n \n );\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 React from 'react';\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { Address, CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { IShipMultipleAddressesLineViewModel } from '../../modules/checkout-shipping-address';\nimport { ICheckoutShippingCartLineInfo } from '../../modules/checkout-shipping-address/components';\n\nexport interface IShipMultipleAddressesLineProps extends CartLine {\n shipMultipleAddressesLine: IShipMultipleAddressesLineViewModel;\n shippingLineImage: ICheckoutShippingCartLineInfo;\n price?: number;\n context: ICoreContext;\n product?: SimpleProduct;\n imageSettings?: IImageSettings;\n quantity: number;\n moduleId: string;\n moduleTypeName: string;\n currencyCode: string | undefined;\n customerAddresses: Address[];\n error?: string;\n isMobile: boolean;\n onSelect(line: IShipMultipleAddressesLineViewModel, isChecked: boolean): void;\n onShippingAddressChange(shippingLine: CartLine, event: React.ChangeEvent): void;\n resources: {\n unavailableProductErrorMessage?: string;\n outOfStockProductErrorMessage?: string;\n };\n}\n\nexport interface IShipMultipleAddressesLineViewProps {\n key?: string;\n productImage?: React.ReactNode;\n productPrice?: React.ReactNode;\n productCurrencyCode?: React.ReactNode;\n productName?: string;\n productNumber?: React.ReactNode;\n productInfo?: React.ReactNode;\n productLabel?: React.ReactNode;\n productUnitOfMeasure?: React.ReactNode;\n productQuantity?: number;\n productListId?: string;\n productAddress?: React.ReactNode;\n selectLine?: React.ReactNode;\n popUp?: JSX.Element;\n productAddressPopup?: JSX.Element | null | undefined;\n isMobile?: boolean;\n}\n\n/**\n * On Select line function.\n * @param shipMultipleAddressesLine - Ship multiple addresses line.\n * @param input - Ship multiple addresses line props.\n * @returns Set on select shipping line.\n */\nconst onSelectLineHandler = (shipMultipleAddressesLine: IShipMultipleAddressesLineViewModel, input: IShipMultipleAddressesLineProps) => (\n event: React.ChangeEvent\n) => {\n shipMultipleAddressesLine.isChecked = !shipMultipleAddressesLine.isChecked;\n\n input.onSelect(shipMultipleAddressesLine, event.target.checked);\n};\n\nexport const ShipMultipleAddressesLineView = (input: IShipMultipleAddressesLineProps): IShipMultipleAddressesLineViewProps | null => {\n const { customerAddresses, shipMultipleAddressesLine, shippingLineImage, product, context, onShippingAddressChange } = input;\n\n console.log('ShipMultipleAddressesLineView rendering');\n\n if (!product) {\n return null;\n }\n\n const { ItemId } = product;\n const { Quantity, ShippingAddress } = shipMultipleAddressesLine.cartLine;\n\n return {\n selectLine: (\n \n ),\n productImage: renderProductImage(\n '',\n context,\n product.Name!,\n shippingLineImage.imageProps.fallBackSrc,\n shippingLineImage.imageProps.src\n ),\n productInfo: renderProductInfo(input),\n productPrice: renderProductPrice(input),\n productNumber: product && (\n <>\n
{ItemId}
\n {input.error !== 'NONE' ?
{renderProductError(input)}
: undefined}\n \n ),\n productQuantity: Quantity,\n productAddress: (\n onShippingAddressChange(shipMultipleAddressesLine.cartLine, e)}\n value={ShippingAddress?.RecordId}\n >\n {customerAddresses?.map((address: Address, index: number) => (\n \n {address.FullAddress}\n \n ))}\n \n )\n };\n};\n\nconst renderProductImage = (\n className: string,\n context: ICoreContext,\n heading: string,\n image?: string,\n fallbackImage?: string\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n lg: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n xl: { q: 'w=64&h=64&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n};\n\nconst renderProductDimensions = (props: IShipMultipleAddressesLineProps): (string | undefined)[] => {\n const { product } = props;\n if (!product || !product.Dimensions) {\n return [];\n }\n return product.Dimensions.map(dimension => {\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\n return undefined;\n }\n return dimension.DimensionValue.Value;\n });\n};\n\nconst renderProductInfo = (props: IShipMultipleAddressesLineProps): React.ReactNode | undefined => {\n const { product } = props;\n const name = product?.Name;\n const dimensions = renderProductDimensions(props);\n if (!product) {\n return [];\n }\n const productName =
{name}
;\n const dimensionsLine: string = dimensions.join(', ');\n return (\n
\n
{productName}
\n
{dimensionsLine}
\n
\n );\n};\n\nconst renderProductPrice = (props: IShipMultipleAddressesLineProps): React.ReactNode | undefined => {\n const { product } = props;\n\n if (!product?.Price) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n\nconst renderProductError = (props: IShipMultipleAddressesLineProps) => {\n const { error, resources } = props;\n\n if (!error) {\n return '';\n }\n\n const errorMessages = {\n OOS: resources.outOfStockProductErrorMessage,\n UNASSORTED: resources.unavailableProductErrorMessage,\n NONE: ''\n };\n\n return errorMessages[error];\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';\nimport { INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport { Address, CartLine } from '@msdyn365-commerce/retail-proxy';\nimport AddressButtonComponent from './address-button';\nimport { IShipMultipleAddressesTableHeadingProps, ShipMultipleAddressesTableHeading } from './address-ship-multiple-heading';\nimport { IAddressResource } from '../address-module.data';\nimport {\n IShipMultipleAddressesLineProps,\n IShipMultipleAddressesLineViewProps,\n ShipMultipleAddressesLineView\n} from './address-ship-multiple-lines';\nimport { IShipMultipleAddressesLineViewModel } from '../../modules/checkout-shipping-address';\nimport { ICartLineWithProduct, ICheckoutShippingCartLineInfo } from '../../modules/checkout-shipping-address/components';\n\nexport interface IAddressShipMultipleInputProps {\n context: ICoreContext;\n hasExternalSubmitGroup?: boolean;\n moduleId: string;\n moduleTypeName: string;\n currencyCode: string | undefined;\n resources: IAddressResource;\n shippingLines: ICartLineWithProduct[];\n shippingLineImages: ICheckoutShippingCartLineInfo[];\n selectedShippingLines: IShipMultipleAddressesLineViewModel[];\n customerAddresses: Address[];\n onSelect(line: IShipMultipleAddressesLineViewModel, isChecked: boolean): void;\n onSelectAll(isChecked: boolean): void;\n onClear(): void;\n onShippingAddressChange(shippingLine: CartLine, event: React.ChangeEvent): void;\n onBulkShippingAddressChange(event: React.ChangeEvent): void;\n onShipSingleAddress(): void;\n onSave(): void;\n onCancel(): void;\n isMobile: boolean;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface IShipMultipleAddressesViewProps {\n ShipMultipleAddress?: INodeProps;\n shipSingleAddressButton?: React.ReactNode;\n clearSelectionButton?: React.ReactNode;\n addressDropdown?: React.ReactNode;\n ProductsTable?: INodeProps;\n ProductsTableHeading?: React.ReactNode;\n ProductsTableRow?: INodeProps;\n shipMultipleAddressLines?: IShipMultipleAddressesLineViewProps[];\n isShowSaveButton?: boolean;\n saveButton?: React.ReactNode;\n isShowCancelButton?: boolean;\n cancelButton?: React.ReactNode;\n isMobile?: boolean;\n}\n\nexport const AddressShipMultiple = (props: IAddressShipMultipleInputProps): IShipMultipleAddressesViewProps => {\n const {\n context,\n currencyCode,\n hasExternalSubmitGroup,\n moduleId,\n moduleTypeName,\n shippingLines,\n shippingLineImages,\n selectedShippingLines,\n customerAddresses,\n isMobile,\n onSelect,\n onSelectAll,\n onClear,\n onShippingAddressChange,\n onBulkShippingAddressChange,\n onShipSingleAddress,\n onSave,\n onCancel,\n resources\n } = props;\n\n const { unavailableProductErrorMessage, outOfStockProductErrorMessage } = props.resources;\n\n const shipMultipleAddressLines: IShipMultipleAddressesLineViewModel[] = [];\n\n for (const line of shippingLines) {\n shipMultipleAddressLines.push({\n isChecked: false,\n cartLine: line.cartLine\n });\n }\n\n function _renderProductListHeader(): React.ReactNode {\n const headers: IShipMultipleAddressesTableHeadingProps = {\n selectAllRowsText: resources.addressSelectAllRowsText,\n productNumber: resources.addressProductNumberText!,\n productName: resources.addressProductText!,\n productUnitPrice: resources.addressProductUnitPriceText!,\n productQuantity: resources.addressProductQuantityText!,\n productAddress: resources.addressProductAddressText,\n clickHandler: (isChecked: boolean) => {\n onSelectAll(isChecked);\n },\n isAllSelected: selectedShippingLines && selectedShippingLines.every(line => line.isChecked),\n isMobile: isMobile,\n clearSelectionButton: (\n !line.isChecked)\n }}\n />\n )\n };\n\n return ;\n }\n\n function _renderShipMultipleAddressLines(): IShipMultipleAddressesLineViewProps[] {\n return shippingLines.map((line, index) => {\n const currentLineProps: IShipMultipleAddressesLineProps = {\n shipMultipleAddressesLine: {\n isChecked: (selectedShippingLines && selectedShippingLines[index] && selectedShippingLines[index].isChecked) || false,\n cartLine: line.cartLine\n },\n shippingLineImage: shippingLineImages[index],\n product: line.product ? line.product : undefined,\n price: line.product?.Price,\n context,\n quantity: line.cartLine?.Quantity!,\n moduleId: moduleId,\n moduleTypeName: moduleTypeName,\n currencyCode: currencyCode,\n customerAddresses: customerAddresses,\n isMobile: isMobile,\n onSelect: onSelect,\n onShippingAddressChange: onShippingAddressChange,\n resources: {\n unavailableProductErrorMessage,\n outOfStockProductErrorMessage\n }\n };\n\n return ShipMultipleAddressesLineView({ ...currentLineProps })!;\n });\n }\n\n return {\n ShipMultipleAddress: { className: 'msc-address-select' },\n shipSingleAddressButton: (\n \n ),\n clearSelectionButton: (\n !line.isChecked)\n }}\n />\n ),\n addressDropdown: (\n onBulkShippingAddressChange(e)}\n defaultValue={''}\n disabled={selectedShippingLines.every(line => !line.isChecked)}\n >\n \n {customerAddresses?.map((address: Address, index: number) => (\n \n ))}\n \n ),\n ProductsTable: {\n className: `ms-address-select__table`,\n tag: 'table',\n role: 'grid'\n },\n ProductsTableRow: {\n className: `ms-address-select-table-line`,\n tag: 'tr'\n },\n ProductsTableHeading: _renderProductListHeader(),\n shipMultipleAddressLines: _renderShipMultipleAddressLines(),\n isShowSaveButton: !hasExternalSubmitGroup,\n saveButton: (\n \n ),\n isShowCancelButton: !hasExternalSubmitGroup,\n cancelButton: (\n \n ),\n isMobile: isMobile\n };\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"],"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","onShipMultipleAddresses","hasExternalSubmitGroup","multipleAddressShippingEnabled","SelectAddress","addButton","AddressButtonComponent","text","addressAddNewButtonText","addressAddButtonText","ariaLabel","addressAddNewButtonAriaLabel","addressAddButtonAriaLabel","onClick","shipMultipleAddressesButton","addressShipMultipleText","addressShipMultipleAriaLabel","isShowSaveButton","saveButton","addressSaveButtonText","addressSaveButtonAriaLabel","isShowCancelButton","cancelButton","addressCancelButtonText","addressCancelButtonAriaLabel","items","ShipMultipleAddressesTableHeading","state","isChecked","componentClassName","getOnChange","event","setState","clickHandler","render","isMobile","scope","style","maxWidth","position","selectAllRowsText","paddingLeft","isAllSelected","border","top","left","transform","clearSelectionButton","productNumber","productName","textAlign","productUnitPrice","productQuantity","productAddress","onSelectLineHandler","shipMultipleAddressesLine","onSelect","target","ShipMultipleAddressesLineView","customerAddresses","shippingLineImage","product","context","onShippingAddressChange","console","log","ItemId","Quantity","ShippingAddress","cartLine","selectLine","productImage","renderProductImage","Name","imageProps","fallBackSrc","src","productInfo","renderProductInfo","productPrice","renderProductPrice","renderProductError","undefined","e","FullAddress","heading","image","fallbackImage","_context$actionContex","_context$request","Image","actionContext","altText","gridSettings","request","imageSettings","viewports","xs","q","w","h","lg","xl","lazyload","loadFailureBehavior","tabIndex","dimensions","Dimensions","dimension","DimensionValue","Value","renderProductDimensions","dimensionsLine","join","Price","PriceComponent","data","price","CustomerContextualPrice","moduleId","typeName","moduleTypeName","currencyCode","OOS","outOfStockProductErrorMessage","UNASSORTED","unavailableProductErrorMessage","NONE","AddressShipMultiple","shippingLines","shippingLineImages","selectedShippingLines","onSelectAll","onClear","onBulkShippingAddressChange","onShipSingleAddress","shipMultipleAddressLines","line","push","ShipMultipleAddress","shipSingleAddressButton","addressShipSingleText","addressShipSingleAriaLabel","clearSelectionButtonText","clearSelectionButtonAriaLabel","disabled","every","addressDropdown","chooseAddressForSelectedItemsText","chooseAddressForSelectedItemsAriaLabel","defaultValue","noAddressSelectedAriaLabel","hidden","ProductsTable","tag","ProductsTableRow","ProductsTableHeading","headers","addressSelectAllRowsText","addressProductNumberText","addressProductText","addressProductUnitPriceText","addressProductQuantityText","addressProductAddressText","_renderProductListHeader","_line$product","_line$cartLine","currentLineProps","quantity","_objectSpread","saveAndContinueBtnLabel","CheckoutStateInput","_this","CheckoutState","_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","Id","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","updateGuestCheckoutEmail","newGuestCheckoutEmail","customerReference","customerRequisition","note","updateTermsAndConditionsAcceptance","newIsTermsAndConditionAccepted","updateCustomerAccountAmount","__decorate","observable","computed","EnabledPaymentsForOBO","ModuleStatesCacheKey","getModuleStates","cacheKey","moduleStates","get","update","updateModuleStates","WrappedComponent","_super","ModuleState","call","initializeState","_b","states","__assign","_a","hasInitialized","hasError","isRequired","isCancellable","isSubmitContainer","status","childIds","getModuleStateManager","moduleState","validate","isReady","isUpdating","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","setHasError","onReady","onUpdating","onPending","onSkip","onDisable","getModule","getModuleByTypeName","getModuleStateManagerByTypeName","init","options","values","_moduleState","modules","_validateLeaf","source","module","isMatch","_validateContainer","allMatched","skipSkippableItem","app","config","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","includes","ArrayExtensions","hasElements","enableControl","__extends","shouldComponentUpdate","nextProps","observer"],"sourceRoot":""}