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lB,EAAgBD,EAAaO,EAAIC,GAE3C,GAAItmB,EAAIumB,KAAM,OAAOvmB,EAAI5P,MAEzB,IAAKi2B,EAAGG,OAAQ,OAAOZ,EAAWS,EAAIC,GAEtC,IAAIG,EAAcJ,EAAGK,QACrBL,EAAGM,UAAY,EAIf,IAHA,IAEI/5B,EAFAg6B,EAAI,GACJC,EAAI,EAEgC,QAAhCj6B,EAASg5B,EAAWS,EAAIC,KAAc,CAC5C,IAAIQ,EAAWrnB,EAAS7S,EAAO,IAC/Bg6B,EAAEC,GAAKC,EACU,KAAbA,IAAiBT,EAAGM,UAAYhB,EAAmBW,EAAGd,EAASa,EAAGM,WAAYF,IAClFI,IAEF,OAAa,IAANA,EAAU,KAAOD","sources":["webpack://Msdyn365.Commerce.Online/./src/common/method/functions.ts?3a9c","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-address-tile/components/farmlands-account-address-tile-description.tsx?7ca9","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-address-tile/components/farmlands-account-address-tile-links.tsx?f2eb","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-address-tile/farmlands-account-address-tile.tsx?52ec","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-address-tile/farmlands-account-address-tile.view.tsx?9dd2","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-generic-tile/components/farmlands-account-generic-tile-links.tsx?aae9","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-generic-tile/farmlands-account-generic-tile.tsx?3a57","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-account-generic-tile/farmlands-account-generic-tile.view.tsx?066d","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-carousel-content-block/components/links.tsx?1ea4","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-carousel-content-block/farmlands-carousel-content-block.props.autogenerated.ts?b1a6","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-carousel-content-block/farmlands-carousel-content-block.tsx?7869","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-carousel-content-block/farmlands-carousel-content-block.view.tsx?1d34","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-cookie-compliance/components/accept-button.tsx?9c50","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-cookie-compliance/components/links.tsx?8bd9","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-cookie-compliance/farmlands-cookie-compliance.tsx?325f","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-cookie-compliance/farmlands-cookie-compliance.view.tsx?3a12","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-product-description/farmlands-product-description.tsx?c8ac","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-product-description/farmlands-product-description.view.tsx?e953","webpack://Msdyn365.Commerce.Online/./src/modules/accordion-item/accordion-item.tsx?36f7","webpack://Msdyn365.Commerce.Online/./src/modules/accordion-item/accordion-item.view.tsx?a302","webpack://Msdyn365.Commerce.Online/./src/modules/accordion/accordion.tsx?78b1","webpack://Msdyn365.Commerce.Online/./src/modules/accordion/accordion.view.tsx?8c7b","webpack://Msdyn365.Commerce.Online/./src/modules/aad-generic/aad-generic.tsx?c076","webpack://Msdyn365.Commerce.Online/./src/modules/aad-generic/aad-generic.view.tsx?b418","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/account-address-tile.tsx?2f8c","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/account-address-tile.view.tsx?ac91","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/components/account-address-tile-description.tsx?4911","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/components/account-address-tile-links.tsx?bee7","webpack://Msdyn365.Commerce.Online/./src/modules/account-invoice-tile/components/account-invoice-tile-description.tsx?7378","webpack://Msdyn365.Commerce.Online/./src/modules/account-invoice-tile/components/account-invoice-tile-links.tsx?81f3","webpack://Msdyn365.Commerce.Online/./src/modules/account-invoice-tile/account-invoice-tile.tsx?c17e","webpack://Msdyn365.Commerce.Online/./src/modules/account-invoice-tile/account-invoice-tile.view.tsx?0a60","webpack://Msdyn365.Commerce.Online/./src/modules/account-welcome-tile/account-welcome-tile.tsx?2115","webpack://Msdyn365.Commerce.Online/./src/modules/account-welcome-tile/account-welcome-tile.view.tsx?e5e3","webpack://Msdyn365.Commerce.Online/./src/modules/account-wishlist-tile/components/account-wishlist-tile-description.tsx?0588","webpack://Msdyn365.Commerce.Online/./src/modules/account-wishlist-tile/components/account-wishlist-tile-links.tsx?f114","webpack://Msdyn365.Commerce.Online/./src/modules/account-wishlist-tile/account-wishlist-tile.tsx?b721","webpack://Msdyn365.Commerce.Online/./src/modules/account-wishlist-tile/account-wishlist-tile.view.tsx?095e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-apple-pay/checkout-apple-pay.tsx?f243","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-apple-pay/checkout-apple-pay.view.tsx?222d","webpack://Msdyn365.Commerce.Online/./src/modules/footer-item/footer-item.tsx?074a","webpack://Msdyn365.Commerce.Online/./src/modules/footer-item/footer-item.view.tsx?c5af","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/pickup-option-list.tsx?dae0","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-pickup-option-list.tsx?7a25","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers.ts?fe27","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-line-item/store-selector-location-line-item.components.tsx?923d","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-lines.tsx?87ff","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-search-form.tsx?fb9a","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-small-components.tsx?4335","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/selected-store/selected-store.tsx?bfbc","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.tsx?e416","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.view.tsx?71a6","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.match.js?71ff"],"sourcesContent":["import { Cart, CommerceProperty } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g.d';\r\n\r\nenum ePropsValue {\r\n String = 'STRING',\r\n Integer = 'INTEGER',\r\n Boolean = 'BOOLEAN',\r\n Decimal = 'DECIMAL'\r\n}\r\n\r\ntype ExtensionPropsValue = ePropsValue.Boolean | ePropsValue.Integer | ePropsValue.String | ePropsValue.Decimal | null;\r\n\r\nconst IS_BUSINESS_ACCOUNT_KEY = 'IsBusinessAccount';\r\nconst CUST_HOLD_STATUS_KEY = 'CustHoldStatus';\r\nconst CUST_ACCOUNT_STATUS_KEY = 'CustAccountStatus';\r\n\r\n\r\nconst isShareholder = (cart: Cart): boolean => {\r\n console.log(cart)\r\n const { CustomerId, ExtensionProperties } = cart;\r\n const isBusinessAccountProperty = ExtensionProperties!.find((prop: CommerceProperty) => prop.Key === IS_BUSINESS_ACCOUNT_KEY);\r\n if (CustomerId !==undefined)\r\n {\r\n return CustomerId !== null && CustomerId!.length > 0 && ((isBusinessAccountProperty && isBusinessAccountProperty?.Value?.BooleanValue) || false);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nconst isCasual = (cart: Cart): boolean => {\r\n const { CustomerId, ExtensionProperties } = cart;\r\n const isBusinessAccountProperty = ExtensionProperties!.find((prop: CommerceProperty) => prop.Key === IS_BUSINESS_ACCOUNT_KEY);\r\n if (CustomerId !==undefined)\r\n {\r\n return CustomerId !== null && CustomerId!.length > 0 && ((isBusinessAccountProperty && !(isBusinessAccountProperty?.Value?.BooleanValue)) || false);\r\n }\r\n else{\r\n return false;\r\n }\r\n};\r\n\r\nconst isGuest = (cart: Cart): boolean => {\r\n const { CustomerId } = cart;\r\n if (CustomerId !==undefined)\r\n {\r\n return !(CustomerId!.length > 0);\r\n }\r\n else{\r\n return true;\r\n }\r\n\r\n};\r\n\r\nconst findExtensionProperty = (ExtensionProperties: CommerceProperty[], key: string): CommerceProperty | undefined => {\r\n return ExtensionProperties.find((prop: CommerceProperty) => prop.Key === key);\r\n};\r\n\r\n// CustHoldStatus for the customer is not set to \"Tax invoice\" or \"All\"\r\nconst isShareholderAccountNotOnHold = (ExtensionProperties: CommerceProperty[]): boolean => {\r\n const custHoldStatusProp = findExtensionProperty(ExtensionProperties, CUST_HOLD_STATUS_KEY);\r\n const onHoldStatus = custHoldStatusProp ? custHoldStatusProp.Value!.StringValue! : '';\r\n return !['Tax invoice', 'All'].includes(onHoldStatus);\r\n};\r\n\r\n// CustAccountStatus for the customer is set to \"Active\" or \"Monitored\"\r\nconst isShareholderAccountNotInactive = (ExtensionProperties: CommerceProperty[]): boolean => {\r\n const custAccountStatusProp = findExtensionProperty(ExtensionProperties, CUST_ACCOUNT_STATUS_KEY);\r\n const accountStatus = custAccountStatusProp ? custAccountStatusProp.Value!.StringValue! : '';\r\n return ['Active', 'Monitored'].includes(accountStatus);\r\n};\r\n\r\n// CustAccountStatus for the customer is set to \"Off-boarding\" or \"Suspended\"\r\nconst isShareholderAccountDisabled = (ExtensionProperties: CommerceProperty[]): boolean => {\r\n const custAccountStatusProp = findExtensionProperty(ExtensionProperties, CUST_ACCOUNT_STATUS_KEY);\r\n const accountStatus = custAccountStatusProp ? custAccountStatusProp.Value!.StringValue! : '';\r\n return ['Off-boarding', 'Suspended'].includes(accountStatus);\r\n};\r\n\r\n// CustAccountStatus for the customer is set to specifically to \"Inactive\"\r\nconst isShareholderAccountInactive = (ExtensionProperties: CommerceProperty[]): boolean => {\r\n const custAccountStatusProp = findExtensionProperty(ExtensionProperties, CUST_ACCOUNT_STATUS_KEY);\r\n const accountStatus = custAccountStatusProp ? custAccountStatusProp.Value!.StringValue! : '';\r\n return ['Inactive'].includes(accountStatus);\r\n};\r\n\r\nconst hasEcommerceAccess = (userContactDetails: any): boolean => {\r\n return userContactDetails?.CustomerAccounts.find((account: any) => account.IsActive === true).Permissions[0]?.Authorities.find(\r\n (prop: any) => prop.Authority === 'EcommerceAccess'\r\n );\r\n};\r\n\r\n/**\r\n * Get the value of an ExtensionProperty (EP)\r\n * @param extensionProperties The EP used to search for property\r\n * @param keyValue The key value to search\r\n * @param typeValue The type value to return\r\n * @returns The value from EP or EP Object if no typeValue is passed\r\n */\r\nconst getExtensionProperty = (extensionProperties: CommerceProperty[], keyValue: string, typeValue: ExtensionPropsValue = null): any => {\r\n const extensionProperty = extensionProperties.find((prop: CommerceProperty) => prop.Key === keyValue);\r\n\r\n if (typeValue === null || !extensionProperty) {\r\n return extensionProperty;\r\n }\r\n\r\n switch (typeValue) {\r\n case ePropsValue.String:\r\n return extensionProperty.Value!.StringValue;\r\n case ePropsValue.Boolean:\r\n return extensionProperty.Value!.BooleanValue;\r\n case ePropsValue.Integer:\r\n return extensionProperty.Value!.IntegerValue;\r\n case ePropsValue.Decimal:\r\n return extensionProperty.Value!.DecimalValue;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst isValidColour = (str: string | undefined): string | void => {\r\n if (str === undefined || str.match(/^#[a-f0-9]{6}$/i) === null) {\r\n return;\r\n }\r\n return str;\r\n};\r\n\r\nexport {\r\n isShareholder,\r\n isCasual,\r\n isGuest,\r\n isShareholderAccountNotInactive,\r\n isShareholderAccountDisabled,\r\n isShareholderAccountInactive,\r\n isShareholderAccountNotOnHold,\r\n hasEcommerceAccess,\r\n ePropsValue,\r\n getExtensionProperty,\r\n isValidColour\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as React from 'react';\r\n\r\ninterface IAccountAddressTileDescription {\r\n description: string;\r\n}\r\n\r\nconst IAccountAddressTileDescription: React.FC = ({ description }) => (\r\n

{description}

