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Ed,GAA6BloC,EAE9D,OACIb,EAAAA,cAACqG,EAAAA,OAAMpG,OAAAC,OAAA,GAAKW,EAAMiF,aACb+jC,EACAd,IAKb","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-breadcrumb/components/link.tsx?0164","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-breadcrumb/components/separator.tsx?2ecb","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-breadcrumb/farmlands-breadcrumb.tsx?10ad","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-breadcrumb/farmlands-breadcrumb.view.tsx?cff5","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-delivery-options/components/links.tsx?43d5","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-delivery-options/farmlands-delivery-options.tsx?7322","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-delivery-options/farmlands-delivery-options.view.tsx?0504","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/components/store-selector-location-line-item/date-time-helpers.ts?793e","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/components/store-selector-location-line-item/store-selector-location-line-item.components.tsx?1603","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/components/store-selector-location-lines.tsx?64bc","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/components/store-selector-search-form.tsx?ce55","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/components/store-selector-small-components.tsx?0264","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/farmlands-pdp-store-selector.props.autogenerated.ts?88c8","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/farmlands-pdp-store-selector.tsx?6b03","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-pdp-store-selector/farmlands-pdp-store-selector.view.tsx?20b2","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-promotion-block/components/button.tsx?ac58","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-promotion-block/farmlands-promotion-block.props.autogenerated.ts?f4a4","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-promotion-block/farmlands-promotion-block.tsx?e8c6","webpack://Msdyn365.Commerce.Online/./src/modules/farmlands-promotion-block/farmlands-promotion-block.view.tsx?ee82","webpack://Msdyn365.Commerce.Online/./src/themes/farmlandstheme/views/product-specification.view.tsx?be63","webpack://Msdyn365.Commerce.Online/./src/themes/farmlandstheme/views/ratings-histogram.view.tsx?9581","webpack://Msdyn365.Commerce.Online/./src/themes/farmlandstheme/views/reviews-list.view.tsx?046a","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/account-profile-edit.tsx?a0b5","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/account-profile-edit.view.tsx?530d","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-button.tsx?e669","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-error.tsx?eadf","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-input.tsx?5c72","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-label.tsx?4793","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-loading-icon.tsx?fba0","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-loading-message.tsx?7cf0","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/search-bar.tsx?63c1","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/data-grid.tsx?ddec","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/business-partner-users-table.tsx?c677","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/business-partners-table.tsx?8b1d","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/business-partners.tsx?57a6","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/business-partners.view.tsx?b34e","webpack://Msdyn365.Commerce.Online/./src/modules/check-in-for-pickup/check-in-confirmation.tsx?406f","webpack://Msdyn365.Commerce.Online/./src/modules/check-in-for-pickup/check-in-error.tsx?e789","webpack://Msdyn365.Commerce.Online/./src/modules/check-in-for-pickup/check-in-for-pickup.tsx?8686","webpack://Msdyn365.Commerce.Online/./src/modules/check-in-for-pickup/check-in-for-pickup.view.tsx?bd7a","webpack://Msdyn365.Commerce.Online/./src/common/waiting.tsx?8095","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.tsx?1d63","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.view.tsx?4299","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/ratings-histogram.view.tsx?6e01","webpack://Msdyn365.Commerce.Online/./src/modules/order-lookup/utilities/order-lookup-utility.tsx?c60b","webpack://Msdyn365.Commerce.Online/./src/modules/order-lookup/components/order-lookup-additional-fields.tsx?9951","webpack://Msdyn365.Commerce.Online/./src/modules/order-lookup/components/order-lookup-fields.tsx?297b","webpack://Msdyn365.Commerce.Online/./src/modules/order-lookup/order-lookup.tsx?72d3","webpack://Msdyn365.Commerce.Online/./src/modules/order-lookup/order-lookup.view.tsx?b8e5","webpack://Msdyn365.Commerce.Online/./src/modules/product-comparison-button/product-comparison-button.tsx?9384","webpack://Msdyn365.Commerce.Online/./src/modules/product-comparison-button/product-comparison-button.view.tsx?94a7"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\ninterface ILink {\r\n className?: string;\r\n text?: string;\r\n href?: string;\r\n ariaLabel?: string;\r\n index: string;\r\n noclick?: boolean;\r\n telemetryContent: ITelemetryContent;\r\n}\r\n\r\nexport const Link: React.FC = ({ text, className, href, ariaLabel, index, noclick, telemetryContent }) => {\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent, '', '');\r\n\r\n const linkText = text !== undefined ? text : '';\r\n payLoad.contentAction.etext = linkText;\r\n\r\n // Construct telemetry attribute to render\r\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\r\n\r\n return (\r\n \r\n \r\n {linkText}\r\n \r\n \r\n \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface ISeparator {\r\n separator: string;\r\n}\r\n\r\nexport const Separator: React.FC = ({ separator }) => (\r\n {' '}\r\n {separator}\r\n {' '}\r\n);\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\r\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IFarmlandsBreadcrumbData } from './farmlands-breadcrumb.data';\r\nimport { IFarmlandsBreadcrumbProps, ILinksData } from './farmlands-breadcrumb.props.autogenerated';\r\nimport { Link } from './components/link';\r\nimport { Separator } from './components/separator';\r\n\r\nexport interface IBreadcrumbViewProps extends IFarmlandsBreadcrumbProps {\r\n root?: React.ReactNode;\r\n links?: React.ReactNode[];\r\n backButton?: React.ReactNode;\r\n separator?: React.ReactNode;\r\n BreadcrumbContainer: IModuleProps;\r\n BreadcrumbList: INodeProps;\r\n BreadcrumbListItem: INodeProps;\r\n}\r\n\r\n/**\r\n *\r\n * Breadcrumb component.\r\n * @extends {React.PureComponent>}\r\n */\r\nclass Breadcrumb extends React.PureComponent> {\r\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\r\n\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n\r\n public render(): JSX.Element | null {\r\n\r\n const { className } = this.props.config;\r\n let rootLink = null;\r\n let breadcrumbLinks = null;\r\n let backButtonComponent = null;\r\n rootLink = this._getRootLink();\r\n const itemPosition = rootLink ? 1 : 0;\r\n if (this._pageType === 'Category') {\r\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\r\n if (!breadcrumbLinks) {\r\n breadcrumbLinks = this._getCategoryHierarchy(itemPosition);\r\n }\r\n } else if (this._pageType === 'Product') {\r\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\r\n if (!breadcrumbLinks) {\r\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\r\n if (breaCrumbType === 'category') {\r\n breadcrumbLinks = this._getPDPLinks(itemPosition);\r\n }\r\n if (breaCrumbType === 'categoryAndBack') {\r\n backButtonComponent = this._getPDPBackButton();\r\n breadcrumbLinks = this._getPDPLinks(itemPosition);\r\n }\r\n if (breaCrumbType === 'back') {\r\n backButtonComponent = this._getPDPBackButton();\r\n if (backButtonComponent === null) {\r\n breadcrumbLinks = this._getPDPLinks(itemPosition);\r\n }\r\n }\r\n }\r\n\r\n } else {\r\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\r\n }\r\n const linkSeparator = ;\r\n\r\n const breadcrumbViewProps = {\r\n ...this.props,\r\n BreadcrumbContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-breadcrumb', className),\r\n tag: 'nav',\r\n role: 'navigation'\r\n },\r\n BreadcrumbList: {\r\n tag: 'ol' as NodeTag,\r\n className: 'ms-breadcrumb_list'\r\n },\r\n BreadcrumbListItem: {\r\n tag: 'li',\r\n className: 'ms-breadcrumb_item'\r\n },\r\n root: rootLink,\r\n links: breadcrumbLinks,\r\n backButton: backButtonComponent,\r\n separator: linkSeparator\r\n };\r\n return this.props.renderView(breadcrumbViewProps) as React.ReactElement;\r\n }\r\n\r\n private readonly _getRootLink = (): JSX.Element | null => {\r\n const { root } = this.props.config;\r\n if (!root || !root.linkUrl || !root.linkUrl.destinationUrl) {\r\n this.props.context.telemetry.error('BreadCrumb link url content is empty, link wont render');\r\n return null;\r\n }\r\n return (\r\n );\r\n\r\n };\r\n\r\n private readonly _getCustomBreadcrumbLinks = (itemPosition: number): JSX.Element[] | null => {\r\n const { links } = this.props.config;\r\n\r\n if (!links || links.length === 0) {\r\n this.props.context.telemetry.error('BreadCrumb links content is empty, links wont render');\r\n return null;\r\n }\r\n return (\r\n links.map((value: ILinksData, index: number) => {\r\n itemPosition++;\r\n return (\r\n \r\n );\r\n }));\r\n };\r\n\r\n private readonly _getCategoryHierarchy = (itemPosition: number): JSX.Element[] | null => {\r\n const { data } = this.props;\r\n const categoryHierarchy = data.categoryHierarchy.result;\r\n if (!categoryHierarchy) {\r\n this.props.context.telemetry.error('Category Hierarchy content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n return (\r\n categoryHierarchy.map((value: CategoryHierarchy, index: number) => {\r\n const friendlyName = this._getFriendlyName(this.props.context.request.locale, value.NameTranslations);\r\n if (MsDyn365.isBrowser) {\r\n if ((Window as any).digitalData.page.attributes.breadcrumb?.length < itemPosition) {\r\n (Window as any).digitalData.page.attributes.breadcrumb.push(friendlyName);\r\n }\r\n else {\r\n (Window as any).digitalData.page.attributes.breadcrumb = [friendlyName];\r\n }\r\n }\r\n itemPosition++;\r\n return (\r\n \r\n );\r\n }));\r\n\r\n };\r\n\r\n /**\r\n * The function to get translation name for the locale.\r\n * @param locale - The locale information.\r\n * @param nameTranslations - The name translations names.\r\n * @returns - The translation name for the locale.\r\n */\r\n private readonly _getFriendlyName = (locale: string, nameTranslations?: TextValueTranslation[]): string | undefined => {\r\n let nameTranslation: TextValueTranslation | undefined;\r\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\r\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\r\n }\r\n\r\n return nameTranslation?.Text;\r\n };\r\n\r\n private readonly _getPDPLinks = (itemPosition: number): JSX.Element[] | null => {\r\n const { data, config } = this.props;\r\n const categoryHierarchy = data.categoryPaths.result;\r\n const product = data.product.result;\r\n const url = this.props.context.request.url.requestUrl.href;\r\n if (!categoryHierarchy) {\r\n this.props.context.telemetry.error('Category path content is empty for the product');\r\n return null;\r\n }\r\n const links: JSX.Element[] = [];\r\n\r\n categoryHierarchy.map((value: ICategoryUrl, index: number) => {\r\n itemPosition++;\r\n if (typeof document !== 'undefined' && typeof window !== 'undefined') {\r\n if ((Window as any).digitalData.page.attributes.breadcrumb?.length < itemPosition) {\r\n (Window as any).digitalData.page.attributes.breadcrumb.push(value.Name);\r\n }\r\n else {\r\n (Window as any).digitalData.page.attributes.breadcrumb = [value.Name];\r\n }\r\n links.push(\r\n \r\n );\r\n }\r\n });\r\n if (product && !config.hideProductName) {\r\n itemPosition++;\r\n if (typeof document !== 'undefined' && typeof window !== 'undefined') {\r\n if ((Window as any).digitalData.page.attributes.breadcrumb?.length < itemPosition) {\r\n (Window as any).digitalData.page.attributes.breadcrumb.push(product.Name);\r\n }\r\n else {\r\n (Window as any).digitalData.page.attributes.breadcrumb = [product.Name];\r\n }\r\n links.push(\r\n \r\n );\r\n }\r\n }\r\n return links;\r\n\r\n };\r\n\r\n private readonly _goBack = (): void => {\r\n window.history.back();\r\n };\r\n\r\n private readonly _getPDPBackButton = (): JSX.Element | null => {\r\n const isBackAllowed = this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.back;\r\n if (!isBackAllowed) {\r\n return null;\r\n }\r\n if (MsDyn365.isBrowser && (document.referrer === '' || window.history.length < 2)) {\r\n return null;\r\n }\r\n return (\r\n \r\n {this.props.resources.backToResultsText}\r\n \r\n );\r\n\r\n };\r\n}\r\n\r\nexport default Breadcrumb;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IBreadcrumbViewProps } from './farmlands-breadcrumb';\r\n\r\nconst BreadCrumbView: React.FC = props => {\r\n const { root, links, backButton, BreadcrumbContainer, BreadcrumbList, BreadcrumbListItem, separator } = props;\r\n if (!root && !links && !backButton) {\r\n props.context.telemetry.error('BreadCrumb content is empty, module wont render');\r\n return null;\r\n }\r\n return (\r\n \r\n \r\n {root &&\r\n \r\n {root}\r\n {links && separator}\r\n }\r\n {backButton &&\r\n \r\n {backButton}\r\n }\r\n {links && links.map((link, index) => (\r\n \r\n \r\n {link}\r\n {links[index + 1] && separator}\r\n \r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default BreadCrumbView;\r\n","import * as React from 'react';\r\nimport { ILinksData } from '../farmlands-delivery-options.props.autogenerated';\r\n\r\nexport interface IContentCardLinks {\r\n links: ILinksData[];\r\n}\r\n\r\nconst ContentCardLinks: React.FC = ({ links }) => (\r\n
\r\n {links.map((cta: ILinksData, index: number) => {\r\n const btnClass = index === 0 ? 'msc-cta__primary' : 'msc-cta__secondary';\r\n return (\r\n \r\n {cta.linkText}\r\n \r\n );\r\n })}\r\n
\r\n);\r\n\r\nexport default ContentCardLinks;\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 { Heading, IModuleProps, INodeProps } 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 { reaction } from 'mobx';\r\nimport { getDeliveryOptionsAsync } from '../../actions/farmlands-get-delivery-options-calls.action';\r\nimport LinksComponent from './components/links';\r\nimport { IFarmlandsDeliveryOptionsData } from './farmlands-delivery-options.data';\r\nimport { IFarmlandsDeliveryOptionsProps } from './farmlands-delivery-options.props.autogenerated';\r\nimport { getActivePricesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getCustomer, GetCustomerInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n ProjectionDomain,\r\n AffiliationLoyaltyTier,\r\n CustomerAffiliation,\r\n ProductPrice,\r\n CommerceProperty\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport interface IContentBlockViewProps extends IFarmlandsDeliveryOptionsProps {\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 detailsContainer: INodeProps;\r\n deliveryData?: any;\r\n}\r\nexport interface IDeliveryOptionsComponentState {\r\n products: any[];\r\n deliveryData: any;\r\n}\r\n\r\nlet deliveryData: any;\r\n\r\n/**\r\n *\r\n * ContentCard component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass ContentBlock extends React.PureComponent<\r\n IFarmlandsDeliveryOptionsProps,\r\n IDeliveryOptionsComponentState\r\n> {\r\n constructor(props: IFarmlandsDeliveryOptionsProps) {\r\n super(props);\r\n this.state = {\r\n products: [this.props.data.product],\r\n deliveryData: null,\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const { data, context } = this.props;\r\n const { product } = this.props.data;\r\n // set deliveryData on load of the module\r\n const recordId = await product?.result?.RecordId;\r\n await this._getActivePrice();\r\n const salesPriceInclGST = this.state.products[0].result.ExtensionProperties?.find(\r\n (prop: CommerceProperty) => prop.Key === 'ItemPriceWithGST'\r\n )?.Value?.DecimalValue;\r\n const response = await getDeliveryOptionsAsync({\r\n context: { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n recordId,\r\n salesPriceInclGST\r\n });\r\n deliveryData = await Promise.all(response.DeliveryOptions);\r\n this.setState({ deliveryData: deliveryData });\r\n // run below logic when the product variant is selected\r\n // @ts-ignore: Compiler not reconizing condition check for function params\r\n reaction(\r\n () => (data.product.result ? data.product.result.RecordId : null),\r\n async () => {\r\n if (context && data.product.result) {\r\n const variantProduct = data.product;\r\n const variantRecordId = await variantProduct?.result?.RecordId;\r\n const variantSalesPriceInclGST = await variantProduct.result.AdjustedPrice;\r\n const variantResponse = await getDeliveryOptionsAsync({\r\n context: { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n recordId: variantRecordId,\r\n salesPriceInclGST: variantSalesPriceInclGST\r\n });\r\n deliveryData = await Promise.all(variantResponse.DeliveryOptions);\r\n this.setState({ deliveryData: deliveryData });\r\n }\r\n }\r\n );\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, paragraph, image, links, className } = this.props.config;\r\n const contentBlockTitle = heading && heading.text && (\r\n \r\n );\r\n const imageProps = {\r\n gridSettings: this.props.context.request.gridSettings || {},\r\n imageSettings: image && image.imageSettings\r\n };\r\n const contentBlockLinks = links && links.length > 0 && ;\r\n const contentBlockText = paragraph && (\r\n \r\n );\r\n const contentBlockImage = image && ;\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 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-delivery-options__content-block', className)\r\n },\r\n imageContainer: { className: 'farmlands-delivery-options__content-block__image' },\r\n detailsContainer: { className: 'farmlands-delivery-options__content-block__details' },\r\n deliveryData: this._createDeliveryTable(this.state.deliveryData)\r\n };\r\n\r\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\r\n }\r\n\r\n private _createDeliveryTable(deliveryData: IFarmlandsDeliveryOptionsData | undefined): React.ReactNode | undefined {\r\n const { pickUpTableHeader, deliveryTableHeader } = this.props.config;\r\n const deliveryOption = this.removePickUpFromDeliveryArray(deliveryData);\r\n return deliveryData ? (\r\n \r\n \r\n \r\n \r\n \r\n {deliveryOption.length > 0 ? (\r\n // Add delivery options to the table\r\n deliveryOption.map((option: any, index: number) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n ) : (\r\n // If no delivery options are available\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
\r\n {pickUpTableHeader}{deliveryTableHeader}
\r\n {option.DeliveryModes[0].ChargeDescription}\r\n {this.isPickUpAvailable(deliveryData) ? 'FREE' : 'UNAVAILABLE'}${option.DeliveryModes[0].ChargeAmount?.toFixed(2)}
Standard ItemFREEUNAVAILABLE
\r\n ) : undefined;\r\n }\r\n\r\n private removePickUpFromDeliveryArray = (response: any) => {\r\n return response?.filter((deliveryMethod: any) => deliveryMethod.DeliveryType === 'Delivery');\r\n };\r\n\r\n private isPickUpAvailable = (response: any): boolean => {\r\n const isPickUpAvailable = response?.filter((deliveryMethod: any) => deliveryMethod.DeliveryType === 'Pickup');\r\n return isPickUpAvailable.length > 0;\r\n };\r\n\r\n private _getActivePrice = async (): Promise => {\r\n let products = this.state.products || [];\r\n const productRecIds = products && products.length > 0 ? products.map((prod) => prod.result.RecordId) : [];\r\n const projectDomain: ProjectionDomain = {\r\n ChannelId: this.props.context.request.apiSettings.channelId,\r\n CatalogId: this.props.context.request.apiSettings.catalogId\r\n };\r\n const affliations: AffiliationLoyaltyTier[] = [];\r\n const customerInput = new GetCustomerInput(this.props.context.actionContext.requestContext.apiSettings);\r\n const customer = await getCustomer(customerInput, this.props.context.actionContext);\r\n\r\n if (customer && customer.CustomerAffiliations) {\r\n customer.CustomerAffiliations.forEach((affliation: CustomerAffiliation) => {\r\n const aff: AffiliationLoyaltyTier = {\r\n AffiliationId: affliation.RetailAffiliationId,\r\n CustomerId: customer.AccountNumber\r\n };\r\n affliations.push(aff);\r\n });\r\n }\r\n\r\n await getActivePricesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n projectDomain,\r\n productRecIds,\r\n new Date(),\r\n null,\r\n affliations,\r\n true\r\n )\r\n .then((activePricesResponse: ProductPrice[]) => {\r\n products = products.map((prod) => {\r\n const activePrice = activePricesResponse.find(\r\n (product) => product.ProductId === prod.result.RecordId\r\n );\r\n if (activePrice) {\r\n const priceIncGST = activePrice.ExtensionProperties?.find(\r\n (prop: CommerceProperty) => prop.Key === 'BasePriceWithGST'\r\n );\r\n const specialPriceIncGST = activePrice.ExtensionProperties?.find(\r\n (prop: CommerceProperty) => prop.Key === 'ItemPriceWithGST'\r\n );\r\n prod.result.ExtensionProperties.push(priceIncGST);\r\n prod.result.ExtensionProperties.push(specialPriceIncGST);\r\n }\r\n return prod;\r\n });\r\n this.setState({\r\n products: products\r\n });\r\n })\r\n .catch((error: Error) => {\r\n this.props.context.actionContext.trace(error.message);\r\n this.props.context.actionContext.telemetry.exception(error);\r\n this.props.context.actionContext.telemetry.debug(\r\n `[get Affiliation based price on Product Collection]Error executing action`\r\n );\r\n throw new Error('[get Affiliation based price on Product Collection]Error executing action');\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IContentBlockViewProps } from './farmlands-delivery-options';\r\n\r\nconst ContentBlockView: React.FC = (props) => {\r\n const { contentBlockContainer, imageContainer, detailsContainer, title, text, links, image, deliveryData } = props;\r\n\r\n return (\r\n \r\n {image}\r\n \r\n {title}\r\n {text}\r\n {links}\r\n {deliveryData}\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 * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport get from 'lodash/get';\r\n\r\nimport { IStoreSelectorLocationLineItemResources } from '.';\r\n\r\nexport interface IHoursDisplayInfo {\r\n startDayShort: string;\r\n startDayFull: string;\r\n endDayShort?: string;\r\n endDayFull?: string;\r\n timeRange: string;\r\n}\r\n\r\ninterface IHoursInfo {\r\n isClosed: boolean;\r\n openTime?: number;\r\n closeTime?: number;\r\n}\r\n\r\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\r\n\r\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\r\n if (seconds === undefined) {\r\n return undefined;\r\n }\r\n let hours = Math.floor(seconds / (60 * 60));\r\n const ampm = hours >= 12 ? 'pm' : 'am';\r\n hours %= 12;\r\n hours = hours ? hours : 12;\r\n const divisorForMinutes = seconds % (60 * 60);\r\n const minutes =\r\n Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\r\n return `${hours}:${minutes} ${ampm}`;\r\n\r\n};\r\n\r\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\r\n switch (day) {\r\n case 'MON':\r\n return resources.days.monday;\r\n case 'TUE':\r\n return resources.days.tuesday;\r\n case 'WED':\r\n return resources.days.wednesday;\r\n case 'THU':\r\n return resources.days.thursday;\r\n case 'FRI':\r\n return resources.days.friday;\r\n case 'SAT':\r\n return resources.days.saturday;\r\n default: // Case 'SUN':\r\n return resources.days.sunday;\r\n }\r\n};\r\n\r\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\r\n switch (day) {\r\n case 'MON':\r\n return resources.days.mondayFull;\r\n case 'TUE':\r\n return resources.days.tuesdayFull;\r\n case 'WED':\r\n return resources.days.wednesdayFull;\r\n case 'THU':\r\n return resources.days.thursdayFull;\r\n case 'FRI':\r\n return resources.days.fridayFull;\r\n case 'SAT':\r\n return resources.days.saturdayFull;\r\n default: // Case 'SUN':\r\n return resources.days.sundayFull;\r\n }\r\n};\r\n\r\nconst buildHoursDisplayInfo = (startDay: DayType, endDay: DayType, hoursInfo: string, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo => {\r\n return {\r\n startDayShort: getShortTimeString(startDay, resources),\r\n startDayFull: getFullTimeString(startDay, resources),\r\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\r\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\r\n timeRange: hoursInfo\r\n };\r\n};\r\n\r\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\r\n if (firstLine.isClosed && secondLine.isClosed) {\r\n return true;\r\n }\r\n\r\n if (!firstLine.isClosed && !secondLine.isClosed) {\r\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\r\n return {\r\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\r\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\r\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\r\n };\r\n};\r\n\r\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\r\n if (hoursInfo.isClosed) {\r\n return resources.closedText;\r\n }\r\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\r\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\r\n\r\n return `${openFrom}–${openTo}`;\r\n\r\n};\r\n\r\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\r\n const storeHoursList: IHoursDisplayInfo[] = [];\r\n\r\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\r\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\r\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\r\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\r\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\r\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\r\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\r\n\r\n let periodStart: DayType = 'MON';\r\n let periodEnd: DayType = 'MON';\r\n\r\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\r\n\r\n periodStart = 'TUE';\r\n }\r\n periodEnd = 'TUE';\r\n\r\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\r\n\r\n periodStart = 'WED';\r\n }\r\n periodEnd = 'WED';\r\n\r\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\r\n\r\n periodStart = 'THU';\r\n }\r\n periodEnd = 'THU';\r\n\r\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\r\n\r\n periodStart = 'FRI';\r\n }\r\n periodEnd = 'FRI';\r\n\r\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\r\n\r\n periodStart = 'SAT';\r\n }\r\n periodEnd = 'SAT';\r\n\r\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\r\n\r\n periodStart = 'SUN';\r\n }\r\n periodEnd = 'SUN';\r\n\r\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\r\n\r\n return storeHoursList;\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport {\r\n DeliveryOption,\r\n OrgUnitContact,\r\n OrgUnitLocation,\r\n StoreHours\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './date-time-helpers';\r\n\r\nexport interface IStoreSelectorLocationLineItemResources {\r\n contactInfoHeader: string;\r\n storeHoursHeader: string;\r\n availabilityInfoHeader: string;\r\n\r\n closedText: string;\r\n\r\n outOfStock: string;\r\n inStock: string;\r\n\r\n currentLocation: string;\r\n selectLocation: string;\r\n selectLocationAriaLabelFormat: string;\r\n setAsPreferredStoreText: string;\r\n setAsPreferredStoreTextAriaLabel: string;\r\n preferredStoreText: string;\r\n preferredStoreAriaLabel: string;\r\n\r\n days: {\r\n monday: string;\r\n tuesday: string;\r\n wednesday: string;\r\n thursday: string;\r\n friday: string;\r\n saturday: string;\r\n sunday: string;\r\n mondayFull: string;\r\n tuesdayFull: string;\r\n wednesdayFull: string;\r\n thursdayFull: string;\r\n fridayFull: string;\r\n saturdayFull: string;\r\n sundayFull: string;\r\n };\r\n}\r\n\r\nexport interface IStoreSelectorLocationLineItemProps {\r\n location: OrgUnitLocation;\r\n storeHours?: StoreHours;\r\n\r\n hideStockStatus?: boolean;\r\n isInStock?: boolean;\r\n isCurrentLocation?: boolean;\r\n\r\n resources: IStoreSelectorLocationLineItemResources;\r\n stockStatusLabel?: string;\r\n storeLocatorView?: boolean;\r\n isPreferredStoreEnabled?: boolean;\r\n index: string;\r\n inventoryResult: any;\r\n preferredStoreLocationId: string | null;\r\n storePickUpOptionList?: DeliveryOption[];\r\n productPickUpOptionList?: DeliveryOption[];\r\n\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n preferredDistanceUnit: string;\r\n isLocationDisabled?: boolean;\r\n handlers: {\r\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\r\n onSetAsPreferredStore(locationId: string | undefined): void;\r\n onRemovePreferredStore(): void;\r\n };\r\n}\r\n\r\nconst renderStoreHours = (storeHours: StoreHours | undefined, location: OrgUnitLocation, resources: IStoreSelectorLocationLineItemResources): JSX.Element | null => {\r\n // First, use the store hours. This will allow listing day by day houts\r\n if (storeHours && storeHours.RegularStoreHours) {\r\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\r\n\r\n return (\r\n
\r\n {storeHoursList.map(displayTime => (\r\n
\r\n {displayTime.endDayShort ? (\r\n
\r\n \r\n {displayTime.startDayShort}\r\n \r\n –\r\n \r\n {displayTime.endDayShort}\r\n \r\n
\r\n ) : (\r\n
\r\n \r\n {displayTime.startDayShort}\r\n \r\n
\r\n )}\r\n
\r\n {displayTime.timeRange}\r\n
\r\n
\r\n ))}\r\n
\r\n );\r\n }\r\n\r\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\r\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\r\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\r\n\r\n return (\r\n
\r\n {storeOpenFrom}\r\n -\r\n {storeOpenTo}\r\n
\r\n );\r\n\r\n};\r\n\r\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\r\n if (!contacts) {\r\n return undefined;\r\n }\r\n\r\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\r\n\r\n if (allPhoneContacts && allPhoneContacts.length > 0) {\r\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\r\n\r\n if (primaryPhoneContact) {\r\n return primaryPhoneContact.Locator;\r\n }\r\n\r\n return allPhoneContacts[0].Locator;\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nconst StoreSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\r\n const {\r\n location,\r\n resources,\r\n storeHours,\r\n inventoryResult\r\n } = props;\r\n\r\n const storeName: string | undefined = location.OrgUnitName;\r\n const storeAddress: string | undefined = location.Address;\r\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\r\n\r\n return (\r\n \r\n )\r\n};\r\n\r\nconst InventoryStatus = ({ inventoryResult }: any): JSX.Element | null => {\r\n const {\r\n Code,\r\n Level\r\n } = inventoryResult;\r\n\r\n let inventoryClassName: string = '';\r\n let icon: JSX.Element | undefined = undefined;\r\n\r\n switch(Code) {\r\n case 'AVAIL':\r\n inventoryClassName = 'hasStock';\r\n icon = ;\r\n break;\r\n case 'LOW':\r\n inventoryClassName = 'lowStock';\r\n icon = ;\r\n break;\r\n case 'OOS':\r\n inventoryClassName = 'OoS';\r\n icon = ;\r\n break;\r\n default:\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n {icon}\r\n \r\n {Level}\r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nconst Tick = (): JSX.Element => (\r\n \r\n \r\n \r\n)\r\n\r\nconst Cross = (): JSX.Element => (\r\n \r\n \r\n \r\n)\r\n\r\nconst ExclamationMark = (): JSX.Element => (\r\n \r\n \r\n \r\n)\r\n\r\nexport const StoreSelectorLocationLineItemComponent = StoreSelectorLocationLineItem as (props: IStoreSelectorLocationLineItemProps) => JSX.Element;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\r\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IFarmlandsPdpStoreSelectorResources } from '../farmlands-pdp-store-selector.props.autogenerated';\r\nimport { IStoreSelectorLocationLineItemResources, StoreSelectorLocationLineItemComponent } from './store-selector-location-line-item';\r\n\r\nexport interface IStoreSelectorLocationLinesProps {\r\n locations?: IFullOrgUnitAvailability[];\r\n resources: IFarmlandsPdpStoreSelectorResources;\r\n preferredDistanceUnit?: string;\r\n\r\n alreadySelectedLocation?: OrgUnitLocation;\r\n outOfStockThreshold: number;\r\n enableOutOfStockCheck: boolean;\r\n storeLocatorView?: boolean;\r\n selectedStoreLocationId?: string;\r\n isPreferredStoreEnabled?: boolean;\r\n displayList?: boolean;\r\n isLocationDisabled?: boolean;\r\n productPickUpDeliveryOptions?: DeliveryOption[];\r\n estimatedAvailabilityResult: any;\r\n preferredStoreLocationId: string | null;\r\n onSetAsPreferredStore: ((locationId: string | undefined) => void);\r\n onRemovePreferredStore: (() => void);\r\n\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n onLocationSelected(location: OrgUnitLocation | undefined): void;\r\n}\r\n\r\n/**\r\n * Displays all the location line items, or null if none exists.\r\n */\r\n@observer\r\nexport class StoreSelectorLocationLines extends React.PureComponent {\r\n private readonly selectedLocationRef: React.RefObject;\r\n\r\n @observable private _stores: IFullOrgUnitAvailability[] | undefined;\r\n\r\n private storeCounter: number;\r\n\r\n public constructor(props: IStoreSelectorLocationLinesProps) {\r\n super(props);\r\n this.selectedLocationRef = React.createRef();\r\n this.storeCounter = 0;\r\n }\r\n\r\n public componentDidUpdate(prevProps: IStoreSelectorLocationLinesProps): void {\r\n if (this.props.selectedStoreLocationId !== prevProps.selectedStoreLocationId) {\r\n this._scrollIntoView();\r\n }\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.locations) {\r\n this._stores = this._sortStores(this.props.locations);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n if (!this._stores || this._stores.length === 0) {\r\n return null;\r\n }\r\n\r\n this.storeCounter = 0;\r\n\r\n return (\r\n
\r\n {\r\n this._stores.map((store, index) => {\r\n return this._renderStoreLocation(store, index, this.props.estimatedAvailabilityResult);\r\n })\r\n }\r\n
\r\n );\r\n }\r\n\r\n private _renderStoreLocation(store: IFullOrgUnitAvailability, index: number, x: any): JSX.Element | undefined {\r\n const orgUnitLocation = store?.OrgUnitAvailability?.OrgUnitLocation;\r\n const selectedStoreLocationId = this.props.selectedStoreLocationId;\r\n const deliveryOptions = store?.OrgUnitPickUpDeliveryModes;\r\n // @ts-ignore\r\n const storeInventoryResult = x.find( ({InventLocationId}) => InventLocationId === orgUnitLocation!.InventoryLocationId )\r\n\r\n return orgUnitLocation && (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n private _sortStores(stores: IFullOrgUnitAvailability[]): IFullOrgUnitAvailability[] {\r\n const isPreferredStore = (value: IFullOrgUnitAvailability) => this.props.isPreferredStoreEnabled && this.props.preferredStoreLocationId &&\r\n value?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\r\n\r\n return [\r\n ...stores.filter(isPreferredStore),\r\n ...stores.filter(store => !isPreferredStore(store))\r\n ];\r\n }\r\n\r\n private readonly _scrollIntoView = () => {\r\n const selectedLocationDiv = this.selectedLocationRef.current;\r\n const parent = selectedLocationDiv?.parentElement;\r\n if (selectedLocationDiv && parent) {\r\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\r\n parent.scrollTop = selectedLocationDiv.offsetTop;\r\n } else if (selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight > parent.scrollTop + parent.clientHeight) {\r\n parent.scrollTop = selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight - parent.clientHeight;\r\n }\r\n }\r\n };\r\n\r\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined): boolean => (this.props.alreadySelectedLocation && location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) || false;\r\n\r\n private readonly _isProductInStock = (ItemAvailabilities: ItemAvailability[] | undefined): boolean => {\r\n if (!this.props.enableOutOfStockCheck) {\r\n return true;\r\n }\r\n\r\n if (ItemAvailabilities && ItemAvailabilities.length > 0) {\r\n return ItemAvailabilities[0].AvailableQuantity ? ItemAvailabilities[0].AvailableQuantity > 0 : false;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n private readonly _stockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\r\n if (availabilityWithHours?.ProductInventoryInformation &&\r\n availabilityWithHours?.ProductInventoryInformation.length > 0) {\r\n for (let i = 0; i < availabilityWithHours.ProductInventoryInformation.length; i++) {\r\n if (availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId === availabilityWithHours.ProductInventoryInformation[i].InventLocationId) {\r\n return availabilityWithHours.ProductInventoryInformation[i].StockLevelLabel;\r\n }\r\n\r\n }\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private readonly _mapResources = (resources: IFarmlandsPdpStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\r\n return {\r\n contactInfoHeader: resources.contactText,\r\n storeHoursHeader: resources.timeText,\r\n availabilityInfoHeader: resources.availabilityText,\r\n\r\n closedText: resources.storeHoursClosedText,\r\n outOfStock: resources.outOfStockText,\r\n inStock: resources.inStockText,\r\n\r\n currentLocation: resources.selectedStoreLocationText,\r\n selectLocation: resources.selectStoreText,\r\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\r\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\r\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\r\n preferredStoreText: resources.preferredStoreText,\r\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\r\n\r\n days: {\r\n monday: resources.storeHoursMondayText,\r\n tuesday: resources.storeHoursTuesdayText,\r\n wednesday: resources.storeHoursWednesdayText,\r\n thursday: resources.storeHoursThursdayText,\r\n friday: resources.storeHoursFridayText,\r\n saturday: resources.storeHoursSaturdayText,\r\n sunday: resources.storeHoursSundayText,\r\n mondayFull: resources.storeHoursMondayFullText,\r\n tuesdayFull: resources.storeHoursTuesdayFullText,\r\n wednesdayFull: resources.storeHoursWednesdayFullText,\r\n thursdayFull: resources.storeHoursThursdayFullText,\r\n fridayFull: resources.storeHoursFridayFullText,\r\n saturdayFull: resources.storeHoursSaturdayFullText,\r\n sundayFull: resources.storeHoursSundayFullText\r\n }\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\r\nimport * as React from 'react';\r\n\r\nexport interface IStoreSelectorSearchFormProps {\r\n resources: {\r\n searchButtonAriaLabel: string;\r\n searchPlaceholderText: string;\r\n };\r\n\r\n value: string;\r\n isBingMapsDisabled?: boolean;\r\n\r\n performSearch(searchTerm: string): Promise;\r\n searchTermChanged(searchTerm: string): Promise;\r\n}\r\n\r\n/**\r\n * Simple search form consisting of search text and a search button\r\n */\r\nexport class StoreSelectorSearchForm extends React.PureComponent {\r\n constructor(props: IStoreSelectorSearchFormProps) {\r\n super(props);\r\n this.state = { value: '' };\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n \r\n
\r\n location_on\r\n \r\n \r\n search\r\n \r\n
\r\n \r\n \r\n );\r\n }\r\n\r\n private _searchTextChanged = async (e: React.ChangeEvent): Promise => {\r\n const inputValue: string = e.target.value;\r\n await this.props.searchTermChanged(inputValue);\r\n };\r\n\r\n private _onSubmit = async (e: React.SyntheticEvent): Promise => {\r\n e.preventDefault(); // Prevents form submission\r\n\r\n await this.props.performSearch(this.props.value);\r\n };\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IFarmlandsPdpStoreSelectorResources, ITermsOfServiceLinkData } from '../farmlands-pdp-store-selector.props.autogenerated';\r\n\r\nexport interface IStoreSelectorEmptyMessageProps {\r\n resources: IFarmlandsPdpStoreSelectorResources;\r\n}\r\nexport const StoreSelectorEmptyMessage: React.FC = ({ resources }) => (\r\n
\r\n

\r\n {resources.emptyLocationsText}\r\n

\r\n
\r\n);\r\n\r\nexport const StoreSelectorWaiting: React.FC = () => (\r\n
\r\n);\r\n\r\nexport interface IStoreSelectorTermsOfServiceProps {\r\n link?: ITermsOfServiceLinkData;\r\n requestContext: Msdyn365.IRequestContext;\r\n onTextChange?(event: Msdyn365.ContentEditableEvent): void;\r\n}\r\n\r\nexport const StoreSelectorTermsOfService: React.FC = ({ link, requestContext, onTextChange }) => {\r\n if (link) {\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: 'ms-store-select__terms-link',\r\n linkText: link.linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: 'link'\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n\r\n }\r\n return null;\r\n};\r\n\r\nexport interface IStoreSelectorFoundLocationsMessage {\r\n resources: IFarmlandsPdpStoreSelectorResources;\r\n locations?: IFullOrgUnitAvailability[];\r\n searchRadius: number;\r\n preferredDistanceUnit: string;\r\n isSeeAllStore: boolean;\r\n}\r\nexport const StoreSelectorFoundLocationsMessage: React.FC = ({ locations, searchRadius, resources, isSeeAllStore, preferredDistanceUnit }) => {\r\n if (locations) {\r\n const storeCountMessage = preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\r\n return (\r\n
\r\n { isSeeAllStore ? resources.storeAllCountMessage\r\n .replace('{count}', locations.length.toString()) : storeCountMessage\r\n .replace('{count}', locations.length.toString())\r\n .replace('{radius}', searchRadius.toString())}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n};\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 * IFarmlandsPdpStoreSelector 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 mode {\r\n findStores = 'findStores',\r\n pickupInStore = 'pickupInStore'\r\n}\r\n\r\nexport const enum searchRadiusUnit {\r\n miles = 'miles',\r\n kilometers = 'kilometers'\r\n}\r\n\r\nexport const enum style {\r\n inline = 'inline',\r\n dialog = 'dialog'\r\n}\r\n\r\nexport interface IFarmlandsPdpStoreSelectorConfig extends Msdyn365.IModuleConfig {\r\n heading?: string;\r\n termsOfServiceLink?: ITermsOfServiceLinkData;\r\n mode?: mode;\r\n searchRadiusUnit?: searchRadiusUnit;\r\n lookupRadius: number;\r\n style?: style;\r\n setAsPreferredStore?: boolean;\r\n showAllStores?: boolean;\r\n autoSuggestionEnabled?: boolean;\r\n autoSuggestOptions?: IAutoSuggestOptionsData;\r\n className?: string;\r\n}\r\n\r\nexport interface IFarmlandsPdpStoreSelectorResources {\r\n searchPlaceholderText: string;\r\n searchButtonAriaLabel: string;\r\n searchInputAriaLabel: string;\r\n outOfStockText: string;\r\n inStockText: string;\r\n selectedStoreLocationText: string;\r\n emptyLocationsText: string;\r\n selectStoreText: string;\r\n selectStoreAriaFormatText: string;\r\n setAsPreferredStoreText: string;\r\n setAsPreferredStoreTextAriaLabel: string;\r\n preferredStoreText: string;\r\n preferredStoreAriaLabel: string;\r\n timeText: string;\r\n captionText: string;\r\n milesShortText: string;\r\n kilometersShortText: string;\r\n contactText: string;\r\n availabilityText: string;\r\n productDimensionTypeColor: string;\r\n productDimensionTypeConfiguration: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n storeHoursClosedText: string;\r\n storeHoursMondayText: string;\r\n storeHoursTuesdayText: string;\r\n storeHoursWednesdayText: string;\r\n storeHoursThursdayText: string;\r\n storeHoursFridayText: string;\r\n storeHoursSaturdayText: string;\r\n storeHoursSundayText: string;\r\n storeHoursMondayFullText: string;\r\n storeHoursTuesdayFullText: string;\r\n storeHoursWednesdayFullText: string;\r\n storeHoursThursdayFullText: string;\r\n storeHoursFridayFullText: string;\r\n storeHoursSaturdayFullText: string;\r\n storeHoursSundayFullText: string;\r\n storePhoneAriaLabel: string;\r\n storeAddressAriaLabel: string;\r\n storeCountMessage: string;\r\n storeAllCountMessage: string;\r\n storeCountMessageInKm: string;\r\n storeSelectorHeaderText: string;\r\n storeLocatorHeaderText: string;\r\n seeAllStoresText: string;\r\n viewMapText: string;\r\n viewListText: string;\r\n}\r\n\r\nexport interface ITermsOfServiceLinkData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IAutoSuggestOptionsData {\r\n maxResults?: number;\r\n}\r\n\r\nexport interface IFarmlandsPdpStoreSelectorProps extends Msdyn365.IModule {\r\n resources: IFarmlandsPdpStoreSelectorResources;\r\n config: IFarmlandsPdpStoreSelectorConfig;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\r\nimport { IStoreInfo } from '@msdyn365-commerce-modules/bopis-utilities';\r\nimport {\r\n getFullAvailableInventoryNearby,\r\n GetFullAvailableInventoryNearbyInput,\r\n getOrgUnitLocationsByArea, GetOrgUnitLocationsByAreaInput,\r\n IFullOrgUnitAvailability\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getEstimatedAvailabilityAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport {\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n NodeTag\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport { reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n StoreSelectorEmptyMessage,\r\n StoreSelectorFoundLocationsMessage,\r\n StoreSelectorLocationLines,\r\n StoreSelectorSearchForm,\r\n StoreSelectorTermsOfService,\r\n StoreSelectorWaiting\r\n} from './components';\r\nimport { IStoreSelectorData } from './farmlands-pdp-store-selector.data';\r\nimport { IFarmlandsPdpStoreSelectorProps, mode as modeEnum, searchRadiusUnit, style as styleEnum } from './farmlands-pdp-store-selector.props.autogenerated';\r\n\r\nexport interface IStoreSelectorState {\r\n hasSearched?: boolean;\r\n isSearchInProgress: boolean;\r\n searchTerm?: string;\r\n isSeeAllStoreValue: boolean;\r\n isLocationDisabled?: boolean;\r\n estimatedAvailabilityResult: any;\r\n}\r\n\r\nexport interface IStoreSelectorViewProps extends IFarmlandsPdpStoreSelectorProps {\r\n state: IStoreSelectorState;\r\n\r\n // Containers:\r\n ModuleProps: IModuleProps;\r\n BodyContainerProps: INodeProps;\r\n FooterContainerProps: INodeProps;\r\n HeaderContainerProps: INodeProps;\r\n HeaderProps?: React.ReactNode;\r\n\r\n // Components\r\n locationsMessage?: React.ReactNode;\r\n search?: React.ReactNode;\r\n spinner?: React.ReactNode;\r\n locationsList?: React.ReactNode;\r\n noLocationsMessage?: React.ReactNode;\r\n terms?: React.ReactNode;\r\n headerText?: React.ReactNode;\r\n\r\n callbacks: {\r\n closeDialog(): Promise;\r\n searchTermChanged(searchTerm: string): Promise;\r\n performSearch(searchTerm: string): Promise;\r\n selectedLocation(location: OrgUnitLocation | undefined): Promise;\r\n getAndUpdateUserLocation(): Promise;\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * Pick Up In Store module.\r\n * @extends React.Component>}\r\n */\r\n@observer\r\nclass StoreSelector extends React.Component, IStoreSelectorState> {\r\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: IFarmlandsPdpStoreSelectorProps) {\r\n super(props);\r\n this.state = {\r\n hasSearched: false,\r\n isSearchInProgress: false,\r\n searchTerm: '',\r\n isSeeAllStoreValue: false,\r\n estimatedAvailabilityResult: []\r\n };\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\r\n }\r\n\r\n public componentDidMount(): void {\r\n const {\r\n context: {\r\n telemetry,\r\n actionContext: {\r\n requestContext: {\r\n channel\r\n }\r\n }\r\n },\r\n config: {\r\n autoSuggestionEnabled\r\n }\r\n } = this.props;\r\n\r\n // Adding Timeout to make sure it loads the data based upon the preferred store.\r\n setTimeout(() => {\r\n this._getAndUpdateStoreLocation();\r\n }, 0);\r\n\r\n reaction(\r\n () => this.props.data.storeSelectorStateManager.result && this.props.data.storeSelectorStateManager.result.isDialogOpen,\r\n async () => {\r\n const context = this.props.data.storeSelectorStateManager.result?.context;\r\n if (context?.id === this.props.id) {\r\n this._getAndUpdateStoreLocation();\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.storeSelectorStateManager.result && this.props.data.storeSelectorStateManager.result.context && this.props.data.storeSelectorStateManager.result.context.id,\r\n async () => {\r\n const context = this.props.data.storeSelectorStateManager.result?.context;\r\n if (!context || (context?.id === this.props.id)) {\r\n await this._searchTermChanged('');\r\n this._getAndUpdateStoreLocation();\r\n }\r\n }\r\n );\r\n\r\n if (channel && !channel.BingMapsApiKey) {\r\n telemetry.error('BingMapsApiKey is missing.');\r\n return;\r\n }\r\n\r\n if (channel && !channel.BingMapsEnabled) {\r\n telemetry.error('Map is disabled from HQ.');\r\n return;\r\n }\r\n\r\n if (this.props.data.storeSelectorStateManager.result?.loadMapApi) {\r\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\r\n key: channel?.BingMapsApiKey,\r\n lang: this.props.context?.actionContext?.requestContext?.channel?.DefaultLanguageId,\r\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\r\n }).then().catch();\r\n }\r\n\r\n reaction(\r\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\r\n () => {\r\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\r\n key: channel?.BingMapsApiKey,\r\n lang: this.props.context?.actionContext?.requestContext?.channel?.DefaultLanguageId,\r\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\r\n });\r\n }\r\n );\r\n\r\n if (autoSuggestionEnabled) {\r\n when(\r\n () => {\r\n const isMapApiLoaded = !!this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\r\n const isDialogOpen = !!this.props.data.storeSelectorStateManager.result?.isDialogOpen;\r\n const isSameContext = this.props.data.storeSelectorStateManager.result?.context?.id === this.props.id;\r\n return isMapApiLoaded && isDialogOpen && isSameContext;\r\n },\r\n async () => {\r\n setTimeout(async () => {\r\n await this._attachMapAutoSuggest();\r\n }, 0);\r\n }\r\n );\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IFarmlandsPdpStoreSelectorProps): boolean {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\r\n if (context && context.id === this.props.id) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n config: {\r\n termsOfServiceLink,\r\n className,\r\n heading,\r\n mode,\r\n style,\r\n setAsPreferredStore,\r\n lookupRadius\r\n },\r\n context: {\r\n telemetry,\r\n app: {\r\n config: appConfig\r\n },\r\n actionContext: {\r\n requestContext: {\r\n channel,\r\n cookies\r\n }\r\n }\r\n },\r\n resources,\r\n data: {\r\n availabilitiesWithHours: { result: availabilitiesWithHours },\r\n storeSelectorStateManager: { result: storeSelectorStateManager },\r\n storeLocations: { result: storeLocations }\r\n }\r\n } = this.props;\r\n\r\n const isBingMapsDisabled = channel && channel.BingMapsApiKey && channel.BingMapsEnabled ? false : true;\r\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\r\n const isDialogOpen: boolean = storeSelectorStateManager ? storeSelectorStateManager.isDialogOpen && (context?.id === this.props.id) : false;\r\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\r\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\r\n const inlineView = styleDefault === styleEnum.inline;\r\n const locatorView = modeDefault === modeEnum.findStores;\r\n const hideInventory = locatorView;\r\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\r\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\r\n const displayList = storeSelectorStateManager?.listMapViewState?.displayList;\r\n const isPreferredStoreEnabled = setAsPreferredStore && cookies?.isConsentGiven();\r\n\r\n if (!(channel && channel.BingMapsApiKey)) {\r\n telemetry.error('BingMapsApiKey is missing.');\r\n }\r\n\r\n const configHeading = heading ? heading : (locatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText);\r\n const preferredDistanceUnit = this.props.config.searchRadiusUnit === searchRadiusUnit.kilometers ? resources.kilometersShortText : resources.milesShortText;\r\n\r\n const viewProps = {\r\n ...(this.props as IFarmlandsPdpStoreSelectorProps),\r\n state: this.state,\r\n\r\n ModuleProps: {\r\n tag: inlineView ? 'div' as NodeTag : Modal,\r\n moduleProps: this.props,\r\n className: classname(`ms-store-${inlineView ? 'locate' : 'select'}`, className, inlineView ? '' : 'msc-modal-input-required'),\r\n autoFocus: true,\r\n fade: true,\r\n isOpen: isDialogOpen,\r\n onClosed: this._closeDialog,\r\n horizontalPosition: 'center',\r\n verticalPosition: 'center',\r\n toggle: this._closeDialog\r\n },\r\n HeaderContainerProps: {\r\n tag: inlineView ? 'div' as NodeTag : ModalHeader,\r\n className: `ms-store-select__${inlineView ? 'header' : 'modal-header'}`,\r\n toggle: this._closeDialog\r\n },\r\n HeaderProps: configHeading && (\r\n \r\n ),\r\n FooterContainerProps: {\r\n tag: inlineView ? 'div' as NodeTag : ModalFooter,\r\n className: `ms-store-select__${inlineView ? 'footer' : 'modal-footer'} ${!displayList ? 'map-only-view' : ''}`\r\n },\r\n BodyContainerProps: {\r\n tag: inlineView ? 'div' as NodeTag : ModalBody,\r\n className: `ms-store-select__${inlineView ? 'body' : 'modal-body'}`\r\n },\r\n locationsMessage: !this.state.isLocationDisabled && (\r\n \r\n ),\r\n search: (\r\n \r\n ),\r\n spinner: ,\r\n locationsList: ((availabilitiesWithHours && availabilitiesWithHours.length) || (storeLocations && storeLocations.length)) && (\r\n \r\n ),\r\n noLocationsMessage: ,\r\n terms: ,\r\n\r\n // Not being used in current context, we can use it here to pass more props.\r\n headerText: \r\n {heading ? heading : (locatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText)}\r\n ,\r\n\r\n callbacks: {\r\n searchTermChanged: this._searchTermChanged,\r\n performSearch: this._performSearch,\r\n closeDialog: this._closeDialog,\r\n selectedLocation: this._onOrgUnitLocationSelected,\r\n getAndUpdateUserLocation: () => {\r\n this._getAndUpdateStoreLocation();\r\n return Promise.resolve();\r\n }\r\n }\r\n } as IStoreSelectorViewProps;\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent) => {\r\n if (this.props.config.termsOfServiceLink) {\r\n this.props.config.termsOfServiceLink.linkText = event.target.value;\r\n }\r\n };\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading = event.target.value;\r\n\r\n private readonly _attachMapAutoSuggest = async (): Promise => {\r\n const {\r\n config: {\r\n autoSuggestOptions\r\n },\r\n context: {\r\n telemetry,\r\n actionContext: {\r\n requestContext: {\r\n channel\r\n }\r\n }\r\n },\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n if (storeSelectorStateManager?.isMapApiLoaded && !this.autoSuggestManager) {\r\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\r\n callback: () => {\r\n const options = { ...autoSuggestOptions, countryCode: channel?.ChannelCountryRegionISOCode };\r\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\r\n this.autoSuggestManager.attachAutosuggest(`#ms-store-select__search-box_${this.props.id}`, `#ms-store-select__search-box-container_${this.props.id}`, this._onSuggestionSelected);\r\n },\r\n errorCallback: () => {\r\n if (telemetry) {\r\n telemetry.debug('Unable to attach map auto suggest.');\r\n }\r\n },\r\n credentials: channel?.BingMapsApiKey\r\n });\r\n }\r\n };\r\n\r\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\r\n const context = this.props.data.storeSelectorStateManager && this.props.data.storeSelectorStateManager.result &&\r\n this.props.data.storeSelectorStateManager.result?.context;\r\n if (context && (context?.id === this.props.id)) {\r\n await this._searchTermChanged(result.formattedSuggestion);\r\n await this._performSearch(result.formattedSuggestion);\r\n }\r\n };\r\n\r\n private readonly _setPreferredStore = async (storeId: string | undefined): Promise => {\r\n if (!storeId) {\r\n return;\r\n }\r\n\r\n const {\r\n context: {\r\n actionContext: {\r\n requestContext: {\r\n cookies\r\n }\r\n }\r\n },\r\n config: {\r\n mode\r\n },\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager },\r\n storeLocations: { result: storeLocations },\r\n availabilitiesWithHours: { result: availabilitiesWithHours }\r\n }\r\n } = this.props;\r\n\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\r\n\r\n let stores: IFullOrgUnitAvailability[];\r\n if (modeDefault === modeEnum.findStores && storeLocations) {\r\n stores = storeLocations;\r\n } else {\r\n stores = availabilitiesWithHours!;\r\n }\r\n\r\n const preferedStore = stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === storeId);\r\n\r\n await storeSelectorStateManager.setPreferredStoreLocation(storeId, preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName, cookies?.isConsentGiven(),\r\n preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude, preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude);\r\n };\r\n\r\n private readonly _removePreferredStore = async (): Promise => {\r\n const {\r\n context: {\r\n actionContext: {\r\n requestContext: {\r\n cookies\r\n }\r\n }\r\n },\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n await storeSelectorStateManager.clearPreferredStore(cookies?.isConsentGiven());\r\n };\r\n\r\n private readonly _setSelectedStore = async (storeId: string | undefined): Promise => {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n await storeSelectorStateManager.setSelectedStoreLocationId(storeId);\r\n };\r\n\r\n private readonly _performSearch = async (searchTerm: string): Promise => {\r\n const {\r\n context: {\r\n actionContext\r\n },\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n if (!searchTerm || !storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n hasSearched: true,\r\n isSearchInProgress: true,\r\n isSeeAllStoreValue: false\r\n });\r\n\r\n searchTerm = `${searchTerm} `;\r\n const location = await storeSelectorStateManager.geoLocate(searchTerm.trim() !== '' ? searchTerm : '0', actionContext);\r\n\r\n if (location) {\r\n await this._updateLocations(location.latitude, location.longitude);\r\n }\r\n\r\n this.setState({ isSearchInProgress: false });\r\n };\r\n\r\n private readonly _searchTermChanged = async (searchTerm: string): Promise => {\r\n this.setState({ searchTerm });\r\n };\r\n\r\n private readonly _getAndUpdateStoreLocation = (showAllStores?: boolean): void => {\r\n const {\r\n config: {\r\n style\r\n },\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\r\n\r\n if (styleDefault !== styleEnum.inline && (!storeSelectorStateManager || !storeSelectorStateManager.isDialogOpen)) {\r\n // Store selector dialog isn't open yet, so don't try and update anything\r\n return;\r\n }\r\n\r\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\r\n\r\n if (navigator && navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(\r\n async position => {\r\n if (showAllStores) {\r\n this.setState({ isSeeAllStoreValue: true });\r\n await this._searchTermChanged('');\r\n await this._updateLocations(position.coords.latitude, position.coords.longitude, 0);\r\n } else {\r\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\r\n }\r\n\r\n this.setState({ isSearchInProgress: false });\r\n },\r\n async error => {\r\n // If the location setting is turned off\r\n if (error.PERMISSION_DENIED) {\r\n this.setState({ isLocationDisabled: true });\r\n if (showAllStores) {\r\n this.setState({ isSeeAllStoreValue: true });\r\n await this._searchTermChanged('');\r\n await this._updateLocations(void 0, void 0, 0);\r\n } else {\r\n await this._updateLocations();\r\n }\r\n }\r\n\r\n this.setState({ isSearchInProgress: false });\r\n },\r\n { timeout: 2000 }\r\n );\r\n } else {\r\n this.setState({ isSearchInProgress: false });\r\n }\r\n };\r\n\r\n private readonly _closeDialog = async (): Promise => {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n this.setState({\r\n hasSearched: false,\r\n searchTerm: ''\r\n });\r\n\r\n if (storeSelectorStateManager) {\r\n return storeSelectorStateManager.closeDialog();\r\n }\r\n };\r\n\r\n private readonly _setOrgUnitStoreInformation = async (orgUnitStoreInformation: IFullOrgUnitAvailability[]): Promise => {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n },\r\n config: {\r\n style\r\n },\r\n telemetry\r\n } = this.props;\r\n\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n const context = storeSelectorStateManager.context;\r\n const id: string = context && context.id ? context.id : this.props.id;\r\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\r\n await storeSelectorStateManager.setOrgUnitStoreInformation({\r\n id,\r\n showMapViewLink: context && context.showMapViewLink,\r\n isDialog: styleDefault === styleEnum.dialog,\r\n orgUnitStoreInformation,\r\n onLocationSelected: orgUnitLocation => {\r\n // TO-DO handle event for when location in selected\r\n return Promise.resolve();\r\n }\r\n })\r\n .catch((error: Error) => {\r\n if (telemetry) {\r\n telemetry.error(error.message);\r\n telemetry.debug('Unable to Update store location state');\r\n }\r\n return;\r\n });\r\n return;\r\n };\r\n\r\n private readonly _updateLocations = async (latitude?: number, longitude?: number, radius?: number): Promise => {\r\n const {\r\n telemetry,\r\n config: {\r\n mode,\r\n lookupRadius,\r\n style\r\n },\r\n context: {\r\n actionContext\r\n },\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\r\n const calRadius = (radius || radius === 0) ? radius : (lookupRadius || 50);\r\n const distanceUnitValue = this.props.config.searchRadiusUnit === searchRadiusUnit.kilometers ? 1 : 0;\r\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\r\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\r\n let lat = this.state.searchTerm || !(preferredStore?.Latitude) ? latitude : preferredStore.Latitude;\r\n let long = this.state.searchTerm || !(preferredStore?.Longitude) ? longitude : preferredStore.Longitude;\r\n if (styleDefault === styleEnum.inline) {\r\n const lastInlineStoreLocation = storeSelectorStateManager?.lastInlineShownStoreInfo;\r\n if (lastInlineStoreLocation && !this.state.searchTerm) {\r\n lat = lastInlineStoreLocation.Latitude ? lastInlineStoreLocation.Latitude : lat;\r\n long = lastInlineStoreLocation.Longitude ? lastInlineStoreLocation.Longitude : long;\r\n }\r\n await storeSelectorStateManager?.setLastInlineStoreInfo(lat, long);\r\n }\r\n\r\n if (modeDefault === modeEnum.findStores) {\r\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\r\n lat,\r\n long,\r\n calRadius,\r\n distanceUnitValue,\r\n this.state.isLocationDisabled\r\n );\r\n\r\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\r\n if (orgUnitLocations) {\r\n await this._setOrgUnitStoreInformation(orgUnitLocations);\r\n await this._setSelectedStore(undefined);\r\n }\r\n return;\r\n }\r\n\r\n if (!storeSelectorStateManager || !storeSelectorStateManager.context) {\r\n // Store selector dialog isn't open yet, so don't try and update anything\r\n return;\r\n }\r\n\r\n if (!storeSelectorStateManager.context.product) {\r\n // TODO: Use alternative search method here to not make inventory check\r\n return;\r\n }\r\n\r\n const input = new GetFullAvailableInventoryNearbyInput(\r\n storeSelectorStateManager.context.product.RecordId,\r\n latitude || 0,\r\n longitude || 0,\r\n lookupRadius || 50\r\n );\r\n\r\n const searchCriteria = {\r\n DefaultWarehouseOnly: false,\r\n FilterByChannelFulfillmentGroup: true,\r\n ProductIds: [storeSelectorStateManager.context.product.RecordId]\r\n }\r\n\r\n await getEstimatedAvailabilityAsync({ callerContext: actionContext }, searchCriteria)\r\n .then((resp) =>\r\n this.setState({ estimatedAvailabilityResult: resp.ProductWarehouseInventoryAvailabilities })\r\n ).catch((error) => {\r\n telemetry.warning(error);\r\n telemetry.error(error.message);\r\n telemetry.debug('Unable to get estimated availability');\r\n })\r\n\r\n await getFullAvailableInventoryNearby(input, actionContext).catch((error) => {\r\n telemetry.warning(error);\r\n telemetry.error(error.message);\r\n telemetry.debug('Unable to get full available inventory near by');\r\n });\r\n };\r\n\r\n private readonly _onOrgUnitLocationSelected = async (location: OrgUnitLocation | undefined, deliveryMode?: string): Promise => {\r\n const {\r\n telemetry,\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n if (storeSelectorStateManager) {\r\n if (location && storeSelectorStateManager.context) {\r\n // Want to eat exceptions here so that the dialog still closes even if the onLocationSelected call goes wrong\r\n await storeSelectorStateManager.context.onLocationSelected(location, deliveryMode).catch(error => {\r\n telemetry.warning(error);\r\n telemetry.error(error.message);\r\n telemetry.debug('Unable to get on org unit location selected');\r\n });\r\n }\r\n\r\n await storeSelectorStateManager.closeDialog();\r\n }\r\n };\r\n}\r\n\r\nexport default StoreSelector;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IStoreSelectorViewProps } from './farmlands-pdp-store-selector';\r\n\r\nconst StoreSelectorView: React.FC = props => {\r\n const {\r\n BodyContainerProps,\r\n HeaderContainerProps,\r\n HeaderProps,\r\n ModuleProps,\r\n search,\r\n state,\r\n spinner,\r\n locationsList,\r\n noLocationsMessage,\r\n } = props;\r\n\r\n return (\r\n \r\n \r\n {HeaderProps}\r\n \r\n \r\n {search}\r\n {state.isSearchInProgress ? (\r\n {spinner}\r\n ) : (\r\n state.hasSearched && (\r\n <>\r\n
\r\n

Stores near you

\r\n {locationsList ? locationsList : noLocationsMessage}\r\n \r\n )\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default StoreSelectorView;\r\n","import * as React from 'react';\r\nimport { ILinksData } from '../farmlands-promotion-block.props.autogenerated';\r\n\r\nexport interface IFarmlandsPromotionBlockButton {\r\n buttons: ILinksData[];\r\n}\r\n\r\nconst FarmlandsPromotionBlockButton: React.FC = ({ buttons }) => (\r\n <>\r\n {buttons.map((button: ILinksData, index: number) => {\r\n return (\r\n \r\n \r\n {button.linkText}\r\n \r\n
\r\n );\r\n })}\r\n \r\n);\r\n\r\nexport default FarmlandsPromotionBlockButton;\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 * IFarmlandsPromotionBlock 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 displayOnlyTo {\r\n all = 'all',\r\n loggedInOnly = 'loggedInOnly',\r\n loggedOutOnly = 'loggedOutOnly'\r\n}\r\n\r\nexport interface IFarmlandsPromotionBlockConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n paragraph?: Msdyn365.RichText;\r\n image?: Msdyn365.IImageData;\r\n links?: ILinksData[];\r\n displayOnlyTo: displayOnlyTo;\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 IFarmlandsPromotionBlockProps extends Msdyn365.IModule {\r\n config: IFarmlandsPromotionBlockConfig;\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 { Heading, IModuleProps, INodeProps } 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 FarmlandsPromotionBlockButton from './components/button';\r\nimport { IFarmlandsPromotionBlockProps, displayOnlyTo } from './farmlands-promotion-block.props.autogenerated';\r\n\r\nexport interface IContentBlockViewProps extends IFarmlandsPromotionBlockProps<{}> {\r\n title?: React.ReactNode;\r\n text?: React.ReactNode;\r\n image?: React.ReactNode;\r\n buttons?: React.ReactNode;\r\n className?: string;\r\n contentBlockContainer: IModuleProps;\r\n imageContainer: INodeProps;\r\n detailsContainer: INodeProps;\r\n buttonsContainer: INodeProps;\r\n shouldShowModule: boolean;\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 public render(): JSX.Element | null {\r\n const { heading, paragraph, image, links, displayOnlyTo, className } = this.props.config;\r\n const contentBlockTitle = heading && heading.text && (\r\n \r\n );\r\n const contentBlockText = paragraph && (\r\n \r\n );\r\n const contentBlockImage = image && (\r\n {image.altText}\r\n );\r\n const contentBlockButtons = links && ;\r\n const imageContainer = { className: 'farmlands-promotion-block__image-container' };\r\n const detailsContainer = { className: 'farmlands-promotion-block__details' };\r\n const buttonsContainer = { className: 'farmlands-promotion-block__buttons' };\r\n const isLoggedIn = this.props.context.request.user.isAuthenticated;\r\n const shouldShowModule = this._shouldShowTo(isLoggedIn, displayOnlyTo);\r\n if (!contentBlockTitle && !contentBlockText) {\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 buttons: contentBlockButtons,\r\n moduleClass: this.props.config.className,\r\n contentBlockContainer: {\r\n moduleProps: this.props,\r\n className: classnames('farmlands-promotion-block', className)\r\n },\r\n imageContainer: imageContainer,\r\n detailsContainer: detailsContainer,\r\n buttonsContainer: buttonsContainer,\r\n shouldShowModule: shouldShowModule\r\n };\r\n\r\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\r\n }\r\n\r\n private _shouldShowTo = (isLoggedIn: boolean, displayTo: displayOnlyTo): boolean => {\r\n if (isLoggedIn && displayTo === displayOnlyTo.loggedOutOnly) {\r\n return false;\r\n } else if (!isLoggedIn && displayTo === displayOnlyTo.loggedInOnly) {\r\n return false;\r\n }\r\n return true;\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IContentBlockViewProps } from './farmlands-promotion-block';\r\n\r\nconst ContentBlockView: React.FC = (props) => {\r\n const {\r\n contentBlockContainer,\r\n imageContainer,\r\n detailsContainer,\r\n buttonsContainer,\r\n title,\r\n text,\r\n buttons,\r\n image,\r\n shouldShowModule\r\n } = props;\r\n\r\n return shouldShowModule ? (\r\n \r\n <>\r\n
\r\n {image}\r\n \r\n {title}\r\n {text}\r\n \r\n
\r\n {buttons}\r\n \r\n
\r\n ) : null;\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IProductSpecificationViewProps } from '@msdyn365-commerce-modules/product-specification/src/modules/product-specification/./product-specification';\r\n\r\nconst ProductSpecificationView: React.FC = (props) => {\r\n const {\r\n ProductSpecification,\r\n ProductSpecificationTableProps,\r\n ProductSpecificationTableBodyProps,\r\n productSpecificationResult\r\n } = props;\r\n return (\r\n \r\n {props.title}\r\n \r\n \r\n {productSpecificationResult &&\r\n productSpecificationResult.map((row) => {\r\n return removeUndefinedAttributes(row);\r\n })}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction removeUndefinedAttributes(row: JSX.Element | null): JSX.Element | null {\r\n if (\r\n (row?.props.cellData.props && !('dangerouslySetInnerHTML' in row?.props.cellData.props)) ||\r\n (row?.props.cellData.props.dangerouslySetInnerHTML?.__html !== undefined &&\r\n row?.props.cellData.props.dangerouslySetInnerHTML?.__html !== 'Not defined')\r\n ) {\r\n return row && row;\r\n }\r\n return null;\r\n}\r\n\r\nexport default ProductSpecificationView;\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 { IHistogramItemViewProps, IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nconst RatingsHistogramView: React.FC = props => {\r\n const { heading, histogramItems, histogramProps, moduleProps } = props;\r\n return (\r\n \r\n {heading}\r\n \r\n {histogramItems.map(item => {\r\n return histogramItem(item);\r\n })}\r\n \r\n \r\n );\r\n};\r\n\r\nconst histogramItem = (props: IHistogramItemViewProps) => {\r\n return (\r\n \r\n {props.starLabel}\r\n {props.bar}\r\n {props.percentage}\r\n \r\n );\r\n};\r\n\r\nexport default RatingsHistogramView;","import { IReviewModalViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { IReportReviewModalViewProps, IReviewCardViewProps, IReviewsListState, IReviewsListViewProps } from '@msdyn365-commerce-modules/ratings-reviews/src/modules/reviews-list';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nconst ReviewsListview: React.FC = props => {\r\n const {\r\n averageRating,\r\n filterByDropdown,\r\n moduleProps,\r\n noReviewsMessage,\r\n noReviewsWithFilterMessage,\r\n pageControls,\r\n refineReviewsProps,\r\n reportReviewModal,\r\n reviewsListProps,\r\n reviewCards,\r\n reviewCount,\r\n reviewModal,\r\n sortByDropdown,\r\n state,\r\n userReview\r\n } = props;\r\n\r\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\r\n return {noReviewsMessage};\r\n }\r\n\r\n return (\r\n \r\n {averageRating}\r\n {reviewCount}\r\n \r\n {sortByDropdown}\r\n {filterByDropdown}\r\n \r\n \r\n {userReview && buildReviewCard(userReview)}\r\n {reviewCards.map(review => {\r\n return buildReviewCard(review);\r\n })}\r\n \r\n { reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\r\n {pageControls}\r\n {createReviewModal(reviewModal)}\r\n {createReportModal(reportReviewModal, state)}\r\n \r\n );\r\n};\r\n\r\nconst buildReviewCard = (props: IReviewCardViewProps) => {\r\n return (\r\n \r\n \r\n {props.rating}\r\n {props.name}\r\n {props.date}\r\n \r\n \r\n \r\n {props.reviewTitle}\r\n {props.reviewText}\r\n \r\n \r\n {props.responseName}\r\n {props.responseDate}\r\n {props.responseText}\r\n \r\n \r\n {props.ratingHelpfulLabel}\r\n {props.like}\r\n {props.dislike}\r\n {props.edit}\r\n {props.report}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst createReviewModal = (props: IReviewModalViewProps): JSX.Element => {\r\n return (\r\n \r\n {props.modalHeader}\r\n \r\n \r\n \r\n {props.rating}\r\n {props.ratingLabel}\r\n \r\n \r\n {props.titleLabel}\r\n {props.titleInput}\r\n \r\n \r\n {props.textLabel}\r\n {props.textInput}\r\n \r\n {props.privacyPolicyUrl}\r\n {props.error}\r\n \r\n \r\n \r\n {props.submitButton}\r\n {props.cancelButton}\r\n \r\n \r\n );\r\n};\r\n\r\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\r\n return (\r\n \r\n \r\n {state.reported ? props.headerSubmitted : props.header}\r\n \r\n \r\n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\r\n \r\n \r\n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ReviewsListview;","/*!\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 { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IAccountProfileEditConfig, IAccountProfileEditProps } from './account-profile-edit.props.autogenerated';\nimport AccountProfileEditButtonComponent from './components/account-profile-edit-button';\nimport AccountProfileEditErrorComponent from './components/account-profile-edit-error';\nimport AccountProfileEditInputComponent from './components/account-profile-edit-input';\nimport AccountProfileEditLabelComponent from './components/account-profile-edit-label';\nimport AccountProfileEditLoadingIconComponent from './components/account-profile-edit-loading-icon';\nimport AccountProfileEditLoadingMessageComponent from './components/account-profile-edit-loading-message';\n\nexport interface IAccountProfileEditViewState {\n isShowLoading: boolean;\n}\n\nexport interface IAccountProfileEditItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IAccountProfileEditLocalAccount {\n localAccount: INodeProps;\n items: IAccountProfileEditItem[];\n errorMessage: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IAccountProfileEditLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAccountProfileEditViewProps {\n className: string;\n viewState: IAccountProfileEditViewState;\n loading: IAccountProfileEditLoading;\n accountProfileEdit: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n accountProfileEditLocalAccount: IAccountProfileEditLocalAccount;\n}\n\n/**\n *\n * AccountProfileEdit component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component>}\n */\n@observer\nclass AccountProfileEdit extends React.Component> {\n private readonly moduleClassName: string = 'ms-account-profile-edit';\n\n private readonly telemetryContent: ITelemetryContent;\n\n @observable private givenName: string;\n\n @observable private surname: string;\n\n @observable private email: string;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: IAccountProfileEditProps) {\n super(props);\n this.givenName = '';\n this.surname = '';\n this.email = '';\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(\n nextProps: IAccountProfileEditProps,\n nextState: IAccountProfileEditViewState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config, resources } = this.props;\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n accountProfileEdit: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n heading: config.heading && config.heading.text && (\n \n ),\n accountProfileEditLocalAccount: this._renderLocalAccount()\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 onTextBoxChange = (event: React.ChangeEvent) => {\n const id = event.target.id;\n const value = event.target.value;\n\n switch (id.toLowerCase()) {\n case 'givenname': {\n this.givenName = value;\n break;\n }\n case 'surname': {\n this.surname = value;\n break;\n }\n case 'email': {\n this.emailRegex = value;\n break;\n }\n default:\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n const { resources } = this.props;\n const invalidEmailAddressError = resources.invalidEmailAddressError || 'Please enter a valid email address.';\n\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['SA_FIELDS']['AttributeFields'].map(\n (obj: { ID: string; PRE: string; PAT: string; UX_INPUT_TYPE: string; PAT_DESC: string }) => {\n const value = obj.PRE ? this._htmlDecode(obj.PRE) : '';\n switch (obj.ID.toLowerCase()) {\n case 'givenname': {\n this.givenName = value;\n break;\n }\n case 'surname': {\n this.surname = value;\n break;\n }\n case 'email': {\n this.email = value;\n this.emailRegex = obj.PAT;\n obj.PAT_DESC = invalidEmailAddressError;\n break;\n }\n default:\n }\n }\n );\n }\n };\n\n private _htmlDecode(str: string): string {\n const e = document.createElement('div');\n\n e.innerHTML = str;\n return e.childNodes.length === 0 ? '' : e.childNodes[0].nodeValue || '';\n }\n\n private readonly _updateErrorMessage = () => {\n const { resources } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const message = {\n required_field: resources.requiredFieldMissingError,\n verifying_blurb: resources.loadingMessage\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], message);\n }\n };\n\n private _renderLocalAccount(): IAccountProfileEditLocalAccount {\n const { config, resources } = this.props;\n const localAccount = {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n items: [\n this._renderInput('givenName', 'text', this.givenName, resources.firstNameLabelText, resources.firstNameMaxLength),\n this._renderInput('surname', 'text', this.surname, resources.lastNameLabelText, resources.lastNameMaxLength)\n ],\n errorMessage: [\n ,\n ,\n \n ],\n buttonsWrapper: {\n className: `${this.moduleClassName}__buttons`\n },\n buttons: [\n ,\n \n ],\n verificationSuccessModal: {\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\n },\n verificationSuccessModalMessage: {\n id: 'verifying_blurb',\n className: `${this.moduleClassName}__verifying-modal-message`\n }\n };\n\n if (config.showEmail && this.email !== '') {\n localAccount.items.push(\n this._renderInput('email', 'email', this.email, resources.emailAddressLabelText, undefined, this.emailRegex)\n );\n }\n\n return localAccount;\n }\n\n private _renderInput(\n id: string,\n type: string,\n value: string,\n labelText: string,\n maxLength?: string,\n pattern?: string\n ): IAccountProfileEditItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n };\n }\n}\n\nexport default AccountProfileEdit;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IAccountProfileEditItem,\n IAccountProfileEditLoading,\n IAccountProfileEditLocalAccount,\n IAccountProfileEditViewProps\n} from './account-profile-edit';\n\nconst AccountProfileEditItem: React.FC = ({ wrapper, label, errorMessage, input }) => {\n return (\n \n {label}\n {errorMessage}\n {input}\n \n );\n};\n\nconst LocalAccount: React.FC = ({\n localAccount,\n items,\n errorMessage,\n buttonsWrapper,\n buttons,\n verificationSuccessModal,\n verificationSuccessModalMessage\n}) => {\n return (\n \n {items &&\n items.map((item: IAccountProfileEditItem) => {\n // eslint-disable-next-line react/jsx-key\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n \n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n \n\n \n \n \n \n );\n};\n\nconst AccountProfileEditLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst AccountProfileEditView: React.FC = props => {\n const { accountProfileEdit, viewState, loading, defaultAADConainer, aadConainer, heading, accountProfileEditLocalAccount } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(accountProfileEditLocalAccount)}\n \n \n );\n};\n\nexport default AccountProfileEditView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAccountProfileEditButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst AccountProfileEditButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n disabled,\n telemetryContent,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n );\n};\n\nexport default AccountProfileEditButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IAccountProfileEditErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst AccountProfileEditError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default AccountProfileEditError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAccountProfileEditInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IAccountProfileEditInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst AccountProfileEditInput: React.FC = ({ id, type, value, pattern, className, maxLength, onChange }) => (\n \n);\n\nexport default AccountProfileEditInput;\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 IAccountProfileEditLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst AccountProfileEditLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default AccountProfileEditLabel;\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 IAccountProfileEditLoadingIcon {\n className: string;\n}\n\nconst AccountProfileEditLoadingIcon: React.FC = ({ className }) => (\n
\n);\n\nexport default AccountProfileEditLoadingIcon;\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 IAccountProfileEditLoadingMessage {\n className: string;\n message: string;\n}\n\nconst AccountProfileEditLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default AccountProfileEditLoadingMessage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { KeyCodes } from '@msdyn365-commerce-modules/utilities';\n\nexport interface ISearchBarProps {\n className: string;\n searchPlaceholderLabel: string;\n onSearch(searchText: string): void;\n}\n\nexport interface ISearchBarState {\n searchText: string;\n}\n\nexport class SearchBar extends React.Component {\n constructor(props: ISearchBarProps) {\n super(props);\n this.state = {\n searchText: ''\n };\n }\n\n public render(): JSX.Element {\n const { className, searchPlaceholderLabel } = this.props;\n return (\n
\n \n
\n );\n }\n\n private readonly onSearchTextChange = (ev: React.ChangeEvent): void => {\n this.setState({\n searchText: ev.target.value\n });\n };\n\n private readonly onSearch = (): void => {\n this.props.onSearch(this.state.searchText);\n };\n\n private readonly handleKeyUp = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter) {\n this.onSearch();\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 { IComponentProps } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\nimport { moduleClassName } from '../business-partners';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { SearchBar } from './search-bar';\n\n/**\n * Props of DataGrid component.\n */\nexport interface IDataGridProps extends IComponentProps {\n className: string;\n pageSize?: number;\n searchPlaceholderLabel: string;\n defaultSorting?: ISortingInfo;\n resources: IBusinessPartnersResources;\n columns: IDataGridColumn[];\n loadData(): Promise;\n}\n\n/**\n * State of DataGrid component.\n */\nexport interface IDataGridState {\n data: Tdata[];\n paging: IPagingInfo;\n filter: IFilterInfo;\n sorting?: ISortingInfo;\n isLoading: boolean;\n hasError: boolean;\n}\n\nexport interface IPagingInfo {\n index: number;\n}\n\nexport interface IFilterInfo {\n searchText: string;\n}\n\nexport interface ISortingInfo {\n fieldName: string;\n ascending: boolean;\n}\n\n/**\n * Column definition of DataGrid component.\n */\nexport interface IDataGridColumn {\n /**\n * A unique key for identifying the column.\n */\n reactKey: string;\n\n /**\n * Name to render on the column header.\n */\n name: string;\n\n /**\n * Class name added to table cell.\n */\n className?: string;\n\n /**\n * The field to pull the text value from for the column.Can be unset if a custom `onRender` method is provided.\n */\n fieldName?: string;\n\n /**\n * Whether the user can search this column by text.\n */\n isSearchable?: boolean;\n\n /**\n * Custom renderer for cell content, instead of the default text rendering.\n */\n onRender?(item: Tdata): JSX.Element;\n}\n\nconst defaultPageSize = 10;\n\n/**\n * DataGrid component encapsulates common table functionalities.\n */\nexport class DataGrid extends React.Component, IDataGridState> {\n constructor(props: IDataGridProps) {\n super(props);\n this.state = {\n data: [],\n sorting: props.defaultSorting,\n paging: { index: 0 },\n filter: { searchText: '' },\n isLoading: true,\n hasError: false\n };\n }\n\n public componentDidMount(): void {\n this.loadDataInternal();\n }\n\n public shouldComponentUpdate(nextProps: Readonly>, nextState: Readonly>): boolean {\n return (\n this.props.id !== nextProps.id ||\n this.props.columns !== nextProps.columns ||\n this.state.data !== nextState.data ||\n this.state.paging !== nextState.paging ||\n this.state.filter !== nextState.filter ||\n this.state.isLoading !== nextState.isLoading ||\n this.state.hasError !== nextState.hasError\n );\n }\n\n public render(): JSX.Element | null {\n const data = this.getDataToDisplay();\n const hasMore = this.hasMore();\n if (this.state.hasError) {\n return {this.props.resources.genericErrorMessage};\n }\n if (this.state.isLoading) {\n return {this.props.resources.loadingLabel};\n }\n if (!ArrayExtensions.hasElements(data)) {\n return (\n <>\n \n

{this.props.resources.noDataMessage}

\n \n );\n }\n return (\n <>\n \n \n {this.renderGridHeader()}\n {data.map((item, index) => this.renderGridRow(item, index))}\n
\n {hasMore && (\n \n )}\n \n );\n }\n\n /**\n * Renders the TH header in the table.\n * @returns - Header react node.\n */\n private readonly renderGridHeader = () => {\n const className = `${this.props.className}__header`;\n const rowClassName = `${className}__row`;\n return (\n \n \n {this.props.columns.map(column => (\n \n {column.name}\n \n ))}\n \n \n );\n };\n\n /**\n * Renders table row.\n * @param item - Data item for this row.\n * @param index - Index of the row.\n * @returns - Row react node.\n */\n private readonly renderGridRow = (item: Tdata, index: number) => {\n const rowClassName = `${this.props.className}__row`;\n return (\n \n {this.props.columns.map(column => {\n if (column.fieldName) {\n return (\n \n {((item as unknown) as { [key: string]: string })[column.fieldName]}\n \n );\n }\n return {column.onRender?.(item)};\n })}\n \n );\n };\n\n /**\n * Load data for the table.\n * @returns Promise.\n */\n private readonly loadDataInternal = async () => {\n if (!this.props.context.actionContext.requestContext.user.isAuthenticated) {\n this.setState({\n isLoading: false\n });\n return;\n }\n try {\n const result = await this.props.loadData();\n this.setState({\n isLoading: false,\n data: result\n });\n } catch {\n this.setState({\n isLoading: false,\n hasError: true\n });\n }\n };\n\n private readonly onSearch = (searchText: string): void => {\n this.setState({\n paging: { index: 0 },\n filter: { searchText }\n });\n };\n\n private readonly loadMore = (): void => {\n this.setState({\n paging: { index: this.state.paging.index + 1 }\n });\n };\n\n private readonly sortData = (): Tdata[] => {\n const sorting = this.state.sorting;\n if (!sorting) {\n return this.state.data;\n }\n const { fieldName, ascending } = sorting;\n return this.state.data.sort((item1: Tdata, item2: Tdata) => {\n let value1 = ((item1 as unknown) as { [key: string]: string })[fieldName];\n let value2 = ((item2 as unknown) as { [key: string]: string })[fieldName];\n if (typeof value1 === 'string' && typeof value2 === 'string') {\n value1 = value1.toLowerCase();\n value2 = value2.toLowerCase();\n }\n const compareResult = value1 > value2 ? 1 : value1 < value2 ? -1 : 0;\n return ascending ? compareResult : compareResult * -1;\n });\n };\n\n private readonly filterData = (): Tdata[] => {\n const column = this.props.columns.find(c => c.isSearchable);\n const searchText = this.state.filter.searchText;\n return this.sortData().filter(item => {\n if (!column?.fieldName || !searchText) {\n return true;\n }\n const columnValue = ((item as unknown) as { [key: string]: string })[column.fieldName];\n return columnValue && columnValue.toLowerCase().indexOf(searchText.trim().toLowerCase()) >= 0;\n });\n };\n\n private readonly getDataToDisplay = (): Tdata[] => {\n const itemsCount = (this.props.pageSize || defaultPageSize) * (this.state.paging.index + 1);\n const filteredItems = this.filterData();\n return filteredItems.slice(0, itemsCount);\n };\n\n private readonly hasMore = (): boolean => {\n const itemsCount = (this.props.pageSize || defaultPageSize) * (this.state.paging.index + 1);\n const filteredItems = this.filterData();\n return filteredItems.length > itemsCount;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { BusinessPartner, BusinessPartnerUser, BusinessPartnersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { DataGrid, IDataGridColumn } from './data-grid';\n\n/**\n * View model of business partner user, used to display.\n */\nexport interface IBusinessPartnerUserViewModel extends BusinessPartnerUser {\n name: string;\n spendingLimitStr: string;\n}\n\n/**\n * Props of BusinessPartnerUsersTable.\n */\nexport interface IBusinessPartnerUsersTableProps extends IComponentProps {\n className: string;\n pageSize?: number;\n businessPartner: BusinessPartner;\n resources: IBusinessPartnersResources;\n onSelect(businessPartnerUser: BusinessPartnerUser): void;\n}\n\n/**\n * BusinessPartnerUsersTable component.\n */\nexport class BusinessPartnerUsersTable extends React.Component {\n public shouldComponentUpdate(nextProps: Readonly): boolean {\n return this.props.id !== nextProps.id;\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Get column definition of the table.\n * @returns - Columns.\n */\n private readonly getColumns = (): IDataGridColumn[] => {\n return [\n {\n reactKey: 'name',\n name: this.props.resources.businessUserTableNameHeadingText,\n fieldName: 'name',\n isSearchable: true\n },\n {\n reactKey: 'email',\n name: this.props.resources.businessUserTableEmailHeadingText,\n fieldName: 'Email'\n },\n {\n reactKey: 'spendingLimit',\n name: this.props.resources.businessUserTableSpendingLimitHeadingText,\n className: `${this.props.className}__row__column-with-number`,\n fieldName: 'spendingLimitStr'\n },\n {\n reactKey: 'select-button',\n name: '',\n onRender: this.renderSelectButton,\n className: `${this.props.className}__row__column-select-button`\n }\n ];\n };\n\n /**\n * Renders the button to select a business partner user.\n * @param businessPartnerUser - The business partner user to select.\n * @returns - Button component.\n */\n private readonly renderSelectButton = (businessPartnerUser: IBusinessPartnerUserViewModel) => {\n return (\n {\n this.props.onSelect(businessPartnerUser);\n }}\n title={this.props.resources.select}\n aria-label={this.props.resources.select}\n />\n );\n };\n\n /**\n * Call retail proxy to get business partner users.\n * @returns - Business partner users view model.\n */\n private readonly getBusinessPartnerUsers = async (): Promise => {\n const businessPartners = await BusinessPartnersDataActions.getUsersAsync(\n {\n callerContext: this.props.context.actionContext,\n bypassCache: 'get',\n queryResultSettings: {}\n },\n this.props.businessPartner.BusinessPartnerId\n );\n return businessPartners\n .filter(user => user.StatusValue === 1)\n .map(user => ({\n ...user,\n name: `${user.FirstName} ${user.LastName}`,\n spendingLimitStr: !ObjectExtensions.isNullOrUndefined(user.SpendingLimit)\n ? this.props.context.cultureFormatter.formatCurrency(user.SpendingLimit.toString())\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 { IComponentProps } from '@msdyn365-commerce/core';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { BusinessPartner, BusinessPartnersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { DataGrid, IDataGridColumn } from './data-grid';\n\n/**\n * Props of IBusinessPartnersTable.\n */\nexport interface IBusinessPartnersTableProps extends IComponentProps {\n className: string;\n pageSize?: number;\n resources: IBusinessPartnersResources;\n onSelect(businessPartner: BusinessPartner): void;\n}\n\n/**\n * BusinessPartnersTable component.\n */\nexport class BusinessPartnersTable extends React.Component {\n public shouldComponentUpdate(nextProps: Readonly): boolean {\n return this.props.id !== nextProps.id;\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Get column definition of the table.\n * @returns - Columns.\n */\n private readonly getColumns = (): IDataGridColumn[] => {\n return [\n {\n reactKey: 'name',\n name: this.props.resources.businessPartnerName,\n fieldName: 'Name',\n isSearchable: true\n },\n {\n reactKey: 'select-button',\n name: '',\n onRender: this.renderSelectButton,\n className: `${this.props.className}__row__column-select-button`\n }\n ];\n };\n\n /**\n * Renders the button to select a business partner.\n * @param businessPartner - The business partner to select.\n * @returns - Button component.\n */\n private readonly renderSelectButton = (businessPartner: BusinessPartner) => {\n return (\n {\n this.props.onSelect(businessPartner);\n }}\n title={this.props.resources.select}\n aria-label={this.props.resources.select}\n />\n );\n };\n\n /**\n * Call retail proxy to get business partners.\n * @returns - Business partners.\n */\n private readonly getBusinessPartners = async () => {\n const businessPartners = await BusinessPartnersDataActions.getManagedBusinessPartnersAsync({\n callerContext: this.props.context.actionContext,\n bypassCache: 'get',\n queryResultSettings: {}\n });\n return businessPartners;\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 classname from 'classnames';\nimport * as React from 'react';\n\nimport { BusinessPartner, BusinessPartnerUser } from '@msdyn365-commerce/retail-proxy';\nimport { IBusinessPartnersData } from './business-partners.data';\nimport { IBusinessPartnersProps } from './business-partners.props.autogenerated';\nimport { BusinessPartnerUsersTable } from './components/business-partner-users-table';\nimport { BusinessPartnersTable } from './components/business-partners-table';\n\n/**\n * Props for the module view.\n */\nexport interface IBusinessPartnersViewProps extends IBusinessPartnersProps {\n businessPartnersProps: IModuleProps;\n businessPartnersHeading?: React.ReactNode;\n businessPartnersTable?: React.ReactNode;\n businessPartnerUsersTable?: React.ReactNode;\n backToBusinessPartnersLink?: React.ReactNode;\n}\n\n/**\n * State of BusinessPartners component.\n */\nexport interface IBusinessPartnersState {\n selectedBusinessPartner?: BusinessPartner;\n}\n\n/**\n * The class name root for the module.\n */\nexport const moduleClassName: string = 'ms-business-partners';\n\n/**\n * BusinessPartners component.\n */\nclass BusinessPartners extends React.Component, IBusinessPartnersState> {\n constructor(props: IBusinessPartnersProps) {\n super(props);\n this.state = {};\n }\n\n public componentDidMount() {\n this.props.context.request.cookies.removeAccountSelectionCookie();\n }\n\n public shouldComponentUpdate(nextProps: IBusinessPartnersProps, nextState: IBusinessPartnersState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, pageSize, businessPartnersHeading }\n } = this.props;\n const viewProps: IBusinessPartnersViewProps = {\n ...this.props,\n businessPartnersProps: {\n moduleProps: this.props,\n className: classname(moduleClassName, className)\n },\n businessPartnersHeading: businessPartnersHeading && businessPartnersHeading.text && (\n \n ),\n businessPartnersTable: !this.state.selectedBusinessPartner ? (\n \n ) : (\n undefined\n ),\n businessPartnerUsersTable: this.state.selectedBusinessPartner ? (\n \n ) : (\n undefined\n ),\n backToBusinessPartnersLink: this.state.selectedBusinessPartner ? (\n {\n this.onSelectBusinessPartner();\n }}\n >\n {this.props.resources.backToBusinessPartnersLink}\n \n ) : (\n undefined\n )\n };\n return this.props.renderView(viewProps);\n }\n\n /**\n * Event handler of business partner selection.\n * @param businessPartner - Selected business partner.\n */\n private readonly onSelectBusinessPartner = (businessPartner?: BusinessPartner) => {\n this.setState({\n selectedBusinessPartner: businessPartner\n });\n };\n\n /**\n * Event handler of business partner user selection.\n * @param businessPartnerUser - Selected business partner user.\n */\n private readonly onSelectBusinessPartnerUser = (businessPartnerUser: BusinessPartnerUser) => {\n if (businessPartnerUser.AccountNumber) {\n this.props.context.request.cookies.setAccountSelectionCookie(true, businessPartnerUser.AccountNumber);\n const homeUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext);\n if (homeUrl && Msdyn365.msdyn365Commerce.isBrowser) {\n window.location.href = homeUrl;\n }\n }\n };\n}\n\nexport default BusinessPartners;\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 { IBusinessPartnersViewProps } from './business-partners';\n\n/**\n * View layout of business partner module.\n * @param props - React props of the component.\n * @returns Functional component.\n */\nconst businessPartnersView: React.FC = props => {\n return (\n \n {props.backToBusinessPartnersLink}\n {props.businessPartnersHeading}\n {props.businessPartnersTable}\n {props.businessPartnerUsersTable}\n \n );\n};\n\nexport default businessPartnersView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport QRCode from 'qrcode.react';\nimport * as React from 'react';\n\n/**\n * CheckInConfirmation component Properties.\n */\nexport interface ICheckInConfirmationProps {\n /**\n * The confirmation text to show.\n */\n confirmationText: string;\n\n /**\n * Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n */\n shouldShowQrCode: boolean;\n\n /**\n * The label shows for channel reference ID.\n */\n channelReferenceIdLabel: string;\n\n /**\n * The channel reference ID to show. When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n */\n channelReferenceId?: string;\n}\n\n/**\n * CheckInConfirmation component for showing confirmation information after check-in succeed.\n * @param confirmationProps - The confirmation properties.\n * @param confirmationProps.confirmationText - The confirmation text.\n * @param confirmationProps.shouldShowQrCode - Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n * @param confirmationProps.channelReferenceIdLabel - The label shows for channel reference ID.\n * @param confirmationProps.channelReferenceId - The channel reference ID to show.\n * When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n * @returns The check-in confirmation component.\n */\nexport const CheckInConfirmationComponent: React.FC = ({\n confirmationText,\n shouldShowQrCode,\n channelReferenceIdLabel,\n channelReferenceId\n}) => {\n return (\n
\n

{confirmationText}

\n {channelReferenceId && (\n

\n {`${channelReferenceIdLabel} ${channelReferenceId}`}\n

\n )}\n {channelReferenceId && shouldShowQrCode && (\n \n \n \n )}\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * Check-in error properties.\n */\nexport interface ICheckInErrorProps {\n errorMessage?: string;\n}\n\n/**\n * Check-in error.\n * @param errorProps - The error properties.\n * @param errorProps.errorMessage - The error message to show.\n * @returns The alert element showing check-in errors.\n */\nexport const CheckInErrorComponent: React.FC = ({ errorMessage }) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\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 { IDictionary } from '@msdyn365-commerce/core';\nimport { CommerceProperty, SalesOrdersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { CheckInConfirmationComponent } from './check-in-confirmation';\nimport { CheckInErrorComponent } from './check-in-error';\nimport { IAdditionalInformationKeysData, ICheckInForPickupConfig, ICheckInForPickupProps } from './check-in-for-pickup.props.autogenerated';\n\n/**\n * The interface representing a piece of additional information data.\n */\ninterface IAdditionalInformation {\n formKey: IAdditionalInformationKeysData;\n value: string;\n}\n\n/**\n * The state for check-in view.\n */\nexport interface ICheckInViewState {\n /**\n * If the module has header error to show.\n */\n isHeaderError: boolean;\n\n /**\n * If the customer has checked in.\n */\n isCheckedIn: boolean;\n\n /**\n * Additional information to capture.\n */\n additionalInformation: IDictionary[];\n}\n\n/**\n * The properties for check-in view.\n */\nexport interface ICheckInViewProps extends ICheckInForPickupProps {\n headerError: React.ReactNode;\n confirmationComponent: React.ReactNode;\n viewState: ICheckInViewState;\n additionalInformationValues: string[];\n checkInForOrderPickup(additionalInformation?: IAdditionalInformation[]): Promise;\n}\n\n/**\n * The state of the CheckInForPickup module.\n */\nexport interface ICheckInForPickupState {\n /**\n * The header error message.\n */\n headerErrorMessage: string;\n\n /**\n * If the customer has checked in successfully.\n */\n isCheckedIn: boolean;\n}\n\n/**\n *\n * CheckIn component.\n * @extends {React.Component, ICheckInForPickupState>}\n */\nclass CheckInForPickup extends React.Component, ICheckInForPickupState> {\n public constructor(props: ICheckInForPickupProps) {\n super(props);\n this.state = {\n headerErrorMessage: '',\n isCheckedIn: false\n };\n }\n\n public render(): JSX.Element | null {\n const isHeaderError: boolean = this.state.headerErrorMessage !== '';\n\n const viewProps = {\n ...this.props,\n headerError: ,\n confirmationComponent: (\n \n ),\n checkInForOrderPickup: this.checkInForOrderPickup,\n additionalInformationValues: this.props.config.additionalInformationKeys\n ? this.props.config.additionalInformationKeys.map(() => {\n return {};\n })\n : undefined,\n viewState: {\n isHeaderError,\n isCheckedIn: this.state.isCheckedIn\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public shouldComponentUpdate(nextProps: ICheckInForPickupProps, nextState: ICheckInForPickupState): boolean {\n if (\n this.props.config.additionalInformationHeading !== nextProps.config.additionalInformationHeading ||\n this.props.config.confirmationText !== nextProps.config.confirmationText\n ) {\n return true;\n }\n if (this.state.headerErrorMessage !== nextState.headerErrorMessage || this.state.isCheckedIn !== nextState.isCheckedIn) {\n return true;\n }\n return false;\n }\n\n public async componentDidMount(): Promise {\n await this._onInit();\n }\n\n /**\n * The async callback for submitting check-in.\n * @param additionalInformationList - The optional additional information captured.\n * @returns The async result.\n */\n public checkInForOrderPickup = async (additionalInformationList?: IAdditionalInformation[]): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query!.channelId, 10);\n const channelReferenceId: string = this.props.context.request.query!.channelReferenceId;\n const packingSlipId: string = this.props.context.request.query!.packingSlipId;\n\n const additionalInformationToSubmit: { formKey: string; value: string }[] | undefined = additionalInformationList?.map(\n additionalInformationKeyValuePair => {\n return {\n formKey: additionalInformationKeyValuePair.formKey.resourceId ?? '',\n value: additionalInformationKeyValuePair.value\n };\n }\n );\n const extensionPropertyList: CommerceProperty[] = [];\n if (!ObjectExtensions.isNullOrUndefined(additionalInformationToSubmit)) {\n for (const additionalInformation of additionalInformationToSubmit) {\n extensionPropertyList.push({\n Key: additionalInformation.formKey,\n Value: {\n StringValue: additionalInformation.value\n }\n });\n }\n }\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId,\n extensionPropertyList\n );\n } catch (error) {\n this.state = { headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false };\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n return Promise.resolve();\n };\n\n /**\n * The action performed on module initialization.\n * @returns The async result.\n */\n private readonly _onInit = async (): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query?.channelId ?? '', 10);\n const channelReferenceId: string | undefined = this.props.context.request.query?.channelReferenceId;\n const packingSlipId: string | undefined = this.props.context.request.query?.packingSlipId;\n if (Number.isNaN(channelId) || !channelReferenceId || !packingSlipId) {\n // No error message shown in editor mode.\n if (this.props.context.request.params.isEditor) {\n return Promise.resolve();\n } else if (this.props.context.request.params.isPreview) {\n this.setState({ headerErrorMessage: this.props.resources.requiredParameterMissingErrorMessage });\n } else {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage });\n }\n this.props.context.telemetry.error(\n 'One or more required URL parameters are missing. ' +\n 'Please make sure you have pass in channelId, channelReferenceId and packingSlipId through URL parameter.'\n );\n return Promise.resolve();\n }\n\n const { additionalInformationKeys } = this.props.config;\n\n const hasAdditionalInformation: boolean = ArrayExtensions.hasElements(additionalInformationKeys);\n\n // Call check-in-for-pickup directly if no additional information to capture.\n if (!hasAdditionalInformation) {\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId\n );\n } catch (error) {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false });\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n }\n return Promise.resolve();\n };\n}\n\nexport default CheckInForPickup;\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 { FormBuilder } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckInViewProps } from './check-in-for-pickup';\n\n/**\n * The check-in view for submitting check-in, capturing additional information, and showing check-in confirmation.\n * @param props - The check-in view properties.\n * @returns The check-in view as a react component.\n */\nconst CheckInViewComponent: React.FC = (props: ICheckInViewProps) => {\n const { headerError, checkInForOrderPickup, confirmationComponent, viewState } = props;\n return (\n <>\n {viewState.isHeaderError && headerError}\n {!viewState.isHeaderError && ArrayExtensions.hasElements(props.config.additionalInformationKeys) && (\n \n )}\n {!viewState.isHeaderError &&\n !ArrayExtensions.hasElements(props.config.additionalInformationKeys) &&\n viewState.isCheckedIn &&\n confirmationComponent}\n \n );\n};\n\nexport default CheckInViewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * Payment waiting props.\n */\nexport interface IPaymentWaitingProps {\n message: string;\n className?: string;\n}\n\n/**\n * Payment waiting.\n * @param param0 - First in param.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const WaitingComponent: React.FC = ({ message, className = 'ms-checkout-payment-instrument' }) => (\n
\n \n {message}\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport classname from 'classnames';\n\nimport { reaction } from 'mobx';\nimport { ICheckoutExpressPaymentContainerData } from './checkout-express-payment-container.data';\nimport {\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerHeadingData\n} from './checkout-express-payment-container.props.autogenerated';\nimport { WaitingComponent } from '../../common/waiting';\n\n/**\n * ICheckoutExpressPaymentContainerModuleProps interface.\n */\nexport interface ICheckoutExpressPaymentContainerModuleProps\n extends ICheckoutExpressPaymentContainerProps,\n IModuleStateProps {}\n\nexport interface ICheckoutExpressPaymentContainerViewProps\n extends ICheckoutExpressPaymentContainerProps<{}>,\n ICheckoutExpressPaymentContainerState {\n checkoutPlainContainerProps: IModuleProps;\n items: React.ReactNode[];\n isReady?: boolean;\n waiting?: React.ReactNode;\n title?: React.ReactNode;\n headerProps: INodeProps;\n}\n\n/**\n * Checkout Express Payment Container State.\n */\nexport interface ICheckoutExpressPaymentContainerState {\n isReady?: boolean;\n shouldHideExpressPaymentContainer?: boolean;\n}\n\n/**\n *\n * CheckoutExpressPaymentContainer component\n * @extends {React.PureComponent>}\n */\n@observer\nexport class CheckoutExpressPaymentContainer extends React.PureComponent<\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerState\n> {\n private readonly moduleClassName: string = 'ms-checkout-express-section-container';\n\n public constructor(props: ICheckoutExpressPaymentContainerModuleProps) {\n super(props);\n this.state = {\n isReady: false,\n shouldHideExpressPaymentContainer: this.props.data.checkout.result?.shippingAddressFromExpressCheckout ? true : false\n };\n }\n\n public componentDidMount(): void {\n reaction(\n () => this.props.data.checkout.result?.isExpressPaymentModulesReady,\n () => {\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n }\n let isReady = true;\n\n for (const item of items) {\n // @ts-ignore\n if (item.key.includes('checkout-express')) {\n // @ts-ignore\n const extensionPropertyKey = `is${item.props.config.paymentTenderType}ExpressModuleReady`;\n\n const isModuleReady =\n this.props.data.checkout.result?.isExpressPaymentModulesReady?.find(\n property => property.Key === extensionPropertyKey\n )?.Value?.BooleanValue ?? false;\n isReady = isReady && isModuleReady;\n }\n }\n this.setState({ isReady });\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n isExpressCheckoutApplied => {\n this.setState({ shouldHideExpressPaymentContainer: isExpressCheckoutApplied });\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { checkoutExpressPaymentContainerHeading },\n resources: { checkoutExpressPaymentSectionLoadingMessage }\n } = this.props;\n\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n return null;\n }\n\n const shouldHideExpressPaymentContainerClassName: string = this.state.shouldHideExpressPaymentContainer ? 'hide' : '';\n\n const moduleClassName = classname(\n 'ms-checkout-express-payment-container',\n this.props.config.className,\n shouldHideExpressPaymentContainerClassName\n );\n\n const viewProps: ICheckoutExpressPaymentContainerViewProps = {\n ...this.props,\n\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items,\n isReady: this.state.isReady,\n waiting: ,\n title: checkoutExpressPaymentContainerHeading && this._renderMsdyn365Text(checkoutExpressPaymentContainerHeading),\n headerProps: { className: 'ms-checkout-express-payment-container__head' }\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly _getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\n\n /**\n * Renders heading.\n * @param checkoutExpressPaymentContainerHeading - The checkout express container heading.\n * @returns React node.\n */\n private _renderMsdyn365Text(checkoutExpressPaymentContainerHeading: ICheckoutExpressPaymentContainerHeadingData): React.ReactNode {\n return (\n \n );\n }\n\n /**\n * Event handler for heading change event.\n * @param event - The content change event in heading element.\n * @returns The new heading value.\n */\n private _handleCheckoutExpressContainerHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutExpressPaymentContainerHeading!.text = event.target.value);\n}\n\nexport default CheckoutExpressPaymentContainer;\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 { ICheckoutExpressPaymentContainerViewProps } from './checkout-express-payment-container';\n\ninterface IContainerItemsComponent {\n isLoadingClassName: string;\n items: React.ReactNode[];\n}\n\nconst ContainerItemsComponent: React.FC = ({ isLoadingClassName, items }) => (\n
{items}
\n);\n\nconst CheckoutExpressPaymentContainerView: React.FC = ({\n checkoutPlainContainerProps,\n items,\n isReady,\n waiting,\n title,\n headerProps\n}) => {\n const isLoadingClassName: string = isReady ? 'showContainer' : 'notShowContainer';\n return (\n \n {title}\n {!isReady && waiting}\n \n \n );\n};\n\nexport default CheckoutExpressPaymentContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IHistogramItemViewProps, IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst RatingsHistogramView: React.FC = props => {\n const { heading, histogramItems, histogramProps, moduleProps } = props;\n return (\n \n {heading}\n \n {histogramItems.map(item => {\n return histogramItem(item);\n })}\n \n \n );\n};\n\nconst histogramItem = (props: IHistogramItemViewProps) => {\n return (\n \n {props.starLabel}\n {props.bar}\n {props.percentage}\n \n );\n};\n\nexport default RatingsHistogramView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ExtensibleEnumeration } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { IOrderLookupResources, IOrderLookupSearchAdditionalFieldsData } from '../order-lookup.props.autogenerated';\n\n/**\n * Render label.\n * @param className - Classname for label.\n * @param value - Text for label.\n * @returns -The JSX Element.\n */\nexport const labelGroup = (className: string, value: string): JSX.Element => {\n return
{value}
;\n};\n\n/**\n * Error label.\n * @param responseErrorMessage - Error message for label.\n * @param errorMessageClassName - Error message for class name.\n * @returns - Error ReactNode.\n */\nexport const renderErrorLabel = (responseErrorMessage: string, errorMessageClassName: string): React.ReactNode => {\n return responseErrorMessage &&
{responseErrorMessage}
;\n};\n\n/**\n * Registered user message.\n * @param resources - Resource values.\n * @param signInUrl - Signin url.\n * @param signInLinkClassName - Signin link classname.\n * @param registeredUserClassName - Registered user message classname.\n * @returns - ReactNode.\n */\nexport const renderRegisteredUserMessage = (\n resources: IOrderLookupResources,\n signInUrl: string,\n signInLinkClassName: string,\n registeredUserClassName: string\n): React.ReactNode => {\n const { orderLookupRegisteredUserText, orderLookupViewAccountText, orderLookupSignInLinkText } = resources;\n const message: string = orderLookupRegisteredUserText;\n const infoMessage: string = orderLookupViewAccountText;\n const signInText: string = orderLookupSignInLinkText;\n return (\n
\n {message}\n \n {signInText}\n \n {infoMessage}\n
\n );\n};\n\n/**\n * EmailValid submit.\n * @param email - Onsubmit of form and button click.\n * @returns - Boolean.\n */\nexport const isEmailValid = (email: string): boolean => {\n return EmailRegex.defaultRegex.test(email);\n};\n\n/**\n * Additional field validation for on submit.\n * @param name - Onsubmit of form and button click.\n * @returns - Boolean.\n */\nexport const isAdditionalFieldValid = (name: string): boolean => {\n const regEx = new RegExp('^(?!\\\\s)[A-Za-z0-9\\\\s]+$', 'u');\n return regEx.test(name);\n};\n\n/**\n * Validate order lookup field against extensible enum.\n * @param orderStatusLookUpParameter - Order lookup parameter.\n * @param orderLookupExtensibleEnum - Order lookup extensible enum.\n * @returns - Boolean.\n */\nexport const validateOrderLookupField = (\n orderStatusLookUpParameter: string,\n orderLookupExtensibleEnum: ExtensibleEnumeration[]\n): boolean => {\n let isValidField: boolean = false;\n for (const item of orderLookupExtensibleEnum) {\n if (item.Name.toLocaleLowerCase() === orderStatusLookUpParameter.toLocaleLowerCase()) {\n isValidField = true;\n return isValidField;\n }\n }\n return isValidField;\n};\n\n/**\n * Validate order lookup additional fields with proxy values.\n * @param value - Value to be validated.\n * @param orderLookupExtensibleEnum - Order lookup extensible enum.\n * @returns - Boolean.\n */\nexport const validateAdditionalFieldWithProxy = (value: string, orderLookupExtensibleEnum: ExtensibleEnumeration[]): boolean => {\n return !orderLookupExtensibleEnum.some(item => item.Name.toLocaleLowerCase() === value.toLocaleLowerCase());\n};\n\n/**\n * Validate order lookup additional fields against extensible enum.\n * @param orderStatusLookUpAdditionalParameters - Order lookup parameter.\n * @param orderLookupExtensibleEnum - Order lookup extensible enum.\n * @returns - Boolean.\n */\nexport const validateOrderLookupAdditionalField = (\n orderStatusLookUpAdditionalParameters: IOrderLookupSearchAdditionalFieldsData[],\n orderLookupExtensibleEnum: ExtensibleEnumeration[]\n): boolean => {\n let isValidAdditionalField: boolean = false;\n if (ArrayExtensions.hasElements(orderStatusLookUpAdditionalParameters)) {\n orderStatusLookUpAdditionalParameters.map(item => {\n const fieldKey: string = item.fieldKey ?? '';\n if (!isValidAdditionalField) {\n isValidAdditionalField = validateAdditionalFieldWithProxy(fieldKey, orderLookupExtensibleEnum);\n }\n return isValidAdditionalField;\n });\n } else {\n isValidAdditionalField = false;\n }\n return isValidAdditionalField;\n};\n\n/**\n * Render validation message if field does not matches with extensible enum.\n * @param orderLookupFieldValidationErrorMessage - Order lookup validation message.\n * @returns - ReactNode.\n */\nexport const renderFieldErrors = (orderLookupFieldValidationErrorMessage: string): React.ReactNode => {\n return
{orderLookupFieldValidationErrorMessage}
;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { labelGroup } from '../utilities/order-lookup-utility';\n\n/**\n * Additional input field props.\n */\nexport interface IOrderLookupAdditionalFieldInfoInput {\n className: string;\n ariaLabel: string;\n inputType: string;\n value: string;\n name: string;\n additionalFieldLabel: string;\n additionalFieldLabelClassName: string;\n isValidAdditionalFieldName: boolean;\n additionalFieldValidationMessage: string;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Order lookup additional field props.\n */\nexport interface IOrderLookupAdditionalFieldInfo {\n additionalFieldLabel: React.ReactNode;\n additionalFieldInput: React.ReactNode;\n additionalFieldError: React.ReactNode;\n}\n\n/**\n * RenderOrderLookupAdditionalFieldInput component.\n */\n@observer\nexport default class RenderOrderLookupAdditionalFieldInput extends React.Component {\n public constructor(props: IOrderLookupAdditionalFieldInfoInput) {\n super(props);\n }\n\n public shouldComponentUpdate(nextProps: IOrderLookupAdditionalFieldInfoInput): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n return (\n
\n {this._getOrderLookupAdditionalFields().additionalFieldLabel}\n {this._getOrderLookupAdditionalFields().additionalFieldError}\n {this._getOrderLookupAdditionalFields().additionalFieldInput}\n
\n );\n }\n\n /**\n * Function to create the order lookup additional fields.\n * @returns IOrderLookupFieldInfo.\n */\n private _getOrderLookupAdditionalFields(): IOrderLookupAdditionalFieldInfo {\n return {\n additionalFieldLabel: labelGroup(this.props.additionalFieldLabelClassName, this.props.additionalFieldLabel),\n additionalFieldInput: (\n
\n \n
\n ),\n additionalFieldError: (\n
\n {!this.props.isValidAdditionalFieldName ? this.props.additionalFieldValidationMessage : ''}\n
\n )\n };\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { labelGroup } from '../utilities/order-lookup-utility';\n\n/**\n * Input field props.\n */\nexport interface IOrderLookupFieldInfoInput {\n inputReference?: React.RefObject;\n className: string;\n ariaLabel: string;\n inputType: string;\n value: string;\n name: string;\n orderLookupLabel: string;\n orderLookupLabelClassName: string;\n fieldErrorClassName: string;\n isInputTypeError: boolean;\n isValidInputField: boolean;\n renderAlert(className: string): JSX.Element;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Order lookup field props.\n */\nexport interface IOrderLookupFieldInfo {\n label: React.ReactNode;\n input: React.ReactNode;\n error: React.ReactNode;\n}\n\n/**\n * RenderOrderLookupInputs component.\n */\n@observer\nexport default class RenderOrderLookupFormFields extends React.Component {\n public constructor(props: IOrderLookupFieldInfoInput) {\n super(props);\n }\n\n public shouldComponentUpdate(nextProps: IOrderLookupFieldInfoInput): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n return (\n
\n {this._getOrderLookupFields().label}\n {this._getOrderLookupFields().error}\n {this._getOrderLookupFields().input}\n
\n );\n }\n\n /**\n * Function to create the order lookup fields.\n * @returns IOrderLookupFieldInfo.\n */\n private _getOrderLookupFields(): IOrderLookupFieldInfo {\n return {\n label: labelGroup(this.props.orderLookupLabelClassName, this.props.orderLookupLabel),\n input: (\n
\n \n
\n ),\n error: (\n
\n {this.props.isInputTypeError ? this.props.renderAlert(this.props.name) : ''}\n {this.props.isValidInputField ? this.props.renderAlert(this.props.name) : ''}\n
\n )\n };\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IActionContext } from '@msdyn365-commerce/core-internal';\nimport { ExtensibleEnumeration, StoreOperationsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport RenderOrderLookupAdditionalFieldInput from './components/order-lookup-additional-fields';\nimport RenderOrderLookupFormFields from './components/order-lookup-fields';\nimport {\n IOrderLookupProps,\n IOrderLookupSearchAdditionalFieldsData,\n orderStatusLookUpParametersType as orderStatusLookUpParametersTypes\n} from './order-lookup.props.autogenerated';\nimport {\n isAdditionalFieldValid,\n isEmailValid,\n renderErrorLabel,\n renderFieldErrors,\n renderRegisteredUserMessage,\n validateOrderLookupAdditionalField,\n validateOrderLookupField\n} from './utilities/order-lookup-utility';\n\n/**\n * OrderLookup view props.\n */\nexport interface IOrderLookupViewProps extends IOrderLookupProps<{}> {\n additionalProperties: JSX.Element[] | undefined;\n orderLookup: IModuleProps;\n orderLookupContainer: INodeProps;\n orderLookupAdditionalFieldContainer: INodeProps;\n paragraph?: React.ReactNode;\n heading?: React.ReactNode;\n submitButton?: INodeProps;\n submitButtonLabelText?: string;\n orderLookupForm?: INodeProps;\n renderOrderLookupInputField: JSX.Element | undefined;\n orderNumberInput?: JSX.Element | undefined;\n errorMessage?: React.ReactNode;\n fieldErrorMessage?: React.ReactNode;\n registeredUserMessage?: React.ReactNode;\n onChange?(event: React.ChangeEvent): void;\n submit?(): void;\n}\n\n/**\n * OrderLookupSearchValues -- supported values.\n */\nenum OrderLookupSearchValues {\n email = 'email',\n ordernumber = 'ordernumber'\n}\n\n/**\n * To render and handle state for additional order lookup fields.\n */\nexport interface IOrderLookupAdditionalFields {\n labelName: string;\n isValidFieldName: boolean;\n fieldValue: string;\n ariaLabel: string;\n additionalfieldErrorMessage: string;\n}\n\n/**\n * OrderLookup view props.\n */\nexport interface IOrderLookupFormState {\n orderNumber: string;\n email: string;\n isOrdNumberError: boolean;\n isEmailError: boolean;\n isValidEmailError: boolean;\n isReqError: boolean;\n isDisabled: boolean;\n isValidLookupField: boolean;\n isValidAdditionalLookupField: boolean;\n responseErrorMessage: string;\n additionalProperties: IOrderLookupAdditionalFields[];\n}\n\n/**\n *\n * OrderLookup component.\n * @extends {React.PureComponent>}\n */\nclass OrderLookup extends React.PureComponent, IOrderLookupFormState> {\n public orderNumberInputRef: React.RefObject;\n\n public emailInputRef: React.RefObject;\n\n public isEmailValue: boolean = false;\n\n private requiredErrorMessage: string | undefined;\n\n private emailValidationErrorMessage: string | undefined;\n\n private isOrderNumberValue: boolean = false;\n\n private orderLookupExtensibleEnum: ExtensibleEnumeration[] = [];\n\n public constructor(props: IOrderLookupProps<{}>) {\n super(props);\n this.orderNumberInputRef = React.createRef();\n this.emailInputRef = React.createRef();\n const { config } = this.props;\n const { orderLookupSearchAdditionalFields } = config;\n const additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n\n if (orderLookupSearchAdditionalFields) {\n for (const item of orderLookupSearchAdditionalFields) {\n additionalPropertyStates.push({\n labelName: item.labelName ?? '',\n isValidFieldName: true,\n fieldValue: '',\n ariaLabel: item.ariaLabel ?? '',\n additionalfieldErrorMessage: item.validationMessage ?? ''\n });\n }\n }\n\n this.state = {\n orderNumber: '',\n email: '',\n isOrdNumberError: false,\n isEmailError: false,\n isValidEmailError: false,\n isReqError: false,\n isDisabled: true,\n isValidLookupField: true,\n isValidAdditionalLookupField: false,\n responseErrorMessage: '',\n additionalProperties: additionalPropertyStates\n };\n }\n\n public render(): JSX.Element | null {\n const {\n config: { paragraph, heading },\n resources,\n context\n } = this.props;\n\n const {\n orderLookupDefaultHeadingText,\n orderLookupButtonLabel,\n orderLookupFormAriaLabel,\n orderLookupOrderNumberLabel,\n orderLookupOrderNumberAriaLabel,\n orderLookupSubmitAriaLabel,\n orderLookupFieldValidationErrorMessage\n } = resources;\n\n const { responseErrorMessage, isDisabled, orderNumber, isOrdNumberError } = this.state;\n\n const headingText = StringExtensions.isNullOrEmpty(heading?.text) ? orderLookupDefaultHeadingText : heading?.text;\n const headingTag = heading?.tag ?? 'h1';\n\n const moduleClassName = 'ms-order-lookup';\n const orderLookupContainerClassName = `${moduleClassName}__details`;\n const orderLookupHeadingClassName = `${orderLookupContainerClassName}__heading`;\n const orderLookupFormClassName = `${orderLookupContainerClassName}__form`;\n const orderLookupAdditionalFiledContainerClassName = `${orderLookupFormClassName}__additional-fields-container`;\n const orderLookupFormFieldsClassName = `${orderLookupFormClassName}__fields`;\n const orderNumberLabelClassName = `${orderLookupFormFieldsClassName}__order-number-label`;\n const orderNumberInputErrorClassName = `${orderLookupFormFieldsClassName}__order-number-input-error`;\n const submitButtonClassName = `${orderLookupFormClassName}__submit`;\n const labelErrorMessageClassName = `${moduleClassName}__error-message`;\n const registeredUserClassName = `${moduleClassName}__registered-user`;\n const signinLinkClassName = `${registeredUserClassName}__sign-in-link msc-btn`;\n\n const orderLookupHeading = (\n \n );\n\n const viewProps: IOrderLookupViewProps = {\n ...this.props,\n orderLookup: {\n moduleProps: this.props,\n className: moduleClassName\n },\n\n orderLookupContainer: {\n className: orderLookupContainerClassName\n },\n orderLookupAdditionalFieldContainer: {\n className: orderLookupAdditionalFiledContainerClassName\n },\n paragraph: paragraph && this._createParagraph(paragraph),\n heading: orderLookupHeading,\n\n renderOrderLookupInputField: this._renderOrderLookupInput(),\n orderLookupForm: {\n className: orderLookupFormClassName,\n tag: 'form',\n 'aria-label': orderLookupFormAriaLabel,\n name: 'orderLookupForm',\n role: 'form',\n autoComplete: 'off',\n onSubmit: this.handleSubmit\n },\n orderNumberInput: (\n \n ),\n\n submitButton: {\n className: submitButtonClassName,\n tag: Button,\n 'aria-label': orderLookupSubmitAriaLabel,\n type: 'submit',\n role: 'button',\n title: orderLookupButtonLabel,\n onClick: this.handleSubmit,\n disabled: isDisabled\n },\n\n submitButtonLabelText: orderLookupButtonLabel,\n errorMessage: renderErrorLabel(responseErrorMessage, labelErrorMessageClassName),\n fieldErrorMessage:\n (!this.state.isValidLookupField || this.state.isValidAdditionalLookupField) &&\n renderFieldErrors(orderLookupFieldValidationErrorMessage),\n registeredUserMessage: renderRegisteredUserMessage(\n resources,\n context.request.user.signInUrl ?? '',\n signinLinkClassName,\n registeredUserClassName\n ),\n onChange: this.onChange,\n submit: this.handleSubmit,\n additionalProperties: this._renderAdditionalFields()\n };\n return this.props.renderView(viewProps);\n }\n\n public async componentDidMount(): Promise {\n const { config, context } = this.props;\n const { actionContext } = context;\n const { orderStatusLookUpParametersType, orderLookupSearchAdditionalFields } = config;\n let isOrderLookupAdditionalFieldValid: boolean = false;\n let isOrderLookupFieldValid: boolean = false;\n\n const getExtensibleEnumerations = await StoreOperationsDataActions.getExtensibleEnumerationsAsync({ callerContext: actionContext });\n this.orderLookupExtensibleEnum =\n getExtensibleEnumerations.find(item => item.TypeName === 'OrderLookupAdditionalCriteriaType')?.ExtensibleEnumerations ?? [];\n\n const orderLookupParameter: string = orderStatusLookUpParametersType ?? '';\n const orderLookupAdditionalParameter: IOrderLookupSearchAdditionalFieldsData[] = orderLookupSearchAdditionalFields ?? [];\n\n isOrderLookupFieldValid = validateOrderLookupField(orderLookupParameter, this.orderLookupExtensibleEnum);\n isOrderLookupAdditionalFieldValid = validateOrderLookupAdditionalField(\n orderLookupAdditionalParameter,\n this.orderLookupExtensibleEnum\n );\n this.setLookupFieldState(isOrderLookupFieldValid, isOrderLookupAdditionalFieldValid);\n }\n\n /**\n * Handle text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handle paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\n const { config } = this.props;\n config.paragraph = event.target.value;\n };\n\n /**\n * Sets isValidLookupField after validating with extensible emun.\n * @param isValidField - Sets the property.\n * @param isValidAdditionalField - Sets the additional field property.\n */\n public setLookupFieldState(isValidField: boolean, isValidAdditionalField: boolean): void {\n this.setState({ isValidLookupField: isValidField, isValidAdditionalLookupField: isValidAdditionalField });\n }\n\n /**\n * HandleSubmit submit.\n */\n public readonly handleSubmit = (): void => {\n const { config, context } = this.props;\n const { actionContext } = context;\n const { additionalProperties, orderNumber, email } = this.state;\n const orderLookupValue = email;\n const { orderStatusLookUpParametersType } = config;\n const orderLookupName = orderStatusLookUpParametersType !== undefined ? orderStatusLookUpParametersType : '';\n const isValid: boolean = this._validateOrderLookupForm();\n if (isValid) {\n const actionContextValue: IActionContext = actionContext;\n const orderDetailsPath = Msdyn365.getUrlSync('orderDetails', actionContextValue) ?? '';\n if (orderDetailsPath) {\n const baseUrl = new URL(window.location.origin);\n const redirectUrl = new URL(orderDetailsPath, baseUrl);\n const searchParameters = redirectUrl.searchParams;\n\n searchParameters.set('confirmationId', orderNumber);\n searchParameters.set('propertyName', orderLookupName);\n searchParameters.set('propertyValue', orderLookupValue);\n\n if (ArrayExtensions.hasElements(additionalProperties)) {\n additionalProperties.map((item, index) => {\n const fieldName = !StringExtensions.isNullOrWhitespace(item.ariaLabel)\n ? item.ariaLabel.replace(' ', '').toLocaleLowerCase()\n : '';\n const fieldValue = !StringExtensions.isNullOrWhitespace(item.fieldValue) ? item.fieldValue : '';\n searchParameters.set(`field${index + 1}Name`, fieldName);\n searchParameters.set(`field${index + 1}Value`, fieldValue);\n return item;\n });\n }\n\n window.location.assign(redirectUrl.toString());\n }\n }\n };\n\n /**\n * OnChange event.\n * @param event - Value of input field.\n */\n public readonly onChange = (event: React.ChangeEvent): void => {\n const { additionalProperties } = this.state;\n const { config } = this.props;\n const { orderStatusLookUpParametersType } = config;\n const name = event.target.name || '';\n const value = event.target.value || '';\n this.isOrderNumberValue = !StringExtensions.isNullOrWhitespace(this.orderNumberInputRef.current?.value);\n this.isEmailValue = !StringExtensions.isNullOrWhitespace(this.emailInputRef.current?.value);\n\n if (orderStatusLookUpParametersType?.toLocaleLowerCase() === 'none') {\n this.isEmailValue = true;\n }\n\n this.setState({ responseErrorMessage: '' });\n const additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n let isAdditionalFieldError: boolean = true as boolean;\n let isKeyExistInAdditionalFieldArray: boolean = false as boolean;\n\n for (const item of additionalProperties) {\n const fieldName: string = item.ariaLabel.replace(' ', '');\n if (fieldName.toLocaleLowerCase() === name.toLocaleLowerCase()) {\n additionalPropertyStates.push({\n labelName: item.labelName,\n isValidFieldName: true,\n fieldValue: value,\n ariaLabel: item.ariaLabel,\n additionalfieldErrorMessage: item.additionalfieldErrorMessage\n });\n } else {\n additionalPropertyStates.push({\n labelName: item.labelName,\n isValidFieldName: item.isValidFieldName,\n fieldValue: item.fieldValue,\n ariaLabel: item.ariaLabel,\n additionalfieldErrorMessage: item.additionalfieldErrorMessage\n });\n }\n if (fieldName.toLocaleLowerCase() === orderStatusLookUpParametersType?.toLocaleLowerCase()) {\n isKeyExistInAdditionalFieldArray = true;\n }\n }\n\n for (const items of additionalPropertyStates) {\n if (StringExtensions.isNullOrWhitespace(items.fieldValue)) {\n isAdditionalFieldError = false;\n }\n }\n\n this.setState({ additionalProperties: additionalPropertyStates });\n\n if (!isKeyExistInAdditionalFieldArray) {\n switch (name.toLocaleLowerCase()) {\n case OrderLookupSearchValues.ordernumber: {\n this.setState({\n orderNumber: value,\n isOrdNumberError: false,\n isReqError: false\n });\n break;\n }\n case OrderLookupSearchValues.email: {\n this.setState({\n email: value,\n isEmailError: false,\n isValidEmailError: false,\n isReqError: false\n });\n break;\n }\n default: {\n this.setState({ isReqError: false });\n }\n }\n }\n\n if (\n this.isOrderNumberValue &&\n this.isEmailValue &&\n isAdditionalFieldError &&\n this.state.isValidLookupField &&\n !this.state.isValidAdditionalLookupField\n ) {\n this.setState({ isDisabled: false });\n } else {\n this.setState({ isDisabled: true });\n }\n };\n\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\n const { context } = this.props;\n const { request } = context;\n if (!text) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Render order lookup validation message.\n * @param className - Class name for error field.\n * @returns - JSX.Element.\n */\n private readonly _renderAlert = (className: string): JSX.Element => {\n const {\n resources: { orderLookupEmailValidationErrorMessage, orderLookupRequiredTextErrorMessage }\n } = this.props;\n\n const { isEmailError, email, isValidEmailError, isReqError } = this.state;\n if (isEmailError) {\n this.requiredErrorMessage = orderLookupRequiredTextErrorMessage;\n }\n\n if (!StringExtensions.isNullOrEmpty(email) && isValidEmailError) {\n this.emailValidationErrorMessage = orderLookupEmailValidationErrorMessage;\n }\n\n const isRequireError = isReqError;\n const isEmailValidError = isValidEmailError;\n const isValidEmailInput = className.toLocaleLowerCase() === OrderLookupSearchValues.email;\n return (\n <>\n {isRequireError && (\n \n {this.requiredErrorMessage}\n \n )}\n {isEmailValidError && isValidEmailInput && (\n \n {this.emailValidationErrorMessage}\n \n )}\n \n );\n };\n\n /**\n * Render order number validation message.\n * @param className - Class name for error field.\n * @returns - JSX.Element.\n */\n private readonly _renderOrderNumberAlert = (className: string): JSX.Element => {\n const {\n resources: { orderLookupOrderNumberValidationErrorMessage, orderLookupRequiredTextErrorMessage }\n } = this.props;\n\n const { isOrdNumberError, isReqError } = this.state;\n return (\n <>\n {isReqError && (\n \n {orderLookupRequiredTextErrorMessage}\n \n )}\n {isOrdNumberError && (\n \n {orderLookupOrderNumberValidationErrorMessage}\n \n )}\n \n );\n };\n\n private _renderAdditionalFields(): JSX.Element[] | undefined {\n const { additionalProperties } = this.state;\n const additionalFieldsInput: JSX.Element[] = [];\n for (const item of additionalProperties) {\n const name: string = item.ariaLabel.replace(' ', '');\n additionalFieldsInput.push(\n \n );\n }\n return additionalFieldsInput;\n }\n\n /**\n * Render Input field for order lookup.\n * @returns - IOrderLookupFieldInfo.\n */\n private readonly _renderOrderLookupInput = (): JSX.Element | undefined => {\n const { email, isEmailError, isValidEmailError } = this.state;\n const {\n config: { orderStatusLookUpParametersType },\n resources: { orderLookupEmailLabel, orderLookupEmailAriaLabel }\n } = this.props;\n\n switch (orderStatusLookUpParametersType) {\n case orderStatusLookUpParametersTypes.none:\n return undefined;\n case orderStatusLookUpParametersTypes.email:\n default:\n return (\n \n );\n }\n };\n\n /**\n * _validation for additional fields.\n * @returns - Returns IOrderLookupAdditionalFields[].\n */\n private readonly _additionalFieldValidation = (): IOrderLookupAdditionalFields[] => {\n const additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n for (const item of this.state.additionalProperties) {\n const isFieldValid: boolean = !StringExtensions.isNullOrWhitespace(item.fieldValue) && isAdditionalFieldValid(item.fieldValue);\n additionalPropertyStates.push({\n labelName: item.labelName,\n isValidFieldName: isFieldValid,\n fieldValue: item.fieldValue,\n ariaLabel: item.ariaLabel,\n additionalfieldErrorMessage: item.additionalfieldErrorMessage\n });\n }\n return additionalPropertyStates;\n };\n\n /**\n * _validateOrderLookupForm submit.\n * @returns - Returns boolean.\n */\n private readonly _validateOrderLookupForm = (): boolean => {\n const { config } = this.props;\n const { orderNumber, email } = this.state;\n const { orderStatusLookUpParametersType } = config;\n let additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n let isValid = false;\n let isDisable = false;\n\n if (ArrayExtensions.hasElements(this.state.additionalProperties)) {\n additionalPropertyStates = this._additionalFieldValidation();\n for (const item of additionalPropertyStates) {\n if (!item.isValidFieldName) {\n isDisable = true;\n }\n }\n\n if (isDisable) {\n this.setState({\n additionalProperties: additionalPropertyStates,\n isDisabled: true\n });\n }\n }\n\n if (StringExtensions.isNullOrWhitespace(orderNumber)) {\n this.setState({\n isOrdNumberError: true,\n isReqError: true,\n isDisabled: true\n });\n } else if (orderNumber.trim() !== orderNumber) {\n this.setState({\n isOrdNumberError: true,\n isReqError: false,\n isDisabled: true\n });\n } else if (\n orderStatusLookUpParametersType === orderStatusLookUpParametersTypes.email &&\n StringExtensions.isNullOrWhitespace(email)\n ) {\n this.setState({\n isEmailError: true,\n isReqError: true,\n isDisabled: true\n });\n } else if (orderStatusLookUpParametersType === orderStatusLookUpParametersTypes.email && !isEmailValid(email)) {\n this.setState({\n isValidEmailError: true,\n isDisabled: true\n });\n } else if (isDisable || !this.state.isValidLookupField || this.state.isValidAdditionalLookupField) {\n this.setState({\n isDisabled: true\n });\n } else {\n this.setState({\n isDisabled: false\n });\n isValid = true;\n }\n return isValid;\n };\n}\n\nexport default OrderLookup;\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 { IOrderLookupViewProps } from './order-lookup';\n\n/**\n * View component.\n * @param props - The view properties.\n * @returns - Returns JSX Element.\n */\nexport const OrderLookupViewComponent: React.FC = props => {\n const {\n orderLookup,\n orderLookupContainer,\n orderLookupAdditionalFieldContainer,\n heading,\n paragraph,\n orderLookupForm,\n renderOrderLookupInputField,\n orderNumberInput,\n errorMessage,\n submitButton,\n additionalProperties,\n registeredUserMessage,\n fieldErrorMessage\n } = props;\n return (\n \n \n {heading}\n {paragraph}\n \n {orderNumberInput}\n {renderOrderLookupInputField}\n {ArrayExtensions.hasElements(additionalProperties) && (\n \n {additionalProperties.map((item: JSX.Element) => (\n {item}\n ))}\n \n )}\n {fieldErrorMessage}\n \n {props.submitButtonLabelText}\n \n {errorMessage}\n \n {registeredUserMessage}\n \n \n );\n};\n\nexport default OrderLookupViewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCatalogId } from '@msdyn365-commerce/core';\nimport { ProductComparisonItem, ProductComparisonState } from '../product-comparison-state';\nimport { IProductComparisonButtonProps } from './product-comparison-button.props.autogenerated';\n\n/**\n * Represents product comparison view props.\n */\nexport interface IProductComparisonButtonViewProps extends IProductComparisonButtonProps<{}> {\n moduleProps: IModuleProps;\n productComparisonButton?: React.ReactNode;\n productComparisonPreview?: React.ReactNode;\n}\n\n/**\n * Represents the data which is required for the product comparison button to be rendered.\n */\nexport interface IProductComparisonButtonData {}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonFullProps extends IProductComparisonButtonProps {\n product: ProductSearchResult | SimpleProduct;\n catalogId: number;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonState {\n canProductBeAddedToProductComparison: boolean;\n currentProductsCount: number;\n comparisonItemId: string;\n}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductComparisonButton extends React.PureComponent {\n private static _productComparisonPreview?: React.ReactNode;\n\n private readonly _className: string;\n\n private readonly _instanceId: string;\n\n private readonly _shouldUsePreview: boolean;\n\n private static _renderProductComparisonPreview(props: IProductComparisonButtonFullProps): React.ReactNode {\n if (!ProductComparisonButton._productComparisonPreview && ArrayExtensions.hasElements(props.slots.productComparisonPreview)) {\n ProductComparisonButton._productComparisonPreview = props.slots.productComparisonPreview[0];\n }\n\n return ProductComparisonButton._productComparisonPreview;\n }\n\n private static _renderProductComparisonButton(\n className: string,\n buttonText: string | undefined,\n title: string,\n onClickHandler?: () => void\n ): React.ReactNode {\n const isDisabled = ObjectExtensions.isNullOrUndefined(onClickHandler);\n let content: React.ReactNode;\n if (buttonText) {\n content = (\n <>\n
\n
{buttonText}
\n \n );\n }\n return (\n \n );\n }\n\n public constructor(props: IProductComparisonButtonFullProps) {\n super(props);\n\n this._className = 'ms-product-comparison-button';\n this._instanceId = `${this._className}-${this.props.id}-${Random.Guid.generateGuid()}`;\n\n this.state = this._getNewState();\n\n this._shouldUsePreview = !ProductComparisonButton._productComparisonPreview;\n ProductComparisonButton._renderProductComparisonPreview(this.props);\n }\n\n public componentDidMount(): void {\n ProductComparisonState.instance(this.props.context.request).listModifiedEvent.subscribe({\n instanceId: this._instanceId,\n\n /**\n * Updates the state in case the state for the particular product was changed.\n */\n handler: () => {\n this.setState(this._getNewState());\n }\n });\n }\n\n public getSnapshotBeforeUpdate(previousProps: Readonly): void {\n if (previousProps.product.RecordId !== this.props.product.RecordId || previousProps.catalogId !== this.props.catalogId) {\n this.setState(this._getNewState());\n }\n }\n\n public componentWillUnmount(): void {\n ProductComparisonState.instance(this.props.context.request).listModifiedEvent.unsubscribe(this._instanceId);\n }\n\n public render(): React.ReactNode | null {\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n if (!isConsentGiven) {\n return null;\n }\n\n const viewProps: IProductComparisonButtonViewProps = {\n ...this.props,\n moduleProps: {\n moduleProps: this.props,\n className: this._className\n }\n };\n\n if (this._shouldUsePreview) {\n viewProps.productComparisonPreview = ProductComparisonButton._productComparisonPreview;\n }\n\n const buttonClassName = this.props.config.shouldDisplayText ? `${this._className}__button` : `${this._className}__icon`;\n\n if (!this.state.canProductBeAddedToProductComparison) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.removeFromComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n classnames(`${buttonClassName}__removing`, buttonClassName),\n buttonText,\n this.props.resources.removeFromComparisonButtonText,\n this._removeFromProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n const productsLimit = this._getProductsLimit();\n if (!ObjectExtensions.isNullOrUndefined(productsLimit) && productsLimit <= this.state.currentProductsCount) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonLimitReachedButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonLimitReachedButtonText\n );\n return this.props.renderView(viewProps);\n }\n\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonButtonText,\n this._addToProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n private _getProductsLimit(): number | undefined | null {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n if (viewport === 'xs' || viewport === 'sm') {\n return this.props.context.app.config.productComparisonMobileProductsLimit;\n }\n return this.props.context.app.config.productComparisonDesktopProductsLimit;\n }\n\n /**\n * Adds current product to a product comparison list.\n */\n private readonly _addToProductComparison: () => void = () => {\n const item = new ProductComparisonItem(this.props.product.RecordId, this.props.catalogId);\n ProductComparisonState.instance(this.props.context.request).addItem(item);\n };\n\n /**\n * Removes current product from the product comparison list where it was added earlier.\n */\n private readonly _removeFromProductComparison: () => void = () => {\n ProductComparisonState.instance(this.props.context.request).removeItemById(this.state.comparisonItemId);\n };\n\n private _getProdutComparisonDataByCatalogId(): ProductComparisonItem[] {\n const items = ProductComparisonState.instance(this.props.context.request).items;\n const catalogId = getCatalogId(this.props.context.request);\n const productByCatalogId = items?.filter(product => product.catalogId === catalogId) ?? [];\n return productByCatalogId;\n }\n\n /**\n * Retrieves the state of the component based on the comparison data.\n * @returns State object for the component.\n */\n private readonly _getNewState: () => IProductComparisonButtonState = () => {\n const comparisonItemId = ProductComparisonItem.getItemId(this.props.product.RecordId, this.props.catalogId);\n const products = this._getProdutComparisonDataByCatalogId();\n return {\n comparisonItemId,\n canProductBeAddedToProductComparison: !ProductComparisonState.instance(this.props.context.request).hasItemById(\n comparisonItemId\n ),\n currentProductsCount: products.length\n };\n };\n}\n\nexport default ProductComparisonButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductComparisonButtonViewProps } from './product-comparison-button';\n\n/**\n * Represents product comparison button view.\n * @param props - View props for product comparison button.\n * @returns Functional component of product comparison button.\n */\nexport const ProductComparisonButtonViewFunctionalComponent: React.FC = props => {\n const { productComparisonButton, productComparisonPreview } = props;\n\n return (\n \n {productComparisonButton}\n {productComparisonPreview}\n \n );\n};\n\nexport default ProductComparisonButtonViewFunctionalComponent;\n"],"names":["Link","_ref","text","className","href","ariaLabel","index","noclick","telemetryContent","payLoad","getPayloadObject","linkText","undefined","contentAction","etext","attribute","getTelemetryAttributes","React","Object","assign","onClick","onTelemetryClick","itemProp","content","Separator","separator","Breadcrumb","constructor","_pageType","this","props","context","request","urlTokens","pageType","getTelemetryObject","telemetryPageName","friendlyName","telemetry","_getRootLink","root","config","linkUrl","destinationUrl","error","_getCustomBreadcrumbLinks","itemPosition","links","length","map","value","key","toString","_getCategoryHierarchy","data","categoryHierarchy","result","_getFriendlyName","locale","NameTranslations","_Window$digitalData$p","MsDyn365","isBrowser","Window","digitalData","page","attributes","breadcrumb","push","Url","nameTranslations","_nameTranslation","nameTranslation","ArrayExtensions","hasElements","find","item","Language","toLowerCase","Text","_getPDPLinks","categoryPaths","product","url","requestUrl","_Window$digitalData$p3","_Window$digitalData$p2","document","window","Name","hideProductName","_goBack","history","back","_getPDPBackButton","query","referrer","role","resources","backToResultsText","render","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","app","breadcrumbType","linkSeparator","breadcrumbViewProps","_objectSpread","BreadcrumbContainer","moduleProps","classnames","tag","BreadcrumbList","BreadcrumbListItem","backButton","renderView","Module","Node","link","cta","btnClass","title","target","openInNewTab","deliveryData","ContentBlock","super","removePickUpFromDeliveryArray","response","filter","deliveryMethod","DeliveryType","isPickUpAvailable","_getActivePrice","async","products","state","productRecIds","prod","RecordId","projectDomain","ChannelId","apiSettings","channelId","CatalogId","catalogId","affliations","customerInput","GetCustomerInput","actionContext","requestContext","customer","getCustomer","CustomerAffiliations","forEach","affliation","aff","AffiliationId","RetailAffiliationId","CustomerId","AccountNumber","getActivePricesAsync","callerContext","queryResultSettings","Date","then","activePricesResponse","activePrice","ProductId","_activePrice$Extensio","_activePrice$Extensio2","priceIncGST","ExtensionProperties","prop","Key","specialPriceIncGST","setState","catch","trace","message","exception","debug","Error","_product$result","_this$state$products$","recordId","salesPriceInclGST","Value","DecimalValue","getDeliveryOptionsAsync","Promise","all","DeliveryOptions","reaction","_variantProduct$resul","variantProduct","variantRecordId","variantSalesPriceInclGST","AdjustedPrice","variantResponse","heading","paragraph","image","contentBlockTitle","Heading","headingTag","imageProps","gridSettings","imageSettings","contentBlockLinks","LinksComponent","contentBlockText","Msdyn365","contentBlockImage","contentBlockviewProps","moduleClass","contentBlockContainer","imageContainer","detailsContainer","_createDeliveryTable","pickUpTableHeader","deliveryTableHeader","deliveryOption","option","_option$DeliveryModes","DeliveryModes","ChargeDescription","ChargeAmount","toFixed","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","renderStoreHours","location","RegularStoreHours","storeHoursList","buildStoreHours","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","displayTime","storeOpenFrom","OpenFrom","storeOpenTo","OpenTo","InventoryStatus","inventoryResult","Code","Level","icon","inventoryClassName","Tick","ExclamationMark","Cross","xmlns","width","height","fill","viewBox","d","StoreSelectorLocationLineItemComponent","storeName","OrgUnitName","storeAddress","Address","phoneNumber","contacts","allPhoneContacts","contact","ContactTypeValue","IsPrivate","primaryPhoneContact","IsPrimary","Locator","extractPhoneNumber","Contacts","htmlFor","StoreSelectorLocationLines","_scrollIntoView","selectedLocationDiv","selectedLocationRef","current","parent","parentElement","scrollTop","offsetTop","clientHeight","_isCurrentLocation","alreadySelectedLocation","OrgUnitNumber","_isProductInStock","ItemAvailabilities","enableOutOfStockCheck","AvailableQuantity","_stockInventoryLabel","availabilityWithHours","ProductInventoryInformation","i","_availabilityWithHour","OrgUnitAvailability","OrgUnitLocation","InventoryLocationId","InventLocationId","StockLevelLabel","_mapResources","contactInfoHeader","contactText","storeHoursHeader","timeText","availabilityInfoHeader","availabilityText","storeHoursClosedText","outOfStock","outOfStockText","inStock","inStockText","currentLocation","selectedStoreLocationText","selectLocation","selectStoreText","selectLocationAriaLabelFormat","selectStoreAriaFormatText","setAsPreferredStoreText","setAsPreferredStoreTextAriaLabel","preferredStoreText","preferredStoreAriaLabel","storeHoursMondayText","storeHoursTuesdayText","storeHoursWednesdayText","storeHoursThursdayText","storeHoursFridayText","storeHoursSaturdayText","storeHoursSundayText","storeHoursMondayFullText","storeHoursTuesdayFullText","storeHoursWednesdayFullText","storeHoursThursdayFullText","storeHoursFridayFullText","storeHoursSaturdayFullText","storeHoursSundayFullText","storeCounter","componentDidUpdate","prevProps","selectedStoreLocationId","componentDidMount","locations","_stores","_sortStores","show","displayList","store","_renderStoreLocation","estimatedAvailabilityResult","x","_store$OrgUnitAvailab","_store$OrgUnitAvailab2","orgUnitLocation","deliveryOptions","OrgUnitPickUpDeliveryModes","storeInventoryResult","selected","StoreHours","preferredDistanceUnit","isCurrentLocation","isInStock","handlers","onSelected","onLocationSelected","onSetAsPreferredStore","onRemovePreferredStore","stockStatusLabel","storeLocatorView","preferredStoreLocationId","isPreferredStoreEnabled","isLocationDisabled","storePickUpOptionList","productPickUpOptionList","productPickUpDeliveryOptions","PhysicalAvailableInventoryLevelCode","PhysicalAvailableInventoryLevelLabel","stores","isPreferredStore","_value$OrgUnitAvailab","__decorate","observable","observer","StoreSelectorSearchForm","_searchTextChanged","inputValue","e","searchTermChanged","_onSubmit","preventDefault","performSearch","searchButtonAriaLabel","name","autoComplete","onSubmit","type","placeholder","searchPlaceholderText","onChange","isBingMapsDisabled","disabled","StoreSelectorEmptyMessage","emptyLocationsText","StoreSelectorWaiting","StoreSelectorTermsOfService","_ref2","onTextChange","editableLink","editProps","StoreSelectorFoundLocationsMessage","_ref3","searchRadius","isSeeAllStore","storeCountMessage","milesShortText","storeCountMessageInKm","storeAllCountMessage","replace","mode","searchRadiusUnit","style","StoreSelector","handleLinkTextChange","event","termsOfServiceLink","handleHeadingChange","_attachMapAutoSuggest","autoSuggestOptions","channel","storeSelectorStateManager","isMapApiLoaded","autoSuggestManager","Microsoft","Maps","loadModule","callback","options","countryCode","ChannelCountryRegionISOCode","AutosuggestManager","attachAutosuggest","id","_onSuggestionSelected","errorCallback","credentials","BingMapsApiKey","_this$props$data$stor","_searchTermChanged","formattedSuggestion","_performSearch","_setPreferredStore","_preferedStore$OrgUni","_preferedStore$OrgUni2","_preferedStore$OrgUni3","storeId","cookies","storeLocations","availabilitiesWithHours","modeEnum","pickupInStore","findStores","preferedStore","setPreferredStoreLocation","isConsentGiven","Latitude","Longitude","_removePreferredStore","clearPreferredStore","_setSelectedStore","setSelectedStoreLocationId","searchTerm","hasSearched","isSearchInProgress","isSeeAllStoreValue","geoLocate","trim","_updateLocations","latitude","longitude","_getAndUpdateStoreLocation","showAllStores","styleEnum","dialog","inline","isDialogOpen","navigator","geolocation","getCurrentPosition","position","coords","PERMISSION_DENIED","timeout","_closeDialog","closeDialog","_setOrgUnitStoreInformation","styleDefault","setOrgUnitStoreInformation","showMapViewLink","isDialog","orgUnitStoreInformation","resolve","radius","lookupRadius","calRadius","distanceUnitValue","kilometers","modeDefault","preferredStore","lat","long","lastInlineStoreLocation","lastInlineShownStoreInfo","setLastInlineStoreInfo","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","input","GetFullAvailableInventoryNearbyInput","searchCriteria","DefaultWarehouseOnly","FilterByChannelFulfillmentGroup","ProductIds","getEstimatedAvailabilityAsync","resp","ProductWarehouseInventoryAvailabilities","warning","getFullAvailableInventoryNearby","_onOrgUnitLocationSelected","deliveryMode","_this$props$data$stor4","autoSuggestionEnabled","setTimeout","_this$props$data$stor2","_this$props$data$stor3","BingMapsEnabled","_this$props$data$stor5","_this$props$context","_this$props$context2","loadMapApi","lang","DefaultLanguageId","market","_this$props$data$stor6","_this$props$data$stor7","_this$props$context3","_this$props$context4","when","_this$props$data$stor8","_this$props$data$stor9","_this$props$data$stor10","isSameContext","shouldComponentUpdate","nextProps","_storeSelectorStateMa","_storeSelectorStateMa2","setAsPreferredStore","appConfig","inlineView","locatorView","hideInventory","listMapViewState","configHeading","storeLocatorHeaderText","storeSelectorHeaderText","kilometersShortText","viewProps","ModuleProps","Modal","classname","autoFocus","fade","isOpen","onClosed","horizontalPosition","verticalPosition","toggle","HeaderContainerProps","ModalHeader","HeaderProps","onEdit","FooterContainerProps","ModalFooter","BodyContainerProps","ModalBody","locationsMessage","search","spinner","locationsList","outOfStockThreshold","enableStockCheck","StoreId","noLocationsMessage","terms","headerText","callbacks","selectedLocation","getAndUpdateUserLocation","buttons","button","displayOnlyTo","HeadingTag","_shouldShowTo","isLoggedIn","displayTo","loggedOutOnly","loggedInOnly","src","alt","altText","contentBlockButtons","FarmlandsPromotionBlockButton","user","isAuthenticated","shouldShowModule","buttonsContainer","ProductSpecification","ProductSpecificationTableProps","ProductSpecificationTableBodyProps","productSpecificationResult","row","_row$props$cellData$p","_row$props$cellData$p2","cellData","dangerouslySetInnerHTML","__html","removeUndefinedAttributes","histogramItem","buttonProps","starLabel","bar","percentage","histogramItems","histogramProps","buildReviewCard","cardProps","headerProps","rating","date","cardBodyProps","reviewProps","reviewTitle","reviewText","responseProps","responseName","responseDate","responseText","controlsProps","ratingHelpfulLabel","like","dislike","edit","report","createReviewModal","modal","modalHeader","modalBody","form","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","modalFooter","submitButton","cancelButton","createReportModal","reported","headerSubmitted","header","reportSubmittedMessage","reportMessage","radioButtons","succesfulButton","averageRating","filterByDropdown","noReviewsMessage","noReviewsWithFilterMessage","pageControls","refineReviewsProps","reportReviewModal","reviewsListProps","reviewCards","reviewCount","reviewModal","sortByDropdown","userReview","isFilterApplied","review","AccountProfileEdit","moduleClassName","onTextBoxChange","givenName","surname","emailRegex","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","clearInterval","isInitialized","invalidEmailAddressError","obj","PRE","_htmlDecode","ID","email","PAT","PAT_DESC","required_field","requiredFieldMissingError","verifying_blurb","loadingMessage","EmailRegex","defaultRegex","source","nextState","viewState","isShowLoading","accountProfileEdit","loading","AccountProfileEditLoadingIconComponent","AccountProfileEditLoadingMessageComponent","defaultAADConainer","display","aadConainer","accountProfileEditLocalAccount","_renderLocalAccount","str","createElement","innerHTML","childNodes","nodeValue","localAccount","items","_renderInput","firstNameLabelText","firstNameMaxLength","lastNameLabelText","lastNameMaxLength","errorMessage","AccountProfileEditErrorComponent","requiredFieldMissingSummaryError","fieldIncorrectError","buttonsWrapper","AccountProfileEditButtonComponent","saveButtonAriaLabel","saveButtonText","cancelButtonText","verificationSuccessModal","verificationSuccessModalMessage","showEmail","emailAddressLabelText","labelText","maxLength","pattern","wrapper","label","AccountProfileEditLabelComponent","forId","AccountProfileEditInputComponent","AccountProfileEditItem","AccountProfileEditLoading","LocalAccount","Button","errorClassName","GetMaxLength","parsedMaxLength","Number","parseInt","isNaN","SearchBar","onSearchTextChange","ev","searchText","onSearch","handleKeyUp","keyCode","KeyCodes","Enter","searchPlaceholderLabel","onKeyUp","DataGrid","renderGridHeader","rowClassName","columns","column","reactKey","renderGridRow","_column$onRender","fieldName","onRender","call","loadDataInternal","loadData","isLoading","_unused","hasError","paging","loadMore","sortData","sorting","ascending","sort","item1","item2","value1","value2","compareResult","filterData","c","isSearchable","columnValue","indexOf","getDataToDisplay","itemsCount","pageSize","slice","hasMore","defaultSorting","genericErrorMessage","loadingLabel","businessPartnerLoadMore","noDataMessage","BusinessPartnerUsersTable","getColumns","businessUserTableNameHeadingText","businessUserTableEmailHeadingText","businessUserTableSpendingLimitHeadingText","renderSelectButton","businessPartnerUser","onSelect","select","getBusinessPartnerUsers","BusinessPartnersDataActions","bypassCache","businessPartner","BusinessPartnerId","StatusValue","FirstName","LastName","spendingLimitStr","ObjectExtensions","isNullOrUndefined","SpendingLimit","cultureFormatter","formatCurrency","businessPartnerSearchCustomer","BusinessPartnersTable","businessPartnerName","getBusinessPartners","businessPartnerSearchCompany","BusinessPartners","onSelectBusinessPartner","selectedBusinessPartner","onSelectBusinessPartnerUser","setAccountSelectionCookie","homeUrl","removeAccountSelectionCookie","businessPartnersHeading","businessPartnersProps","businessPartnersTable","businessPartnerUsersTable","backToBusinessPartnersLink","CheckInConfirmationComponent","confirmationText","shouldShowQrCode","channelReferenceIdLabel","channelReferenceId","QRCode","size","CheckInErrorComponent","CheckInForPickup","checkInForOrderPickup","packingSlipId","additionalInformationToSubmit","additionalInformationList","additionalInformationKeyValuePair","_additionalInformatio","formKey","resourceId","extensionPropertyList","additionalInformation","StringValue","SalesOrdersDataActions","headerErrorMessage","isCheckedIn","_this$props$context$r","_this$props$context$r2","_this$props$context$r3","_this$props$context$r4","params","isEditor","isPreview","requiredParameterMissingErrorMessage","additionalInformationKeys","_this$props$context$r5","isHeaderError","headerError","confirmationComponent","defaultConfirmationText","confirmationIdLabel","additionalInformationValues","additionalInformationHeading","_props$config$additio","FormBuilder","additionalInformationDefaultHeading","submitButtonText","additionalInformationSubmitButtonText","keys","requiredValueMissingErrorMessage","WaitingComponent","Waiting","CheckoutExpressPaymentContainer","_this$props$data$chec","_getItems","slots","primary","_handleCheckoutExpressContainerHeadingChange","checkoutExpressPaymentContainerHeading","isReady","shouldHideExpressPaymentContainer","checkout","shippingAddressFromExpressCheckout","_this$props$data$chec2","isExpressPaymentModulesReady","includes","_this$props$data$chec3","_this$props$data$chec4","extensionPropertyKey","paymentTenderType","isModuleReady","property","BooleanValue","_this$props$data$chec5","isExpressCheckoutApplied","checkoutExpressPaymentSectionLoadingMessage","shouldHideExpressPaymentContainerClassName","checkoutPlainContainerProps","waiting","_renderMsdyn365Text","ContainerItemsComponent","isLoadingClassName","labelGroup","renderErrorLabel","responseErrorMessage","errorMessageClassName","renderRegisteredUserMessage","signInUrl","signInLinkClassName","registeredUserClassName","orderLookupRegisteredUserText","orderLookupViewAccountText","orderLookupSignInLinkText","infoMessage","signInText","renderFieldErrors","orderLookupFieldValidationErrorMessage","RenderOrderLookupAdditionalFieldInput","_getOrderLookupAdditionalFields","additionalFieldLabel","additionalFieldError","additionalFieldInput","additionalFieldLabelClassName","inputType","isValidAdditionalFieldName","additionalFieldValidationMessage","RenderOrderLookupFormFields","_getOrderLookupFields","orderLookupLabelClassName","orderLookupLabel","ref","inputReference","fieldErrorClassName","isInputTypeError","renderAlert","isValidInputField","OrderLookupSearchValues","OrderLookup","isEmailValue","isOrderNumberValue","orderLookupExtensibleEnum","handleTextChange","handleParagraphChange","handleSubmit","additionalProperties","orderNumber","orderLookupValue","orderStatusLookUpParametersType","orderLookupName","_validateOrderLookupForm","_Msdyn365$getUrlSync","actionContextValue","orderDetailsPath","baseUrl","URL","origin","redirectUrl","searchParameters","searchParams","set","StringExtensions","isNullOrWhitespace","toLocaleLowerCase","fieldValue","_this$orderNumberInpu","_this$emailInputRef$c","orderNumberInputRef","emailInputRef","additionalPropertyStates","isAdditionalFieldError","isKeyExistInAdditionalFieldArray","labelName","isValidFieldName","additionalfieldErrorMessage","ordernumber","isOrdNumberError","isReqError","isEmailError","isValidEmailError","isValidLookupField","isValidAdditionalLookupField","isDisabled","_renderAlert","orderLookupEmailValidationErrorMessage","orderLookupRequiredTextErrorMessage","requiredErrorMessage","isNullOrEmpty","emailValidationErrorMessage","isRequireError","isEmailValidError","isValidEmailInput","_renderOrderNumberAlert","orderLookupOrderNumberValidationErrorMessage","_renderOrderLookupInput","orderLookupEmailLabel","orderLookupEmailAriaLabel","_additionalFieldValidation","isFieldValid","RegExp","test","isValid","isDisable","isEmailValid","orderLookupSearchAdditionalFields","_item$labelName","_item$ariaLabel","_item$validationMessa","validationMessage","_heading$tag","_context$request$user","orderLookupDefaultHeadingText","orderLookupButtonLabel","orderLookupFormAriaLabel","orderLookupOrderNumberLabel","orderLookupOrderNumberAriaLabel","orderLookupSubmitAriaLabel","headingText","orderLookupContainerClassName","orderLookupFormClassName","orderLookupAdditionalFiledContainerClassName","orderLookupFormFieldsClassName","orderNumberLabelClassName","orderNumberInputErrorClassName","submitButtonClassName","signinLinkClassName","orderLookupHeading","orderLookup","orderLookupContainer","orderLookupAdditionalFieldContainer","_createParagraph","renderOrderLookupInputField","orderLookupForm","orderNumberInput","submitButtonLabelText","fieldErrorMessage","registeredUserMessage","submit","_renderAdditionalFields","_getExtensibleEnumera","_getExtensibleEnumera2","isOrderLookupAdditionalFieldValid","isOrderLookupFieldValid","getExtensibleEnumerations","StoreOperationsDataActions","TypeName","ExtensibleEnumerations","orderLookupAdditionalParameter","validateOrderLookupField","orderStatusLookUpParameter","isValidField","validateOrderLookupAdditionalField","orderStatusLookUpAdditionalParameters","isValidAdditionalField","_item$fieldKey","fieldKey","validateAdditionalFieldWithProxy","some","setLookupFieldState","additionalFieldsInput","OrderLookupViewComponent","_orderLookupForm$clas","_submitButton$classNa","ProductComparisonButton","_addToProductComparison","ProductComparisonItem","ProductComparisonState","instance","addItem","_removeFromProductComparison","removeItemById","comparisonItemId","_getNewState","getItemId","_getProdutComparisonDataByCatalogId","canProductBeAddedToProductComparison","hasItemById","currentProductsCount","_className","_instanceId","Random","Guid","generateGuid","_shouldUsePreview","_productComparisonPreview","_renderProductComparisonPreview","productComparisonPreview","buttonText","onClickHandler","listModifiedEvent","subscribe","instanceId","handler","getSnapshotBeforeUpdate","previousProps","componentWillUnmount","unsubscribe","buttonClassName","shouldDisplayText","removeFromComparisonButtonText","productComparisonButton","_renderProductComparisonButton","productsLimit","_getProductsLimit","addToComparisonLimitReachedButtonText","addToComparisonButtonText","viewport","isMobile","variant","VariantType","Browser","productComparisonMobileProductsLimit","productComparisonDesktopProductsLimit","_items$filter","getCatalogId","ProductComparisonButtonViewFunctionalComponent"],"sourceRoot":""}