\r\n);\r\n\r\nexport default IAccountAddressTileDescription;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as React from 'react';\r\n\r\nimport { ILinksData } from '../farmlands-account-address-tile.props.autogenerated';\r\n\r\nexport interface IAccountAddressTileLinks {\r\n links: ILinksData[];\r\n}\r\n\r\nconst AccountAddressTileLinks: React.FC = ({ links }) => {\r\n if (links.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {links.map((link: ILinksData, index: number) => (\r\n \r\n {link.linkText}\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nexport default AccountAddressTileLinks;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { IFarmlandsAccountAddressTileData } from './farmlands-account-address-tile.data';\r\nimport { IFarmlandsAccountAddressTileProps } from './farmlands-account-address-tile.props.autogenerated';\r\nimport DescriptionComponent from './components/farmlands-account-address-tile-description';\r\nimport LinksComponent from './components/farmlands-account-address-tile-links';\r\nimport { isShareholder } from '../../common/method/functions';\r\n\r\nexport interface IAccountAddressTileViewProps\r\n extends IFarmlandsAccountAddressTileProps {\r\n AccountAddressTile: IModuleProps;\r\n className: string;\r\n heading?: React.ReactNode;\r\n links?: React.ReactNode;\r\n description?: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * AccountAddress component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass AccountAddressTile extends React.PureComponent<\r\n IFarmlandsAccountAddressTileProps\r\n> {\r\n public render(): JSX.Element {\r\n const { config, data } = this.props;\r\n const { className, heading, links, shareholderText } = config;\r\n const { address } = data;\r\n const addressCount = (address && address.result && address.result.length) || 0;\r\n const description = this._formatAddressDescription(addressCount);\r\n\r\n const isShareholderAccount: boolean = isShareholder(data.cart.result!.cart);\r\n\r\n const viewProps = {\r\n ...this.props,\r\n className: className,\r\n AccountAddressTile: {\r\n moduleProps: this.props,\r\n className: classnames('ms-account-address-tile', config.className)\r\n },\r\n heading: heading && (\r\n \r\n ),\r\n links: !isShareholderAccount && links && links.length > 0 && ,\r\n description: !isShareholderAccount ? (\r\n \r\n ) : (\r\n \r\n )\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private _formatAddressDescription(count: number): string {\r\n const numberWords = ['no', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];\r\n if (count <= 1) {\r\n return `You have ${numberWords[count]} address saved.`;\r\n }\r\n if (count < 10) {\r\n return `You have ${numberWords[count]} addresses saved.`;\r\n }\r\n return `You have ${count} addresses saved.`;\r\n }\r\n}\r\n\r\nexport default AccountAddressTile;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IAccountAddressTileViewProps } from './farmlands-account-address-tile';\r\n\r\nconst AccountAddressTileView: React.FC = props => {\r\n const {\r\n AccountAddressTile,\r\n heading,\r\n description,\r\n links\r\n } = props;\r\n\r\n return (\r\n \r\n {heading}\r\n {description}\r\n {links}\r\n \r\n );\r\n};\r\n\r\nexport default AccountAddressTileView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as React from 'react';\r\n\r\nimport { ILinksData } from '../farmlands-account-generic-tile.props.autogenerated';\r\n\r\nexport interface IAccountGenericTileLinks {\r\n links: ILinksData[];\r\n}\r\n\r\nconst AccountGenericTileLinks: React.FC = ({ links }) => {\r\n if (links.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {links.map((link: ILinksData, index: number) => (\r\n \r\n {link.linkText}\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nexport default AccountGenericTileLinks;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { IFarmlandsAccountGenericTileData } from './farmlands-account-generic-tile.data';\r\nimport {\r\n IFarmlandsAccountGenericTileConfig, IFarmlandsAccountGenericTileProps\r\n} from './farmlands-account-generic-tile.props.autogenerated';\r\nimport LinksComponent from './components/farmlands-account-generic-tile-links';\r\nimport { isShareholder } from '../../common/method/functions';\r\n\r\nexport interface IAccountGenericTileViewProps extends IFarmlandsAccountGenericTileProps {\r\n AccountGenericTile: IModuleProps;\r\n className: string;\r\n heading?: React.ReactNode;\r\n links?: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * AccountGeneric component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass AccountGenericTile extends React.PureComponent> {\r\n public render(): JSX.Element {\r\n const { config, data } = this.props;\r\n const { className, heading } = config;\r\n\r\n const links = isShareholder(data.cart.result!.cart)\r\n ? this.props.config.shareholderLinks\r\n : this.props.config.links;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n className: className,\r\n AccountGenericTile: {\r\n moduleProps: this.props,\r\n className: classnames('ms-account-generic-tile', config.className)\r\n },\r\n heading: heading && ,\r\n links: links && links.length > 0 && \r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default AccountGenericTile;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IAccountGenericTileViewProps } from './farmlands-account-generic-tile';\r\n\r\nconst AccountGenericTileView: React.FC = props => {\r\n const { AccountGenericTile, heading, links } = props;\r\n\r\n return (\r\n \r\n {heading}\r\n {links}\r\n \r\n );\r\n};\r\n\r\nexport default AccountGenericTileView;\r\n","/* tslint:disable: no-duplicate-imports */\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ITelemetryContent,\r\n onTelemetryClick\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { ILinksData } from '../farmlands-carousel-content-block.props.autogenerated';\r\n\r\nexport interface IContentCardLinks {\r\n links: ILinksData[];\r\n requestContext: Msdyn365.IRequestContext;\r\n telemetryContent: ITelemetryContent;\r\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\r\n}\r\n\r\n/**\r\n *\r\n * ContentCardLinks component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class ContentCardLinks extends React.PureComponent {\r\n public render(): JSX.Element {\r\n const editableLinks = this._mapEditableLinks(this.props.links);\r\n return (\r\n
\r\n {editableLinks && editableLinks.length ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n\r\n private _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\r\n if (!linkdata || linkdata.length === 0) {\r\n return null;\r\n }\r\n const editableLinks: Msdyn365.ILinksData[] = [];\r\n linkdata.forEach((link, index) => {\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\r\n const linkText = link.linkText ? link.linkText : '';\r\n payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\r\n const btnClass = index === 0 ? 'msc-cta__primary' : 'msc-cta__secondary';\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: btnClass,\r\n linkText: link.linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: 'button',\r\n additionalProperties: attributes,\r\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\r\n };\r\n editableLinks.push(editableLink);\r\n });\r\n\r\n return editableLinks;\r\n };\r\n}\r\nexport default ContentCardLinks;\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IFarmlandsCarouselContentBlock contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum actionableRegion {\r\n imageAndLinks = 'imageAndLinks',\r\n linksOnly = 'linksOnly'\r\n}\r\n\r\nexport interface IFarmlandsCarouselContentBlockConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n desktopHeadingColour?: string;\r\n mobileHeadingColour?: string;\r\n paragraph?: Msdyn365.RichText;\r\n desktopParagraphColour?: string;\r\n mobileParagraphColour?: string;\r\n mobileParagraphBackgroundColour?: string;\r\n desktopImage: Msdyn365.IImageData;\r\n mobileImage?: Msdyn365.IImageData;\r\n links?: ILinksData[];\r\n actionableRegion?: actionableRegion;\r\n imageLink?: Msdyn365.ILinkData;\r\n shouldOpenLinkInNewTab?: boolean;\r\n imageAriaLabel?: string;\r\n className?: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface ILinksData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IFarmlandsCarouselContentBlockProps extends Msdyn365.IModule {\r\n config: IFarmlandsCarouselContentBlockConfig;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { computed } from 'mobx';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport LinksComponent from './components/links';\r\nimport { isValidColour } from '../../common/method/functions';\r\nimport { actionableRegion as region, IFarmlandsCarouselContentBlockProps } from './farmlands-carousel-content-block.props.autogenerated';\r\n\r\ntype DeviceType = 'Mobile';\r\nexport interface IContentBlockViewProps extends IFarmlandsCarouselContentBlockProps<{}> {\r\n title?: React.ReactNode;\r\n text?: React.ReactNode;\r\n image?: React.ReactNode;\r\n links?: React.ReactNode;\r\n className?: string;\r\n contentBlockContainer: IModuleProps;\r\n imageContainer: INodeProps;\r\n detailsDesktopContainer: INodeProps;\r\n detailsMobileContainer: INodeProps;\r\n contentBlockAnchorTag?: INodeProps;\r\n imageLink?: string;\r\n shouldOpenLinkInNewTab?: boolean;\r\n imageAriaLabel?: string;\r\n}\r\n/**\r\n *\r\n * ContentCard component\r\n * @extends {React.PureComponent}\r\n */\r\n\r\nclass ContentBlock extends React.PureComponent> {\r\n private telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n @computed get isMobile(): boolean {\r\n return (\r\n this.props.context.request &&\r\n this.props.context.request.device &&\r\n (this.props.context.request.device.Type as DeviceType) === 'Mobile'\r\n );\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n heading,\r\n mobileHeadingColour,\r\n desktopHeadingColour,\r\n paragraph,\r\n mobileParagraphColour,\r\n desktopParagraphColour,\r\n mobileParagraphBackgroundColour,\r\n desktopImage,\r\n mobileImage,\r\n links,\r\n shouldOpenLinkInNewTab,\r\n className,\r\n imageAriaLabel\r\n } = this.props.config;\r\n\r\n const CustomTag = (`${heading?.tag}` || 'h1') as keyof JSX.IntrinsicElements;\r\n const contentBlockTitle = heading && (\r\n \r\n {heading.text}\r\n \r\n );\r\n const imageProps = (imageType: Msdyn365.IImageData) => {\r\n return {\r\n gridSettings: this.props.context.request.gridSettings || {},\r\n imageSettings: imageType && imageType.imageSettings\r\n };\r\n };\r\n const contentBlockLinks = links && links.length > 0 && (\r\n \r\n );\r\n const contentBlockText = paragraph && (\r\n // tslint:disable-next-line: react-no-dangerous-html\r\n \r\n );\r\n const contentBlockImage = desktopImage && (\r\n <>\r\n \r\n {mobileImage && (\r\n \r\n )}\r\n \r\n );\r\n\r\n if (!contentBlockTitle && !contentBlockText && !contentBlockImage && !contentBlockLinks) {\r\n this.props.context.telemetry.error('Content block content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const contentBlockviewProps = {\r\n ...this.props,\r\n title: contentBlockTitle,\r\n text: contentBlockText,\r\n image: contentBlockImage,\r\n links: contentBlockLinks,\r\n moduleClass: this.props.config.className,\r\n contentBlockContainer: {\r\n moduleProps: this.props,\r\n className: classnames('farmlands-carousel-content-block', className)\r\n },\r\n imageContainer: { className: 'farmlands-carousel-content-block__image' },\r\n detailsDesktopContainer: {\r\n className: 'farmlands-carousel-content-block__details farmlands-carousel-content-block__details--desktop'\r\n },\r\n detailsMobileContainer: {\r\n style: { 'background-color': isValidColour(mobileParagraphBackgroundColour) || '#000000' },\r\n className: 'farmlands-carousel-content-block__details farmlands-carousel-content-block__details--mobile'\r\n },\r\n contentBlockAnchorTag: {\r\n tag: 'a',\r\n className: 'farmlands-carousel-content-block__link',\r\n role: 'link'\r\n },\r\n imageLink: this._getImageLink(),\r\n imageAriaLabel,\r\n shouldOpenLinkInNewTab: shouldOpenLinkInNewTab\r\n };\r\n\r\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\r\n }\r\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\r\n /* Handle link text change*/\r\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\r\n if (this.props.config.links && this.props.config.links[linkIndex]) {\r\n this.props.config.links[linkIndex].linkText = event.target.value;\r\n }\r\n };\r\n private _getImageLink(): string | null {\r\n const { imageLink, links, actionableRegion } = this.props.config;\r\n if (actionableRegion === region.imageAndLinks) {\r\n if (imageLink && imageLink.destinationUrl) {\r\n return imageLink.destinationUrl;\r\n } else if (links && links.length && links[0].linkUrl) {\r\n return links[0].linkUrl.destinationUrl;\r\n } else {\r\n return null;\r\n }\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n\r\nexport default ContentBlock;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IContentBlockViewProps } from './farmlands-carousel-content-block';\r\n\r\nconst ContentBlockView: React.FC = (props) => {\r\n const {\r\n contentBlockContainer,\r\n imageContainer,\r\n detailsDesktopContainer,\r\n detailsMobileContainer,\r\n title,\r\n text,\r\n links,\r\n image,\r\n contentBlockAnchorTag,\r\n imageLink,\r\n imageAriaLabel,\r\n shouldOpenLinkInNewTab\r\n } = props;\r\n\r\n if (imageLink) {\r\n return (\r\n \r\n \r\n \r\n {image}\r\n \r\n {title}\r\n {text}\r\n {links}\r\n \r\n \r\n \r\n {title}\r\n {text}\r\n {links}\r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n {image}\r\n \r\n {title}\r\n {text}\r\n {links}\r\n \r\n \r\n \r\n {title}\r\n {text}\r\n {links}\r\n \r\n \r\n );\r\n }\r\n};\r\n\r\nexport default ContentBlockView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ICookieComplianceAcceptButton {\r\n acceptCookiesButtonText?: string;\r\n acceptCookiesButtonAriaLabel?: string;\r\n colour: string;\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n onClose(): void;\r\n}\r\n\r\nexport const CookieComplianceAcceptButton: React.FC = ({\r\n acceptCookiesButtonText,\r\n acceptCookiesButtonAriaLabel,\r\n colour,\r\n telemetryContent,\r\n onClose\r\n}) => {\r\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, 'accept cookies');\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n \r\n {acceptCookiesButtonText}\r\n \r\n );\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { IActionLinksData } from '../farmlands-cookie-compliance.props.autogenerated';\r\n\r\nexport interface ICookieComplianceLinks {\r\n links: IActionLinksData[];\r\n requestContext: Msdyn365.IRequestContext;\r\n telemetryContent: ITelemetryContent;\r\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\r\n}\r\n\r\n/**\r\n *\r\n * ContentCardLinks component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class CookieComplianceLinks extends React.PureComponent {\r\n public render(): JSX.Element {\r\n const editableLinks = this._mapEditableLinks(this.props.links);\r\n return(\r\n \r\n {editableLinks && editableLinks.length ?\r\n \r\n : null\r\n }\r\n \r\n\r\n );\r\n }\r\n\r\n private _mapEditableLinks = (linkdata: IActionLinksData[]): Msdyn365.ILinksData[] | null => {\r\n if(!linkdata || linkdata.length === 0) {\r\n return null;\r\n }\r\n const editableLinks: Msdyn365.ILinksData[] = [];\r\n linkdata.forEach((link,index) => {\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\r\n const linkText = link.linkText ? link.linkText : '';\r\n payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: 'link',\r\n linkText: link.linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: 'button',\r\n additionalProperties: attributes,\r\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\r\n };\r\n editableLinks.push(editableLink);\r\n });\r\n\r\n return editableLinks;\r\n };\r\n}\r\n\r\nexport default CookieComplianceLinks;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { getTelemetryObject, IAlertProps, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { isValidColour } from '../../common/method/functions';\r\nimport { CookieComplianceAcceptButton, CookieComplianceLinks} from './components';\r\nimport { IFarmlandsCookieComplianceConfig, IFarmlandsCookieComplianceProps } from './farmlands-cookie-compliance.props.autogenerated';\r\n\r\nexport interface IAlertState {\r\n visible: boolean;\r\n}\r\n\r\nexport interface ICookieComplianceViewProps extends IFarmlandsCookieComplianceProps<{}> {\r\n CookieComplianceBanner: IModuleProps;\r\n AlertProps: IAlertProps;\r\n Content: INodeProps;\r\n text?: React.ReactNode;\r\n links?: React.ReactNode;\r\n acceptButton?: React.ReactNode;\r\n className: string;\r\n onDismiss(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CookieCompliance component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CookieCompliance extends React.PureComponent, IAlertState> {\r\n private cookieRef: React.RefObject;\r\n private telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n constructor(props: IFarmlandsCookieComplianceProps) {\r\n super(props);\r\n this.state = {visible:false};\r\n this.cookieRef = React.createRef();\r\n this._onDismiss = this._onDismiss.bind(this);\r\n }\r\n\r\n public componentDidMount(): void {\r\n const { context } = this.props;\r\n\r\n if (context && context.request && context.request.cookies && !context.request.cookies.isConsentGiven()) {\r\n this.setState({visible: true});\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { config, context, resources, telemetry } = this.props;\r\n const { bannerColour, bannerButtonColour } = config;\r\n const { acceptCookiesButtonText, acceptCookiesAriaLabel } = resources;\r\n const { visible } = this.state;\r\n\r\n const isConsentGiven = context && context.request && context.request.cookies && context.request.cookies.isConsentGiven();\r\n let moduleConfig: IFarmlandsCookieComplianceConfig;\r\n\r\n try {\r\n moduleConfig = config;\r\n } catch(e) {\r\n telemetry.error(`Something went wrong while rendering the alert module ------${e}`);\r\n return
{e}
;\r\n }\r\n\r\n if (isConsentGiven && !visible) {\r\n this.props.context.telemetry.error('Cookie Compliance content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const viewProps = {\r\n ...this.props,\r\n onDismiss: this._onDismiss,\r\n CookieComplianceBanner: {\r\n moduleProps: this.props,\r\n className: classnames('ms-cookie-compliance', moduleConfig.className),\r\n ref: this.cookieRef,\r\n style: { 'background-color': isValidColour(bannerColour) || '#00553d' }\r\n },\r\n AlertProps: {\r\n className: 'ms-cookie-compliance__container',\r\n color: 'white',\r\n fade: false\r\n },\r\n Content: {\r\n className: 'ms-cookie-compliance__content'\r\n },\r\n text: moduleConfig.content && (\r\n \r\n ),\r\n links: moduleConfig.actionLinks && moduleConfig.actionLinks.length > 0 && (\r\n \r\n ),\r\n acceptButton: (\r\n )\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /* Handle link text change*/\r\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent) => {\r\n if(this.props.config.actionLinks && this.props.config.actionLinks[linkIndex]) {\r\n this.props.config.actionLinks[linkIndex].linkText = event.target.value;\r\n }\r\n };\r\n\r\n /* Handle text content change*/\r\n public handleContentChange = (event: MsDyn365.ContentEditableEvent) => this.props.config.content = event.target.value;\r\n\r\n private _onDismiss(): void {\r\n const { context } = this.props;\r\n\r\n if (context && context.request && context.request.cookies) {\r\n context.request.cookies.setConsentCookie();\r\n location.reload();\r\n }\r\n this.setState({visible: false});\r\n }\r\n}\r\n\r\nexport default CookieCompliance;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { Alert, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICookieComplianceViewProps } from './farmlands-cookie-compliance';\r\n\r\nconst CookieComplianceView: React.FC = props => {\r\n const { CookieComplianceBanner, AlertProps, Content, acceptButton, text, links } = props;\r\n\r\n return (\r\n \r\n \r\n \r\n {text}\r\n {links}\r\n \r\n {acceptButton}\r\n \r\n \r\n );\r\n};\r\nexport default CookieComplianceView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IFarmlandsProductDescriptionData } from './farmlands-product-description.data';\r\nimport { IFarmlandsProductDescriptionProps } from './farmlands-product-description.props.autogenerated';\r\nimport { getExtensionProperty, ePropsValue } from '../../common/method/functions';\r\n\r\nexport interface IProductDescriptionViewProps extends IFarmlandsProductDescriptionProps<{}> {\r\n ProductDescription: IModuleProps;\r\n ProductDescriptionNode: React.ReactNode;\r\n}\r\n\r\nexport interface IFarmlandsProductDescriptionState {\r\n onlineLongDescription: string;\r\n onlineShortDescription: string;\r\n}\r\n\r\n/**\r\n *\r\n * ProductSpecification component\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass ProductDescription extends React.Component, IFarmlandsProductDescriptionState> {\r\n constructor(props: IFarmlandsProductDescriptionProps) {\r\n super(props);\r\n this.state = {\r\n onlineLongDescription: '',\r\n onlineShortDescription: '',\r\n };\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n const {\r\n ExtensionProperties: eProps\r\n } = this.props.data.product.result!;\r\n\r\n // Only update description values if the new values are not empty and are different from the existing strings.\r\n const longDesc = getExtensionProperty(eProps!, 'OnlineLongDescription', ePropsValue.String);\r\n const shortDesc = getExtensionProperty(eProps!, 'OnlineShortDescription', ePropsValue.String);\r\n\r\n if (this.state.onlineLongDescription !== longDesc && longDesc !== '') {\r\n this.setState({\r\n onlineLongDescription: longDesc\r\n });\r\n }\r\n\r\n if (this.state.onlineShortDescription !== shortDesc && shortDesc !== '') {\r\n this.setState({\r\n onlineShortDescription: shortDesc\r\n });\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps = {\r\n ...this.props,\r\n ProductDescription: {\r\n moduleProps: this.props,\r\n className: classnames('ms-product-specification', this.props.config.className)\r\n },\r\n ProductDescriptionNode: (\r\n \r\n )\r\n } as IProductDescriptionViewProps;\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default ProductDescription;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IProductDescriptionViewProps } from './farmlands-product-description';\r\n\r\nconst ProductDescriptionView: React.FC = props => {\r\n const {\r\n ProductDescription,\r\n ProductDescriptionNode\r\n } = props;\r\n\r\n return (\r\n \r\n {ProductDescriptionNode}\r\n \r\n );\r\n};\r\n\r\nexport default ProductDescriptionView;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ControlledDrawer, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { IDrawerState } from '@msdyn365-commerce-modules/utilities/dist/types/drawer/Drawer';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createAccordionStateInput, interactionStyle } from '../..';\nimport { IAccordionItemData } from './accordion-item.data';\nimport { IAccordionItemProps } from './accordion-item.props.autogenerated';\n\nexport interface IAccordionItemViewProps {\n AccordionItemContainer: IModuleProps;\n drawer: INodeProps;\n accordionSlots: INodeProps;\n AccordionItemContent: INodeProps;\n className: string;\n}\n\nexport interface IAccordionItemExtentedProps extends IAccordionItemProps {\n interactionStyle?: interactionStyle;\n}\n\n/**\n *\n * AccordionItem component.\n * @extends {React.Component}\n */\n@observer\nclass AccordionItem extends React.Component {\n private readonly moduleClassName: string = 'ms-accordion-item';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IAccordionItemProps) {\n super(props);\n this._onToggle = this._onToggle.bind(this);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public shouldComponentUpdate(nextProps: IAccordionItemProps): boolean {\n if (this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { slots, renderView, config, data } = this.props;\n const accordionExpandedStateResult = data && data.accordionExpandedState && data.accordionExpandedState.result;\n const expanded =\n accordionExpandedStateResult && accordionExpandedStateResult.isAllExpanded === undefined\n ? data && config.isExpandedOnInitialLoad\n : accordionExpandedStateResult && accordionExpandedStateResult.isAllExpanded;\n const viewProps = {\n ...this.props,\n AccordionItemContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n AccordionItemContent: {\n className: 'ms-accordion-item-content'\n },\n drawer: {\n tag: ControlledDrawer,\n className: `${this.moduleClassName}__drawer`,\n toggleButtonText: (config.accordionItemTitle && config.accordionItemTitle) || '',\n collapseProps: { isOpen: expanded },\n onToggle: this._onToggle,\n onTextChange: this.handleHeadingChange,\n requestContext: this.props.context.request,\n telemetryContent: this.telemetryContent\n },\n accordionSlots: slots\n };\n return renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.accordionItemTitle = event.target.value);\n\n private _onToggle(state: IDrawerState): void {\n if (!state.isOpen && this.props.interactionStyle === interactionStyle.ExpandOneItemOnly) {\n const accordionState = { isAllExpanded: false };\n this.props.context.actionContext.update(createAccordionStateInput(accordionState), accordionState);\n }\n }\n}\nexport default AccordionItem;\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 { IAccordionItemViewProps } from './accordion-item';\n\nconst AccordionItemView: React.FC = props => {\n const { drawer, accordionSlots, AccordionItemContainer, AccordionItemContent } = props;\n return (\n \n \n \n {accordionSlots &&\n accordionSlots.accordionItemContent &&\n accordionSlots.accordionItemContent.length &&\n _renderAccordionItemContent(accordionSlots.accordionItemContent)}\n \n \n \n );\n};\n\nconst _renderAccordionItemContent = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {items && items.length > 0\n ? items.map((item: React.ReactNode, index: number) => {\n return {item};\n })\n : null}\n \n );\n};\nexport default AccordionItemView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createAccordionStateInput } from '../..';\nimport { IAccordionData } from './accordion.data';\nimport { IAccordionProps } from './accordion.props.autogenerated';\n\n/**\n *\n * Accordion component.\n * @extends {React.PureComponent>}\n */\n\nexport interface ICallToActionProps {\n link: INodeProps[];\n}\n\n/**\n * Added interface for state management.\n */\nexport interface IAccordianState {\n isDisabled: boolean;\n}\n\nexport interface IAccordionViewProps extends IAccordionProps<{}> {\n heading?: React.ReactNode;\n AccordionContainer: IModuleProps;\n HeaderSection: INodeProps;\n HeadingWrapper: INodeProps;\n accordianButtonsContainer: INodeProps;\n accordionButtons: React.ReactNode;\n accordionItemContainer: INodeProps;\n accordionItems: React.ReactNode;\n}\n\n/**\n *\n * Accordion component.\n * @extends {React.Component>}\n */\n@observer\nclass Accordion extends React.PureComponent, IAccordianState> {\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n private readonly expandAllButtonRef: React.RefObject = React.createRef();\n\n private readonly collapseAllButtonRef: React.RefObject = React.createRef();\n\n constructor(props: IAccordionProps) {\n super(props);\n this._onExpandAll = this._onExpandAll.bind(this);\n this._onCollapseAll = this._onCollapseAll.bind(this);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n this.state = { isDisabled: false };\n }\n\n public render(): JSX.Element {\n const { slots } = this.props;\n const { heading, className } = this.props.config;\n const headingComponent = heading && heading.text && (\n \n );\n\n const accordionViewProps = {\n ...this.props,\n AccordionContainer: {\n moduleProps: this.props,\n className: classnames('ms-accordion', className)\n },\n HeaderSection: { className: 'ms-accordion-header-section' },\n HeadingWrapper: { className: 'ms-accordion-header-section-container' },\n heading: headingComponent,\n config: this.props && this.props.config,\n accordianButtonsContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-accordion-header-section-toggle-button-container'\n },\n accordionButtons: this._renderAccordionButton(),\n accordionItemContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-accordion-item-section'\n },\n accordionItems:\n slots &&\n slots.accordionItems &&\n slots.accordionItems.length > 0 &&\n slots.accordionItems.map((item: React.ReactNode, index: number) => this._getAccordionItem(item, index))\n };\n return this.props.renderView(accordionViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n private _renderAccordionButton(): React.ReactNode | null {\n const { config, resources } = this.props;\n const { heading } = config;\n this.payLoad.contentAction.etext = TelemetryConstant.ExpandAll;\n const attributeExpandAll = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.CollapseAll;\n const attributeCollapseAll = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n if (!config.showToggleAll) {\n this.props.context.telemetry.error('Accordion button content is empty, module wont render');\n return null;\n }\n return (\n <>\n \n {resources.expandAllText}\n \n  \n {resources.toggleAllSeparator}\n  \n \n {resources.collapseAllText}\n \n \n );\n }\n\n private _onExpandAll(): void {\n const accordionState = { isAllExpanded: true };\n this.props.context.actionContext.update(createAccordionStateInput(accordionState), accordionState);\n if (accordionState.isAllExpanded) {\n this.setState({\n isDisabled: true\n });\n setTimeout(() => {\n this.collapseAllButtonRef.current?.focus();\n }, 50);\n }\n }\n\n private _onCollapseAll(): void {\n const accordionState = { isAllExpanded: false };\n this.props.context.actionContext.update(createAccordionStateInput(accordionState), accordionState);\n if (!accordionState.isAllExpanded) {\n this.setState({\n isDisabled: false\n });\n setTimeout(() => {\n this.expandAllButtonRef.current?.focus();\n }, 50);\n }\n }\n\n private _getAccordionItem(item: React.ReactNode, index: number): React.ReactNode {\n return (\n \n {React.cloneElement(item as React.ReactElement, { interactionStyle: this.props.config.interactionStyle })}\n \n );\n }\n}\n\nexport default Accordion;\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 { IAccordionViewProps } from './accordion';\n\nconst accordionView: React.FC = props => {\n const { heading, AccordionContainer, accordionItems } = props;\n if (!props.heading && !props.accordionButtons && !props.accordionItems) {\n props.context.telemetry.error('Accordion content is empty, module wont render');\n return null;\n }\n return (\n \n \n {heading}\n {props.accordionButtons && {props.accordionButtons}}\n \n {accordionItems}\n \n );\n};\n\nexport default accordionView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAadGenericData } from './aad-generic.data';\nimport { IAadGenericProps } from './aad-generic.props.autogenerated';\n\nexport interface IAadGenericViewProps extends IAadGenericProps {\n aadGeneric: IModuleProps;\n aadConainer: INodeProps;\n aadAPIConainer: React.ReactNode;\n heading?: React.ReactNode;\n}\n\n/**\n *\n * AadGeneric component.\n * @extends {React.Component>}\n */\nclass AadGeneric extends React.Component> {\n private readonly moduleClassName: string = 'ms-aad-generic';\n\n public componentDidMount(): void {\n // @ts-expect-error\n const { $i2e, $element } = window || {};\n\n if ($i2e && $element) {\n $i2e.insertServiceContent($element.getElementContent());\n $element.initialize();\n }\n }\n\n public shouldComponentUpdate(nextProps: IAadGenericViewProps): boolean {\n if (nextProps.config.heading !== this.props.config.heading) {\n return true;\n }\n return false;\n }\n\n public render(): JSX.Element | null {\n const { className, heading } = this.props.config;\n\n const viewProps = {\n ...this.props,\n aadGeneric: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n aadConainer: {\n className: `${this.moduleClassName}__container`\n },\n aadAPIConainer:
,\n heading: heading && (\n \n )\n };\n\n return this.props.renderView(viewProps);\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.heading) {\n this.props.config.heading.text = event.target.value;\n }\n };\n}\n\nexport default AadGeneric;\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 { IAadGenericViewProps } from './aad-generic';\n\nexport default (props: IAadGenericViewProps) => {\n const { aadGeneric, aadConainer, aadAPIConainer, heading } = props;\n\n return (\n \n \n {heading}\n {aadAPIConainer}\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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountAddressTileData } from './account-address-tile.data';\nimport { IAccountAddressTileProps } from './account-address-tile.props.autogenerated';\nimport DescriptionComponent from './components/account-address-tile-description';\nimport LinksComponent from './components/account-address-tile-links';\n\nexport interface IAccountAddressTileViewProps extends IAccountAddressTileProps {\n AccountAddressTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountAddress component.\n * @extends {React.PureComponent>}\n */\nclass AccountAddressTile extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountAddressTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { config, resources, data } = this.props;\n const { className, heading, links } = config;\n const { accountAddressTileDescriptionForSingleAddress, accountAddressTileDescriptionForMultipleAddresses } = resources;\n const { address } = data;\n const addressCount = (address && address.result && address.result.length) || 0;\n const accountAddressTileDescription =\n addressCount === 1 ? accountAddressTileDescriptionForSingleAddress : accountAddressTileDescriptionForMultipleAddresses;\n const description = format(accountAddressTileDescription, addressCount);\n\n const viewProps = {\n ...this.props,\n className,\n AccountAddressTile: {\n moduleProps: this.props,\n className: classnames('ms-account-address-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountAddressTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountAddressTileViewProps } from './account-address-tile';\n\nconst AccountAddressTileView: React.FC = props => {\n const { AccountAddressTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountAddressTileView;\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\ninterface IAccountAddressTileDescription {\n description: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountAddressTileDescription: React.FC = ({ description }) => (\n

{description}

\n);\n\nexport default IAccountAddressTileDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-address-tile.props.autogenerated';\n\nexport interface IAccountAddressTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountAddressTileLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-address-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountAddressTileLinks;\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 IAccountInvoiceTileDescription {\n description: string;\n}\n\nexport const AccountInvoiceTileDescription: React.FC = ({ description }) => (\n

{description}

\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-invoice-tile.props.autogenerated';\n\nexport interface IAccountInvoiceTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountInvoiceTileLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-invoice-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountInvoiceTileLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountInvoiceTileData } from './account-invoice-tile.data';\nimport { IAccountInvoiceTileProps } from './account-invoice-tile.props.autogenerated';\nimport { AccountInvoiceTileDescription } from './components';\nimport LinksComponent from './components/account-invoice-tile-links';\n\nexport interface IAccountInvoiceTileViewProps extends IAccountInvoiceTileProps {\n AccountInvoiceTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountInvoiceTile component.\n * @extends {React.PureComponent>}\n */\nclass AccountInvoiceTile extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountInvoiceTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const {\n config,\n data,\n resources,\n context: {\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n }\n } = this.props;\n const { className, heading, links } = config;\n const { accountInvoiceTileDescription } = resources;\n\n const openinvoiceAmount = data.customerBalance.result?.OpenInvoiceBalance || 0;\n const invoiceTotalAmount: string | undefined = formatCurrency(openinvoiceAmount.toFixed(2), currencyCode);\n\n const description = invoiceTotalAmount && format(accountInvoiceTileDescription, invoiceTotalAmount);\n\n const viewProps = {\n ...this.props,\n className,\n AccountInvoiceTile: {\n moduleProps: this.props,\n className: classnames('ms-account-invoice-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: description && \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountInvoiceTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountInvoiceTileViewProps } from './account-invoice-tile';\n\nexport default (props: IAccountInvoiceTileViewProps) => {\n const { AccountInvoiceTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileData } from './account-welcome-tile.data';\nimport { IAccountWelcomeTileProps } from './account-welcome-tile.props.autogenerated';\n\nexport interface IAccountWelcomeTileViewProps extends IAccountWelcomeTileProps {\n AccountWelcomeTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n}\n\n/**\n *\n * AccountWelcome component.\n * @extends {React.PureComponent>}\n */\nclass AccountWelcomeTile extends React.PureComponent> {\n public render(): JSX.Element {\n const { config, data } = this.props;\n const { className } = config;\n\n const accountInfo = data.accountInformation.result;\n const heading = {\n ...config.heading,\n ...{\n text: `${config.heading.text} ${accountInfo && accountInfo.FirstName ? accountInfo.FirstName : ''}`\n }\n };\n\n const viewProps = {\n ...this.props,\n className,\n AccountWelcomeTile: {\n moduleProps: this.props,\n className: classnames('ms-account-welcome-tile', config.className)\n },\n heading: heading && heading.text && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n}\n\nexport default AccountWelcomeTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileViewProps } from './account-welcome-tile';\n\nconst AccountWelcomeTileView: React.FC = props => {\n const { AccountWelcomeTile, heading } = props;\n\n return {heading};\n};\n\nexport default AccountWelcomeTileView;\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\ninterface IAccountWishlistTileDescription {\n description: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountWishlistTileDescription: React.FC = ({ description }) => (\n

{description}

\n);\n\nexport default IAccountWishlistTileDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-wishlist-tile.props.autogenerated';\n\nexport interface IAccountWishlistTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountWishlistTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-wishlist-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountWishlistTileLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountWishlistTileData } from './account-wishlist-tile.data';\nimport { IAccountWishlistTileProps } from './account-wishlist-tile.props.autogenerated';\nimport DescriptionComponent from './components/account-wishlist-tile-description';\nimport LinksComponent from './components/account-wishlist-tile-links';\n\nexport interface IAccountWishlistTileViewProps extends IAccountWishlistTileProps {\n AccountWishlistTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountWishlist component.\n * @extends {React.PureComponent>}\n */\nclass AccountWishlistTile extends React.PureComponent> {\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IAccountWishlistTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { config, resources, data } = this.props;\n const { className, heading, links } = config;\n const { accountWishlistTileDescription } = resources;\n const wishlists = data.wishlists.result;\n\n const wishlistsCount = ((wishlists && wishlists.length && wishlists[0].CommerceListLines) || []).length;\n const description = format(accountWishlistTileDescription || 'You have {0} items in the Wishlist.', wishlistsCount);\n\n const viewProps = {\n ...this.props,\n className,\n AccountWishlistTile: {\n moduleProps: this.props,\n className: classnames('ms-account-wishlist-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountWishlistTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountWishlistTileViewProps } from './account-wishlist-tile';\n\nconst AccountWishlistTileView: React.FC = props => {\n const { AccountWishlistTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountWishlistTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { retrieveCardPaymentAcceptResultAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { CardPaymentAcceptPoint } from '@msdyn365-commerce/retail-proxy';\nimport { ICheckoutApplePayData } from './checkout-apple-pay.data';\nimport { ICheckoutApplePayProps } from './checkout-apple-pay.props.autogenerated';\n\ninterface ICheckoutApplePayState {\n paymentConnectorId?: string;\n}\n\ninterface IValidationEvent {\n validationUrl: string;\n}\n\ninterface IAppleSessionHandler {\n onValidation(resolve: (result: string) => void, reject: () => void, validationEvent: IValidationEvent): void;\n onAuthorize(): void;\n onCancel(): void;\n onPaymentMethodUpdate?(): void;\n onShippingMethodUpdate?(): void;\n}\n\nexport interface ICheckoutApplePayViewProps extends ICheckoutApplePayProps<{}>, ICheckoutApplePayState {\n className?: string;\n checkoutApplyPay: IModuleProps;\n applePayButton?: React.ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const window: any;\n\n/**\n *\n * CheckoutApplePay component\n * @extends {React.PureComponent>}\n */\nexport class CheckoutApplePay extends React.PureComponent, ICheckoutApplePayData> {\n private readonly moduleClassName: string = 'ms-checkout-apple-pay';\n private readonly applePaySdkId = 'd365-apple-pay-sdk';\n\n public constructor(props: ICheckoutApplePayProps) {\n super(props);\n }\n\n public componentDidMount() {\n // load JS portion of payment connector for ApplePay\n this.props.data.cardPaymentAcceptPoint?.then(res => this.loadPaymentConnectorSdk(res));\n\n // load official ApplePay JS SDK.\n const script = document.createElement('script');\n script.src = 'https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js';\n script.async = false;\n script.onerror = () => console.log('unable to load apple script');\n document.body.appendChild(script);\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className }\n // telemetry\n } = this.props;\n\n const applePayButton = ;\n const viewProps: ICheckoutApplePayViewProps = {\n ...this.props,\n ...this.state,\n className,\n checkoutApplyPay: {\n moduleProps: this.props,\n className: classNames(this.moduleClassName, className)\n },\n applePayButton\n };\n\n return this.props.renderView(viewProps);\n }\n\n public handlePayButton = () => {\n console.log('[handlePayButton] pay with apple clicked.');\n\n const handler: IAppleSessionHandler = {\n onValidation: this.validateMerchant,\n onAuthorize: this.authorizePayment,\n onCancel: this.cancelPayment,\n onPaymentMethodUpdate: this.updatePaymentMethod,\n onShippingMethodUpdate: this.updateShippingMethod\n };\n\n // calling connector JS to create payment session.\n window.CreateApplePaySession(handler);\n };\n\n private loadPaymentConnectorSdk = (cardPaymentAcceptPoint: CardPaymentAcceptPoint) => {\n if (!cardPaymentAcceptPoint.AcceptPageContent) {\n this.props.telemetry.error(`Card payment accept page content can't be null or empty`);\n }\n\n const connectorSdk: string = cardPaymentAcceptPoint.AcceptPageContent || '';\n const sdk = document.createElement('script');\n sdk.id = this.applePaySdkId;\n sdk.type = 'text/javascript';\n sdk.appendChild(document.createTextNode(connectorSdk));\n document.body.appendChild(sdk);\n };\n\n private validateMerchant = (resolve: (result: string) => void, reject: () => void, validationEvent: IValidationEvent): void => {\n const {\n data: { checkout, cardPaymentAcceptPoint },\n telemetry\n } = this.props;\n\n console.log(`[validateMerchant] received event: ${JSON.stringify(validationEvent)}`);\n const validationUrl = validationEvent?.validationUrl || '';\n if (!validationUrl) {\n telemetry.error(`Validation Url can't be null or empty`);\n reject();\n }\n\n const cartId = checkout?.result?.checkoutCart.cart.Id || '';\n if (!cartId) {\n telemetry.error('Card identifier can not be null or empty');\n reject();\n }\n\n const paymentConnectorId = cardPaymentAcceptPoint?.result?.PaymentConnectorId || '';\n if (!paymentConnectorId) {\n telemetry.error('Connector identifier can not be null or empty');\n reject();\n }\n\n const settings = {\n PaymentConnectorId: paymentConnectorId\n };\n\n console.log(`[validationCallback] validationEvent: ${JSON.stringify(validationEvent)}`);\n const validationObject = {\n domainName: window.location.hostname,\n validationUrl: validationUrl\n };\n const validationBody = JSON.stringify(validationObject);\n console.log(`[handlePayButton] validationBody: ${validationBody}`);\n\n retrieveCardPaymentAcceptResultAsync(\n { callerContext: this.props.context.actionContext },\n Buffer.from(validationBody).toString('base64'),\n [],\n cartId,\n settings\n )\n .then(async cardPaymentAcceptResult => {\n const validationResult: string = JSON.stringify(cardPaymentAcceptResult);\n console.log(`[retrieveCardPaymentAcceptResultAsync] result: ${validationResult}`);\n resolve(validationResult);\n })\n .catch(error => {\n telemetry.error(`retrieveCardPaymentAcceptResultAsync failed, error: ${error}`);\n reject();\n });\n };\n\n private authorizePayment = (): void => {\n console.log('authorizePayment');\n };\n\n private cancelPayment = (): void => {\n console.log('cancelPayment');\n };\n\n private updateShippingMethod = (): void => {\n console.log('updateShippingMethod');\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private updatePaymentMethod = (): void => {\n console.log('updatePaymentMethod');\n };\n}\n\nexport default CheckoutApplePay;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICheckoutApplePayViewProps } from './checkout-apple-pay';\n\nconst CheckoutApplyPayView: React.FC = ({ checkoutApplyPay, applePayButton }) => (\n {applePayButton}\n);\n\nexport default CheckoutApplyPayView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterItemConfig, IFooterItemProps, IHeadingData, ILinkData } from './footer-item.props.autogenerated';\n\nexport interface IFooterViewProps extends IFooterItemProps {\n heading: React.ReactNode;\n image: React.ReactNode;\n text: React.ReactNode;\n linkText: React.ReactNode;\n className?: string;\n FooterItem: IModuleProps;\n HeadingContainer: INodeProps;\n ItemContainer: INodeProps;\n Link: INodeProps;\n EditableLink: React.ReactNode;\n}\n\n/**\n *\n * FooterItem component.\n * @extends {React.PureComponent>}\n */\nexport class FooterItem extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n private attributes: Msdyn365.IDictionary | undefined;\n\n constructor(props: IFooterItemProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n // Construct telemetry attribute to render\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n }\n\n public render(): JSX.Element {\n const { heading, image, link, text } = this.props.config;\n const footerItemClassName = classnames('ms-footer__item', this.props.config.className);\n const linkText = link && link.linkText ? link.linkText : '';\n this.payLoad.contentAction.etext = linkText;\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n const viewProps: IFooterViewProps = {\n ...this.props,\n heading: this._createHeading(heading!),\n image: this._createImageMarkup(image!),\n text: this._createText(text!),\n linkText: this._createLinkText(link!),\n EditableLink: this._createLink(link!),\n\n FooterItem: {\n moduleProps: this.props,\n className: footerItemClassName\n },\n\n HeadingContainer: {\n className: 'ms-footer__heading'\n },\n\n ItemContainer: {\n className: 'ms-footer__link__container'\n },\n\n // @ts-expect-error\n Link: link &&\n link.linkUrl &&\n link.linkUrl.destinationUrl && {\n tag: 'a',\n role: 'link',\n className: 'ms-footer__link',\n href: link.linkUrl.destinationUrl,\n title: linkText,\n 'aria-label': link.ariaLabel,\n target: link.openInNewTab ? '_blank' : undefined,\n onClick: onTelemetryClick(this.telemetryContent, this.payLoad, linkText),\n ...this.attributes\n },\n className: footerItemClassName\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.text = event.target.value);\n\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.link!.linkText = event.target.value);\n\n private _createLink(link: ILinkData): React.ReactNode | null {\n if (link) {\n const linkText = link.linkText ? link.linkText : '';\n\n // TODO: Update the inner tag in the anchor link to span\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-footer__link',\n linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: this.attributes!,\n onClick: onTelemetryClick(this.telemetryContent, this.payLoad, linkText)\n };\n return (\n \n );\n }\n return null;\n }\n\n private _createLinkText(link: ILinkData): React.ReactNode | null {\n if (!link || !link.linkText) {\n return null;\n }\n\n return {link.linkText};\n }\n\n private _createHeading(heading: IHeadingData): React.ReactNode | null {\n if (!heading || !heading.text || heading.text.length === 0) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _createText(text: string): React.ReactNode | null {\n if (!text) {\n return null;\n }\n return (\n \n );\n }\n\n private _createImageMarkup(item: Msdyn365.IImageData, ariaHiddenAttr?: boolean): React.ReactNode | null {\n if (!item || !item.src || item.src.length === 0) {\n return null;\n }\n\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=24&h=24&m=6', w: 0, h: 0 },\n lg: { q: 'w=24&h=24&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n return (\n \n );\n }\n}\n\nexport default FooterItem;\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 { IFooterViewProps } from './footer-item';\n\n/**\n *\n * FooterItemView component.\n * @extends {React.PureComponent}\n */\nexport class FooterItemView extends React.PureComponent {\n public render(): JSX.Element | null {\n const { FooterItem } = this.props;\n return {this._renderElement(this.props)};\n }\n\n private _renderElement(props: IFooterViewProps): React.ReactNode | null {\n const { heading, HeadingContainer, Link, linkText, image, text, EditableLink } = props;\n if (heading) {\n return {heading} ;\n } else if (Link && image) {\n return (\n \n {linkText}\n {image}\n \n );\n } else if (Link) {\n return EditableLink;\n }\n return (\n <>\n {text}\n {image}\n \n );\n }\n}\n\nexport default FooterItemView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Interface Pickup option list.\n */\nexport interface IPickUpOptionListProps {\n pickupListOptionMenuText: string;\n pickupmodeList?: DeliveryOption[];\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Interface pickup option list state.\n */\nexport interface IPickOptionListState {\n expandSiteOptions: boolean;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class PickUpOptionList extends React.PureComponent {\n private readonly _pickupListOptionMenu: React.RefObject;\n\n private readonly _pickupListOptionButton: React.RefObject;\n\n private readonly eventsToBeBind = ['click', 'touchstart'];\n\n public constructor(props: IPickUpOptionListProps) {\n super(props);\n this._renderDeliveryOptions = this._renderDeliveryOptions.bind(this);\n this._pickupListOptionMenu = React.createRef();\n this._pickupListOptionButton = React.createRef();\n this.state = {\n expandSiteOptions: false\n };\n }\n\n public componentDidMount(): void {\n for (const event of this.eventsToBeBind) {\n window.addEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public componentWillUnmount(): void {\n for (const event of this.eventsToBeBind) {\n window.removeEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public render(): JSX.Element {\n const { pickupListOptionMenuText, pickupmodeList } = this.props;\n\n return (\n
\n \n {pickupListOptionMenuText}\n \n \n {this.state.expandSiteOptions ? (\n
    \n {pickupmodeList?.map((delivery: DeliveryOption) => {\n return (\n
  • \n \n \n {delivery.Description}\n \n \n
  • \n );\n })}\n
\n ) : null}\n
\n );\n }\n\n /**\n * Handle the document click.\n * @param event -- Event object.\n */\n private readonly handleDocumentClick = (event: Event): void => {\n const htmlElement = event.target as HTMLElement;\n if (\n !(\n (this._pickupListOptionButton.current !== null &&\n (event.target === this._pickupListOptionButton.current ||\n this._pickupListOptionButton.current.contains(htmlElement))) ||\n (this._pickupListOptionMenu.current !== null &&\n (event.target === this._pickupListOptionMenu.current || this._pickupListOptionMenu.current.contains(htmlElement)))\n )\n ) {\n this.setState({\n expandSiteOptions: false\n });\n }\n };\n\n private _renderDeliveryOptions(event: React.MouseEvent): void {\n event.stopPropagation();\n const isExpandSiteOptionsState = this.state.expandSiteOptions;\n this.setState({\n expandSiteOptions: !isExpandSiteOptionsState\n });\n }\n\n /**\n * Select Delivery option.\n * @param event -- Event Object.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode && deliveryCode.length > 0) {\n await this.props.onChange(deliveryCode);\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 { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Store Pickup option list interface.\n */\nexport interface IStorePickUpOptionListProps {\n productPickupListOptionMenuText?: string;\n productPickupModeList?: DeliveryOption[];\n defaultOptionText?: string;\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Store Pickup option state interface.\n */\nexport interface IStorePickOptionListState {\n isFilterExpanded: boolean;\n selectedPickupMode?: string;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class StorePickUpOptionList extends React.PureComponent {\n private readonly _storePickupListOptionMenu: React.RefObject;\n\n public constructor(props: IStorePickUpOptionListProps) {\n super(props);\n this._storePickupListOptionMenu = React.createRef();\n this.state = {\n isFilterExpanded: false,\n selectedPickupMode: ''\n };\n }\n\n public render(): JSX.Element {\n const { productPickupListOptionMenuText, productPickupModeList, defaultOptionText } = this.props;\n const selectedPickupModeDesc = defaultOptionText\n ? defaultOptionText\n : productPickupModeList?.find((delivery: DeliveryOption) => delivery.Code === this.state.selectedPickupMode)?.Description;\n const role = 'menu';\n return (\n
\n \n {this.state.isFilterExpanded ? (\n
    \n {productPickupModeList?.map((delivery: DeliveryOption) => {\n return (\n
  • \n \n \n {delivery.Description}\n \n \n
  • \n );\n })}\n
\n ) : null}\n
\n );\n }\n\n /**\n * Method to call when drop dwon get selected.\n */\n private readonly _rendeDeliveryOptions = () => {\n const isExpandOptionsState = this.state.isFilterExpanded;\n this.setState({\n isFilterExpanded: !isExpandOptionsState\n });\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onKeyDown = async (event: React.KeyboardEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\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 { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\n\nimport { IStoreSelectorLocationLineItemResources } from '.';\n\nexport interface IHoursDisplayInfo {\n startDayShort: string;\n startDayFull: string;\n endDayShort?: string;\n endDayFull?: string;\n timeRange: string;\n}\n\ninterface IHoursInfo {\n isClosed: boolean;\n openTime?: number;\n closeTime?: number;\n}\n\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\n\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\n if (seconds === undefined) {\n return undefined;\n }\n let hours = Math.floor(seconds / (60 * 60));\n const ampm = hours >= 12 ? 'pm' : 'am';\n hours %= 12;\n hours = hours ? hours : 12;\n const divisorForMinutes = seconds % (60 * 60);\n const minutes = Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\n return `${hours}:${minutes} ${ampm}`;\n};\n\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.monday;\n case 'TUE':\n return resources.days.tuesday;\n case 'WED':\n return resources.days.wednesday;\n case 'THU':\n return resources.days.thursday;\n case 'FRI':\n return resources.days.friday;\n case 'SAT':\n return resources.days.saturday;\n default:\n // Case 'SUN':\n return resources.days.sunday;\n }\n};\n\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.mondayFull;\n case 'TUE':\n return resources.days.tuesdayFull;\n case 'WED':\n return resources.days.wednesdayFull;\n case 'THU':\n return resources.days.thursdayFull;\n case 'FRI':\n return resources.days.fridayFull;\n case 'SAT':\n return resources.days.saturdayFull;\n default:\n // Case 'SUN':\n return resources.days.sundayFull;\n }\n};\n\nconst buildHoursDisplayInfo = (\n startDay: DayType,\n endDay: DayType,\n hoursInfo: string,\n resources: IStoreSelectorLocationLineItemResources\n): IHoursDisplayInfo => {\n return {\n startDayShort: getShortTimeString(startDay, resources),\n startDayFull: getFullTimeString(startDay, resources),\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\n timeRange: hoursInfo\n };\n};\n\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\n if (firstLine.isClosed && secondLine.isClosed) {\n return true;\n }\n\n if (!firstLine.isClosed && !secondLine.isClosed) {\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\n }\n\n return false;\n};\n\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\n return {\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\n };\n};\n\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\n if (hoursInfo.isClosed) {\n return resources.closedText;\n }\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\n\n return `${openFrom}–${openTo}`;\n};\n\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\n const storeHoursList: IHoursDisplayInfo[] = [];\n\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\n\n let periodStart: DayType = 'MON';\n let periodEnd: DayType = 'MON';\n\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\n\n periodStart = 'TUE';\n }\n periodEnd = 'TUE';\n\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\n\n periodStart = 'WED';\n }\n periodEnd = 'WED';\n\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\n\n periodStart = 'THU';\n }\n periodEnd = 'THU';\n\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\n\n periodStart = 'FRI';\n }\n periodEnd = 'FRI';\n\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\n\n periodStart = 'SAT';\n }\n periodEnd = 'SAT';\n\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\n\n periodStart = 'SUN';\n }\n periodEnd = 'SUN';\n\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\n\n return storeHoursList;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './date-time-helpers';\n\n/**\n * Store Locator line item resources.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n\n closedText: string;\n\n outOfStock: string;\n inStock: string;\n\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * Store Locator line item props.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n };\n}\n\n/**\n * Store Locator line item action component.\n */\nconst storeSelectorLocationLineItemComponentActions = {\n onLocationSelected(props: IStoreSelectorLocationLineItemProps, deliveryMode?: string): void {\n props.handlers.onSelected(props.location, deliveryMode);\n },\n onSetAsPreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onSetAsPreferredStore(props.location.OrgUnitNumber);\n },\n onRemovePreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onRemovePreferredStore();\n }\n};\n\n/**\n * Function to render store hours.\n * @param storeHours - Store Hours object.\n * @param location - Store Unit.\n * @param resources - Resources.\n * @returns - Jsx element.\n */\nconst renderStoreHours = (\n storeHours: StoreHours | undefined,\n location: OrgUnitLocation,\n resources: IStoreSelectorLocationLineItemResources\n): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day houts\n if (storeHours?.RegularStoreHours) {\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\n\n return (\n
\n {storeHoursList.map(displayTime => (\n
\n {displayTime.endDayShort ? (\n
\n {displayTime.startDayShort}–\n {displayTime.endDayShort}\n
\n ) : (\n
\n {displayTime.startDayShort}\n
\n )}\n
{displayTime.timeRange}
\n
\n ))}\n
\n );\n }\n\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\n\n return (\n
\n {storeOpenFrom}-{storeOpenTo}\n
\n );\n};\n\n/**\n * Function to retrun distance measure unit.\n * @param distance - Store location within radius.\n * @param preferredDistanceUnit - Unit configuration.\n * @param isLocationDisabled - Flag to check user location.\n * @returns - Unit of distance.\n */\nexport const buildDistanceString = (\n distance: number | undefined,\n preferredDistanceUnit: string,\n isLocationDisabled?: boolean\n): string | undefined => {\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < 1) {\n return `(<1 ${preferredDistanceUnit})`;\n }\n return `(${Math.floor(distance)} ${preferredDistanceUnit})`;\n};\n\n/**\n * Function to store contact.\n * @param contacts - Store location within radius.\n * @returns - Return primary contact number of store.\n */\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\n\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props);\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: IStoreSelectorLocationLineItemProps, pickupMode?: string) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, pickupMode);\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onSetAsPreferredStore(props);\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onRemovePreferredStore(props);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: IStoreSelectorLocationLineItemProps) => async (deliveryCode: string): Promise => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, deliveryCode);\n return Promise.resolve();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: IStoreSelectorLocationLineItemProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns DeliveryOptionList.\n */\nexport const matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined\n): DeliveryOption[] => {\n const deliveryOption: DeliveryOption[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(_delivery => _delivery.Code === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n });\n\n return deliveryOption;\n};\n\n/**\n * Renders store location line items.\n * @param props - Store location line items props.\n * @returns - HTML.\n */\nconst storeSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\n const {\n hideStockStatus,\n isCurrentLocation,\n isInStock,\n location,\n resources,\n storeHours,\n stockStatusLabel,\n storeLocatorView,\n index,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n shouldShowIndex\n } = props;\n\n const storeName: string | undefined = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(location.Distance, props.preferredDistanceUnit, isLocationDisabled);\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n const stockText: string | undefined = hideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = hideStockStatus || isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName || '');\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n /* eslint-disable prettier/prettier */\n return (\n
\n
\n {(shouldShowIndex || storeLocatorView) && {index}}\n {storeName}\n {distanceAsString ? \n {' '}\n {distanceAsString}\n : false}\n
\n
\n
\n

{resources.contactInfoHeader}

\n {storeAddress && (\n
\n \n {storeAddress}\n
\n )}\n {phoneNumber && (\n
\n \n {phoneNumber}\n
\n )}\n
\n
\n

{resources.storeHoursHeader}

\n {renderStoreHours(storeHours, location, resources)}\n
\n {!storeLocatorView && (\n
\n

{resources.availabilityInfoHeader}

\n {stockText &&

{stockText}

}\n {isCurrentLocation ? (\n

{resources.currentLocation}

\n ) : canSelectLocation ? (\n deliveryOptionList.length === 0 ? (\n \n {pickupInStoreButtonText}\n \n ) : (\n renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel)\n )\n ) : (\n false\n )}\n
\n )}\n {isPreferredStoreEnabled ? (\n isPreferredStore ? (\n \n {resources.preferredStoreText}\n \n ) : (\n \n {resources.setAsPreferredStoreText}\n \n )\n ) : null}\n
\n
\n );\n};\n\n/**\n * Store location line item component.\n */\nexport const StoreSelectorLocationLineItemComponent = storeSelectorLocationLineItem as (\n props: IStoreSelectorLocationLineItemProps\n) => JSX.Element;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources } from '../store-selector.props.autogenerated';\nimport { IStoreSelectorLocationLineItemResources, StoreSelectorLocationLineItemComponent } from './store-selector-location-line-item';\n\n/**\n * Store selector location lines props interface.\n */\nexport interface IStoreSelectorLocationLinesProps {\n locations?: IFullOrgUnitAvailability[];\n resources: IStoreSelectorResources;\n preferredDistanceUnit?: string;\n\n alreadySelectedLocation?: OrgUnitLocation;\n outOfStockThreshold: number;\n enableOutOfStockCheck: boolean;\n storeLocatorView?: boolean;\n selectedStoreLocationId?: string;\n isPreferredStoreEnabled?: boolean;\n displayList?: boolean;\n isLocationDisabled?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n onClick: (locationId: string | undefined) => void;\n preferredStoreLocationId: string | null;\n onSetAsPreferredStore: (locationId: string | undefined) => void;\n onRemovePreferredStore: () => void;\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onLocationSelected(location: OrgUnitLocation | undefined): void;\n}\n\n/**\n * Displays all the location line items, or null if none exists.\n */\n@observer\nexport class StoreSelectorLocationLines extends React.PureComponent {\n @observable private _stores: IFullOrgUnitAvailability[] | undefined;\n\n private readonly selectedLocationRef: React.RefObject;\n\n private storeCounter: number;\n\n public constructor(props: IStoreSelectorLocationLinesProps) {\n super(props);\n this.selectedLocationRef = React.createRef();\n this.storeCounter = 0;\n }\n\n public componentDidUpdate(previousProps: IStoreSelectorLocationLinesProps): void {\n if (this.props.selectedStoreLocationId !== previousProps.selectedStoreLocationId) {\n this._scrollIntoView();\n }\n }\n\n public componentDidMount(): void {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n\n reaction(\n () => this.props.locations,\n () => {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n }\n );\n }\n\n public render(): JSX.Element | null {\n if (!ArrayExtensions.hasElements(this._stores)) {\n return null;\n }\n\n this.storeCounter = 0;\n\n return (\n
\n {this._stores.map((store, index) => {\n return this._renderStoreLocation(store, index);\n })}\n
\n );\n }\n\n /**\n * On click Handler function.\n * @param orgUnitLocation -OrgUnit location.\n * @returns Click action on orgUnit Location.\n */\n private readonly onClickHandler = (orgUnitLocation: OrgUnitLocation | undefined) => () => {\n this.props.onClick(orgUnitLocation?.OrgUnitNumber);\n };\n\n private _renderStoreLocation(store: IFullOrgUnitAvailability, index: number): JSX.Element | undefined {\n const orgUnitLocation = store?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocationId = this.props.selectedStoreLocationId;\n const deliveryOptions = store?.OrgUnitPickUpDeliveryModes;\n const defaultAriaSetsize = 0;\n if (orgUnitLocation) {\n ++this.storeCounter;\n return (\n \n \n
\n );\n }\n return undefined;\n }\n\n /**\n * Sort store.\n * @param stores - Array of stores data.\n * @returns Sorted stores array.\n */\n private _sortStores(stores: IFullOrgUnitAvailability[]): IFullOrgUnitAvailability[] {\n /**\n * IsPreferredStore.\n * @param value - Array of stores data.\n * @returns IsPreferred store boolean value.\n */\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n this.props.isPreferredStoreEnabled &&\n this.props.preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Scroll into view.\n */\n private readonly _scrollIntoView = () => {\n const selectedLocationDiv = this.selectedLocationRef.current;\n const parent = selectedLocationDiv?.parentElement;\n if (selectedLocationDiv && parent) {\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\n parent.scrollTop = selectedLocationDiv.offsetTop;\n } else if (selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight > parent.scrollTop + parent.clientHeight) {\n parent.scrollTop = selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight - parent.clientHeight;\n }\n }\n };\n\n /**\n * Is current location.\n * @param location - Org unit location.\n * @returns The current location.\n */\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined): boolean =>\n (this.props.alreadySelectedLocation && location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) ||\n false;\n\n /**\n * Check the product is in stock or not.\n * @param itemAvailabilities - Item availabilities.\n * @returns If the product is in stock.\n */\n private readonly _isProductInStock = (itemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!this.props.enableOutOfStockCheck) {\n return true;\n }\n\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > 0 : false;\n }\n\n return false;\n };\n\n /**\n * Get the stock inventory label.\n * @param availabilityWithHours - Full org unit availability.\n * @returns The stock label.\n */\n private readonly _stockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours && ArrayExtensions.hasElements(availabilityWithHours.ProductInventoryInformation)) {\n for (let i = 0; i < availabilityWithHours.ProductInventoryInformation.length; i++) {\n if (\n availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n availabilityWithHours.ProductInventoryInformation[i].InventLocationId\n ) {\n return availabilityWithHours.ProductInventoryInformation[i].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n /**\n * Map resources.\n * @param resources - Store resources.\n * @returns Resources.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n KeyCodes,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { StorePickUpOptionList } from './store-pickup-option-list';\n\n/**\n * Store Selector Search Form Props interface.\n */\nexport interface IStoreSelectorSearchFormProps {\n resources: {\n searchInputAriaLabel: string;\n searchButtonAriaLabel: string;\n searchPlaceholderText: string;\n seeAllStoresText: string;\n viewListText: string;\n viewMapText: string;\n pickupFilterByHeading?: string;\n pickupFilterMenuHeading?: string;\n };\n\n id: string;\n value: string;\n isMapDisabled?: boolean;\n showAllStores?: boolean;\n displayList?: boolean;\n locatorView?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n hasEnabledPickupFilterToShowStore?: boolean;\n filteredPickupMode?: string;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onShowAllStores(): void;\n onToggleListMapViewState(): void;\n performSearch(searchTerm: string): Promise;\n searchTermChanged(searchTerm: string): Promise;\n filterPickupModeSelected(pickupMode: string): void;\n}\n\n/**\n * Simple search form consisting of search text and a search button.\n */\nexport class StoreSelectorSearchForm extends React.PureComponent {\n private readonly searchBoxRef: React.RefObject = React.createRef();\n\n private readonly storeSearchAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly showAllStoreAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly toggleMapViewAttributes: Msdyn365.IDictionary | undefined;\n\n private previousValue: string = '';\n\n private isSearchResultOpened: boolean = false;\n\n public constructor(props: IStoreSelectorSearchFormProps) {\n super(props);\n this.state = { value: '' };\n this._handleKeyPressPrev = this._handleKeyPressPrev.bind(this);\n const payLoad: IPayLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SearchStore);\n this.storeSearchAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ShowAllStore;\n this.showAllStoreAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ToggleMapView;\n this.toggleMapViewAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n searchButtonAriaLabel,\n searchPlaceholderText,\n seeAllStoresText,\n viewListText,\n viewMapText,\n pickupFilterByHeading,\n pickupFilterMenuHeading\n },\n id,\n value,\n isMapDisabled,\n showAllStores,\n displayList,\n locatorView,\n onShowAllStores,\n productPickUpDeliveryOptions,\n hasEnabledPickupFilterToShowStore\n } = this.props;\n\n const toggleButtonText = displayList ? viewMapText : viewListText;\n\n return (\n
\n \n
\n )}\n {this.renderPickupModesList(\n this.props,\n toggleButtonText,\n productPickUpDeliveryOptions,\n pickupFilterMenuHeading,\n locatorView,\n pickupFilterByHeading,\n hasEnabledPickupFilterToShowStore,\n displayList\n )}\n \n );\n }\n\n /**\n * Handles the key press on the input box.\n * @param event - Event object.\n */\n private readonly _handleInputKeyPress = (event: React.KeyboardEvent): void => {\n // When the user navigates through the up and down arrow on the result returned by the auto suggest and press enter.\n // At that time, two requests were made to fetch the store details due to which incorrect result is shown and causes flickering.\n // In order to avoid that. Checking if the search result is open or not.\n if (event.keyCode === KeyCodes.ArrowUp || event.keyCode === KeyCodes.ArrowDown) {\n const activeDescedantValue = (event.target as HTMLInputElement).getAttribute('aria-activedescendant');\n if (activeDescedantValue) {\n if (this.previousValue === '') {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n return;\n }\n\n if (activeDescedantValue !== this.previousValue) {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n } else {\n this.isSearchResultOpened = false;\n }\n }\n }\n };\n\n /**\n * Calls method display result.\n * @param event - The first number.\n */\n private readonly _handleKeyPressPrev = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter || event.keyCode === KeyCodes.Space) {\n this.props.onShowAllStores();\n }\n };\n\n /**\n * Method called on search text changed.\n * @param event - Input value.\n */\n private readonly _searchTextChanged = async (event: React.ChangeEvent): Promise => {\n const inputValue: string = event.target.value;\n\n await this.props.searchTermChanged(inputValue);\n };\n\n /**\n * Method called on search submit.\n * @param event - Input value.\n */\n private readonly _onSubmit = async (event: React.SyntheticEvent): Promise => {\n event.preventDefault(); // Prevents form submission\n this.searchBoxRef.current?.blur();\n if (!this.isSearchResultOpened) {\n await this.props.performSearch(this.props.value);\n }\n this.isSearchResultOpened = false;\n };\n\n /**\n * Method called on product pickup option change.\n * @returns - Void.\n */\n private readonly _onChangeHandler = () => async (deliveryCode: string): Promise => {\n this.props.filterPickupModeSelected(deliveryCode);\n return Promise.resolve();\n };\n\n /**\n * Method to render pickup mode list.\n * @param props - Store selector search form props.\n * @param toggleButtonText - Locator view button text.\n * @param productPickUpDeliveryOptions - Product DeliveryOption List.\n * @param pickupFilterMenuHeading - Pickup store button text.\n * @param locatorView - Locator View is on\\off.\n * @param pickupFilterByHeading - Pickup list label text.\n * @param hasEnabledPickupFilterToShowStore - Flag to check header filter is enabled.\n * @param shouldDisplayList - Display List.\n * @returns Jsx component.\n */\n private readonly renderPickupModesList = (\n props: IStoreSelectorSearchFormProps,\n toggleButtonText: string,\n productPickUpDeliveryOptions: DeliveryOption[] | undefined,\n pickupFilterMenuHeading: string | undefined,\n locatorView: boolean | undefined,\n pickupFilterByHeading: string | undefined,\n hasEnabledPickupFilterToShowStore: boolean | undefined,\n shouldDisplayList?: boolean\n ): JSX.Element | null => {\n const toggleButtonClass = shouldDisplayList ? 'view-map' : 'list-view';\n if (hasEnabledPickupFilterToShowStore) {\n return (\n
\n {locatorView && (\n \n {toggleButtonText}\n \n )}\n \n
{pickupFilterByHeading}
\n
\n );\n }\n if (locatorView) {\n return (\n \n {toggleButtonText}\n \n );\n }\n return null;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources, ITermsOfServiceLinkData } from '../store-selector.props.autogenerated';\n\nexport interface IStoreSelectorEmptyMessageProps {\n resources: IStoreSelectorResources;\n}\nexport const StoreSelectorEmptyMessage: React.FC = ({ resources }) => (\n
\n

{resources.emptyLocationsText}

\n
\n);\n\nexport const StoreSelectorWaiting: React.FC = () =>
;\n\nexport interface IStoreSelectorTermsOfServiceProps {\n link?: ITermsOfServiceLinkData;\n requestContext: Msdyn365.IRequestContext;\n onTextChange?(event: Msdyn365.ContentEditableEvent): void;\n}\n\nexport const StoreSelectorTermsOfService: React.FC = ({ link, requestContext, onTextChange }) => {\n if (link) {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-store-select__terms-link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link'\n };\n\n return (\n
\n \n
\n );\n }\n return null;\n};\n\nexport interface IStoreSelectorFoundLocationsMessage {\n resources: IStoreSelectorResources;\n locations?: IFullOrgUnitAvailability[];\n searchRadius: number;\n preferredDistanceUnit: string;\n isSeeAllStore: boolean;\n}\nexport const StoreSelectorFoundLocationsMessage: React.FC = ({\n locations,\n searchRadius,\n resources,\n isSeeAllStore,\n preferredDistanceUnit\n}) => {\n if (locations) {\n const storeCountMessage =\n preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n return (\n
\n {isSeeAllStore\n ? resources.storeAllCountMessage.replace('{count}', locations.length.toString())\n : storeCountMessage.replace('{count}', locations.length.toString()).replace('{radius}', searchRadius.toString())}\n
\n );\n }\n\n return null;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildDistanceString, matchDeliveryOptions } from '../store-selector-location-line-item';\n\n/**\n * Store Locator line item resources.\n */\nexport interface ISelectedStoreResources {\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreProps {\n className?: string;\n shouldHideStockStatus?: boolean;\n isCurrentLocation?: boolean;\n isInStock?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n resources: ISelectedStoreResources;\n stockStatusLabel?: string;\n preferredStoreLocationId: string | null;\n isPreferredStoreEnabled?: boolean;\n isLocationDisabled?: boolean;\n telemetryContent?: ITelemetryContent;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n preferredDistanceUnit: string;\n filteredPickupMode?: string;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreViewProps {\n isCurrentLocation?: boolean;\n canSelectLocation?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n deliveryOptions?: DeliveryOption[];\n isPreferredStore?: boolean;\n resources: ISelectedStoreResources;\n\n storeDetailsMain: INodeProps;\n storeHeader: INodeProps;\n storeName: React.ReactNode;\n storeDistance: React.ReactNode;\n storeDetailsAvailabilityContainer: INodeProps;\n productAvailability: React.ReactNode;\n stockStatus: React.ReactNode;\n currentLocation: React.ReactNode;\n pickUpDeliveryOptionButton: React.ReactNode;\n pickupModes?: React.ReactNode;\n preferredStoreButton?: React.ReactNode;\n removePreferredStoreButton?: React.ReactNode;\n storeDetailsCloseButton?: React.ReactNode;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: ISelectedStoreProps) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation);\n }\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onSetAsPreferredStore(props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: ISelectedStoreProps) => async (deliveryCode: string): Promise => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, deliveryCode);\n }\n return Promise.resolve();\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onRemovePreferredStore();\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: ISelectedStoreProps, pickupMode?: string) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, pickupMode);\n }\n};\n\n/**\n * On store details close functionality.\n * @param props -Store locator location items.\n * @returns Void promise.\n */\nconst storeDetailsModalHandler = (props: ISelectedStoreProps) => async (): Promise => {\n await props.handlers.closeStoreDetailsModal();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: ISelectedStoreProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Renders selected store details.\n * @param props - Store location details props.\n * @returns - Selected Store view props.\n */\nconst selectedStoreDetails = (props: ISelectedStoreProps): ISelectedStoreViewProps => {\n const {\n className,\n shouldHideStockStatus,\n isCurrentLocation,\n isInStock,\n selectedStore,\n resources,\n stockStatusLabel,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n preferredDistanceUnit\n } = props;\n\n const parentClassName = className ? className : 'ms-store-select__map__selected_store';\n const storeName: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\n const location = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const distanceAsString: string | undefined = buildDistanceString(location?.Distance, preferredDistanceUnit, isLocationDisabled);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n // eslint-disable-next-line no-nested-ternary -- Required to check stock Label\n const stockText: string | undefined = shouldHideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = !shouldHideStockStatus && isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\n const isPreferredStore = preferredStoreLocationId === location?.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n\n const viewProps: ISelectedStoreViewProps = {\n selectedStore,\n isCurrentLocation,\n canSelectLocation,\n isPreferredStore,\n resources,\n deliveryOptions: deliveryOptionList,\n storeDetailsMain: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__main`\n },\n storeHeader: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__header`\n },\n storeName: {storeName},\n storeDetailsCloseButton: \n ),\n pickupModes: renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel),\n preferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.preferredStoreText}\n \n ) : null,\n removePreferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.setAsPreferredStoreText}\n \n ) : null,\n handlers: {\n onSelected: props.handlers.onSelected,\n onSetAsPreferredStore: props.handlers.onSetAsPreferredStore,\n onRemovePreferredStore: props.handlers.onRemovePreferredStore,\n closeStoreDetailsModal: props.handlers.closeStoreDetailsModal\n }\n };\n\n return viewProps;\n};\n\n/**\n * Store location line item component.\n */\nexport const SelectedStoreComponent = selectedStoreDetails as (props: ISelectedStoreProps) => ISelectedStoreViewProps;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreInfo, IStoreSelectionStateContext } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n ArrayExtensions,\n getFullAvailableInventoryNearby,\n GetFullAvailableInventoryNearbyInput,\n getOrgUnitLocationsByArea,\n GetOrgUnitLocationsByAreaInput,\n IFullOrgUnitAvailability\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n NodeTag,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n StoreSelectorEmptyMessage,\n StoreSelectorFoundLocationsMessage,\n StoreSelectorLocationLines,\n StoreSelectorSearchForm,\n StoreSelectorTermsOfService,\n StoreSelectorWaiting\n} from './components';\nimport { ISelectedStoreProps, ISelectedStoreViewProps, SelectedStoreComponent } from './components/selected-store/selected-store';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './components/store-selector-location-line-item/date-time-helpers';\nimport { IStoreSelectorData } from './store-selector.data';\nimport {\n IStoreSelectorProps,\n IStoreSelectorResources,\n mode as modeEnum,\n searchRadiusUnit as SearchRadiusUnit,\n style as styleEnum\n} from './store-selector.props.autogenerated';\n\n/**\n * StoreSelector State Interface.\n */\nexport interface IStoreSelectorState {\n isSearchInProgress: boolean;\n searchTerm?: string;\n isSeeAllStoreValue: boolean;\n isLocationDisabled?: boolean;\n filteredPickupMode?: string;\n}\n\n/**\n * StoreSelector View Props Interface.\n */\nexport interface IStoreSelectorViewProps extends IStoreSelectorProps {\n state: IStoreSelectorState;\n\n // Containers:\n ModuleProps: IModuleProps;\n BodyContainerProps: INodeProps;\n FooterContainerProps: INodeProps;\n HeaderContainerProps: INodeProps;\n HeaderProps?: React.ReactNode;\n\n // Components\n locationsMessage?: React.ReactNode;\n search?: React.ReactNode;\n spinner?: React.ReactNode;\n locationsList?: React.ReactNode;\n selectedLocation?: ISelectedStoreViewProps;\n noLocationsMessage?: React.ReactNode;\n terms?: React.ReactNode;\n headerText?: React.ReactNode;\n sortLocations?: IFullOrgUnitAvailability[];\n locationListProps?: IStoreSelectorLocationLineItemProps[];\n bodyWrapperProps?: INodeProps;\n storeResultContainerProps?: INodeProps;\n mapContainerProps?: INodeProps;\n maps?: React.ReactNode;\n isMobileView?: boolean;\n storeDetailsModal?: INodeProps;\n\n callbacks: {\n closeDialog(): Promise;\n searchTermChanged(searchTerm: string): Promise;\n performSearch(searchTerm: string): Promise;\n selectedLocation(location: OrgUnitLocation | undefined): Promise;\n getAndUpdateUserLocation(): Promise;\n attachMapAutoSuggest(): Promise;\n onSuggestionSelected(result: Microsoft.Maps.ISuggestionResult): Promise;\n setPreferredStore(storeId: string | undefined): Promise;\n removePreferredStore(): Promise;\n setSelectedStore(storeId: string | undefined): Promise;\n setOrgUnitStoreInformation(location: OrgUnitLocation | undefined): Promise;\n };\n}\n\n/**\n * StoreSelectorLocation Line Resources Interface.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * ILocationHours Interface.\n */\nexport interface ILocationHours {\n openFrom?: string;\n openTo?: string;\n}\n\n/**\n * StoreSelectorLocation Line Item Props Interface.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n storeHoursList?: IHoursDisplayInfo[];\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n selectedStoreLocationId?: string;\n locationOpen?: ILocationHours;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n onClick: (locationId: string | undefined) => void;\n}\n\n/**\n *\n * Pick Up In Store module.\n * @extends React.Component>}\n */\n@observer\nclass StoreSelector extends React.Component, IStoreSelectorState> {\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private storeCounter: number;\n\n private isPreferredStoreEnabled?: boolean;\n\n public constructor(props: IStoreSelectorProps) {\n super(props);\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.state = { isSearchInProgress: true, searchTerm: '', isSeeAllStoreValue: false, filteredPickupMode: undefined };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.storeCounter = 0;\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled: isAutoSuggestionEnabled }\n } = this.props;\n\n // Adding Timeout to make sure it loads the data based upon the preferred store.\n setTimeout(() => {\n this._getAndUpdateStoreLocation();\n }, 0);\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isDialogOpen,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context?.id === this.props.id) {\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.context?.id,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (!context || context.id === this.props.id) {\n await this._searchTermChanged('');\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n if (this.props.data.storeSelectorStateManager.result?.loadMapApi) {\n await this.props.data.storeSelectorStateManager.result.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n });\n }\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\n () => {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context.actionContext.requestContext.channel?.ChannelCountryRegionISOCode\n });\n }\n );\n\n reaction(\n () => this.props.data.availabilitiesWithHours.result,\n async () => {\n if (this.props.data.storeSelectorStateManager.result?.isDialogOpen) {\n const storeLocationList = this.props.data.availabilitiesWithHours.result;\n if (storeLocationList) {\n await this._setOrgUnitStoreInformation(storeLocationList);\n }\n }\n }\n );\n\n if (isAutoSuggestionEnabled) {\n when(\n () => {\n const isMapApiLoaded = !!this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n const isDialogOpen = !!this.props.data.storeSelectorStateManager.result?.isDialogOpen;\n const isSameContext = this.props.data.storeSelectorStateManager.result?.context?.id === this.props.id;\n return isMapApiLoaded && isDialogOpen && isSameContext;\n },\n () => {\n setTimeout(async () => {\n await this._attachMapAutoSuggest();\n }, 0);\n }\n );\n }\n }\n\n public shouldComponentUpdate(): boolean {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n if (context && context.id === this.props.id) {\n return true;\n }\n return false;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element {\n const {\n config: {\n termsOfServiceLink,\n className,\n heading,\n mode,\n style,\n setAsPreferredStore: shouldSetAsPreferredStore,\n showAllStores: shouldShowAllStores,\n lookupRadius,\n enablePickupFilterToShowStore: hasEnablePickupFilterToShowStore,\n searchRadiusUnit\n },\n context: {\n telemetry,\n app: { config: appConfig },\n actionContext: {\n requestContext: { channel, cookies }\n }\n },\n slots: { maps: mapSlot },\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n this.storeCounter = 0;\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n const isMapDisabled = !(channel?.BingMapsApiKey && channel.BingMapsEnabled);\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const isDialogOpen: boolean = storeSelectorStateManager\n ? storeSelectorStateManager.isDialogOpen && context?.id === this.props.id\n : false;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const isInlineView = styleDefault === styleEnum.inline;\n const isLocatorView = modeDefault === modeEnum.findStores;\n const shouldHideInventory = isLocatorView;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n const shouldDisplayList = storeSelectorStateManager?.listMapViewState?.displayList;\n this.isPreferredStoreEnabled = shouldSetAsPreferredStore && cookies?.isConsentGiven();\n const canShowLocationView =\n context && (context.showMapViewLink === undefined || context.showMapViewLink) && storeSelectorStateManager?.isMapModuleLoaded;\n\n const storeSelectorActions = {\n async toggleListMapViewState(): Promise {\n await storeSelectorStateManager?.toggleListMapViewState();\n }\n };\n\n if (!channel?.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n }\n\n const configHeading = heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText;\n const preferredDistanceUnit =\n searchRadiusUnit === SearchRadiusUnit.kilometers ? resources.kilometersShortText : resources.milesShortText;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n let storeLocationList: IFullOrgUnitAvailability[] | undefined = shouldHideInventory ? storeLocations : availabilitiesWithHours;\n let sortLocation = null;\n if (storeLocationList) {\n sortLocation = this._sortStores(storeLocationList, this.isPreferredStoreEnabled, preferredLocationId);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Reading value from app config.\n const isEnableOutofStock: boolean = appConfig?.enableStockCheck || false;\n const alreadySelectedLocation = context ? context.alreadySelectedLocation : undefined;\n const productPickUpOptionList = storeSelectorStateManager?.context?.deliveryOptions?.DeliveryOptions;\n if (this.state.filteredPickupMode && storeLocationList) {\n storeLocationList = this.onFilterLocations(storeLocationList, this.state.filteredPickupMode);\n }\n const locationListProps = this._getStoreLocationListProps(\n isEnableOutofStock,\n isLocatorView,\n preferredLocationId,\n this.isPreferredStoreEnabled,\n selectedStoreLocationId,\n sortLocation ?? null,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n\n const hasMapSlot = ArrayExtensions.hasElements(mapSlot);\n const dialogClassName = hasMapSlot ? 'ms-store-select__map' : '';\n const viewProps: IStoreSelectorViewProps = {\n ...(this.props as IStoreSelectorProps),\n state: this.state,\n maps: hasMapSlot ? mapSlot[0] : undefined,\n\n ModuleProps: {\n tag: isInlineView ? ('div' as NodeTag) : Modal,\n moduleProps: this.props,\n className: classname(\n `ms-store-${isInlineView ? 'locate' : 'select'}`,\n className,\n dialogClassName,\n isInlineView ? '' : 'msc-modal-input-required'\n ),\n autoFocus: true,\n fade: true,\n isOpen: isDialogOpen,\n 'aria-label': configHeading,\n onClosed: this._closeDialog,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n toggle: this._closeDialog\n },\n isMobileView: isMobileDevice,\n HeaderContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalHeader,\n className: `ms-store-select__${isInlineView ? 'header' : 'modal-header'}`,\n toggle: this._closeDialog\n },\n HeaderProps: configHeading && (\n \n ),\n FooterContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalFooter,\n className: `ms-store-select__${isInlineView ? 'footer' : 'modal-footer'} ${!shouldDisplayList ? 'map-only-view' : ''}`\n },\n BodyContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalBody,\n className: `ms-store-select__${isInlineView ? 'body' : 'modal-body'}`\n },\n bodyWrapperProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__body_wrapper'\n },\n storeResultContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__store_container'\n },\n mapContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__map_container'\n },\n storeDetailsModal: {\n tag: 'div' as NodeTag,\n className: `ms-store-select__map__selected_store__modal ${\n selectedStoreLocationId && isDialogOpen && !shouldDisplayList ? 'show' : 'hide'\n }`\n },\n locationsMessage: !this.state.isLocationDisabled && (\n \n ),\n selectedLocation: this.renderSelectedStore(\n shouldHideInventory,\n preferredDistanceUnit,\n preferredStore,\n this.isPreferredStoreEnabled,\n isEnableOutofStock,\n productPickUpOptionList,\n shouldDisplayList\n ),\n search: (\n \n ),\n spinner: ,\n locationsList: ArrayExtensions.hasElements(storeLocationList) ? (\n \n ) : (\n undefined\n ),\n noLocationsMessage: ,\n terms: (\n \n ),\n\n // Not being used in current context, we can use it here to pass more props.\n headerText: (\n {heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText}\n ),\n sortLocations: sortLocation,\n locationListProps,\n callbacks: {\n searchTermChanged: this._searchTermChanged,\n performSearch: this._performSearch,\n closeDialog: this._closeDialog,\n selectedLocation: this._onOrgUnitLocationSelected,\n getAndUpdateUserLocation: async () => {\n this._getAndUpdateStoreLocation();\n return Promise.resolve();\n },\n attachMapAutoSuggest: this._attachMapAutoSuggest,\n onSuggestionSelected: this._onOrgUnitLocationSelected,\n setPreferredStore: this._setPreferredStore,\n removePreferredStore: this._removePreferredStore,\n setSelectedStore: this._setSelectedStore,\n setOrgUnitStoreInformation: this._setOrgUnitStoreInformation\n }\n } as IStoreSelectorViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Render the selected store for the mobile devices.\n * @param shouldHideInventory -- Hide Inventory.\n * @param preferredDistanceUnit -- Preferred Distance Unit.\n * @param preferredStore -- Preferred Store.\n * @param isPreferredStoreEnabled -- Is Preferred Store Enabled.\n * @param hasEnabledOutOfStockCheck -- Stock check is enabled or not.\n * @param productPickUpOptionList -- Product pickup option list.\n * @param shouldDisplayList - Should Display list.\n * @returns -- Returns the view props.\n */\n public renderSelectedStore = (\n shouldHideInventory: boolean,\n preferredDistanceUnit: string,\n preferredStore: IStoreInfo | undefined,\n isPreferredStoreEnabled: boolean | undefined,\n hasEnabledOutOfStockCheck: boolean,\n productPickUpOptionList?: DeliveryOption[],\n shouldDisplayList?: boolean\n ): ISelectedStoreViewProps | undefined => {\n const {\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const selectedStore = (shouldHideInventory ? storeLocations : availabilitiesWithHours)?.find(\n store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === selectedStoreLocationId\n );\n const orgUnitLocation = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreResources = this._mapResources(resources);\n\n if (!shouldDisplayList && selectedStore) {\n const selectedProps: ISelectedStoreProps = {\n shouldHideStockStatus: shouldHideInventory,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, context?.alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, selectedStore.OrgUnitAvailability?.ItemAvailabilities),\n selectedStore,\n resources: selectedStoreResources,\n stockStatusLabel: this._stockInventoryLabel(selectedStore),\n preferredStoreLocationId: preferredStore?.StoreId ? preferredStore.StoreId : '',\n isPreferredStoreEnabled,\n isLocationDisabled: this.state.isLocationDisabled,\n telemetryContent: this.telemetryContent,\n storePickUpOptionList: selectedStore.OrgUnitPickUpDeliveryModes?.DeliveryOptions,\n productPickUpOptionList,\n preferredDistanceUnit,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n\n return SelectedStoreComponent(selectedProps);\n }\n\n return undefined;\n };\n\n /**\n * Method to be called on link text change.\n * @param event -Content Edit Event.\n */\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.termsOfServiceLink) {\n this.props.config.termsOfServiceLink.linkText = event.target.value;\n }\n };\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading = event.target.value;\n };\n\n /**\n * Show all stores handler function.\n */\n private readonly onShowAllStoresHandler = () => {\n this._getAndUpdateStoreLocation(true);\n this.setState({ filteredPickupMode: undefined });\n };\n\n /**\n * Method to be called for filtered the store location based on the filter selected by the user.\n * @param stores -All the stores from the API.\n * @param filteredPickupMode -Filter selected by the user.\n * @returns -Filtered stores.\n */\n private readonly onFilterLocations = (stores: IFullOrgUnitAvailability[], filteredPickupMode: string) => {\n return stores.filter(location => {\n return location.OrgUnitPickUpDeliveryModes?.DeliveryOptions?.some(deliveryOption => {\n return deliveryOption.Code === filteredPickupMode;\n });\n });\n };\n\n /**\n * Filter Store by pickup mode.\n * @param deliveryCode -Delivery Code.\n */\n private readonly onFilteredPickupMode = (deliveryCode: string) => {\n this.setState({ filteredPickupMode: deliveryCode });\n };\n\n /**\n * Method will sort all stores.\n * @param stores -Stores List.\n * @param isPreferredStoreEnabled -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @returns List of Stores.\n */\n // eslint-disable-next-line class-methods-use-this -- No need of introducing new variable.\n private _sortStores(\n stores: IFullOrgUnitAvailability[],\n isPreferredStoreEnabled: boolean | undefined,\n preferredStoreLocationId: string\n ): IFullOrgUnitAvailability[] {\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n isPreferredStoreEnabled &&\n preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Method will list of store selector location line.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param stores -Store Id.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns List of StoreSelectorLocation Line.\n */\n private _getStoreLocationListProps(\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n stores: IFullOrgUnitAvailability[] | null,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps[] {\n const storeList: IStoreSelectorLocationLineItemProps[] = [];\n if (ArrayExtensions.hasElements(stores)) {\n stores.map((store, index: number) => {\n const storeLineProps = this._createStoreLocationList(\n store,\n index,\n hasEnabledOutOfStockCheck,\n isStoreLocatorView,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n selectedStoreLocationId,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n if (storeLineProps) {\n storeList.push(storeLineProps);\n }\n });\n }\n return storeList;\n }\n\n /**\n * Initialize Map AutoSuggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n config: { autoSuggestOptions },\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded && !this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n /**\n * Callback for the autosuggest API.\n */\n callback: () => {\n const options = { ...autoSuggestOptions, countryCode: channel?.ChannelCountryRegionISOCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(\n `#ms-store-select__search-box_${this.props.id}`,\n `#ms-store-select__search-box-container_${this.props.id}`,\n this._onSuggestionSelected\n );\n },\n\n /**\n * Error call back for autosuggest API.\n */\n errorCallback: () => {\n if (telemetry) {\n telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: channel?.BingMapsApiKey\n });\n }\n };\n\n /**\n * On Selecting Location Suggestion.\n * @param result - Map Suggestions List.\n */\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context && context.id === this.props.id) {\n await this._searchTermChanged(result.formattedSuggestion);\n await this._performSearch(result.formattedSuggestion);\n }\n };\n\n /**\n * On Selecting Preferred Store.\n * @param storeId - Store Id.\n */\n private readonly _setPreferredStore = async (storeId: string | undefined): Promise => {\n if (!storeId) {\n return;\n }\n\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n config: { mode },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations },\n availabilitiesWithHours: { result: availabilitiesWithHours }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n\n let stores: IFullOrgUnitAvailability[];\n if (modeDefault === modeEnum.findStores && storeLocations) {\n stores = storeLocations;\n } else {\n stores = availabilitiesWithHours!;\n }\n\n const preferredStore = stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === storeId);\n\n await storeSelectorStateManager.setPreferredStoreLocation(\n storeId,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName,\n cookies.isConsentGiven(),\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude\n );\n };\n\n /**\n * On Removing Preferred Store.\n */\n private readonly _removePreferredStore = async (): Promise => {\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.clearPreferredStore(cookies.isConsentGiven());\n };\n\n /**\n * Method called to close the store details modal that comes up on clicking the pushpin.\n * @returns Void promise.\n */\n private readonly _closeStoreDetailModal = async (): Promise => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n await storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n };\n\n /**\n * On Selecting Store for pickup.\n * @param storeId - Store Id.\n */\n private readonly _setSelectedStore = async (storeId: string | undefined): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.setSelectedStoreLocationId(storeId);\n };\n\n /**\n * Method to be called on search.\n * @param searchTerm - Search string.\n */\n private readonly _performSearch = async (searchTerm: string): Promise => {\n const {\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!searchTerm || !storeSelectorStateManager) {\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n const location = await storeSelectorStateManager.geoLocate(searchTerm.trim() !== '' ? searchTerm : '0', actionContext);\n\n if (location) {\n await this._updateLocations(location.latitude, location.longitude);\n } else {\n await this._updateLocations();\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n };\n\n /**\n * Method to be called on search term changed.\n * @param searchTerm - Search string.\n */\n private readonly _searchTermChanged = async (searchTerm: string): Promise => {\n this.setState({ searchTerm });\n };\n\n /**\n * Method to be called updating the store location.\n * @param shouldShowAllStores - Flag to show all stores.\n */\n private readonly _getAndUpdateStoreLocation = (shouldShowAllStores?: boolean): void => {\n const {\n config: { style },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n\n if (styleDefault !== styleEnum.inline && (!storeSelectorStateManager || !storeSelectorStateManager.isDialogOpen)) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n if (navigator?.geolocation) {\n navigator.geolocation.getCurrentPosition(\n async position => {\n // eslint-disable-next-line react/no-unused-state -- This state is used in the views.\n this.setState({ isLocationDisabled: false, isSearchInProgress: true });\n if (shouldShowAllStores) {\n this.setState({ isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(position.coords.latitude, position.coords.longitude, 0);\n } else {\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n async error => {\n // If the location setting is turned off\n if (error.PERMISSION_DENIED) {\n this.setState({ isLocationDisabled: true, isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(0, 0, 0);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n { timeout: 5000 }\n );\n } else {\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n }\n };\n\n /**\n * Method to be called closing the store selector dialog.\n * @returns Void promise.\n */\n private readonly _closeDialog = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n this.setState({ searchTerm: '' });\n\n if (storeSelectorStateManager) {\n storeSelectorStateManager.context?.parentElementRef?.current?.focus();\n return storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method to set store info.\n * @param orgUnitStoreInformation - Store Info Object.\n * @returns Void promise.\n */\n private readonly _setOrgUnitStoreInformation = async (orgUnitStoreInformation: IFullOrgUnitAvailability[]): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n config: { style },\n telemetry\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n const context = storeSelectorStateManager.context;\n const moduleId: string = context?.id ? context.id : this.props.id;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n let input: IStoreSelectionStateContext = {\n /**\n * On Location selected.\n * @returns - Returns promise.\n */\n onLocationSelected: async () => {\n // TO-DO handle event for when location in selected\n return Promise.resolve();\n }\n };\n\n if (storeSelectorStateManager.context) {\n input = storeSelectorStateManager.context;\n }\n\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager.preferredStore;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n const storeLocationList = this._sortStores(orgUnitStoreInformation, this.isPreferredStoreEnabled, preferredLocationId);\n\n input = {\n ...input,\n id: moduleId,\n showMapViewLink: context?.showMapViewLink,\n parentElementRef: context?.parentElementRef,\n isDialog: styleDefault === styleEnum.dialog,\n orgUnitStoreInformation: storeLocationList,\n product: context?.product\n };\n\n await storeSelectorStateManager.setOrgUnitStoreInformation(input).catch((error: Error) => {\n if (telemetry) {\n telemetry.error(error.message);\n telemetry.debug('Unable to Update store location state');\n }\n });\n };\n\n /**\n * Method to update user location.\n * @param latitude - User location.\n * @param longitude - User location.\n * @param radius - Search Criteria Radius.\n * @returns Void promise.\n */\n private readonly _updateLocations = async (latitude?: number, longitude?: number, radius?: number): Promise => {\n const {\n config: { mode, lookupRadius, style, searchRadiusUnit },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const calRadius = radius || radius === 0 ? radius : lookupRadius || 50;\n const distanceUnitValue = searchRadiusUnit === SearchRadiusUnit.kilometers ? 1 : 0;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n let localLatitude = this.state.searchTerm || !preferredStore?.Latitude ? latitude : preferredStore.Latitude;\n let long = this.state.searchTerm || !preferredStore?.Longitude ? longitude : preferredStore.Longitude;\n if (styleDefault === styleEnum.inline) {\n const lastInlineStoreLocation = storeSelectorStateManager?.lastInlineShownStoreInfo;\n if (lastInlineStoreLocation && !this.state.searchTerm) {\n localLatitude = lastInlineStoreLocation.Latitude ? lastInlineStoreLocation.Latitude : localLatitude;\n long = lastInlineStoreLocation.Longitude ? lastInlineStoreLocation.Longitude : long;\n }\n await storeSelectorStateManager?.setLastInlineStoreInfo(localLatitude, long);\n }\n\n if (modeDefault === modeEnum.findStores) {\n await this.getOrgUnitLocationByArea(calRadius, distanceUnitValue, localLatitude, long);\n return;\n }\n\n await this.getFullAvailableInventoryNearby(calRadius, distanceUnitValue, localLatitude, long);\n };\n\n /**\n * Get org unit location by area.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getOrgUnitLocationByArea = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n context: { actionContext }\n } = this.props;\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\n latitude,\n longitude,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\n if (orgUnitLocations) {\n await this._setOrgUnitStoreInformation(orgUnitLocations);\n await this._setSelectedStore(undefined);\n }\n };\n\n /**\n * Get full available inventory nearby.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getFullAvailableInventoryNearby = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n telemetry,\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager || !storeSelectorStateManager.context) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n if (!storeSelectorStateManager.context.product) {\n // TODO: Use alternative search method here to not make inventory check\n return;\n }\n\n const input = new GetFullAvailableInventoryNearbyInput(\n storeSelectorStateManager.context.product.RecordId,\n latitude ?? 0,\n longitude ?? 0,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n await getFullAvailableInventoryNearby(input, actionContext).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get full available inventory near by');\n });\n };\n\n /**\n * Method to called on store selected.\n * @param location - Store Info.\n * @param deliveryMode - Pickup mode.\n * @returns Void promise.\n */\n private readonly _onOrgUnitLocationSelected = async (location: OrgUnitLocation | undefined, deliveryMode?: string): Promise => {\n const {\n telemetry,\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager) {\n if (location && storeSelectorStateManager.context) {\n // Want to eat exceptions here so that the dialog still closes even if the onLocationSelected call goes wrong\n await storeSelectorStateManager.context.onLocationSelected(location, deliveryMode).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get on org unit location selected');\n });\n }\n\n await storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method will list of store selector location line.\n * @param store -Store Info.\n * @param index - List index.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns StoreSelectorLocation Line Prop.\n */\n private _createStoreLocationList(\n store: IFullOrgUnitAvailability,\n index: number,\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps | undefined {\n const orgUnitLocation = store.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocation = selectedStoreLocationId;\n const deliveryOptions = store.OrgUnitPickUpDeliveryModes;\n const lineResources = this._mapResources(this.props.resources);\n const storeOpenFrom: string | undefined = secondsToTime(orgUnitLocation?.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(orgUnitLocation?.OpenTo);\n const storeHours = store.StoreHours;\n\n if (orgUnitLocation) {\n ++this.storeCounter;\n return {\n location: orgUnitLocation,\n selectedStoreLocationId: selectedStoreLocation,\n storeHours,\n resources: lineResources,\n preferredDistanceUnit: preferredDistanceUnit!,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, store.OrgUnitAvailability?.ItemAvailabilities),\n stockStatusLabel: this._stockInventoryLabel(store),\n storeLocatorView: isStoreLocatorView,\n index: this.storeCounter.toString(),\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n telemetryContent: this.telemetryContent,\n isLocationDisabled: this.state.isLocationDisabled,\n storePickUpOptionList: deliveryOptions?.DeliveryOptions,\n productPickUpOptionList,\n locationOpen: { openFrom: storeOpenFrom, openTo: storeOpenTo },\n storeHoursList: storeHours?.RegularStoreHours ? buildStoreHours(storeHours.RegularStoreHours, lineResources) : [],\n onClick: this._setSelectedStore,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n }\n return undefined;\n }\n\n /**\n * Method to map resources with Location Item.\n * @param resources - List of strings for module.\n * @returns Resources for StoreSelector location line.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined, selectedLocation?: OrgUnitLocation): boolean =>\n (selectedLocation && location && selectedLocation.OrgUnitNumber === location.OrgUnitNumber) || false;\n\n /**\n * Method to get stock.\n * @param hasEnableOutOfStockCheck - Config to check for stock check enabled.\n * @param itemAvailabilities - Item quantity availability.\n * @returns Boolean value for item stock.\n */\n private readonly _isProductInStock = (\n hasEnableOutOfStockCheck: boolean,\n itemAvailabilities: ItemAvailability[] | undefined\n ): boolean => {\n if (!hasEnableOutOfStockCheck) {\n return true;\n }\n const quantityCount = 0;\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > quantityCount : false;\n }\n\n return false;\n };\n\n /**\n * Method to get stocklevel label.\n * @param isInStock - Stock available in store.\n * @returns Label for stock status.\n */\n private readonly _stockInventoryLabel = (isInStock: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (isInStock?.ProductInventoryInformation && ArrayExtensions.hasElements(isInStock.ProductInventoryInformation)) {\n for (let index = 0; index < isInStock.ProductInventoryInformation.length; index++) {\n if (\n isInStock.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n isInStock.ProductInventoryInformation[index].InventLocationId\n ) {\n return isInStock.ProductInventoryInformation[index].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n}\n\nexport default StoreSelector;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISelectedStoreViewProps } from './components/selected-store/selected-store';\nimport { IStoreSelectorViewProps } from './store-selector';\n\n/**\n * Renders the pickup Delivery options.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderDeliveryOptions: React.FC = props => {\n const { canSelectLocation, deliveryOptions, pickUpDeliveryOptionButton, pickupModes } = props;\n\n return (\n <>\n {/* eslint-disable-next-line no-nested-ternary -- Need this.*/}\n {canSelectLocation ? (ArrayExtensions.hasElements(deliveryOptions) ? pickupModes : pickUpDeliveryOptionButton) : false}\n \n );\n};\n\n/**\n * Render the selected store.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderSelectedStore: React.FC = props => {\n const {\n storeDetailsMain,\n storeHeader,\n storeName,\n storeDetailsCloseButton,\n storeDistance,\n storeDetailsAvailabilityContainer,\n productAvailability,\n stockStatus,\n isCurrentLocation,\n currentLocation,\n isPreferredStore,\n preferredStoreButton,\n removePreferredStoreButton\n } = props;\n\n return (\n \n \n {storeDetailsCloseButton}\n {storeName}\n {storeDistance}\n \n \n {productAvailability}\n {stockStatus}\n \n {isCurrentLocation ? currentLocation : renderDeliveryOptions(props)}\n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\n \n );\n};\n\n/**\n * Render the body of the popup.\n * @param props -- Store selector view props.\n * @returns -- Returns the html.\n */\nconst renderBody: React.FC = props => {\n const {\n BodyContainerProps,\n locationsMessage,\n search,\n state,\n spinner,\n locationsList,\n noLocationsMessage,\n maps,\n bodyWrapperProps,\n storeResultContainerProps,\n mapContainerProps,\n isMobileView,\n storeDetailsModal,\n selectedLocation\n } = props;\n\n if (isMobileView) {\n return (\n \n {locationsMessage}\n {search}\n \n \n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n {maps}\n {selectedLocation && renderSelectedStore(selectedLocation)}\n \n \n \n );\n }\n\n return (\n \n \n \n {locationsMessage}\n {search}\n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n \n {maps}\n \n \n );\n};\n\n/**\n * Store selector view props.\n * @param props - Store selector view props.\n * @returns - HTML.\n */\nconst StoreSelectorView: React.FC = props => {\n const {\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n\n terms\n } = props;\n\n return (\n \n {HeaderProps}\n {renderBody(props)}\n {terms}\n \n );\n};\n\nexport default StoreSelectorView;\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n"],"names":["ePropsValue","IS_BUSINESS_ACCOUNT_KEY","CUST_ACCOUNT_STATUS_KEY","isShareholder","cart","console","log","CustomerId","ExtensionProperties","isBusinessAccountProperty","find","prop","Key","_isBusinessAccountPro","undefined","length","Value","BooleanValue","isCasual","_isBusinessAccountPro2","isGuest","findExtensionProperty","key","isShareholderAccountNotOnHold","custHoldStatusProp","onHoldStatus","StringValue","includes","isShareholderAccountNotInactive","custAccountStatusProp","accountStatus","isShareholderAccountDisabled","isShareholderAccountInactive","hasEcommerceAccess","userContactDetails","_userContactDetails$C","CustomerAccounts","account","IsActive","Permissions","Authorities","Authority","getExtensionProperty","extensionProperties","keyValue","typeValue","arguments","extensionProperty","String","Boolean","Integer","IntegerValue","Decimal","DecimalValue","isValidColour","str","match","_ref","description","React","className","links","map","link","index","title","linkText","href","linkUrl","destinationUrl","ariaLabel","target","openInNewTab","AccountAddressTile","render","config","data","this","props","heading","shareholderText","address","addressCount","result","_formatAddressDescription","isShareholderAccount","viewProps","_objectSpread","moduleProps","classnames","Heading","headingTag","tag","text","LinksComponent","Object","assign","DescriptionComponent","renderView","count","numberWords","Module","AccountGenericTile","shareholderLinks","ContentCardLinks","constructor","_mapEditableLinks","linkdata","editableLinks","forEach","payLoad","getPayloadObject","telemetryContent","contentAction","etext","attributes","getTelemetryAttributes","btnClass","editableLink","role","additionalProperties","onClick","onTelemetryClick","push","Msdyn365","editProps","onTextChange","requestContext","actionableRegion","HeadingTag","ContentBlock","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","handleTextChange","event","value","handleParagraphChange","paragraph","handleLinkTextChange","linkIndex","device","Type","mobileHeadingColour","desktopHeadingColour","mobileParagraphColour","desktopParagraphColour","mobileParagraphBackgroundColour","desktopImage","mobileImage","shouldOpenLinkInNewTab","imageAriaLabel","CustomTag","contentBlockTitle","style","isMobile","color","imageProps","imageType","gridSettings","imageSettings","contentBlockLinks","contentBlockText","dangerouslySetInnerHTML","getRichTextHtml","contentBlockImage","error","contentBlockviewProps","image","moduleClass","contentBlockContainer","imageContainer","detailsDesktopContainer","detailsMobileContainer","contentBlockAnchorTag","imageLink","_getImageLink","region","imageAndLinks","__decorate","computed","Node","rel","CookieComplianceAcceptButton","acceptCookiesButtonText","acceptCookiesButtonAriaLabel","colour","onClose","type","backgroundColor","CookieComplianceLinks","CookieCompliance","super","actionLinks","handleContentChange","content","state","visible","cookieRef","_onDismiss","bind","componentDidMount","cookies","isConsentGiven","setState","resources","bannerColour","bannerButtonColour","acceptCookiesAriaLabel","moduleConfig","e","onDismiss","CookieComplianceBanner","ref","AlertProps","fade","Content","MsDyn365","onEdit","acceptButton","setConsentCookie","location","reload","Alert","ProductDescription","onlineLongDescription","onlineShortDescription","componentDidUpdate","eProps","product","longDesc","shortDesc","ProductDescriptionNode","RichTextComponent","observer","AccordionItem","moduleClassName","handleHeadingChange","accordionItemTitle","_onToggle","shouldComponentUpdate","nextProps","slots","accordionExpandedStateResult","accordionExpandedState","expanded","isAllExpanded","isExpandedOnInitialLoad","AccordionItemContainer","AccordionItemContent","drawer","ControlledDrawer","toggleButtonText","collapseProps","isOpen","onToggle","accordionSlots","interactionStyle","accordionState","actionContext","update","createAccordionStateInput","_renderAccordionItemContent","items","item","accordionItemContent","Accordion","expandAllButtonRef","collapseAllButtonRef","_onExpandAll","_onCollapseAll","isDisabled","headingComponent","accordionViewProps","AccordionContainer","HeaderSection","HeadingWrapper","accordianButtonsContainer","accordionButtons","_renderAccordionButton","accordionItemContainer","accordionItems","_getAccordionItem","TelemetryConstant","ExpandAll","attributeExpandAll","CollapseAll","attributeCollapseAll","showToggleAll","disabled","expandAllText","toggleAllSeparator","collapseAllText","setTimeout","_this$collapseAllButt","current","focus","_this$expandAllButton","AadGeneric","$i2e","$element","window","insertServiceContent","getElementContent","initialize","aadGeneric","aadConainer","aadAPIConainer","id","accountAddressTileDescriptionForSingleAddress","accountAddressTileDescriptionForMultipleAddresses","accountAddressTileDescription","format","AccountInvoiceTileDescription","AccountInvoiceTile","_data$customerBalance","cultureFormatter","formatCurrency","currencyCode","accountInvoiceTileDescription","invoiceTotalAmount","customerBalance","OpenInvoiceBalance","toFixed","AccountWelcomeTile","accountInfo","accountInformation","FirstName","AccountWishlistTile","accountWishlistTileDescription","wishlists","wishlistsCount","CommerceListLines","CheckoutApplePay","applePaySdkId","handlePayButton","handler","onValidation","validateMerchant","onAuthorize","authorizePayment","onCancel","cancelPayment","onPaymentMethodUpdate","updatePaymentMethod","onShippingMethodUpdate","updateShippingMethod","CreateApplePaySession","loadPaymentConnectorSdk","cardPaymentAcceptPoint","AcceptPageContent","connectorSdk","sdk","document","createElement","appendChild","createTextNode","body","resolve","reject","validationEvent","_checkout$result","_cardPaymentAcceptPoi","checkout","JSON","stringify","validationUrl","cartId","checkoutCart","Id","paymentConnectorId","PaymentConnectorId","settings","validationObject","domainName","hostname","validationBody","retrieveCardPaymentAcceptResultAsync","callerContext","Buffer","from","toString","then","async","validationResult","cardPaymentAcceptResult","catch","_this$props$data$card","res","script","src","onerror","applePayButton","Button","checkoutApplyPay","classNames","FooterItem","footerItemClassName","_createHeading","_createImageMarkup","_createText","_createLinkText","EditableLink","_createLink","HeadingContainer","ItemContainer","Link","ariaHiddenAttr","viewports","xs","q","w","h","lg","lazyload","loadFailureBehavior","shouldSkipToMainImage","FooterItemView","_renderElement","PickUpOptionList","eventsToBeBind","handleDocumentClick","htmlElement","_pickupListOptionButton","contains","_pickupListOptionMenu","expandSiteOptions","_onSelect","preventDefault","deliveryCode","currentTarget","getAttribute","onChange","_renderDeliveryOptions","addEventListener","componentWillUnmount","removeEventListener","pickupListOptionMenuText","pickupmodeList","delivery","Code","tabIndex","Description","stopPropagation","isExpandSiteOptionsState","StorePickUpOptionList","_rendeDeliveryOptions","isExpandOptionsState","isFilterExpanded","selectedPickupMode","_onKeyDown","_storePickupListOptionMenu","_productPickupModeLis","productPickupListOptionMenuText","productPickupModeList","defaultOptionText","selectedPickupModeDesc","onKeyDown","secondsToTime","seconds","hours","Math","floor","ampm","divisorForMinutes","getShortTimeString","day","days","monday","tuesday","wednesday","thursday","friday","saturday","sunday","getFullTimeString","mondayFull","tuesdayFull","wednesdayFull","thursdayFull","fridayFull","saturdayFull","sundayFull","buildHoursDisplayInfo","startDay","endDay","hoursInfo","startDayShort","startDayFull","endDayShort","endDayFull","timeRange","shouldMergeLines","firstLine","secondLine","isClosed","openTime","closeTime","getStoreHoursData","storeHours","dateForLookup","get","buildStoreHoursString","closedText","buildStoreHours","storeHoursList","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","storeSelectorLocationLineItemComponentActions","onLocationSelected","deliveryMode","handlers","onSelected","onSetAsPreferredStore","OrgUnitNumber","onRemovePreferredStore","buildDistanceString","distance","preferredDistanceUnit","isLocationDisabled","onPickupInStoreClickHandler","onPickupModeSelectHandler","pickupMode","onSetPreferredStoreClickHandler","removePreferredStoreHandler","onChangeHandler","Promise","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","pickup","_delivery","StoreSelectorLocationLineItemComponent","hideStockStatus","isCurrentLocation","isInStock","stockStatusLabel","storeLocatorView","preferredStoreLocationId","isPreferredStoreEnabled","productPickUpOptionList","shouldShowIndex","storeName","OrgUnitName","distanceAsString","Distance","storeAddress","Address","phoneNumber","contacts","allPhoneContacts","filter","contact","ContactTypeValue","IsPrivate","ArrayExtensions","hasElements","primaryPhoneContact","IsPrimary","Locator","extractPhoneNumber","Contacts","resourceLabel","inStock","outOfStock","stockLabel","stockText","canSelectLocation","pickupInStoreButtonText","selectLocation","pickupInStoreAriaLabel","selectLocationAriaLabelFormat","replace","isPreferredStore","PickupInStore","PreferredStore","preferredStoreAttributes","RemovePreferredStore","removePreferredStoreAttributes","deliveryOptionList","contactInfoHeader","storeHoursHeader","renderStoreHours","RegularStoreHours","displayTime","storeOpenFrom","OpenFrom","storeOpenTo","OpenTo","availabilityInfoHeader","currentLocation","renderPickupModes","filteredPickupMode","preferredStoreAriaLabel","preferredStoreText","setAsPreferredStoreTextAriaLabel","setAsPreferredStoreText","StoreSelectorLocationLines","onClickHandler","orgUnitLocation","_scrollIntoView","selectedLocationDiv","selectedLocationRef","parent","parentElement","scrollTop","offsetTop","clientHeight","_isCurrentLocation","alreadySelectedLocation","_isProductInStock","itemAvailabilities","enableOutOfStockCheck","AvailableQuantity","_stockInventoryLabel","availabilityWithHours","ProductInventoryInformation","i","_availabilityWithHour","OrgUnitAvailability","OrgUnitLocation","InventoryLocationId","InventLocationId","StockLevelLabel","_mapResources","contactText","timeText","availabilityText","storeHoursClosedText","outOfStockText","inStockText","selectedStoreLocationText","selectStoreText","selectStoreAriaFormatText","storeHoursMondayText","storeHoursTuesdayText","storeHoursWednesdayText","storeHoursThursdayText","storeHoursFridayText","storeHoursSaturdayText","storeHoursSundayText","storeHoursMondayFullText","storeHoursTuesdayFullText","storeHoursWednesdayFullText","storeHoursThursdayFullText","storeHoursFridayFullText","storeHoursSaturdayFullText","storeHoursSundayFullText","storeCounter","previousProps","selectedStoreLocationId","locations","_stores","_sortStores","reaction","show","displayList","store","_renderStoreLocation","_store$OrgUnitAvailab","deliveryOptions","OrgUnitPickUpDeliveryModes","_store$OrgUnitAvailab2","selected","StoreHours","ItemAvailabilities","DeliveryOptions","productPickUpDeliveryOptions","stores","_value$OrgUnitAvailab","observable","StoreSelectorSearchForm","searchBoxRef","previousValue","isSearchResultOpened","_handleInputKeyPress","keyCode","KeyCodes","ArrowUp","ArrowDown","activeDescedantValue","_handleKeyPressPrev","Enter","Space","onShowAllStores","_searchTextChanged","inputValue","searchTermChanged","_onSubmit","_this$searchBoxRef$cu","blur","performSearch","_onChangeHandler","filterPickupModeSelected","renderPickupModesList","pickupFilterMenuHeading","locatorView","pickupFilterByHeading","hasEnabledPickupFilterToShowStore","shouldDisplayList","toggleButtonClass","onToggleListMapViewState","toggleMapViewAttributes","SearchStore","storeSearchAttributes","ShowAllStore","showAllStoreAttributes","ToggleMapView","searchButtonAriaLabel","searchPlaceholderText","seeAllStoresText","viewListText","viewMapText","isMapDisabled","showAllStores","name","autoComplete","onSubmit","searchInputAriaLabel","placeholder","onKeyUp","StoreSelectorEmptyMessage","emptyLocationsText","StoreSelectorWaiting","StoreSelectorTermsOfService","_ref2","StoreSelectorFoundLocationsMessage","_ref3","searchRadius","isSeeAllStore","storeCountMessage","milesShortText","storeCountMessageInKm","storeAllCountMessage","_props$selectedStore","selectedStore","_props$selectedStore2","_props$selectedStore3","_props$selectedStore4","storeDetailsModalHandler","closeStoreDetailsModal","SelectedStoreComponent","_selectedStore$OrgUni","_selectedStore$OrgUni2","shouldHideStockStatus","parentClassName","storeDetailsMain","storeHeader","storeDetailsCloseButton","storeDistance","storeDetailsAvailabilityContainer","productAvailability","stockStatus","pickUpDeliveryOptionButton","pickupModes","preferredStoreButton","removePreferredStoreButton","StoreSelector","renderSelectedStore","shouldHideInventory","preferredStore","hasEnabledOutOfStockCheck","availabilitiesWithHours","storeSelectorStateManager","storeLocations","selectedStoreResources","_selectedStore$OrgUni3","selectedProps","StoreId","_onOrgUnitLocationSelected","_setPreferredStore","_removePreferredStore","_closeStoreDetailModal","termsOfServiceLink","onShowAllStoresHandler","_getAndUpdateStoreLocation","onFilterLocations","_location$OrgUnitPick","some","onFilteredPickupMode","_attachMapAutoSuggest","autoSuggestOptions","channel","isMapApiLoaded","autoSuggestManager","Microsoft","Maps","loadModule","callback","options","countryCode","ChannelCountryRegionISOCode","AutosuggestManager","attachAutosuggest","_onSuggestionSelected","errorCallback","debug","credentials","BingMapsApiKey","_this$props$data$stor","_searchTermChanged","formattedSuggestion","_performSearch","_preferredStore$OrgUn","_preferredStore$OrgUn2","_preferredStore$OrgUn3","storeId","mode","setPreferredStoreLocation","Latitude","Longitude","clearPreferredStore","setSelectedStoreLocationId","_setSelectedStore","searchTerm","isSearchInProgress","isSeeAllStoreValue","geoLocate","trim","_updateLocations","latitude","longitude","shouldShowAllStores","_navigator","isDialogOpen","navigator","geolocation","getCurrentPosition","position","coords","PERMISSION_DENIED","timeout","_closeDialog","_storeSelectorStateMa","parentElementRef","closeDialog","_setOrgUnitStoreInformation","moduleId","styleDefault","input","preferredLocationId","storeLocationList","orgUnitStoreInformation","showMapViewLink","isDialog","setOrgUnitStoreInformation","message","radius","lookupRadius","searchRadiusUnit","calRadius","distanceUnitValue","modeDefault","localLatitude","long","lastInlineStoreLocation","lastInlineShownStoreInfo","setLastInlineStoreInfo","getFullAvailableInventoryNearby","getOrgUnitLocationByArea","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","GetFullAvailableInventoryNearbyInput","RecordId","warning","selectedLocation","hasEnableOutOfStockCheck","_isInStock$OrgUnitAva","_this$props$data$stor6","autoSuggestionEnabled","isAutoSuggestionEnabled","_this$props$context","_this$props$data$stor2","_this$props$data$stor3","_this$props$data$stor4","_this$props$data$stor5","loadMapApi","BingMapsEnabled","lang","locale","market","_this$props$data$stor7","_this$props$data$stor8","_this$props$context$a","_this$props$data$stor9","when","_this$props$data$stor10","_this$props$data$stor11","_this$props$data$stor12","isSameContext","_storeSelectorStateMa2","_storeSelectorStateMa3","_sortLocation","_storeSelectorStateMa4","_storeSelectorStateMa5","setAsPreferredStore","shouldSetAsPreferredStore","enablePickupFilterToShowStore","hasEnablePickupFilterToShowStore","app","appConfig","maps","mapSlot","isMobileDevice","variant","VariantType","Viewport","isInlineView","isLocatorView","listMapViewState","canShowLocationView","isMapModuleLoaded","storeSelectorActions","toggleListMapViewState","configHeading","storeLocatorHeaderText","storeSelectorHeaderText","kilometersShortText","sortLocation","isEnableOutofStock","enableStockCheck","locationListProps","_getStoreLocationListProps","hasMapSlot","dialogClassName","ModuleProps","Modal","classname","autoFocus","onClosed","horizontalPosition","verticalPosition","toggle","isMobileView","HeaderContainerProps","ModalHeader","HeaderProps","FooterContainerProps","ModalFooter","BodyContainerProps","ModalBody","bodyWrapperProps","storeResultContainerProps","mapContainerProps","storeDetailsModal","locationsMessage","search","spinner","locationsList","outOfStockThreshold","noLocationsMessage","terms","headerText","sortLocations","callbacks","getAndUpdateUserLocation","attachMapAutoSuggest","onSuggestionSelected","setPreferredStore","removePreferredStore","setSelectedStore","isStoreLocatorView","storeList","storeLineProps","_createStoreLocationList","_store$OrgUnitAvailab3","selectedStoreLocation","lineResources","_store$OrgUnitAvailab4","locationOpen","openFrom","openTo","renderDeliveryOptions","renderBody","call","fixRegExpWellKnownSymbolLogic","anObject","isNullOrUndefined","toLength","requireObjectCoercible","getMethod","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","RegExp","string","rx","S","done","global","fullUnicode","unicode","lastIndex","A","n","matchStr"],"sourceRoot":""}