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EAAwCpgB,QAE7FqgB,EACA7e,EAAMqgB,mBACHvB,EAEAxgB,EAAAA,cAAAA,EAAAA,SAAA,KAAG0gB,EAAgBtH,EAAqBlZ,EAAOmZ,GAA6BsH,IAGpF3gB,EAAAA,cAACuK,EAAAA,KAAI,CACDxC,UAAW,mCAC8B,QAArCgY,EAAA/b,EAAKyV,0BAA0BvV,cAAM,IAAA6b,GAArCA,EAAuCrG,iBAAiBsI,WAAa,GAAK,SAG7EvB,IAGTzgB,EAAAA,cAACuK,EAAAA,KAAIF,OAAAC,OAAA,GAAK4V,GAAuBU","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2c_order_history/aaa_b2c_order_history.tsx?7f36","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_b2c_order_history/aaa_b2c_order_history.view.tsx?2aa3","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/b2b-requests-status.view.tsx?0173","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/components/search.categorysuggest.tsx?455d","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/components/search.mobile.empty.tsx?cf46","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/components/search.form.tsx?b3a3","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/components/search.keywordsuggest.tsx?f97a","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/components/search.productsuggest.tsx?3b68","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/search.view.tsx?91d2","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/store-selector.view.tsx?fc62","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-button.tsx?c1c2","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-error.tsx?347f","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-input.tsx?fd25","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-label.tsx?aab5","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-loading-icon.tsx?d70e","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-loading-message.tsx?d239","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/components/password-reset-verification-success.tsx?3c81","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/password-reset-verification.tsx?691f","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset-verification/password-reset-verification.view.tsx?dffa","webpack://Msdyn365.Commerce.Online/./src/modules/country-picker/country-picker.tsx?4fcb","webpack://Msdyn365.Commerce.Online/./src/modules/country-picker/country-picker.view.tsx?0036","webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.tsx?e0bd","webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.view.tsx?fdce","webpack://Msdyn365.Commerce.Online/./src/modules/invoice-details/components/invoice-details-header.tsx?a6c6","webpack://Msdyn365.Commerce.Online/./src/modules/invoice-details/components/invoice-details-payment-summary.tsx?3434","webpack://Msdyn365.Commerce.Online/./src/modules/invoice-details/components/invoice-details-products.tsx?8f29","webpack://Msdyn365.Commerce.Online/./src/modules/invoice-details/helpers/invoice-data.ts?608f","webpack://Msdyn365.Commerce.Online/./src/modules/invoice-details/invoice-details.tsx?b51a","webpack://Msdyn365.Commerce.Online/./src/modules/invoice-details/invoice-details.view.tsx?3784","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/invoice-error-component.tsx?2ff9","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/invoices-filter-component.tsx?5fd4","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?f5e1","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?48db","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9790","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/make-payment-component.tsx?1427","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/pay-invoice-component.tsx?6f61","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/request-invoice-button.tsx?9eb0","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/helpers/invoice-data.ts?00b1","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/helpers/invoice-status.ts?5841","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/helpers/pay-invoices.ts?30c0","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/components/request-invoice-modal.tsx?f9b5","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/invoices-list.tsx?2d55","webpack://Msdyn365.Commerce.Online/./src/modules/invoices-list/invoices-list.view.tsx?8b51","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-pickup-option-list.tsx?7a25","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-lines.tsx?87ff","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-search-form.tsx?fb9a","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-small-components.tsx?4335","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/pickup-option-list.tsx?dae0","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers.ts?fe27","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/store-selector-location-line-item/store-selector-location-line-item.components.tsx?923d","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/components/selected-store/selected-store.tsx?bfbc","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.tsx?e416","webpack://Msdyn365.Commerce.Online/./src/modules/store-selector/store-selector.view.tsx?71a6","webpack://Msdyn365.Commerce.Online/./src/modules/subscribe/subscribe.tsx?9fea","webpack://Msdyn365.Commerce.Online/./src/modules/subscribe/subscribe.view.tsx?19c8","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/store-selector.view.tsx?ccdd"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IAaaB2COrderHistoryData } from './aaa_b2c_order_history.data';\r\nimport { IAaa_b2c_order_historyProps } from './aaa_b2c_order_history.props.autogenerated';\r\nimport { getRequestOrderHistoryB2CAsync } from '../../dataActions/DataActionExtension.g';\r\nimport _ from 'lodash';\r\n\r\nexport interface IAaa_b2c_order_historyViewProps extends IAaa_b2c_order_historyProps {\r\n requestOrderLines: [];\r\n currentPageItems: [];\r\n headers: [];\r\n totalItemPerPage: number;\r\n activePage: number;\r\n pageCount: number;\r\n handlePageItemsChange: any;\r\n handleMouseEnterEvent: any;\r\n handleMouseOutEvent: any;\r\n mouseOverIndex: number;\r\n handleOnChangeInput: any;\r\n getOrderDetailPageUrl: any;\r\n searchItems: any;\r\n resetItems: any;\r\n searchString: string;\r\n searchPageItems: [];\r\n isLoading: boolean;\r\n}\r\nexport interface IAaa_b2c_order_historyState {\r\n requestOrderLines: [];\r\n currentPageItems: [];\r\n headers: any;\r\n customerInfo: { AccountNumber: '' };\r\n products: [];\r\n totalItemPerPage: number;\r\n activePage: number;\r\n pageCount: number;\r\n mouseOverIndex: number;\r\n searchString: string;\r\n searchPageItems: [];\r\n isLoading: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * Aaa_b2c_order_history component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass Aaa_b2c_order_history extends React.PureComponent, IAaa_b2c_order_historyState> {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n requestOrderLines: [],\r\n currentPageItems: [],\r\n headers: ['Stockist Name', 'Order Number', 'Individual Price', 'Total Price', 'Snapshot ID', 'Status'],\r\n customerInfo: { AccountNumber: '' },\r\n products: [],\r\n totalItemPerPage: this.props.config.totalItemPerPage ? this.props.config.totalItemPerPage : 0,\r\n activePage: 1,\r\n pageCount: 0,\r\n mouseOverIndex: 0,\r\n searchString: '',\r\n searchPageItems: [],\r\n isLoading: true\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n if (this.props.data.customerInformation.result) {\r\n const customerInfo = this.props.data.customerInformation.result;\r\n await this.getRequestOrderList(customerInfo);\r\n }\r\n }\r\n\r\n public getRequestOrderList = async (customerInfo: any) => {\r\n const response: any = await getRequestOrderHistoryB2CAsync(\r\n {\r\n callerContext: this.props.context.actionContext,\r\n\r\n queryResultSettings: {}\r\n },\r\n ''\r\n );\r\n\r\n if (response.RequestOrder) {\r\n this.mappedRequestOrder(response.RequestOrder, customerInfo);\r\n }\r\n };\r\n public mappedRequestOrder(requestOrders: any, customerInfo: any) {\r\n const mappedProducts: any = [];\r\n for (const requestOrder of requestOrders) {\r\n if (requestOrder.RequestOrderId) {\r\n requestOrder.imageUrl = requestOrder.LowResImageURL;\r\n requestOrder.stockistName = requestOrder.b2BCUSTOMERNAME ? requestOrder.b2BCUSTOMERNAME : '-';\r\n requestOrder.orderNumber = requestOrder.RequestOrderId;\r\n requestOrder.totalPrice = `$${requestOrder.B2CPrice.toLocaleString()}`;\r\n requestOrder.orderLinesPriceInfo = [];\r\n const parseData = JSON.parse(requestOrder.RequestOrderLines);\r\n _.forEach(parseData, (orderLine: any) => {\r\n requestOrder.orderLinesPriceInfo.push({ name: orderLine.DetailName, price: orderLine.B2CPrice });\r\n });\r\n requestOrder.snapShotId = requestOrder.Snapshotid;\r\n requestOrder.statusName = requestOrder.StatusName;\r\n requestOrder.lineNum = requestOrder.LineNum.toString();\r\n mappedProducts.push(requestOrder);\r\n }\r\n }\r\n // if manage orders length > 0 set active 1 per page 5,\r\n // divided mangage orders / per page 50/5=10 pagaes\r\n // if active is 1 page pick 0 to active -1 and push into cureent page items\r\n const currentPageItems = this.currentPageItems(this.state.activePage, this.state.totalItemPerPage, mappedProducts);\r\n this.setState({\r\n requestOrderLines: mappedProducts,\r\n customerInfo: customerInfo,\r\n currentPageItems: currentPageItems,\r\n isLoading: false,\r\n pageCount:\r\n mappedProducts.length <= this.state.totalItemPerPage ? 1 : Math.ceil(mappedProducts.length / this.state.totalItemPerPage)\r\n });\r\n }\r\n\r\n private handleMouseEnterEvent = (index: number) => {\r\n this.setState({ mouseOverIndex: index });\r\n };\r\n private handleMouseOutEvent = () => {\r\n this.setState({ mouseOverIndex: 0 });\r\n };\r\n private handlePageItemsChange = (totalItemPerPage: any, activePage: number) => {\r\n let pageCount: number;\r\n let currentPageItems: any;\r\n if (this.state.searchPageItems.length > 0) {\r\n pageCount =\r\n this.state.searchPageItems.length <= totalItemPerPage ? 1 : Math.ceil(this.state.searchPageItems.length / totalItemPerPage);\r\n currentPageItems = this.currentPageItems(activePage, totalItemPerPage, this.state.searchPageItems);\r\n } else {\r\n pageCount =\r\n this.state.requestOrderLines.length <= totalItemPerPage\r\n ? 1\r\n : Math.ceil(this.state.requestOrderLines.length / totalItemPerPage);\r\n currentPageItems = this.currentPageItems(activePage, totalItemPerPage, this.state.requestOrderLines);\r\n }\r\n this.setState({ pageCount, totalItemPerPage, activePage, currentPageItems });\r\n };\r\n private currentPageItems = (activePage: number, totalItemPerPage: number, requestOrderLines: any) => {\r\n const getEndOrderIndexInPage = activePage * totalItemPerPage - 1;\r\n let getStartOrderIndexInPage = getEndOrderIndexInPage - totalItemPerPage + 1;\r\n const currentPageItems: any = [];\r\n if (getEndOrderIndexInPage && getEndOrderIndexInPage) {\r\n for (getStartOrderIndexInPage; getStartOrderIndexInPage <= getEndOrderIndexInPage; getStartOrderIndexInPage++) {\r\n if (requestOrderLines[getStartOrderIndexInPage]) {\r\n currentPageItems.push(requestOrderLines[getStartOrderIndexInPage]);\r\n }\r\n }\r\n }\r\n return currentPageItems;\r\n };\r\n private handleOnChangeInput = (searchString: string) => {\r\n this.setState({ searchString: searchString.toLowerCase() });\r\n };\r\n private getOrderDetailPageUrl = (requestId: string, lineNum: number) => {\r\n const request = this.props.context.request;\r\n let orderDetailUrl = request.url.requestUrl.origin;\r\n if (request.sitePath) {\r\n orderDetailUrl = orderDetailUrl + request.sitePath;\r\n }\r\n if (requestId && request) {\r\n window.location.href = `${orderDetailUrl}${this.props.config.redirectToOrderDetailUrl}?requestOrderId=${requestId}&lineNum=${lineNum}`;\r\n }\r\n };\r\n private searchItems = () => {\r\n if (this.state.searchString) {\r\n const searchPageItems: any = this.state.requestOrderLines.filter((f: any) => {\r\n return f.b2BCUSTOMERNAME.toLowerCase().includes(this.state.searchString);\r\n });\r\n console.log(searchPageItems);\r\n const currentPageItems = this.currentPageItems(1, this.state.totalItemPerPage, searchPageItems);\r\n this.setState({\r\n activePage: 1,\r\n searchPageItems,\r\n currentPageItems: currentPageItems,\r\n pageCount:\r\n searchPageItems.length <= this.state.totalItemPerPage\r\n ? 1\r\n : Math.ceil(searchPageItems.length / this.state.totalItemPerPage)\r\n });\r\n }\r\n };\r\n private resetItems = () => {\r\n const currentPageItems = this.currentPageItems(1, this.state.totalItemPerPage, this.state.requestOrderLines);\r\n this.setState({\r\n searchPageItems: [],\r\n searchString: '',\r\n currentPageItems,\r\n activePage: this.state.activePage,\r\n pageCount:\r\n this.state.requestOrderLines.length <= this.state.totalItemPerPage\r\n ? 1\r\n : Math.ceil(this.state.requestOrderLines.length / this.state.totalItemPerPage)\r\n });\r\n };\r\n public render(): JSX.Element | null {\r\n if (!this.state.customerInfo) {\r\n return null;\r\n }\r\n const viewProps: IAaa_b2c_order_historyViewProps = {\r\n ...(this.props as IAaa_b2c_order_historyProps),\r\n requestOrderLines: this.state.requestOrderLines,\r\n headers: this.state.headers,\r\n activePage: this.state.activePage,\r\n totalItemPerPage: this.state.totalItemPerPage,\r\n currentPageItems: this.state.currentPageItems,\r\n pageCount: this.state.pageCount,\r\n handlePageItemsChange: this.handlePageItemsChange,\r\n handleMouseEnterEvent: this.handleMouseEnterEvent,\r\n handleMouseOutEvent: this.handleMouseOutEvent,\r\n mouseOverIndex: this.state.mouseOverIndex,\r\n handleOnChangeInput: this.handleOnChangeInput,\r\n getOrderDetailPageUrl: this.getOrderDetailPageUrl,\r\n searchItems: this.searchItems,\r\n resetItems: this.resetItems,\r\n searchString: this.state.searchString,\r\n searchPageItems: this.state.searchPageItems,\r\n isLoading: this.state.isLoading\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n}\r\n\r\nexport default Aaa_b2c_order_history;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IAaa_b2c_order_historyViewProps } from './aaa_b2c_order_history';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\r\n\r\nexport default (props: IAaa_b2c_order_historyViewProps) => {\r\n const style: any = {\r\n pagination: {\r\n marginRight: '70px',\r\n marginBottom: '20px'\r\n },\r\n a: {\r\n color: 'black',\r\n float: 'left',\r\n padding: '8px 16px',\r\n textDecoration: 'none',\r\n transition: 'background-color .3s',\r\n border: '1px solid #ddd',\r\n cursor: 'pointer'\r\n },\r\n active: {\r\n backgroundColor: '#031C36',\r\n color: 'white',\r\n border: '1px solid #031C36'\r\n },\r\n hover: {\r\n backgroundColor: '#ddd'\r\n },\r\n disabled: {\r\n backgroundColor: '#eeeeee',\r\n cursor: 'not-allowed'\r\n },\r\n searchInput: {\r\n height: '37px',\r\n width: '300px',\r\n marginRight: '10px'\r\n }\r\n };\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n lg: { q: 'w=100&h=100&m=6', w: 100, h: 100 },\r\n xl: { q: 'w=100&h=100&m=6', w: 100, h: 100 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n return (\r\n <>\r\n {props.requestOrderLines.length > 0 && !props.isLoading && (\r\n
\r\n props.handleOnChangeInput(event.target.value)}\r\n />\r\n props.searchItems()}\r\n >\r\n {'Search'}\r\n \r\n \r\n

\r\n {props.searchString\r\n ? `${props.searchPageItems.length} / ${props.requestOrderLines.length}`\r\n : props.requestOrderLines.length}{' '}\r\n Items Available\r\n

\r\n
\r\n )}\r\n
\r\n \r\n {props.currentPageItems.length > 0 && (\r\n \r\n ;\r\n })}\r\n \r\n )}\r\n {props.currentPageItems.map((line: any, index: number) => {\r\n return (\r\n \r\n \r\n \r\n \r\n 0 ? 45 : 0\r\n }}\r\n >\r\n {line.orderLinesPriceInfo.length > 0 ? (\r\n line.orderLinesPriceInfo.map((orderLinePriceInfo: any, index: number) => {\r\n return (\r\n
\r\n {orderLinePriceInfo.name}\r\n - ${orderLinePriceInfo.price.toLocaleString()}\r\n
\r\n );\r\n })\r\n ) : (\r\n -\r\n )}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n
\r\n {props.headers.map((h: string, index: number) => {\r\n return {h}
\r\n \r\n {line.stockistName}{line.orderNumber}{line.totalPrice}{line.Snapshotid ? line.Snapshotid : '-'}{line.statusName}\r\n props.getOrderDetailPageUrl(line.orderNumber, line.lineNum)}\r\n >\r\n {'View Details'}\r\n \r\n
\r\n
\r\n {props.currentPageItems.length > 0 && (\r\n
\r\n \r\n {' '}\r\n \r\n props.activePage !== 1 ? props.handlePageItemsChange(props.totalItemPerPage, props.activePage - 1) : {}\r\n }\r\n >\r\n «\r\n \r\n \r\n {props.pageCount &&\r\n [...Array(props.pageCount)].map((p: number, index: number) => {\r\n return (\r\n 0 && props.mouseOverIndex === index + 1 ? style.hover : null)\r\n }}\r\n key={index + 1}\r\n onMouseEnter={() => props.handleMouseEnterEvent(index + 1)}\r\n onMouseLeave={() => props.handleMouseOutEvent()}\r\n onClick={() => props.handlePageItemsChange(props.totalItemPerPage, index + 1)}\r\n >\r\n {index + 1}\r\n \r\n );\r\n })}\r\n \r\n {' '}\r\n \r\n props.activePage !== props.pageCount\r\n ? props.handlePageItemsChange(props.totalItemPerPage, props.activePage + 1)\r\n : {}\r\n }\r\n >\r\n »\r\n \r\n \r\n
\r\n )}\r\n {props.isLoading &&
Loading...
}\r\n {!props.isLoading && (props.requestOrderLines.length === 0 || props.currentPageItems.length === 0) && (\r\n
\r\n
\r\n

{'You currently do not have any orders to view.'}

\r\n
\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\nimport { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { IB2bRequestsStatusViewProps } from '@msdyn365-commerce-modules/account-management';\r\nimport { Button, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { IB2bRequestsStatusProps, IB2bRequestsStatusResources } from '../definition-extensions/b2b-requests-status.ext.props.autogenerated';\r\n\r\n/**\r\n * B2b Request status View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from module file.\r\nconst B2bRequestsStatusView: React.FC> = props => {\r\n const { b2bRequestsStatus, heading, table } = props;\r\n const { continueShoppingButtonTitle } = props.resources;\r\n const initialCount = 0;\r\n\r\n if (props.data.operationRequests.result?.length === initialCount) {\r\n return (\r\n \r\n {heading}\r\n \r\n
\r\n

\r\n {props.resources.headingForEmptyRequestStatus}\r\n

\r\n

\r\n {props.resources.textForEmptyRequestStatus}\r\n

\r\n \r\n \r\n {continueShoppingButtonTitle}\r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n return (\r\n \r\n {heading}\r\n {table}\r\n \r\n );\r\n};\r\n\r\nexport default B2bRequestsStatusView;\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 { ISearchData, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Categories heading.\r\n * @param inCategoriesHeading - The Keywords result heading.\r\n * @returns The JSX Element.\r\n */\r\nconst renderCategorySuggestionsTitle = (inCategoriesHeading: string): JSX.Element => {\r\n const categoryAutoSuggestionHeading = inCategoriesHeading ? inCategoriesHeading : 'In categories';\r\n\r\n return (\r\n
\r\n {categoryAutoSuggestionHeading}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render Categories suggestion result.\r\n * @param inCategoriesHeading - The Categories result heading.\r\n * @param noResultText - The \"No Result\" text.\r\n * @param props - The Categories suggestion result.\r\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\r\n * @param isLoadingNode - The autosuggestion loading node.\r\n * @returns The JSX Element.\r\n */\r\nexport const CategorySuggestionsComponent = (\r\n inCategoriesHeading: string,\r\n noResultText: string,\r\n props: ISearchViewProps & ISearchProps,\r\n isLoadingAutoSuggest?: boolean,\r\n isLoadingNode?: React.ReactNode\r\n): JSX.Element => {\r\n return props.autosuggestCategory ? (\r\n \r\n {renderCategorySuggestionsTitle(inCategoriesHeading)}\r\n \r\n {isLoadingAutoSuggest && isLoadingNode}\r\n {!isLoadingAutoSuggest && props.autosuggestCategory.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n ) : (\r\n \r\n {renderCategorySuggestionsTitle(inCategoriesHeading)}\r\n \r\n
  • \r\n {noResultText}\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\nimport { IImageData, Image } from '@msdyn365-commerce/core';\r\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\r\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\r\n if (!noSearchResultImage || !noSearchResultImage.src) {\r\n return null;\r\n }\r\n const imageSettings = {\r\n lazyload: true,\r\n viewports: {\r\n xs: { w: 100, h: 100, q: 'w=100&h=100&q=60&m=6' }\r\n }\r\n };\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Product suggestion result.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nexport const MobileAutoSuggestEmptyComponent = (\r\n props: ISearchProps\r\n): JSX.Element => {\r\n return (\r\n \r\n
    \r\n {renderProductNotFoundResultsImage(props)}\r\n
    \r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchTextHeading}\r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchText}\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\nimport { ISearchData, ISearchFormViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Button, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\nimport { MobileAutoSuggestEmptyComponent } from './search.mobile.empty';\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nconst renderClearButton = (clearSearchButtonText: string, clearSearch: () => void): JSX.Element => {\r\n return (\r\n \r\n {clearSearchButtonText || 'Clear'}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Search form.\r\n * @param form -Form view props.\r\n * @param searchForm -Search Form props.\r\n * @param formWrapper -Form Wrapper props.\r\n * @param isMobile -Is mobile viewport flag.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param props -The props for resource.\r\n * @param isSearchText -Is SearchText flag for input text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nexport const FormComponent = (\r\n form: ISearchFormViewProps,\r\n searchForm: INodeProps,\r\n formWrapper: INodeProps,\r\n isMobile: boolean,\r\n clearSearchButtonText: string,\r\n props: ISearchProps,\r\n isSearchText: boolean,\r\n clearSearch: () => void): JSX.Element => {\r\n\r\n const cancelButtonNode = (\r\n \r\n );\r\n\r\n return (\r\n isMobile ? (\r\n \r\n {form.cancelBtn}\r\n \r\n {form.input}\r\n {isSearchText && renderClearButton(clearSearchButtonText, clearSearch)}\r\n {!isSearchText ? MobileAutoSuggestEmptyComponent(props) : null}\r\n \r\n \r\n ) : (\r\n \r\n \r\n {form.submitBtn}\r\n {form.input}\r\n {isSearchText && cancelButtonNode}\r\n \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\nimport { ISearchKeywordViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\n/**\r\n * Render keywords heading.\r\n * @param keywordsHeading -The Keywords result heading.\r\n * @returns The JSX Element.\r\n */\r\nconst renderKeywordSuggestionsTitle = (keywordsHeading: string): JSX.Element => {\r\n const categoryAutoSuggestionHeading = keywordsHeading ? keywordsHeading : 'Keywords';\r\n\r\n return (\r\n
    \r\n {categoryAutoSuggestionHeading}\r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render keywords reults.\r\n * @param keywordSuggest -The Keywords suggest Node props.\r\n * @param ulKeyword -The List Node props.\r\n * @param keywordsHeading -The Keywords result heading.\r\n * @param noResultText -The \"No Result\" text.\r\n * @param keywordSuggestions -The Keywords suggestion result.\r\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\r\n * @param isLoadingNode - The autosuggestion loading node.\r\n * @returns -The JSX Element.\r\n */\r\nexport const KeywordSuggestionsComponent = (\r\n keywordSuggest: INodeProps,\r\n ulKeyword: INodeProps,\r\n keywordsHeading: string,\r\n noResultText: string,\r\n keywordSuggestions?: ISearchKeywordViewProps,\r\n isLoadingAutoSuggest?: boolean,\r\n isLoadingNode?: React.ReactNode\r\n): JSX.Element => {\r\n return (\r\n keywordSuggestions ? (\r\n \r\n {renderKeywordSuggestionsTitle(keywordsHeading)}\r\n \r\n {isLoadingAutoSuggest && isLoadingNode}\r\n {!isLoadingAutoSuggest && keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n ) : (\r\n \r\n {renderKeywordSuggestionsTitle(keywordsHeading)}\r\n \r\n
  • \r\n {noResultText}\r\n
  • \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\nimport { IImageData, Image } from '@msdyn365-commerce/core';\r\nimport { ISearchData, ISearchProductViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param productSuggestionsHeading -The products suggestion result heading.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductSuggestionsTitle = (productSuggestionsHeading: string): JSX.Element => {\r\n const productAutoSuggestionHeading = productSuggestionsHeading ? productSuggestionsHeading : 'Products';\r\n\r\n return (\r\n
    \r\n {productAutoSuggestionHeading}\r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\r\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\r\n if (!noSearchResultImage || !noSearchResultImage.src) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Products No result section.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResults = (props: ISearchProps): JSX.Element => {\r\n return (\r\n \r\n
    \r\n {renderProductNotFoundResultsImage(props)}\r\n
    \r\n
    \r\n {props.resources.noResultContentHeadingText}\r\n
    \r\n
    \r\n {props.resources.noResultContentParagraphText}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render Product suggestion result.\r\n * @param productSuggest -The product suggest Node props.\r\n * @param ulProduct -The List Node props.\r\n * @param props -The props.\r\n * @param productSuggestions -The Product suggestion result.\r\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\r\n * @param isLoadingNode - The autosuggestion loading node.\r\n * @returns The JSX Element.\r\n */\r\nexport const ProductSuggestionsComponent = (\r\n productSuggest: INodeProps,\r\n ulProduct: INodeProps,\r\n props: ISearchProps,\r\n productSuggestions?: ISearchProductViewProps,\r\n isLoadingAutoSuggest?: boolean,\r\n isLoadingNode?: React.ReactNode\r\n): JSX.Element => {\r\n const liProduct: INodeProps = {\r\n tag: 'li',\r\n className: 'msc-no-result-content'\r\n };\r\n return productSuggestions ? (\r\n \r\n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\r\n \r\n {isLoadingAutoSuggest && isLoadingNode}\r\n {!isLoadingAutoSuggest && productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n ) : (\r\n \r\n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\r\n \r\n \r\n {renderProductNotFoundResults(props)}\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\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ISearchData, ISearchFormViewProps, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Button, format, isMobile, Module, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useCallback, useEffect, useState } from 'react';\r\n\r\nimport { ISearchProps } from '../definition-extensions/search.ext.props.autogenerated';\r\nimport { CategorySuggestionsComponent } from './components/search.categorysuggest';\r\nimport { FormComponent } from './components/search.form';\r\nimport { KeywordSuggestionsComponent } from './components/search.keywordsuggest';\r\nimport { ProductSuggestionsComponent } from './components/search.productsuggest';\r\n\r\n/**\r\n * Render Title for AutoSuggest.\r\n * @param searchSuggestionHeading -The heading resource string.\r\n * @param searchText -The search string.\r\n * @returns -The JSX Element.\r\n */\r\nconst renderTitle = (searchSuggestionHeading: string, searchText: string): JSX.Element => {\r\n const searchTextString = '\"'.concat(searchText.concat('\"'));\r\n const searchAutoSuggestionHeading = searchSuggestionHeading ? format(searchSuggestionHeading, searchTextString) : `Search for ${searchTextString}`;\r\n\r\n return (\r\n \r\n {searchAutoSuggestionHeading}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Search View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst SearchView: React.FC> = (props: ISearchViewProps & ISearchProps): JSX.Element => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n UlKeyword,\r\n UlProduct,\r\n form,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label,\r\n context,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n } = props;\r\n\r\n const { searchSuggestionHeading, categorySuggestionHeading, keywordsHeading, noResultText, clearSearchButtonText } = props.resources;\r\n\r\n const [searchTextString, setSearchTextString] = useState();\r\n const [isMobilePort, setIsMobile] = useState(false);\r\n\r\n useEffect(() => {\r\n setSearchTextString(searchText);\r\n }, [searchText]);\r\n\r\n /**\r\n * ClearSearch callback method to clear search string.\r\n */\r\n const clearSearch = (): void => {\r\n setSearchTextString('');\r\n\r\n const propsForm = props.form as ISearchFormViewProps;\r\n const propsFormInput = propsForm.input as React.DetailedHTMLProps, HTMLInputElement>;\r\n const propsFormInputCurrent = (propsFormInput.ref as React.RefObject).current;\r\n\r\n if (propsFormInputCurrent) {\r\n propsFormInputCurrent.value = '';\r\n }\r\n\r\n propsFormInput.value = '';\r\n props.searchText = '';\r\n props.FormWrapper.action = '';\r\n };\r\n\r\n const isMobileViewport = useCallback(() => {\r\n const isMobileView = isMobile({ variant: VariantType.Browser, context: context.request }) === 'xs';\r\n setIsMobile(isMobileView);\r\n }, [context]);\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', isMobileViewport);\r\n isMobileViewport();\r\n }, [isMobileViewport]);\r\n\r\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\r\n\r\n const isMobileView = (viewport === 'sm' || viewport === 'xs');\r\n\r\n AutoSuggest.className = !StringExtensions.isNullOrEmpty(searchTextString) ? `${AutoSuggest.className} show` : `${AutoSuggest.className} hide`;\r\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\r\n\r\n return (\r\n \r\n {label}\r\n {FormComponent(form as ISearchFormViewProps, SearchForm, FormWrapper, isMobilePort, clearSearchButtonText, props, isSearchText, clearSearch)}\r\n { !isMobileView && \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? \r\n {AutoSuggestAriaLabelText}\r\n : ''}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n \r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {CategorySuggestionsComponent(categorySuggestionHeading, noResultText,\r\n props, isLoadingAutoSuggest, isLoadingNode)}\r\n {KeywordSuggestionsComponent(KeywordSuggest, UlKeyword, keywordsHeading, noResultText, autosuggestKeyword,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n \r\n ) : null}\r\n }\r\n { isMobileView && props.isSearchFormExpanded && \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? \r\n {AutoSuggestAriaLabelText}\r\n : ''}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n {(form as ISearchFormViewProps).cancelBtn}\r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {CategorySuggestionsComponent(categorySuggestionHeading, noResultText,\r\n props, isLoadingAutoSuggest, isLoadingNode)}\r\n {KeywordSuggestionsComponent(KeywordSuggest, UlKeyword, keywordsHeading, noResultText, autosuggestKeyword,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n \r\n \r\n ) : null}\r\n }\r\n \r\n );\r\n};\r\nexport default SearchView;\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 { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n buildStoreHours, IHoursDisplayInfo, ILocationHours, IStoreSelectorFoundLocationsMessage,\r\n IStoreSelectorLocationLineItemProps, IStoreSelectorLocationLineItemResources, IStoreSelectorViewProps, secondsToTime\r\n} from '@msdyn365-commerce-modules/store-selector';\r\nimport { ISelectedStoreViewProps } from '@msdyn365-commerce-modules/store-selector/dist/types/modules/store-selector/components/selected-store/selected-store';\r\nimport {\r\n getPayloadObject, getTelemetryAttributes, getTelemetryObject, IPayLoad, isMobile, Module, Node, TelemetryConstant,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport MsDyn365, { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { ContactInformationType, DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IStoreSelectorProps, IStoreSelectorResources } from '../definition-extensions/store-selector.ext.props.autogenerated';\r\n\r\n/**\r\n * PickUpMethodComponent View Props Interface.\r\n */\r\nexport interface IPickupComponent extends IStoreSelectorLocationLineItemProps {\r\n pickUpStatesProps: IStoreSelectorViewProps;\r\n}\r\n\r\n/**\r\n * Found Locations Message component in Store Selector.\r\n * @param props - The component props.\r\n * @returns The JSX Element.\r\n */\r\nconst StoreSelectorFoundLocationsMessageComponent: React.FC = props => {\r\n const { locations, searchRadius, resources, isSeeAllStore, preferredDistanceUnit } = props;\r\n if (locations) {\r\n const storeCountMessage = preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\r\n\r\n return (\r\n ${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/**\r\n * Build distance string.\r\n * @param distance - The distance.\r\n * @param preferredDistanceUnit - The preferred distance unit.\r\n * @param resources - The module resources.\r\n * @param isLocationDisabled - True if location is disabled.\r\n * @returns The distance string.\r\n */\r\nconst buildDistanceString = (distance: number | undefined, preferredDistanceUnit: string,\r\n resources: IStoreSelectorResources & IStoreSelectorResources, isLocationDisabled?: boolean): string | undefined => {\r\n const closeDistance: number = 1;\r\n if (distance === undefined || isLocationDisabled) {\r\n return undefined;\r\n } else if (distance < closeDistance) {\r\n const closeDistanceString: string = resources.closeDistanceString;\r\n return closeDistanceString.replace('{preferredDistanceUnit}', preferredDistanceUnit);\r\n }\r\n const distanceAsString: string = resources.distanceString;\r\n return distanceAsString.replace('{preferredDistanceUnit}', preferredDistanceUnit)\r\n .replace('{distance}', Math.floor(distance).toString());\r\n\r\n};\r\n\r\n/**\r\n * Extract phone number.\r\n * @param contacts - Contacts array.\r\n * @returns Phone number.\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 === ContactInformationType.Phone && !contact.IsPrivate);\r\n\r\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\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\n/**\r\n * Render Store Hours Day.\r\n * @param displayTime - Store Hours Information.\r\n * @param storeHoursDayPeriodString - The string for store hours day period.\r\n * @param storeHoursDayString - The string for store hours day period.\r\n * @returns JSX element with store hours day.\r\n */\r\nconst buildStoreHoursDay = (displayTime: IHoursDisplayInfo, storeHoursDayPeriodString: string, storeHoursDayString: string) => {\r\n return (\r\n ${displayTime.startDayShort}`)\r\n .replace('{endDay}',\r\n `${displayTime.endDayShort}`) : storeHoursDayString\r\n .replace('{startDay}', `${displayTime.startDayShort}`)}\r\n />\r\n );\r\n};\r\n\r\n/**\r\n * Render Store Hours.\r\n * @param storeHours - Store hours.\r\n * @param storeHoursList - Store hours list.\r\n * @param locationOpen - Location open.\r\n * @param resources - The module resources.\r\n * @returns JSX element with store hours.\r\n */\r\nconst renderStoreHours = (storeHours: StoreHours | undefined, storeHoursList: IHoursDisplayInfo[] | undefined,\r\n locationOpen: ILocationHours | undefined, resources: IStoreSelectorResources & IStoreSelectorResources): JSX.Element | null => {\r\n // First, use the store hours. This will allow listing day by day hours\r\n if (storeHours?.RegularStoreHours) {\r\n return (\r\n
    \r\n {storeHoursList?.map(displayTime => (\r\n
    \r\n {buildStoreHoursDay(displayTime, resources.storeHoursDayPeriod, resources.storeHoursDay)}\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 = locationOpen?.openFrom ? locationOpen.openFrom : '';\r\n const storeOpenTo: string = locationOpen?.openTo ? locationOpen.openTo : '';\r\n return (\r\n
    \r\n {(resources.storeHoursDayPeriod)\r\n .replace('{startDay}', storeOpenFrom)\r\n .replace('{endDay}', storeOpenTo)}\r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Match delivery options.\r\n * @param productDeliveryOptions - The list of product delivery options.\r\n * @param storePickUpOptionList - The list of store pick up options.\r\n * @returns Matched delivery option.\r\n */\r\nconst matchDeliveryOptions = (productDeliveryOptions: DeliveryOption[] | undefined, storePickUpOptionList: DeliveryOption[] | undefined): DeliveryOption[] => {\r\n if (!productDeliveryOptions) {\r\n return [] as DeliveryOption[];\r\n }\r\n return productDeliveryOptions\r\n .map(productDeliveryOption => (storePickUpOptionList?.find(delivery => delivery.Code === productDeliveryOption.Code)))\r\n .filter(productDeliveryOption => productDeliveryOption) as DeliveryOption[];\r\n};\r\n\r\n/**\r\n * PickUpMethod Resources Interface.\r\n */\r\nexport interface IPickUpMethodResources {\r\n selectStoreText: string;\r\n pickUpMethodLabel: string;\r\n pickUpOptionPlaceholder: string;\r\n pickupOptionDropdownError: string;\r\n pickupButtonAriaLabel: string;\r\n}\r\n\r\n/**\r\n * PickUp method dropdown component.\r\n * @param props - The view props.\r\n * @returns JSX Element.\r\n */\r\nconst PickUpMethodDropdownComponent = (props: IPickupComponent & IPickUpMethodResources) => {\r\n const {\r\n handlers,\r\n location,\r\n pickUpStatesProps,\r\n selectStoreText,\r\n pickUpMethodLabel,\r\n pickUpOptionPlaceholder,\r\n pickupOptionDropdownError,\r\n pickupButtonAriaLabel,\r\n productPickUpOptionList,\r\n storePickUpOptionList } = props;\r\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\r\n const [selectedStorePickUpOption, selectStorePickUpOption] = React.useState('');\r\n const [currentStorePickUpOption, setCurrentStorePickUpOption] = React.useState(pickUpOptionPlaceholder);\r\n const [isDropdownOpen, toggleDropdown] = React.useState(false);\r\n const [isError, setError] = React.useState(false);\r\n\r\n /**\r\n * Method to handle the store pickup option change.\r\n * @param event - Change Event.\r\n */\r\n const onChangeHandler = React.useCallback((event: React.MouseEvent) => {\r\n event.preventDefault();\r\n selectStorePickUpOption(event.currentTarget.value);\r\n setCurrentStorePickUpOption(event.currentTarget.dataset.description ? event.currentTarget.dataset.description : '');\r\n toggleDropdown(false);\r\n setError(false);\r\n }, []);\r\n\r\n /**\r\n * Method to render store location line pick up button.\r\n * @param filteredDeliveryMode - Filtered Delivery Mode.\r\n * @returns JSX Element.\r\n */\r\n const renderLocationLinePickupButton = (filteredDeliveryMode: DeliveryOption | undefined) => {\r\n return (\r\n filteredDeliveryMode !== undefined ?
    \r\n \r\n {filteredDeliveryMode.Description}\r\n \r\n
    : null\r\n );\r\n };\r\n\r\n /**\r\n * Method to handle the store pickup option submit.\r\n */\r\n const onClickHandler = React.useCallback(() => {\r\n if (!StringExtensions.isNullOrEmpty(selectedStorePickUpOption)) {\r\n handlers.onSelected(location, selectedStorePickUpOption);\r\n } else if (pickUpStatesProps.state.filteredPickupMode !== undefined) {\r\n handlers.onSelected(location, pickUpStatesProps.state.filteredPickupMode);\r\n } else {\r\n toggleDropdown(false);\r\n setError(true);\r\n }\r\n }, [location, selectedStorePickUpOption, handlers, pickUpStatesProps.state.filteredPickupMode]);\r\n\r\n const handleDropdownToggle = React.useCallback(() => {\r\n toggleDropdown(!isDropdownOpen);\r\n setError(false);\r\n }, [isDropdownOpen]);\r\n\r\n const filterDeliveryOption = deliveryOptionList.find((delivery: DeliveryOption) => delivery.Code === pickUpStatesProps.state.filteredPickupMode);\r\n\r\n const pickupInStoreButtonText: string = selectStoreText;\r\n const filteredDeliveryMode: DeliveryOption | undefined = (pickUpStatesProps.state.filteredPickupMode !== undefined ? filterDeliveryOption : undefined);\r\n return (\r\n \r\n
    \r\n {pickUpMethodLabel}\r\n
    \r\n {pickUpStatesProps.state.filteredPickupMode === undefined ?
    \r\n \r\n {currentStorePickUpOption}\r\n \r\n \r\n {deliveryOptionList.map((delivery: DeliveryOption) => (\r\n \r\n \r\n {delivery.Description}\r\n \r\n \r\n ))}\r\n \r\n
    \r\n {pickupOptionDropdownError}\r\n
    \r\n
    : renderLocationLinePickupButton(filteredDeliveryMode)}\r\n \r\n {pickupInStoreButtonText}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Method to render store location line item.\r\n * @param locationLineItem - The Location Line item view props.\r\n * @param props - The view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderStoreLocationLineItem = (locationLineItem: IStoreSelectorLocationLineItemProps,\r\n props: IStoreSelectorViewProps & IStoreSelectorProps) => {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\r\n hideStockStatus,\r\n index,\r\n isInStock,\r\n preferredStoreLocationId,\r\n isPreferredStoreEnabled,\r\n location,\r\n resources,\r\n storeHours,\r\n storeHoursList,\r\n stockStatusLabel,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\r\n storeLocatorView,\r\n telemetryContent } = locationLineItem;\r\n const storeName = location.OrgUnitName;\r\n const distanceAsString: string | undefined = buildDistanceString(location.Distance,\r\n locationLineItem.preferredDistanceUnit, props.resources, locationLineItem.isLocationDisabled);\r\n const storeAddress: string | undefined = location.Address;\r\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\r\n\r\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\r\n const stockStatus = stockStatusLabel ? stockStatusLabel : resourceLabel;\r\n const stockText: string | undefined = (hideStockStatus) ? undefined : stockStatus;\r\n\r\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n\r\n /**\r\n * Method to handle the change for preferred store.\r\n * @returns Void.\r\n */\r\n const onSetPreferredStoreClickHandler = () => () => {\r\n locationLineItem.handlers.onSetAsPreferredStore(locationLineItem.location.OrgUnitNumber);\r\n };\r\n\r\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\r\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\r\n const preferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\r\n const removePreferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n
    \r\n
    \r\n {storeLocatorView && \r\n {index}\r\n }\r\n \r\n {storeName}\r\n \r\n {distanceAsString ? \r\n {distanceAsString}\r\n : false}\r\n
    \r\n
    \r\n
    \r\n

    \r\n {locationLineItem.resources.contactInfoHeader}\r\n

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

    \r\n {locationLineItem.resources.storeHoursHeader}\r\n

    \r\n {renderStoreHours(storeHours, storeHoursList, locationLineItem.locationOpen, props.resources)}\r\n
    \r\n {\r\n !storeLocatorView &&\r\n
    \r\n

    \r\n {resources.availabilityInfoHeader}\r\n

    \r\n {stockText &&

    \r\n {stockText}\r\n

    }\r\n
    \r\n }\r\n {\r\n isPreferredStoreEnabled && (isPreferredStore ? \r\n {resources.preferredStoreText}\r\n : \r\n {resources.setAsPreferredStoreText}\r\n )\r\n }\r\n
    \r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render Store Location.\r\n * @param location - The location props.\r\n * @param index - The location index.\r\n * @param props - The view props.\r\n * @param selectedLocationReference - The ref.\r\n * @returns The JSX Element.\r\n */\r\nconst renderStoreLocation = (location: IStoreSelectorLocationLineItemProps,\r\n index: number, props: IStoreSelectorViewProps & IStoreSelectorProps,\r\n selectedLocationReference: React.RefObject): JSX.Element | undefined => {\r\n const {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\r\n hideStockStatus, storeLocatorView,\r\n isCurrentLocation,\r\n isInStock,\r\n productPickUpOptionList,\r\n resources,\r\n storePickUpOptionList,\r\n telemetryContent } = location;\r\n\r\n const orgUnitLocation = location.location;\r\n const selectedStoreLocationId = location.selectedStoreLocationId;\r\n const defaultAriaSetsize = 0;\r\n const canSelectLocation = hideStockStatus ?? isInStock;\r\n const storeName = location.location.OrgUnitName;\r\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\r\n const pickupInStoreButtonText: string = resources.selectLocation;\r\n const pickUpOptionDropdownPlaceholderText: string = props.resources.pickupOptionDropdownPlaceholderText;\r\n\r\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\r\n const selectStoreText = props.resources.selectStoreText;\r\n const pickUpMethodLabel = props.resources.pickUpMethodLabel;\r\n\r\n /**\r\n * Method to handle the pick up in store.\r\n * @returns Void.\r\n */\r\n const onPickupInStoreClickHandler = () => () => {\r\n location.handlers.onSelected(location.location);\r\n };\r\n\r\n /**\r\n * Render Store Locations.\r\n * @param unitLocation - The org unit location.\r\n * @returns Handler for onClick.\r\n */\r\n const onClickHandler = (unitLocation: OrgUnitLocation | undefined) => () => {\r\n location.onClick(unitLocation?.OrgUnitNumber);\r\n };\r\n\r\n const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\r\n \r\n {pickupInStoreButtonText}\r\n \r\n ) : ();\r\n const pickUpMethodSelection = (\r\n canSelectLocation ? canSelectPickUpMethod : (\r\n false\r\n )\r\n );\r\n\r\n return (\r\n
    \r\n \r\n {renderStoreLocationLineItem(location, props)}\r\n
    \r\n {!storeLocatorView && (isCurrentLocation ? (\r\n

    \r\n {resources.currentLocation}\r\n

    \r\n ) : pickUpMethodSelection)}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Store Locations.\r\n * @param props - The view props.\r\n * @param selectedLocationReference - The ref.\r\n * @returns The JSX Element.\r\n */\r\nconst renderStoreLocations = (props: IStoreSelectorViewProps & IStoreSelectorProps,\r\n selectedLocationReference: React.RefObject) => {\r\n return (\r\n \r\n {\r\n props.locationListProps?.map((store, index) => {\r\n return renderStoreLocation(store, index, props, selectedLocationReference);\r\n })\r\n }\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Method to map resources with Location Item.\r\n * @param resources - List of strings for module.\r\n * @returns Resources for StoreSelector location line.\r\n */\r\nconst mapResources = (resources: IStoreSelectorResources): 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 * Render the selected store.\r\n * @param selectedLocationProps -- Selected store view props.\r\n * @param storeSelectorViewProps -- Store selector view props.\r\n * @returns -- HTML.\r\n */\r\nexport const renderSelectedStore = (selectedLocationProps: ISelectedStoreViewProps,\r\n storeSelectorViewProps: IStoreSelectorViewProps & IStoreSelectorProps): JSX.Element => {\r\n const {\r\n storeDetailsMain,\r\n storeHeader,\r\n storeName,\r\n storeDetailsCloseButton,\r\n storeDistance,\r\n storeDetailsAvailabilityContainer,\r\n productAvailability,\r\n stockStatus,\r\n isPreferredStore,\r\n preferredStoreButton,\r\n removePreferredStoreButton,\r\n selectedStore\r\n } = selectedLocationProps;\r\n\r\n const storeAddress: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.Address;\r\n const phoneNumber: string | undefined = extractPhoneNumber(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.Contacts);\r\n const storeHoursList = selectedStore?.StoreHours?.RegularStoreHours ? buildStoreHours(selectedStore.StoreHours.RegularStoreHours,\r\n mapResources(storeSelectorViewProps.resources)) : [];\r\n const storeOpenFrom: string | undefined = secondsToTime(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OpenFrom);\r\n const storeOpenTo: string | undefined = secondsToTime(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OpenTo);\r\n const locationOpen = { openFrom: storeOpenFrom, openTo: storeOpenTo };\r\n const storeNameValue = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\r\n const pickupInStoreAriaLabel: string = selectedLocationProps.resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeNameValue ?? '');\r\n const telemetryContent = getTelemetryObject(storeSelectorViewProps.context.request.telemetryPageName!,\r\n storeSelectorViewProps.friendlyName, storeSelectorViewProps.telemetry);\r\n const payLoad = getPayloadObject('click', telemetryContent, TelemetryConstant.PickupInStore);\r\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\r\n const pickupInStoreButtonText: string = selectedLocationProps.resources.selectLocation;\r\n const selectStoreText = storeSelectorViewProps.resources.selectStoreText;\r\n const pickUpMethodLabel = storeSelectorViewProps.resources.pickUpMethodLabel;\r\n const pickUpOptionDropdownPlaceholderText: string = storeSelectorViewProps.resources.pickupOptionDropdownPlaceholderText;\r\n const orgUnitNumber = selectedStore?.OrgUnitAvailability?.OrgUnitLocation!.OrgUnitNumber;\r\n const productPickUpOptionList = storeSelectorViewProps.data.storeSelectorStateManager.result?.context?.deliveryOptions?.DeliveryOptions;\r\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, selectedLocationProps.deliveryOptions);\r\n const selectedLocation = storeSelectorViewProps.locationListProps?.find(location => location.location.OrgUnitNumber === orgUnitNumber);\r\n\r\n /**\r\n * Method to handle the pick up in store.\r\n * @returns Void.\r\n */\r\n const onPickupInStoreClickHandler = () => () => {\r\n selectedLocationProps.handlers.onSelected(selectedStore!.OrgUnitAvailability!.OrgUnitLocation!);\r\n };\r\n const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\r\n \r\n {pickupInStoreButtonText}\r\n \r\n ) : selectedLocation && ();\r\n\r\n return (\r\n \r\n \r\n {storeDetailsCloseButton}\r\n {storeName}\r\n {storeDistance}\r\n \r\n \r\n
    \r\n

    \r\n {storeSelectorViewProps.resources.contactText}\r\n

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

    \r\n {storeSelectorViewProps.resources.timeText}\r\n

    \r\n {renderStoreHours(selectedStore?.StoreHours, storeHoursList, locationOpen, storeSelectorViewProps.resources)}\r\n
    \r\n {\r\n productAvailability &&\r\n
    \r\n

    \r\n {productAvailability}\r\n

    \r\n {stockStatus &&

    \r\n {stockStatus}\r\n

    }\r\n
    \r\n }\r\n
    \r\n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\r\n { canSelectPickUpMethod }\r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Store Selector View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst StoreSelectorViewComponent: React.FC> = props => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Store-Selector.tsx file\r\n const { BodyContainerProps, storeResultContainerProps, FooterContainerProps, HeaderContainerProps, HeaderProps, ModuleProps,\r\n locationsMessage,\r\n search,\r\n state,\r\n spinner,\r\n maps,\r\n locationsList,\r\n noLocationsMessage,\r\n terms,\r\n storeDetailsModal,\r\n selectedLocation,\r\n bodyWrapperProps,\r\n data,\r\n context } = props;\r\n const offSetTopHeight = 250;\r\n const parentClientHeight = 50;\r\n const selectedLocationReference = React.useRef(null);\r\n const [isDesktopPort, setIsDesktopPort] = React.useState(false);\r\n\r\n const isDesktopViewport = React.useCallback(() => {\r\n const portView = isMobile({ variant: VariantType.Browser, context: context.request });\r\n const isDesktopPorts = (portView === 'md') || (portView === 'xl') || (portView === 'lg');\r\n setIsDesktopPort(isDesktopPorts);\r\n }, [context]);\r\n\r\n React.useEffect(() => {\r\n if (props.locationsList) {\r\n /**\r\n * Method to handle scrollling.\r\n */\r\n const scrollIntoView = () => {\r\n const selectedLocationDiv = (selectedLocationReference as React.RefObject).current;\r\n if (selectedLocationDiv !== null) {\r\n const totalTopHeight = Number(selectedLocationDiv.offsetTop) + Number(selectedLocationDiv.clientHeight);\r\n const parent = selectedLocationDiv.parentElement?.parentElement;\r\n if (parent) {\r\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\r\n parent.scrollTop = selectedLocationDiv.offsetTop - offSetTopHeight;\r\n } else if (totalTopHeight > Number(parent.scrollTop) + Number(parent.clientHeight)) {\r\n parent.scrollTop = totalTopHeight - Number(parent.clientHeight) - parentClientHeight;\r\n }\r\n }\r\n }\r\n };\r\n scrollIntoView();\r\n }\r\n }, [props.locationsList]);\r\n\r\n React.useEffect(() => {\r\n if (MsDyn365.isBrowser) {\r\n window.addEventListener('resize', isDesktopViewport);\r\n }\r\n isDesktopViewport();\r\n }, [isDesktopViewport]);\r\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\r\n\r\n const isDesktopView = (viewport === 'md' || viewport === 'lg' || viewport === 'xl');\r\n\r\n if (!isDesktopView || !isDesktopPort) {\r\n return (\r\n \r\n \r\n {HeaderProps}\r\n \r\n \r\n \r\n {locationsMessage && }\r\n {search}\r\n \r\n \r\n {state.isSearchInProgress ? spinner : <>\r\n {locationsList ? renderStoreLocations(props, selectedLocationReference) : noLocationsMessage}\r\n }\r\n \r\n {maps}\r\n \r\n \r\n {selectedLocation && renderSelectedStore(selectedLocation, props)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {terms}\r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n {HeaderProps}\r\n \r\n \r\n \r\n {locationsMessage && }\r\n {search}\r\n {state.isSearchInProgress ? spinner : <>\r\n {locationsList ? renderStoreLocations(props, selectedLocationReference) : noLocationsMessage}\r\n }\r\n \r\n \r\n {maps}\r\n \r\n \r\n \r\n {terms}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default StoreSelectorViewComponent;\r\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 IPasswordResetVerificationButton {\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 PasswordResetVerificationButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n telemetryContent,\n disabled,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default PasswordResetVerificationButton;\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 IPasswordResetVerificationErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetVerificationError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default PasswordResetVerificationError;\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 IPasswordResetVerificationInputProps {\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 IPasswordResetVerificationInput {\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 PasswordResetVerificationInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n onChange\n}) => (\n \n);\n\nexport default PasswordResetVerificationInput;\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 IPasswordResetVerificationLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst PasswordResetVerificationLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default PasswordResetVerificationLabel;\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 IPasswordResetVerificationLoadingIcon {\n className: string;\n}\n\nconst PasswordResetVerificationLoadingIcon: React.FC = ({ className }) => (\n
    \n);\n\nexport default PasswordResetVerificationLoadingIcon;\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 IPasswordResetVerificationLoadingMessage {\n className: string;\n message: string;\n}\n\nconst PasswordResetVerificationLoadingMessage: React.FC = ({ className, message }) => (\n
    {message}
    \n);\n\nexport default PasswordResetVerificationLoadingMessage;\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 IPasswordResetVerificationSuccess {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetVerificationSuccess: React.FC = ({ id, className, type = 'page', message }) => {\n const successClassName = `${className}__${type}-success`;\n\n return (\n \n );\n};\n\nexport default PasswordResetVerificationSuccess;\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 { 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 PasswordResetVerificationButtonComponent from './components/password-reset-verification-button';\nimport PasswordResetVerificationErrorComponent from './components/password-reset-verification-error';\nimport PasswordResetVerificationInputComponent from './components/password-reset-verification-input';\nimport PasswordResetVerificationLabelComponent from './components/password-reset-verification-label';\nimport PasswordResetVerificationLoadingIconComponent from './components/password-reset-verification-loading-icon';\nimport PasswordResetVerificationLoadingMessageComponent from './components/password-reset-verification-loading-message';\nimport PasswordResetVerificationSuccessComponent from './components/password-reset-verification-success';\nimport { IPasswordResetVerificationConfig, IPasswordResetVerificationProps } from './password-reset-verification.props.autogenerated';\n\nexport interface IPasswordResetVerificationViewState {\n isShowLoading: boolean;\n}\n\nexport interface IPasswordResetVerificationItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IPasswordResetVerificationLocalAccount {\n localAccount: INodeProps;\n verificationControlWrapper: INodeProps;\n items: IPasswordResetVerificationItem[];\n successMessage: React.ReactNode[];\n errorMessage: React.ReactNode[];\n verificationButtonsWrapper: INodeProps;\n verificationButtons: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IPasswordResetVerificationLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IPasswordResetVerificationViewProps {\n className: string;\n viewState: IPasswordResetVerificationViewState;\n loading: IPasswordResetVerificationLoading;\n passwordResetVerification: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n passwordResetVerificationLocalAccount: IPasswordResetVerificationLocalAccount;\n}\n\n/**\n *\n * PasswordResetVerification component.\n * @extends {React.Component>}\n */\n@observer\nclass PasswordResetVerification extends React.Component> {\n private readonly moduleClassName: string = 'ms-password-reset-verification';\n\n private readonly telemetryContent: ITelemetryContent;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n @observable private templateVersion: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: IPasswordResetVerificationProps) {\n super(props);\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.templateVersion = '';\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: IPasswordResetVerificationProps,\n nextState: IPasswordResetVerificationViewState\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 passwordResetVerification: {\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 )\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 && (\n \n ),\n passwordResetVerificationLocalAccount: 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 // 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 _prePopulateData(): void {\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((obj: { ID: string; PAT: string }) => {\n if (obj.ID.toLowerCase() === 'email') {\n this.emailRegex = obj.PAT;\n } else if (obj.ID.toLowerCase() === 'emailverificationcontrol') {\n this.templateVersion = 'v2';\n }\n });\n if (!this.templateVersion) {\n this.templateVersion = 'v1';\n }\n }\n }\n\n private _updateErrorMessage(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const message = {\n verifying_blurb: this.props.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(): IPasswordResetVerificationLocalAccount {\n const { resources } = this.props;\n return {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n verificationControlWrapper: {\n id: 'emailVerificationControl',\n className: `${this.moduleClassName}__verification-control-content verificationControlContent`\n },\n items: [\n this._renderInput('email', 'email', resources.emailAddressLabelText, undefined, this.emailRegex),\n this._renderInput(\n this.getValue('email_ver_input', 'emailVerificationCode'),\n 'text',\n resources.verificationCodeLabelText,\n undefined,\n undefined,\n 'VerificationCode'\n )\n ],\n successMessage: [\n ,\n\n \n ],\n errorMessage: [\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n \n ],\n verificationButtonsWrapper: {\n className: `${this.moduleClassName}__email-verification-buttons ${this.getValue('verify', '')}`,\n 'data-claim_id': 'email'\n },\n verificationButtons: [\n ,\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\n private _renderInput(\n id: string,\n type: string,\n labelText: string,\n maxLength?: string,\n pattern?: string,\n cssClassName?: string\n ): IPasswordResetVerificationItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry', cssClassName)\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n };\n }\n\n private readonly getValue = (v1Value: string, v2Value: string): string => {\n if (this.templateVersion) {\n return this.templateVersion === 'v1' ? v1Value : v2Value;\n }\n return '';\n };\n}\n\nexport default PasswordResetVerification;\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 IPasswordResetVerificationItem,\n IPasswordResetVerificationLoading,\n IPasswordResetVerificationLocalAccount,\n IPasswordResetVerificationViewProps\n} from './password-reset-verification';\n\nconst PasswordResetVerificationItem: 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 verificationControlWrapper,\n items,\n successMessage,\n errorMessage,\n verificationButtonsWrapper,\n verificationButtons,\n buttonsWrapper,\n buttons,\n verificationSuccessModal,\n verificationSuccessModalMessage\n}) => {\n return (\n \n \n {items &&\n items.map((item: IPasswordResetVerificationItem) => {\n // eslint-disable-next-line react/jsx-key\n return ;\n })}\n {successMessage &&\n successMessage.map((message: React.ReactNode, index: number) => {\n return {message};\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n \n {verificationButtons &&\n verificationButtons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n \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};\n\nconst PasswordResetVerificationLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst PasswordResetVerificationView: React.FC = props => {\n const {\n passwordResetVerification,\n viewState,\n loading,\n defaultAADConainer,\n aadConainer,\n heading,\n passwordResetVerificationLocalAccount\n } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(passwordResetVerificationLocalAccount)}\n \n \n );\n};\n\nexport default PasswordResetVerificationView;\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 { ICookieSetOptions, IImageDimension, ILocaleItems } from '@msdyn365-commerce/core-internal';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerData } from './country-picker.data';\nimport { IActionLinkData, ICountryPickerProps } from './country-picker.props.autogenerated';\n\n/**\n * CountryPicker view props interface.\n */\nexport interface ICountryPickerViewProps extends ICountryPickerProps {\n modalContainer: IModuleProps;\n modalHeaderContainer: INodeProps;\n modalFooterContainer: INodeProps;\n modalBodyContainer: INodeProps;\n heading?: React.ReactNode;\n subheading?: React.ReactNode;\n link?: React.ReactNode;\n countryList?: React.ReactNode[];\n isModalOpen?: boolean;\n state?: ICountryPickerState;\n stayOnCurrentSiteButton?: React.ReactNode;\n}\n\n/**\n * ICountryPickerState: Interface for Country picker State.\n */\nexport interface ICountryPickerState {\n isModalOpen: boolean;\n}\n\n/**\n *\n * CountryPicker component.\n * @extends {React.PureComponent>}\n */\nexport class CountryPicker extends React.PureComponent, ICountryPickerState> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly _preferredSiteStorageKey: string = '_msdyn365___site_';\n\n private readonly _cookieExpirationTime = 5_184_000;\n\n public constructor(props: ICountryPickerProps) {\n super(props);\n let isCookieValueSet: boolean = false;\n if (props.context.request.cookies.get(this._preferredSiteStorageKey).value) {\n isCookieValueSet = true;\n }\n this.state = {\n isModalOpen: !isCookieValueSet && this.props.context.request.marketSettings !== undefined\n };\n }\n\n public render(): JSX.Element | null {\n const { heading, subheading, countryList, actionLink } = this.props.config;\n\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n\n if (!isConsentGiven) {\n return null;\n }\n\n const countryPickerHeading = heading && (\n \n );\n\n const countryPickerSubHeading = subheading && (\n \n );\n\n const countryPickerActionLink = actionLink && this.createLink(actionLink);\n const currentSiteButton = (\n \n );\n\n const viewprops: ICountryPickerViewProps = {\n ...this.props,\n state: this.state,\n isModalOpen: this.state.isModalOpen,\n modalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-country-picker__dialog',\n isOpen: true,\n 'aria-label': 'country-picker',\n toggle: this.closeModal,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: true\n },\n modalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-country-picker__modal-header',\n toggle: this.closeModal,\n closeButtonTabIndex: 1\n },\n modalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-countryPicker__modal-footer'\n },\n modalBodyContainer: {\n tag: ModalBody,\n className: 'ms-counrtyPicker__modal-body'\n },\n heading: countryPickerHeading,\n subheading: countryPickerSubHeading,\n link: countryPickerActionLink,\n countryList: countryList && this.renderCountryList(),\n stayOnCurrentSiteButton: currentSiteButton\n };\n\n return this.props.renderView(viewprops);\n }\n\n /**\n * Initiate close modal.\n */\n public readonly closeModal = (): void => {\n this.setState({\n isModalOpen: false\n });\n };\n\n public handleParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.subheading = event.target.value;\n }\n\n public handleTextChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.heading!.text = event.target.value;\n }\n\n public handleLinkTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.actionLink?.linkText) {\n this.props.config.actionLink.linkText = event.target.value;\n }\n }\n\n public createLink(link?: IActionLinkData): React.ReactNode | null {\n if (!StringExtensions.isNullOrEmpty(link?.linkUrl.destinationUrl)) {\n const linkText = link?.linkText ?? '';\n const payLoad = getPayloadObject('click', this._telemetryContent, '', '');\n const attributes = getTelemetryAttributes(this._telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: link?.ariaLabel,\n className: 'ms-countryPicker__link',\n linkText,\n linkUrl: link?.linkUrl.destinationUrl,\n openInNewTab: link?.openInNewTab,\n role: 'link',\n additionalProperties: attributes!,\n onClick: onTelemetryClick(this._telemetryContent, payLoad, linkText)\n };\n return (\n \n );\n }\n return null;\n }\n\n public renderCountryList(): React.ReactNode[] | undefined {\n const marketSettings = this.props.context.request.marketSettings;\n if (!marketSettings) {\n return undefined;\n }\n const localeItems = marketSettings.localeItems;\n const countryLinks = localeItems.map((value: ILocaleItems) => {\n return this.renderCountry(value);\n });\n\n return countryLinks;\n }\n\n public renderCountry(localeItem: ILocaleItems): React.ReactNode | null {\n const countryList = this.props.config.countryList;\n let baseUrl = localeItem.localeBaseUrl;\n baseUrl = this._appendProtocolToUrl(baseUrl);\n const matchedCountryItem = countryList?.find(item => item.url === baseUrl);\n if (!matchedCountryItem) {\n return null;\n }\n const imageSize: IImageDimension = { q: 'w=48&h=48&m=6', w: 0, h: 0 };\n const defaultImageSettings: MsDyn365.IImageSettings = {\n viewports: {\n xs: imageSize,\n lg: imageSize,\n xl: imageSize\n },\n lazyload: true\n };\n const image = matchedCountryItem.image;\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: image?.imageSettings ?? defaultImageSettings\n };\n return (\n \n {image && (\n \n )}\n
    \n {matchedCountryItem.displayString}\n {matchedCountryItem.displaySubString}\n
    \n \n );\n }\n\n /**\n * Writes the current site base url to cookie and closes the country picker modal dialog.\n */\n private readonly _handleStayOnSiteButtonClick = (): void => {\n const currentBaseUrl = this.props.context.request.marketSettings?.currentBaseUrl;\n if (currentBaseUrl) {\n const urlToStore = this._appendProtocolToUrl(currentBaseUrl);\n this._writeToCookie(this._preferredSiteStorageKey, urlToStore);\n }\n this.closeModal();\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n * @returns - This method just writes the cookie to the browser.\n */\n private readonly _handleClick = (storageKey?: string, storageValue?: string) => () => {\n this._writeToCookie(storageKey, storageValue);\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n */\n private readonly _writeToCookie = (storageKey?: string, storageValue?: string): void => {\n if (!storageKey || !storageValue) {\n return;\n }\n const cookieOptions: ICookieSetOptions = { secure: true, sameSite: 'none' };\n cookieOptions.maxAge = this._cookieExpirationTime;\n this.props.context.request.cookies.set(storageKey, storageValue, cookieOptions);\n };\n\n /**\n * Appends protocol to an url.\n * @param baseUrl - Url to be formatted.\n * @returns - URL after appending protocol.\n */\n private readonly _appendProtocolToUrl = (baseUrl: string): string => {\n return !baseUrl.includes('https://') ? `https://${baseUrl}` : baseUrl;\n };\n}\n\nexport default CountryPicker;\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 { ICountryPickerViewProps } from './country-picker';\n\n/**\n * Functional component which renders country picker module.\n * @param props - Configuration for the country picker component.\n * @returns React.FC - Functional component of the country picker module.\n */\nexport const countryPickerView: React.FC = (props: ICountryPickerViewProps) => {\n const {\n isModalOpen,\n modalContainer,\n modalHeaderContainer,\n modalBodyContainer,\n heading,\n modalFooterContainer,\n subheading,\n link,\n countryList,\n stayOnCurrentSiteButton\n } = props;\n return isModalOpen && countryList ? (\n \n \n {heading}\n {subheading}\n \n \n {countryList.map(country => (\n <>{country}\n ))}\n \n \n {stayOnCurrentSiteButton}\n {link}\n \n \n ) : null;\n};\n\nexport default countryPickerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\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 React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n {categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, isOboRequest, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { IPayInvoiceResources, PayInvoiceComponent } from '@msdyn365-commerce-modules/invoice';\nimport React from 'react';\n\nimport { InvoiceDetailsModel } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsHeaderData {\n invoiceDetails: InvoiceDetailsModel;\n}\n\nexport interface IInvoiceDetailsHeaderResources extends IPayInvoiceResources {\n invoiceOrderItem: string;\n invoiceOrderItems: string;\n invoiceIdLabel: string;\n invoicePlacedByLabel: string;\n invoiceAmountDueText: string;\n invoicePaymentDueDateText: string;\n}\n\nexport interface IInvoiceDetailsHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n resources: IInvoiceDetailsHeaderResources;\n onError?(): void;\n}\n\nexport interface IInvoiceDetailsHeaderComponent extends IComponent {}\n\nconst formatShortDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'numeric', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst formatLongDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsHeader: React.FC = (props: IInvoiceDetailsHeaderProps): JSX.Element => {\n const {\n className,\n data: { invoiceDetails },\n resources,\n onError\n } = props;\n\n const invoiceNumberText = resources.invoiceIdLabel.replace('{0}', invoiceDetails.id);\n\n const invoiceOrderItemsText =\n invoiceDetails.lines.length === 1\n ? resources.invoiceOrderItem\n : resources.invoiceOrderItems.replace('{0}', invoiceDetails.lines.length.toString());\n\n const invoiceInfoContainerClassName = `${className}__invoice-info-container`;\n const orderInfoContainerClassName = `${invoiceInfoContainerClassName}__order-info-container`;\n const orderInfoClassName = `${orderInfoContainerClassName}__order-info`;\n const orderMainInfoClassName = `${orderInfoClassName}__main-info`;\n const orderDetailsClassName = `${orderInfoClassName}__details`;\n `${className}__actions`;\n const actionsClassName = `${className}__actions`;\n const amountSummaryClassName = `${invoiceInfoContainerClassName}__amount-summary`;\n const orderDate = formatShortDate(props.context, invoiceDetails.invoiceDate);\n\n const dueDate = formatLongDate(props.context, invoiceDetails.dueDate);\n const dueDateText = resources.invoicePaymentDueDateText.replace('{0}', dueDate);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n return (\n
    \n
    {invoiceNumberText}
    \n
    \n
    \n
    \n
    \n
    \n {resources.invoicePlacedByLabel}\n {invoiceDetails.customerName}\n
    \n
    \n
    \n
    {orderDate}
    \n
    {invoiceOrderItemsText}
    \n
    \n
    \n
    \n
    \n
    {resources.invoiceAmountDueText}
    \n
    \n {formatAmount(props.context, invoiceDetails.amountDue, invoiceDetails.currencyCode)}\n
    \n
    {dueDateText}
    \n
    \n
    \n
    \n \n
    \n
    \n );\n};\n\nexport const InvoiceDetailsHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsHeaderComponent\n>('InvoiceDetailsHeaderComponent', { component: InvoiceDetailsHeader });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { IInvoicePaymentDetails } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsPaymentDetailsData {\n invoicePaymentDetails: IInvoicePaymentDetails;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsResources {\n invoicePaymentDiscounts: string;\n invoicePaymentSubtotal: string;\n invoicePaymentCharges: string;\n invoicePaymentTax: string;\n invoicePaymentInvoiceTotal: string;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n resources: IInvoiceDetailsPaymentDetailsResources;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsComponent extends IComponent {}\n\ninterface IInvoicePaymentLineProps {\n label: string;\n value: number;\n className: string;\n}\n\nconst InvoiceDetailsPaymentDetails: React.FC = (\n props: IInvoiceDetailsPaymentDetailsProps\n): JSX.Element | null => {\n const {\n className,\n data: { invoicePaymentDetails },\n resources\n } = props;\n\n const lineClassName = `${className}__line`;\n\n const lines: IInvoicePaymentLineProps[] = [];\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalDiscount)) {\n lines.push({\n label: resources.invoicePaymentDiscounts,\n value: invoicePaymentDetails.totalDiscount,\n className: `${lineClassName}-total-discount`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.subtotal)) {\n lines.push({\n label: resources.invoicePaymentSubtotal,\n value: invoicePaymentDetails.subtotal,\n className: `${lineClassName}-subtotal`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalCharges)) {\n lines.push({\n label: resources.invoicePaymentCharges,\n value: invoicePaymentDetails.totalCharges,\n className: `${lineClassName}-total-charges`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalTax)) {\n lines.push({\n label: resources.invoicePaymentTax,\n value: invoicePaymentDetails.totalTax,\n className: `${lineClassName}-total-tax`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalAmount)) {\n lines.push({\n label: resources.invoicePaymentInvoiceTotal,\n value: invoicePaymentDetails.totalAmount,\n className: `${lineClassName}-total-amount`\n });\n }\n\n if (!ArrayExtensions.hasElements(lines)) {\n return null;\n }\n\n return (\n
    \n {lines.map(line => {\n return (\n
    \n
    {line.label}
    \n
    \n {props.context.cultureFormatter.formatCurrency(line.value, invoicePaymentDetails.currencyCode)}\n
    \n
    \n );\n })}\n
    \n );\n};\n\nexport const InvoiceDetailsPaymentDetailsComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsPaymentDetailsComponent\n>('InvoiceDetailsPaymentDetailsComponent', { component: InvoiceDetailsPaymentDetails });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\nimport { IInvoiceProductLine, InvoiceDetailsModel } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsProductsData {\n invoiceDetails: InvoiceDetailsModel;\n}\n\nexport interface IInvoiceDetailsProductsResources {\n invoiceProductColor: string;\n invoiceProductSize: string;\n invoiceProductStyle: string;\n invoiceQuantity: string;\n}\n\nexport interface IInvoiceDetailsProductsProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n imageSettings?: IImageSettings;\n resources: IInvoiceDetailsProductsResources;\n}\n\nexport interface IInvoiceDetailsProductsComponent extends IComponent {}\n\nconst _renderProductDimensions = (\n className: string,\n resources: IInvoiceDetailsProductsResources,\n product: SalesInvoiceLine\n): JSX.Element => {\n return (\n
    \n {StringExtensions.isNullOrWhitespace(product.ColorName) ? null : (\n
    {resources.invoiceProductColor.replace('{0}', product.ColorName!)}
    \n )}\n {StringExtensions.isNullOrWhitespace(product.SizeName) ? null : (\n
    {resources.invoiceProductSize.replace('{0}', product.SizeName!)}
    \n )}\n {StringExtensions.isNullOrWhitespace(product.StyleName) ? null : (\n
    {resources.invoiceProductStyle.replace('{0}', product.StyleName!)}
    \n )}\n
    \n );\n};\n\nconst _renderProductImage = (\n className: string,\n context: ICoreContext,\n product: IInvoiceProductLine,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n xl: { q: 'w=315&h=315&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n return (\n \n );\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsProducts: React.FC = (props: IInvoiceDetailsProductsProps): JSX.Element => {\n const {\n className,\n data: { invoiceDetails },\n resources\n } = props;\n\n const productLineClass = `${className}__product-line`;\n const productLineInfoContainerClass = `${productLineClass}__product-info-container`;\n const productLineDetailsClass = `${productLineInfoContainerClass}__product-details`;\n const productLineSmallDetailsClass = `${productLineDetailsClass}__small-details`;\n\n return (\n
    \n {invoiceDetails.lines.map(product => {\n const quantity = product.Quantity || 1;\n\n let productUrl = '';\n if (!ObjectExtensions.isNullOrUndefined(product.ProductName) && !ObjectExtensions.isNullOrUndefined(product.ProductId)) {\n productUrl = getProductPageUrlSync(product.ProductName, product.ProductId, props.context.actionContext);\n }\n\n return (\n
    \n
    \n {_renderProductImage(`${productLineInfoContainerClass}__product-image`, props.context, product)}\n
    \n \n {product.ProductName}\n \n
    \n {_renderProductDimensions(`${productLineSmallDetailsClass}__dimensions`, resources, product)}\n
    \n {formatAmount(props.context, product.Price, invoiceDetails.currencyCode)}\n
    \n
    \n {resources.invoiceQuantity.replace('{0}', quantity.toString())}\n
    \n
    \n
    \n
    \n
    \n {formatAmount(props.context, product.NetAmount, invoiceDetails.currencyCode)}\n
    \n
    \n );\n })}\n
    \n );\n};\n\nexport const InvoiceDetailsProductsComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsProductsComponent\n>('InvoiceDetailsProductsComponent', { component: InvoiceDetailsProducts });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus, OrderInvoice, SalesInvoice, SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IPayableInvoice } from '@msdyn365-commerce-modules/invoice';\n\nexport interface IInvoicePaymentDetails {\n totalDiscount?: number;\n subtotal?: number;\n totalCharges?: number;\n totalTax?: number;\n totalAmount?: number;\n currencyCode?: string;\n}\n\nexport interface IInvoiceProductLine extends SalesInvoiceLine {\n primaryImageUrl?: string;\n}\n\n/**\n * Represents invoice details data model.\n */\nexport class InvoiceDetailsModel implements IPayableInvoice, IInvoicePaymentDetails {\n public id: string;\n\n public invoiceDate?: Date;\n\n public customerAccountNumber?: string;\n\n public customerName?: string;\n\n public dueDate?: Date;\n\n public amountDue?: number;\n\n public status?: InvoicePaidStatus;\n\n public lines: IInvoiceProductLine[];\n\n public totalDiscount?: number;\n\n public subtotal?: number;\n\n public totalCharges?: number;\n\n public totalTax?: number;\n\n public totalAmount?: number;\n\n public currencyCode?: string;\n\n public constructor(invoice: OrderInvoice, invoiceDetails: SalesInvoice, products: SimpleProduct[]) {\n this.id = invoice.Id || '';\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\n this.customerName = invoice.CustomerName;\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\n this.amountDue = invoice.AmountBalance;\n this.status = invoice.InvoicePaidStatusValue;\n this.lines = (invoiceDetails.SalesInvoiceLine || []).map(line => {\n const productLine: IInvoiceProductLine = {\n ...line,\n primaryImageUrl: products.find(product => product.RecordId === line.RecordId)?.PrimaryImageUrl\n };\n return productLine;\n });\n\n this.totalDiscount = invoiceDetails.TotalDiscount;\n this.subtotal = invoiceDetails.InvoiceSubtotal;\n this.totalCharges = invoiceDetails.TotalCharges;\n this.totalTax = invoiceDetails.TotalTaxAmount;\n this.totalAmount = invoice.TotalAmount;\n this.currencyCode = invoice.CurrencyCode;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { InvoiceErrorComponent } from '@msdyn365-commerce-modules/invoice';\nimport { getSimpleProductsAction, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { InvoiceDetailsHeaderComponent } from './components/invoice-details-header';\nimport { InvoiceDetailsPaymentDetailsComponent } from './components/invoice-details-payment-summary';\nimport { InvoiceDetailsProductsComponent } from './components/invoice-details-products';\nimport { InvoiceDetailsModel } from './helpers/invoice-data';\nimport { IInvoiceDetailsData } from './invoice-details.data';\nimport { IInvoiceDetailsProps } from './invoice-details.props.autogenerated';\n\nexport interface IInvoiceDetailsViewState {\n invoiceDetails?: InvoiceDetailsModel;\n payInvoiceErrorModalOpen?: boolean;\n}\n\nexport interface IInvoiceDetailsViewProps extends IInvoiceDetailsProps {\n moduleProps: IModuleProps;\n header: JSX.Element;\n products: JSX.Element;\n paymentDetails: JSX.Element;\n payInvoiceError?: JSX.Element;\n}\n\n/**\n * InvoiceDetails component.\n * @extends {React.PureComponent>}\n */\nclass InvoiceDetails extends React.PureComponent, IInvoiceDetailsViewState> {\n private static readonly _className: string = 'msc-invoice-details';\n\n public constructor(props: IInvoiceDetailsProps) {\n super(props);\n\n this.state = {};\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\n }\n\n public async componentDidMount(): Promise {\n const invoice = await this.props.data.invoice;\n const invoiceDetails = await this.props.data.invoiceDetails;\n\n const products = await this._getProducts(invoiceDetails.SalesInvoiceLine, invoiceDetails.ChannelId);\n\n const invoiceDetailsModel = new InvoiceDetailsModel(invoice, invoiceDetails, products);\n\n this.setState({\n invoiceDetails: invoiceDetailsModel,\n payInvoiceErrorModalOpen: false\n });\n }\n\n public render(): JSX.Element | null {\n if (!this.state.invoiceDetails) {\n return null;\n }\n\n const header = this._renderHeader();\n const products = this._renderProducts();\n const paymentDetails = this._renderPaymentDetails();\n const payInvoiceError = this._renderInvoiceErrors();\n\n const props: IInvoiceDetailsViewProps = {\n ...(this.props as IInvoiceDetailsProps),\n moduleProps: {\n moduleProps: this.props,\n className: InvoiceDetails._className\n },\n header,\n products,\n paymentDetails,\n payInvoiceError\n };\n\n return this.props.renderView(props);\n }\n\n private async _getProducts(invoiceLines: SalesInvoiceLine[] = [], channelId?: number): Promise {\n const productInputs = invoiceLines\n .filter(product => product.RecordId)\n .map(\n product =>\n new ProductInput(\n product.RecordId!,\n this.props.context.request.apiSettings,\n channelId,\n undefined,\n this.props.context.actionContext.requestContext\n )\n );\n return getSimpleProductsAction(productInputs, this.props.context.actionContext);\n }\n\n private _renderHeader(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n return (\n \n );\n }\n\n private _renderProducts(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n const { imageSettings } = this.props.config;\n return (\n \n );\n }\n\n private _renderPaymentDetails(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n return (\n \n );\n }\n\n private _onAddToCartFailed(): void {\n this.setState({ payInvoiceErrorModalOpen: true });\n }\n\n private _setPayInvoiceErrorModalClose(): void {\n this.setState({ payInvoiceErrorModalOpen: false });\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const {\n resources: {\n payInvoiceErrorDialogHeader,\n payInvoiceErrorDialogBodyErrorTitle,\n payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText,\n payInvoiceErrorDialogFooterCancelButtonText\n }\n } = this.props;\n\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n\n const errorClassName = `${InvoiceDetails._className}__errors`;\n\n return (\n \n );\n }\n}\n\nexport default InvoiceDetails;\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 { IInvoiceDetailsViewProps } from './invoice-details';\n\nexport const InvoiceDetailsView: React.FC = props => {\n const { header, products, paymentDetails, payInvoiceError } = props;\n\n return (\n \n {header}\n {products}\n {paymentDetails}\n {payInvoiceError}\n \n );\n};\n\nexport default InvoiceDetailsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Alert, Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IInvoiceErrorProps extends IComponentProps {\n messageHeader?: string;\n errorMessage?: string;\n otherError?: string;\n showError: boolean;\n payInvoiceErrorModalOpen: boolean;\n\n errorDialogHeader: string;\n errorDialogBodyErrorTitle: string;\n errorDialogBodyErrorDescription: string;\n errorDialogFooterGoToCartButtonText: string;\n errorDialogFooterCancelButtonText: string;\n cartUrl: string;\n\n setPayInvoiceErrorModalClose(): void;\n}\n\nexport interface IInvoiceErrorComponent extends IComponent {}\n\nexport const InvoiceError: React.FC = ({\n messageHeader,\n errorMessage,\n otherError,\n showError,\n payInvoiceErrorModalOpen,\n errorDialogHeader,\n errorDialogBodyErrorTitle,\n errorDialogBodyErrorDescription,\n errorDialogFooterGoToCartButtonText,\n errorDialogFooterCancelButtonText,\n cartUrl,\n setPayInvoiceErrorModalClose\n}) => {\n const errorMessages: (string | undefined)[] = [];\n\n if (otherError) {\n errorMessages.push(otherError);\n } else {\n errorMessages.push(errorMessage);\n }\n\n const className = 'msc-pay-invoice-error-dialog';\n\n return (\n <>\n 0} color='danger' assertive aria-label={messageHeader}>\n \n {errorMessages.map((message, index) => {\n return (\n
    \n {message}\n
    \n );\n })}\n
    \n \n \n {errorDialogHeader}\n \n \n
    \n
    {errorDialogBodyErrorTitle}
    \n
    {errorDialogBodyErrorDescription}
    \n
    \n
    \n \n \n {errorDialogFooterGoToCartButtonText}\n \n \n {errorDialogFooterCancelButtonText}\n \n \n
    \n \n );\n};\n\n// @ts-expect-error\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceError',\n { component: InvoiceError }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { IInvoiceStatusResources } from '../helpers/invoice-status';\n\nexport interface IInvoicesFilterResources extends IInvoiceStatusResources {\n invoicesFilterShowAll: string;\n}\n\nexport interface IInvoicesFilterProps extends IComponentProps {\n className: string;\n disabled: boolean;\n\n resources: IInvoicesFilterResources;\n\n currentState: InvoicesFilterState;\n onFilterStateChanged(state: InvoicesFilterState): void;\n}\n\nexport enum InvoicesFilterState {\n ShowAll,\n Paid,\n PartiallyPaid,\n Unpaid\n}\n\nconst getInvoicesFilterStateResources = (filterState: InvoicesFilterState, resources: IInvoicesFilterResources): string => {\n switch (filterState) {\n case InvoicesFilterState.ShowAll:\n return resources.invoicesFilterShowAll;\n case InvoicesFilterState.Paid:\n return resources.invoiceStatusPaid;\n case InvoicesFilterState.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n case InvoicesFilterState.Unpaid:\n return resources.invoiceStatusUnpaid;\n default:\n throw new Error('Failed to retrieve resource description for unknown invoices filter state.');\n }\n};\n\n/**\n * On Click function.\n * @param onStateClick -Invoice filter state function.\n * @param filterState -Invoice filter state.\n * @returns Set Invoice filter state.\n */\nconst onClickHandler = (onStateClick: (filterState: InvoicesFilterState) => void, filterState: InvoicesFilterState) => () => {\n onStateClick(filterState);\n};\n\nconst renderFilterStateItem = (\n filterState: InvoicesFilterState,\n resources: IInvoicesFilterResources,\n className: string,\n onStateClick: (filterState: InvoicesFilterState) => void\n): React.ReactNode => {\n const stateStringRepresentation = InvoicesFilterState[filterState];\n\n return (\n \n );\n};\n\nconst InvoicesFilter: React.FC = (props: IInvoicesFilterProps) => {\n const popoverRef = React.createRef();\n const [popoverState, setPopoverState] = React.useState(false);\n const togglePopover = React.useCallback(() => {\n setPopoverState(!popoverState);\n }, [popoverState]);\n\n const [filterState, setFilterState] = React.useState(props.currentState);\n\n const onFilterStateClick = (clickedState: InvoicesFilterState) => {\n setFilterState(clickedState);\n setPopoverState(false);\n props.onFilterStateChanged(clickedState);\n };\n\n return (\n
    \n \n {getInvoicesFilterStateResources(filterState, props.resources)}\n \n \n {EnumExtensions.getEnumValues(InvoicesFilterState).map(state => {\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\n })}\n \n
    \n );\n};\n\nexport const InvoicesFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesFilterProps\n>('InvoicesFilterComponent', { component: InvoicesFilter });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport React from 'react';\n\nexport interface IInvoicesTableHeaderResources {\n invoicesText: string;\n invoiceNumberText: string;\n invoiceDateMobileText: string;\n invoiceDateText: string;\n invoiceUsersText: string;\n invoiceAmountText: string;\n invoiceDueDateText: string;\n invoiceAmountDueText: string;\n invoiceStatusText: string;\n invoiceActionsText: string;\n invoiceListSelectAllRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isSelectedAll: boolean;\n isMobile: boolean;\n isAdmin: boolean;\n\n resources: IInvoicesTableHeaderResources;\n\n onSelectAll(isSelected: boolean): void;\n}\n\nexport interface IInvoicesTableHeaderComponent extends IComponent {}\n\nconst getDesktopHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n {resources.invoiceNumberText}\n {resources.invoiceDateText}\n {resources.invoiceUsersText}\n {resources.invoiceAmountText}\n {resources.invoiceDueDateText}\n {resources.invoiceAmountDueText}\n {resources.invoiceStatusText}\n {resources.invoiceActionsText}\n \n );\n};\n\nconst getMobileHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n {resources.invoicesText}\n {resources.invoiceDateMobileText}\n \n {` `}\n {/* Actions */}\n \n );\n};\n\nconst InvoicesTableHeader: React.FC = (props: IInvoicesTableHeaderProps): JSX.Element => {\n const rowClassName = `${props.className}__row`;\n\n const switchCheckedState = () => {\n props.onSelectAll(!props.isSelectedAll);\n };\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = getMobileHeaderCells(props, rowClassName, switchCheckedState);\n } else {\n headerCells = getDesktopHeaderCells(props, rowClassName, switchCheckedState);\n }\n\n return (\n \n {headerCells}\n \n );\n};\n\nexport const InvoicesTableHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableHeaderComponent\n>('InvoicesTableHeaderComponent', { component: InvoicesTableHeader });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, {\n IComponent,\n IComponentProps,\n ICoreContext,\n IDateFormatOptions,\n isOboRequest,\n msdyn365Commerce\n} from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { getInvoiceDetailsPageUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../../helpers/invoice-data';\nimport { getInvoiceStatusText, IInvoiceStatusResources } from '../../../helpers/invoice-status';\nimport { IInvoiceErrorState } from '../../../invoices-list';\nimport { IPayInvoiceResources, PayInvoiceComponent } from '../../pay-invoice-component';\nimport { RequestInvoiceButton } from '../../request-invoice-button';\n\ninterface IInvoicesTableRowData {\n invoice: InvoiceModel;\n index: number;\n customer: Customer;\n}\n\nexport interface IInvoicesTableRowResources extends IInvoiceStatusResources, IPayInvoiceResources {\n invoiceCurrentUser: string;\n invoiceViewDetailsButtonText: string;\n invoiceViewDetailsButtonAriaLabel: string;\n invoiceActionsButtonTextAriaLabel?: string;\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel?: string;\n invoiceRequestButtonLabel: string;\n invoiceListSelectRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n isMobile: boolean;\n invoiceReferences?: React.RefObject;\n payInvoiceReferences?: React.RefObject;\n resources: IInvoicesTableRowResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice?(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableRowComponent extends IComponent {}\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\n/**\n * Request specific invoice function.\n * @param props -Invoice table row props.\n * @param requestInvoiceButtonReference -Reference button.\n * @returns Call Request Invoice.\n */\nconst onRequestSpecificInvoice = (\n props: IInvoicesTableRowProps,\n requestInvoiceButtonReference: React.RefObject\n) => () => {\n props.onRequestInvoice!(props.data.invoice, requestInvoiceButtonReference);\n};\n\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice, customer }\n } = props;\n\n const isCurrentUser =\n !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n \n \n {formatDate(props.context, invoice.invoiceDate)}\n \n \n {invoice.customerName}\n {isCurrentUser ? {props.resources.invoiceCurrentUser} : null}\n \n {formatAmount(props.context, invoice.amount, invoice.currencyCode)}\n \n {formatDate(props.context, invoice.dueDate)}\n \n {formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}\n \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nlet setShowPreviousActions: React.Dispatch> | undefined;\n\n/**\n * On Click view details function.\n * @param linkToInvoiceDetails -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst onClickViewDetails = (linkToInvoiceDetails: string) => () => {\n if (MsDyn365.isBrowser) {\n window.location.href = linkToInvoiceDetails;\n }\n return;\n};\n\n/**\n * Toggle function.\n * @param isShowActions -Link to invoice details.\n * @param setShowActions -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst toggle = (isShowActions: boolean, setShowActions: React.Dispatch>) => () => {\n const shouldShowActions = !isShowActions;\n if (shouldShowActions) {\n if (setShowPreviousActions) {\n setShowPreviousActions(false);\n }\n setShowActions(shouldShowActions);\n setShowPreviousActions = setShowActions;\n } else {\n setShowPreviousActions = undefined;\n setShowActions(shouldShowActions);\n }\n};\n\nconst extraActionsPopup = (props: IInvoicesTableRowProps): JSX.Element | null => {\n const {\n resources: {\n invoiceViewDetailsButtonAriaLabel,\n invoiceViewDetailsButtonText,\n invoiceActionsButtonTextAriaLabel,\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel\n },\n data: { index }\n } = props;\n\n const [showActions, setShowActions] = useState(false);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n\n const className = `${props.className}__extra-actions-cell`;\n const actionsContainerClassName = `${className}__actions-container`;\n const payInvoiceClassName = `${actionsContainerClassName}__pay-invoice`;\n return (\n
    \n \n {showActions && !isOnBehalfOfRequest && (\n
    \n \n {invoiceViewDetailsButtonText}\n \n \n \n
    \n )}\n
    \n );\n};\n\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice }\n } = props;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n
    \n {invoice.customerName}\n \n \n {formatDate(props.context, invoice.dueDate)}\n
    \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\n const {\n data: { invoice }\n } = props;\n\n const onSelectLine = () => {\n invoice.isSelected = !invoice.isSelected;\n props.onChange();\n };\n\n let rowCells: JSX.Element;\n if (props.isMobile) {\n rowCells = getMobileRowCells(props, onSelectLine);\n } else {\n rowCells = getDesktopRowCells(props, onSelectLine);\n }\n\n return {rowCells};\n};\n\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableRowComponent\n>('InvoicesTableRowComponent', { component: InvoicesTableRow });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../helpers/invoice-data';\nimport { IInvoiceErrorState } from '../../invoices-list';\nimport { IInvoicesTableHeaderResources, InvoicesTableHeaderComponent } from './components/invoices-table-header-component';\nimport { IInvoicesTableRowResources, InvoicesTableRowComponent } from './components/invoices-table-row-component';\n\ninterface IInvoicesTableData {\n invoices: InvoiceModel[];\n customer: Customer;\n}\n\nexport interface IInvoicesTableResources extends IInvoicesTableHeaderResources, IInvoicesTableRowResources {}\n\nexport interface IInvoicesTableProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n invoiceButtonReferences?: React.RefObject[];\n payInvoiceButtonReferences?: React.RefObject[];\n resources: IInvoicesTableResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableComponent extends IComponent {}\n\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nconst getViewport = (context: ICoreContext): GridSize => {\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (window?.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n};\n\nconst isMobileView = (context: ICoreContext) => {\n const viewport = getViewport(context);\n return viewport === 'xs' || viewport === 'sm';\n};\n\n/**\n * On select all function.\n * @param props -Invoice table props.\n * @returns On change.\n */\nconst onSelectAllHandler = (props: IInvoicesTableProps) => (isSelected: boolean) => {\n props.data.invoices.forEach(invoice => {\n invoice.isSelected = isSelected;\n });\n props.onChange();\n};\n\nconst InvoicesTable: React.FC = (props: IInvoicesTableProps): JSX.Element => {\n const [isMobile, setIsMobile] = useState(isMobileView(props.context));\n\n const updateViewport = () => {\n setIsMobile(isMobileView(props.context));\n };\n\n if (typeof window !== undefined && window.addEventListener) {\n window.addEventListener('resize', updateViewport);\n }\n const rowClassName = `${props.className}__row`;\n const headerClassName = `${props.className}__header`;\n\n return (\n \n invoice.isSelected)}\n isMobile={isMobile}\n isAdmin={props.data.customer.IsB2bAdmin || false}\n onSelectAll={onSelectAllHandler(props)}\n resources={props.resources}\n data={{}}\n />\n {props.data.invoices.map((invoice, index: number) => {\n return (\n \n );\n })}\n
    \n );\n};\n\nexport const InvoicesTableComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableComponent\n>('InvoicesTableComponent', { component: InvoicesTable });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\ninterface IMakePaymentData {\n invoices: InvoiceModel[];\n}\n\nexport interface IMakePaymentResources {\n makePaymentButtonText: string;\n makePaymentButtonAriaLabel: string;\n}\n\nexport interface IMakePaymentProps extends IComponentProps {\n context: ICoreContext;\n itemKey?: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n telemetryContent?: ITelemetryContent;\n navigationUrl?: string;\n buttonReferences?: React.RefObject;\n resources: IMakePaymentResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IMakePaymentComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IMakePaymentProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.buttonReferences);\n }\n setDisabled(false);\n };\n\n await payInvoices(props.data.invoices, props.context.actionContext, propagateError);\n};\n\nconst MakePaymentComponentActions = {\n onClick\n};\n\n/**\n * On Click function.\n * @param input -Make payment props.\n * @param setDisabled -Set Disabled.\n * @returns Make payment component on click.\n */\nconst onClickHandler = (input: IMakePaymentProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await MakePaymentComponentActions.onClick(event, input, setDisabled);\n};\n\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\n const {\n data: { invoices }\n } = input;\n const hasInvoices = ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid));\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {input.resources.makePaymentButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const MakePaymentComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'MakePayment',\n { component: MakePayment }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { IPayableInvoice } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\nexport interface IPayInvoiceData {\n invoice: IPayableInvoice;\n}\n\nexport interface IPayInvoiceResources {\n payInvoiceButtonText: string;\n payInvoiceButtonAriaLabel: string;\n}\n\nexport interface IPayInvoiceProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n reference?: React.RefObject;\n resources: IPayInvoiceResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\ninterface IPayInvoiceComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IPayInvoiceProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.reference);\n }\n setDisabled(false);\n };\n\n await payInvoices([props.data.invoice], props.context.actionContext, propagateError);\n};\n\nconst PayInvoiceComponentActions = {\n onClick\n};\n\n/**\n * On click handler function.\n * @param props -Invoice props.\n * @param setDisabled -Set disabled.\n * @returns Pay invoice component action.\n */\nconst onClickHandler = (props: IPayInvoiceProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await PayInvoiceComponentActions.onClick(event, props, setDisabled);\n};\n\nconst PayInvoice: React.FC = (props: IPayInvoiceProps): JSX.Element => {\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {props.resources.payInvoiceButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const PayInvoiceComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'PayInvoiceComponent',\n { component: PayInvoice, ...PayInvoiceComponentActions }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IRequestInvoiceButtonProps {\n innerReference?: React.RefObject;\n className: string;\n requestInvoiceButtonLabel: string;\n onClicked(): void;\n}\n\nexport const RequestInvoiceButton: React.FC = ({\n className,\n onClicked,\n requestInvoiceButtonLabel,\n innerReference\n}) => {\n return (\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 { InvoicePaidStatus, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IPayableInvoice {\n readonly id: string;\n readonly canBePaid: boolean;\n}\n\n/**\n * Represents invoice data model.\n */\nexport class InvoiceModel implements IPayableInvoice {\n public id: string;\n\n public invoiceDate?: Date;\n\n public customerAccountNumber?: string;\n\n public customerName?: string;\n\n public amount?: number;\n\n public dueDate?: Date;\n\n public amountDue?: number;\n\n public status?: InvoicePaidStatus;\n\n public currencyCode?: string;\n\n public isSelected: boolean;\n\n public constructor(invoice: OrderInvoice) {\n this.id = invoice.Id || '';\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\n this.customerAccountNumber = invoice.CustomerAccountNumber;\n this.customerName = invoice.CustomerName;\n this.amount = invoice.TotalAmount;\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\n this.amountDue = invoice.AmountBalance;\n this.status = invoice.InvoicePaidStatusValue;\n this.currencyCode = invoice.CurrencyCode;\n\n this.isSelected = false;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IInvoiceStatusResources {\n invoiceStatusNone: string;\n invoiceStatusUnpaid: string;\n invoiceStatusPartiallyPaid: string;\n invoiceStatusPaid: string;\n}\n\nexport const getInvoiceStatusText = (resources: IInvoiceStatusResources, invoiceStatus: InvoicePaidStatus | undefined) => {\n switch (invoiceStatus) {\n case InvoicePaidStatus.None:\n return resources.invoiceStatusNone;\n\n case InvoicePaidStatus.Unpaid:\n return resources.invoiceStatusUnpaid;\n\n case InvoicePaidStatus.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n\n case InvoicePaidStatus.Paid:\n return resources.invoiceStatusPaid;\n default:\n return '';\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IInvoiceErrorState } from '../invoices-list';\nimport { IPayableInvoice } from './invoice-data';\n\nexport type ICartActionFailureReason = 'EMPTYINPUT' | 'CARTACTIONFAILED';\nexport interface IAddInvoicesToCartFailureResult {\n failureReason: ICartActionFailureReason;\n}\n\nexport const payInvoices = async (\n invoices: IPayableInvoice[],\n actionContext: IActionContext,\n onError: (errorState: IInvoiceErrorState) => void\n) => {\n const invoicesToAdd: string[] = invoices.filter(invoice => invoice.canBePaid).map(invoice => invoice.id);\n\n if (!ArrayExtensions.hasElements(invoicesToAdd)) {\n onError({ errorMessage: '', errorReason: { failureReason: 'EMPTYINPUT' } });\n return;\n }\n\n const cartState = await getCartState(actionContext);\n const result = await cartState.addInvoicesToCart({ invoiceIds: invoicesToAdd });\n\n if (result.status !== 'SUCCESS') {\n onError({\n errorMessage: '',\n errorReason: { failureReason: 'CARTACTIONFAILED' },\n otherError: result.errorDetails?.LocalizedMessage,\n errorCode: result.errorDetails?.ErrorResourceId\n });\n return;\n }\n\n const cartUrl = getUrlSync('cart', actionContext);\n if (cartUrl) {\n window?.location.assign(cartUrl);\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\n\n/* ---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { IInvoicesListResources } from '../invoices-list.props.autogenerated';\n\ninterface IRequestInvoiceModalProps {\n className: string;\n email: string;\n isModalOpen: boolean;\n submitRequestLabel: string;\n modalHeaderLabel: string;\n sendToEmailLabel: string;\n cancelLabel: string;\n searchPlaceholderLabel: string;\n invoices: InvoiceModel[];\n invoicesFoundString: string;\n singleInvoiceFoundString: string;\n searchButtonAltText: string;\n resources: IInvoicesListResources;\n toggle(): void;\n onSubmitRequest(invoiceId: string): void;\n}\n\n/**\n * On submit request click function.\n * @param selectedInvoiceIndex -Check is busy.\n * @param onClosing -On closing function.\n * @param filteredInvoices -Invoice modal.\n * @param onSubmitRequest -On submit request function.\n * @returns Call on submit request.\n */\nconst onSubmitRequestClick = (\n onClosing: () => void,\n filteredInvoices: InvoiceModel[],\n onSubmitRequest: (invoiceId: string) => void,\n checkboxRef: React.MutableRefObject\n) => () => {\n const defaultIndex = 0;\n let closingFlag: number = 0;\n\n filteredInvoices.map((invoice, index) => {\n const inputInvoice = checkboxRef.current[Number(index)] as React.RefObject;\n if (inputInvoice.current?.checked === true && index >= defaultIndex) {\n onSubmitRequest(invoice.id);\n closingFlag = closingFlag + 1;\n }\n });\n if (closingFlag <= filteredInvoices.length) {\n onClosing();\n }\n};\n\n/**\n * On search input change function.\n * @param setSearchInput -Set search input.\n * @returns Set search input function.\n */\nconst searchInputChangedHandler = (setSearchInput: React.Dispatch>) => (\n event: React.ChangeEvent\n) => {\n setSearchInput(event.target.value);\n};\n\n/**\n * Search entered handler.\n * @param invoices -InvoiceModel.\n * @param searchInput -String.\n * @param setFilteredInvoices -InvoiceModel action.\n * @param filteredInvoices -Filtered Invoices.\n * @param setSelectedInvoiceIndex -Selected Invoice Index.\n * @param setShouldShowSearchResults -Show search result action.\n * @param setInvoiceOptions -Invoice options action.\n * @param selectedInvoiceIndex -Selected invoice index.\n * @param className -String.\n * @returns Set invoice options.\n */\nconst searchEnteredHandler = (\n invoices: InvoiceModel[],\n searchInput: string,\n setFilteredInvoices: React.Dispatch>,\n filteredInvoices: InvoiceModel[],\n setSelectedInvoiceIndex: React.Dispatch>,\n setShouldShowSearchResults: React.Dispatch>,\n setInvoiceOptions: React.Dispatch>,\n selectedInvoiceIndex: number,\n className: string,\n checkboxRef: React.MutableRefObject\n) => () => {\n let updatedInvoices = filteredInvoices;\n if (!StringExtensions.isNullOrEmpty(searchInput)) {\n updatedInvoices = invoices.filter(invoice => invoice.id.toLocaleUpperCase().includes(searchInput.toLocaleUpperCase()));\n } else {\n updatedInvoices = invoices;\n }\n\n if (ArrayExtensions.hasElements(updatedInvoices)) {\n setFilteredInvoices(updatedInvoices);\n setSelectedInvoiceIndex(0);\n } else {\n setFilteredInvoices(updatedInvoices);\n setSelectedInvoiceIndex(-1);\n }\n setShouldShowSearchResults(true);\n\n setInvoiceOptions(\n renderInvoiceOptions(\n StringExtensions.isNullOrEmpty(searchInput) ? invoices : updatedInvoices,\n setSelectedInvoiceIndex,\n className,\n checkboxRef\n )\n );\n};\n\n/**\n * On cancel function.\n * @param onClosing -Closing function.\n * @param toggle -Toggle Function.\n * @returns Toggle function.\n */\nconst onCancelHandler = (onClosing: () => void, toggle: () => void) => () => {\n onClosing();\n toggle();\n};\n\n/**\n * On invoice select.\n * @param setSelectedInvoiceIndex -Set Selected Invoice Index.\n * @param index -Number.\n * @returns Set Selected Invoice Index.\n */\nconst onInvoiceSelectHandler = (setSelectedInvoiceIndex: (newIndex: number) => void, index: number) => () => {\n setSelectedInvoiceIndex(index);\n};\n\nconst renderInvoiceOptions = (\n filteredInvoices: InvoiceModel[],\n setSelectedInvoiceIndex: (newIndex: number) => void,\n className: string,\n checkboxRef: React.MutableRefObject\n) => {\n checkboxRef.current = filteredInvoices.map((_invoice, i) => checkboxRef.current[Number(i)] ?? React.createRef());\n return (\n
    \n {filteredInvoices.map((invoice, index) => {\n const onInvoiceSelect = onInvoiceSelectHandler(setSelectedInvoiceIndex, index);\n\n const checkboxId = `invoice__${invoice.id}`;\n const checkboxName = `invoiceSelect__${invoice.id}`;\n\n return (\n
    \n \n \n
    \n );\n })}\n
    \n );\n};\n\nexport const RequestInvoiceModal: React.FC = ({\n className,\n email,\n isModalOpen,\n toggle,\n modalHeaderLabel,\n sendToEmailLabel,\n submitRequestLabel,\n cancelLabel,\n onSubmitRequest,\n invoices,\n searchPlaceholderLabel,\n invoicesFoundString,\n singleInvoiceFoundString,\n searchButtonAltText,\n resources\n}) => {\n const [selectedInvoiceIndex, setSelectedInvoiceIndex] = React.useState(-1);\n const [filteredInvoices, setFilteredInvoices] = React.useState(invoices);\n const [searchInput, setSearchInput] = React.useState('');\n const [shouldShowSearchResults, setShouldShowSearchResults] = React.useState(false);\n const focusDelay = 110;\n const checkboxRef = React.useRef([]);\n const invoiceOptionsData = renderInvoiceOptions(filteredInvoices, setSelectedInvoiceIndex, className, checkboxRef);\n const [invoiceOptions, setInvoiceOptions] = React.useState(invoiceOptionsData);\n const focusElement = React.useRef(null);\n React.useEffect(() => {\n if (isModalOpen && focusElement.current) {\n setTimeout(() => {\n focusElement.current?.focus();\n }, focusDelay);\n }\n }, [isModalOpen]);\n\n /**\n * Sets the filtered invoices to the ones that were selected on the main screen.\n */\n const setFilteredInvoicesToSelectedInvoices = () => {\n setSelectedInvoiceIndex(-1);\n const selectedInvoices = invoices.filter(invoice => invoice.isSelected);\n if (ArrayExtensions.hasElements(selectedInvoices)) {\n setFilteredInvoices(selectedInvoices);\n\n // If only one invoice selected, auto select it\n if (selectedInvoices.length === 1) {\n setSelectedInvoiceIndex(0);\n }\n\n setInvoiceOptions(renderInvoiceOptions(selectedInvoices, setSelectedInvoiceIndex, className, checkboxRef));\n } else {\n setFilteredInvoices(invoices);\n setInvoiceOptions(renderInvoiceOptions(invoices, setSelectedInvoiceIndex, className, checkboxRef));\n }\n };\n\n const searchEntered = searchEnteredHandler(\n invoices,\n searchInput,\n setFilteredInvoices,\n filteredInvoices,\n setSelectedInvoiceIndex,\n setShouldShowSearchResults,\n setInvoiceOptions,\n selectedInvoiceIndex,\n className,\n checkboxRef\n );\n\n const onClosing = () => {\n setSelectedInvoiceIndex(-1);\n setFilteredInvoices(invoices);\n setSearchInput('');\n setShouldShowSearchResults(false);\n };\n\n /**\n * Sets the invoices that are possible to select when the dialog is opened.\n */\n const onOpened = () => {\n setSearchInput('');\n setFilteredInvoicesToSelectedInvoices();\n };\n\n const searchResultString = filteredInvoices.length === 1 ? singleInvoiceFoundString : invoicesFoundString;\n const invoicesFoundReplaceIndex = searchResultString.indexOf('{0}');\n\n return (\n \n \n {modalHeaderLabel}\n \n \n
    \n \n
    \n {email}\n
    \n
    \n {shouldShowSearchResults && (\n
    \n {searchResultString.substring(0, invoicesFoundReplaceIndex)}\n {filteredInvoices.length}\n {searchResultString.substring(invoicesFoundReplaceIndex + 3)}\n
    \n )}\n
    \n \n \n
    \n {invoiceOptions}\n
    \n
    \n
    \n \n \n {submitRequestLabel}\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 { getUrlSync, isOboRequest } from '@msdyn365-commerce/core';\nimport {\n BusinessPartnerOperationDeliveryType,\n BusinessPartnerUsersDataActions,\n InvoicePaidStatus,\n InvoiceSearchCriteria,\n IQueryResultSettings,\n OrderInvoice\n} from '@msdyn365-commerce/retail-proxy';\nimport { getCurrentAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport {\n ArrayExtensions,\n getCustomer,\n GetCustomerInput,\n getInvoices,\n GetInvoicesInput,\n IQueryResultSettingsModuleConfig,\n QueryResultSettingsProxy,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { InvoiceErrorComponent } from './components/invoice-error-component';\nimport { InvoicesFilterComponent, InvoicesFilterState } from './components/invoices-filter-component';\nimport { InvoicesTableComponent } from './components/invoices-table/invoices-table-component';\nimport { IMakePaymentResources, MakePaymentComponent } from './components/make-payment-component';\nimport { RequestInvoiceButton } from './components/request-invoice-button';\nimport { RequestInvoiceModal } from './components/request-invoice-modal';\nimport { InvoiceModel } from './helpers/invoice-data';\nimport { IAddInvoicesToCartFailureResult } from './helpers/pay-invoices';\nimport { IInvoicesListData } from './invoices-list.data';\nimport { IInvoicesListProps } from './invoices-list.props.autogenerated';\n\nexport type InvoicesListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\nexport type InvoiceErrorHost = 'ADDINVOICETOCART';\n\nexport interface IInvoicesListViewProps extends IInvoicesListProps {\n moduleProps: IModuleProps;\n\n header: JSX.Element;\n filter: JSX.Element;\n content?: JSX.Element;\n invoiceRequestModal?: JSX.Element;\n pagination?: JSX.Element;\n}\n\nexport interface IInvoiceErrorState {\n errorHost?: InvoiceErrorHost;\n errorReason?: IAddInvoicesToCartFailureResult;\n errorMessage: string;\n otherError?: string;\n errorCode?: string;\n}\n\nexport interface IInvoicesListState {\n invoices: InvoiceModel[];\n invoicesFilterState: InvoicesFilterState;\n errorState: IInvoiceErrorState;\n isInvoiceRequestModalOpen: boolean;\n isLoading: boolean;\n isPageLoaded: boolean;\n payInvoiceErrorModalOpen: boolean;\n selectedButtonElement?: HTMLButtonElement | null;\n}\n\n/**\n * InvoicesList component.\n * @extends {React.Component, IInvoicesListState>}\n */\nclass InvoicesList extends React.Component, IInvoicesListState> {\n private readonly _className: string = 'msc-invoices-list';\n\n private readonly payInvoiceRequestReference: React.RefObject;\n\n private readonly makePaymentReference: React.RefObject;\n\n private buttonChildReference: React.RefObject[] = [];\n\n private buttonChildPayButtonReference: React.RefObject[] = [];\n\n private readonly _queryResultSettings: IQueryResultSettings;\n\n constructor(props: IInvoicesListProps) {\n super(props);\n\n this._queryResultSettings = QueryResultSettingsProxy.fromModuleData(\n this.props.context.request,\n this.props.config as IQueryResultSettingsModuleConfig\n ).QueryResultSettings;\n this.payInvoiceRequestReference = React.createRef();\n this.makePaymentReference = React.createRef();\n this._updateInvoicesState = this._updateInvoicesState.bind(this);\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._onToggleInvoiceRequestModal = this._onToggleInvoiceRequestModal.bind(this);\n this._handleFilterStateChange = this._handleFilterStateChange.bind(this);\n this._loadMoreInvoices = this._loadMoreInvoices.bind(this);\n this._requestInvoice = this._requestInvoice.bind(this);\n this._requestSpecificInvoice = this._requestSpecificInvoice.bind(this);\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\n this.state = {\n invoices: [],\n invoicesFilterState: InvoicesFilterState.ShowAll,\n isLoading: true,\n isPageLoaded: false,\n errorState: { errorMessage: '' },\n isInvoiceRequestModalOpen: false,\n payInvoiceErrorModalOpen: false,\n selectedButtonElement: null\n };\n }\n\n public shouldComponentUpdate(nextProps: IInvoicesListProps, nextState: IInvoicesListState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className = '', heading },\n context: {\n request: { channel },\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n },\n data: { customerBalance },\n resources: { invoicesListTitle, invoicesListDescTitle, invoicesListDescCount }\n } = this.props;\n\n const totalAmount = customerBalance.result?.OpenInvoiceBalance || 0;\n const amountText = `${formatCurrency(totalAmount.toFixed(2), currencyCode)} ${channel?.Currency || 'USD'}`;\n\n const totalCount = customerBalance.result?.OpenInvoiceCount || 0;\n const countText = invoicesListDescCount.replace('{0}', totalCount.toString());\n const invoicesListTitleHeading = heading?.text ?? invoicesListTitle;\n\n const headerClassName = `${this._className}__header`;\n\n const header = (\n
    \n \n
    \n
    {invoicesListDescTitle}
    \n
    {amountText}
    \n
    {countText}
    \n
    \n
    \n );\n\n const viewProps: IInvoicesListViewProps = {\n ...(this.props as IInvoicesListProps),\n moduleProps: {\n moduleProps: this.props,\n className: classnames(this._className, className)\n },\n header,\n invoiceRequestModal: this._renderInvoiceRequestModal(),\n filter: this._renderInvoicesFilter(this._className),\n pagination: this._renderPagination()\n };\n\n if (!this.state.isPageLoaded) {\n return this.props.renderView(viewProps);\n }\n\n if (ArrayExtensions.hasElements(this.state.invoices)) {\n viewProps.content = this._renderListContainer();\n } else {\n viewProps.content = this._renderEmptyInvoiceLinesPageContent();\n }\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public async componentDidMount(): Promise {\n await this.props.data.customer;\n const invoicesData = await this.props.data.invoices;\n this._initializeWithInvoices(invoicesData);\n }\n\n private _initializeWithInvoices(invoicesData: OrderInvoice[]): void {\n const invoices = invoicesData.map((invoice, index) => {\n this.buttonChildReference[Number(index)] = React.createRef();\n this.buttonChildPayButtonReference[Number(index)] = React.createRef();\n return new InvoiceModel(invoice);\n });\n this.setState({\n invoices,\n isLoading: false,\n isPageLoaded: true\n });\n }\n\n private _addInvoices(invoicesData: OrderInvoice[]): void {\n const newInvoices = invoicesData.map(invoice => new InvoiceModel(invoice));\n const invoices = this.state.invoices.concat(newInvoices);\n this.setState({\n invoices,\n isLoading: false\n });\n }\n\n private _renderEmptyInvoiceLinesPageContent(): JSX.Element {\n const containerClass = `${this._className}__empty-lines__container`;\n const actionsContainerClass = `${containerClass}__actions`;\n return (\n
    \n
    {this.props.resources.invoiceEmptyInvoiceLinesTitle}
    \n
    {this.props.resources.invoiceEmptyInvoiceLinesDescription}
    \n
    \n \n {this.props.resources.invoiceEmptyInvoiceLinesContinueShoppingButtonText}\n \n
    \n
    \n );\n }\n\n private _renderListContainer(): JSX.Element {\n const containerClass = `${this._className}__container`;\n const containerHeaderClass = `${containerClass}__header`;\n const containerContentClass = `${containerClass}__content`;\n const isOnBehalfOfRequest = isOboRequest(this.props.context.request);\n\n return (\n
    \n
    \n {this._renderMakePayment(containerHeaderClass, isOnBehalfOfRequest)}\n {this._renderInvoiceRequestButton()}\n
    \n
    {this._renderInvoiceErrors()}
    \n
    {this._renderInvoicesList(containerContentClass)}
    \n
    \n );\n }\n\n private _updateInvoicesState(): void {\n this.setState({\n invoices: this.state.invoices\n });\n }\n\n private async _getInvoicesSearchCriteria(state: InvoicesFilterState): Promise {\n const searchCriteria: InvoiceSearchCriteria = {};\n\n const context = this.props.context.actionContext;\n\n const businessPartner = await getCurrentAsync({ callerContext: context });\n searchCriteria.BusinessPartnerId = businessPartner.BusinessPartnerId;\n\n const customer = await getCustomer(new GetCustomerInput(context.requestContext.apiSettings), context);\n searchCriteria.CustomerId = customer.AccountNumber;\n\n switch (state) {\n case InvoicesFilterState.ShowAll:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.None];\n break;\n case InvoicesFilterState.Paid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Paid];\n break;\n case InvoicesFilterState.PartiallyPaid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.PartiallyPaid];\n break;\n case InvoicesFilterState.Unpaid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Unpaid];\n break;\n default:\n throw new Error('Failed to process unknown invoices filter state.');\n }\n\n return searchCriteria;\n }\n\n private async _handleFilterStateChange(state: InvoicesFilterState): Promise {\n this.setState({\n invoicesFilterState: state,\n isLoading: true\n });\n\n const searchCriteria = await this._getInvoicesSearchCriteria(state);\n\n if (this._queryResultSettings.Paging) {\n this._queryResultSettings.Paging.Skip = 0;\n }\n\n const invoices = await getInvoices(\n new GetInvoicesInput(searchCriteria, this._queryResultSettings),\n this.props.context.actionContext\n );\n this._initializeWithInvoices(invoices);\n }\n\n private _renderInvoicesFilter(className: string): JSX.Element {\n const filterClassName = `${className}__filter`;\n return (\n \n );\n }\n\n private _renderInvoicesList(className: string): JSX.Element {\n const tableClassName = `${className}__table`;\n return (\n \n );\n }\n\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState, reference?: React.RefObject): void {\n const errorState = { ...newErrorState };\n errorState.errorHost = 'ADDINVOICETOCART';\n errorState.errorMessage =\n newErrorState.errorReason?.failureReason === 'EMPTYINPUT'\n ? this.props.resources.invoiceErrorInvoiceIdNotExist\n : this.props.resources.invoiceErrorFailedAddInvoiceToCart;\n\n const shouldShowAdditionalInfoInPopup =\n errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineNotAllowedWithItemLines';\n this.setState({ errorState, payInvoiceErrorModalOpen: shouldShowAdditionalInfoInPopup, selectedButtonElement: reference?.current });\n }\n\n private _renderMakePayment(className: string, disabled: boolean): JSX.Element {\n const id = `${className}__make-payment`;\n const makePaymentResources: IMakePaymentResources = {\n makePaymentButtonText: this.props.resources.makePaymentButtonText,\n makePaymentButtonAriaLabel: this.props.resources.makePaymentButtonAriaLabel\n };\n\n const selectedInvoices = this._getSelectedInvoices();\n\n return (\n \n );\n }\n\n private _setPayInvoiceErrorModalClose(): void {\n this.setState({\n payInvoiceErrorModalOpen: false\n });\n this.state.selectedButtonElement?.focus();\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const {\n resources: {\n payInvoiceErrorDialogHeader,\n payInvoiceErrorDialogBodyErrorTitle,\n payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText,\n payInvoiceErrorDialogFooterCancelButtonText\n }\n } = this.props;\n\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n\n const errorClassName = `${this._className}__errors`;\n\n return (\n \n );\n }\n\n private _renderPagination(): JSX.Element | undefined {\n const { data, resources } = this.props;\n const invoices = data?.invoices?.result;\n if (!invoices || invoices.length < this._queryResultSettings.Paging!.Top!) {\n return undefined;\n }\n\n return (\n \n {resources.invoicesLoadMore}\n \n );\n }\n\n private async _loadMoreInvoices(): Promise {\n this.setState({ isLoading: true });\n const searchCriteria = await this._getInvoicesSearchCriteria(this.state.invoicesFilterState);\n if (this._queryResultSettings.Paging) {\n this._queryResultSettings.Paging.Skip! += this._queryResultSettings.Paging.Top!;\n }\n const newInvoices = await getInvoices(\n new GetInvoicesInput(searchCriteria, this._queryResultSettings),\n this.props.context.actionContext\n );\n this._addInvoices(newInvoices);\n }\n\n private _renderInvoiceRequestModal(): JSX.Element {\n const customer = this.props.data.customer.result;\n const {\n invoiceRequestModalCancelLabel,\n invoiceRequestModalSubmitLabel,\n invoiceRequestModalHeaderLabel,\n invoiceRequestModalSendToEmailLabel,\n invoiceRequestModalSearch,\n invoiceRequestModalInvoiceSearchDisplay,\n invoiceRequestModalSingleInvoiceSearchDisplay,\n invoiceRequestModalSearchButton\n } = this.props.resources;\n\n return (\n \n );\n }\n\n private _onToggleInvoiceRequestModal(): void {\n this.setState({\n isInvoiceRequestModalOpen: !this.state.isInvoiceRequestModalOpen\n });\n if (this.state.isInvoiceRequestModalOpen) {\n this.state.selectedButtonElement?.focus();\n }\n }\n\n /**\n * Request specific invoice function.\n */\n private readonly _onToggleInvoiceRequestParentModal = () => {\n this.setState(\n {\n selectedButtonElement: this.payInvoiceRequestReference.current\n },\n () => {\n this._onToggleInvoiceRequestModal();\n }\n );\n };\n\n private _renderInvoiceRequestButton(): JSX.Element | null {\n const { invoiceRequestButtonLabel } = this.props.resources;\n const customer = this.props.data.customer.result;\n\n if (StringExtensions.isNullOrWhitespace(customer?.Email)) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _requestInvoice(invoiceId: string): void {\n const context = { callerContext: this.props.context.actionContext };\n const b2bUserId: string = this.props.data.b2bUserInformation?.result?.B2BUserId || '';\n\n BusinessPartnerUsersDataActions.requestInvoiceCopyAsync(context, b2bUserId, invoiceId, BusinessPartnerOperationDeliveryType.Email);\n\n this._onToggleInvoiceRequestModal();\n }\n\n private _getSelectedInvoices(): InvoiceModel[] {\n let selectedInvoices = this.state.invoices.filter(invoice => invoice.isSelected);\n if (!ArrayExtensions.hasElements(selectedInvoices)) {\n selectedInvoices = this.state.invoices;\n }\n\n return selectedInvoices;\n }\n\n private _requestSpecificInvoice(\n specificInvoice: InvoiceModel,\n requestInvoiceButtonReference: React.RefObject\n ): void {\n this.state.invoices.forEach((invoice: InvoiceModel) => {\n if (invoice === specificInvoice) {\n invoice.isSelected = true;\n } else {\n invoice.isSelected = false;\n }\n });\n this.setState({\n selectedButtonElement: requestInvoiceButtonReference.current\n });\n this._onToggleInvoiceRequestModal();\n }\n}\n\nexport default InvoicesList;\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 { IInvoicesListViewProps } from './invoices-list';\n\nexport const InvoiceListView: React.FC = props => {\n const { header, filter, content, invoiceRequestModal, pagination } = props;\n\n return (\n \n {header}\n {invoiceRequestModal}\n {filter}\n {content}\n {pagination}\n \n );\n};\n\nexport default InvoiceListView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Store Pickup option list interface.\n */\nexport interface IStorePickUpOptionListProps {\n productPickupListOptionMenuText?: string;\n productPickupModeList?: DeliveryOption[];\n defaultOptionText?: string;\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Store Pickup option state interface.\n */\nexport interface IStorePickOptionListState {\n isFilterExpanded: boolean;\n selectedPickupMode?: string;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class StorePickUpOptionList extends React.PureComponent {\n private readonly _storePickupListOptionMenu: React.RefObject;\n\n public constructor(props: IStorePickUpOptionListProps) {\n super(props);\n this._storePickupListOptionMenu = React.createRef();\n this.state = {\n isFilterExpanded: false,\n selectedPickupMode: ''\n };\n }\n\n public render(): JSX.Element {\n const { productPickupListOptionMenuText, productPickupModeList, defaultOptionText } = this.props;\n const selectedPickupModeDesc = defaultOptionText\n ? defaultOptionText\n : productPickupModeList?.find((delivery: DeliveryOption) => delivery.Code === this.state.selectedPickupMode)?.Description;\n const role = 'menu';\n return (\n
    \n \n {this.state.isFilterExpanded ? (\n
      \n {productPickupModeList?.map((delivery: DeliveryOption) => {\n return (\n
    • \n \n \n {delivery.Description}\n \n \n
    • \n );\n })}\n
    \n ) : null}\n
    \n );\n }\n\n /**\n * Method to call when drop dwon get selected.\n */\n private readonly _rendeDeliveryOptions = () => {\n const isExpandOptionsState = this.state.isFilterExpanded;\n this.setState({\n isFilterExpanded: !isExpandOptionsState\n });\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n\n /**\n * Method to call on select pickup mode.\n * @param event - Mouse event.\n * @returns Void.\n */\n private readonly _onKeyDown = async (event: React.KeyboardEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode !== null) {\n this.setState({\n selectedPickupMode: deliveryCode\n });\n\n this._rendeDeliveryOptions();\n await this.props.onChange(deliveryCode);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources } from '../store-selector.props.autogenerated';\nimport { IStoreSelectorLocationLineItemResources, StoreSelectorLocationLineItemComponent } from './store-selector-location-line-item';\n\n/**\n * Store selector location lines props interface.\n */\nexport interface IStoreSelectorLocationLinesProps {\n locations?: IFullOrgUnitAvailability[];\n resources: IStoreSelectorResources;\n preferredDistanceUnit?: string;\n\n alreadySelectedLocation?: OrgUnitLocation;\n outOfStockThreshold: number;\n enableOutOfStockCheck: boolean;\n storeLocatorView?: boolean;\n selectedStoreLocationId?: string;\n isPreferredStoreEnabled?: boolean;\n displayList?: boolean;\n isLocationDisabled?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n onClick: (locationId: string | undefined) => void;\n preferredStoreLocationId: string | null;\n onSetAsPreferredStore: (locationId: string | undefined) => void;\n onRemovePreferredStore: () => void;\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onLocationSelected(location: OrgUnitLocation | undefined): void;\n}\n\n/**\n * Displays all the location line items, or null if none exists.\n */\n@observer\nexport class StoreSelectorLocationLines extends React.PureComponent {\n @observable private _stores: IFullOrgUnitAvailability[] | undefined;\n\n private readonly selectedLocationRef: React.RefObject;\n\n private storeCounter: number;\n\n public constructor(props: IStoreSelectorLocationLinesProps) {\n super(props);\n this.selectedLocationRef = React.createRef();\n this.storeCounter = 0;\n }\n\n public componentDidUpdate(previousProps: IStoreSelectorLocationLinesProps): void {\n if (this.props.selectedStoreLocationId !== previousProps.selectedStoreLocationId) {\n this._scrollIntoView();\n }\n }\n\n public componentDidMount(): void {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n\n reaction(\n () => this.props.locations,\n () => {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n }\n );\n }\n\n public render(): JSX.Element | null {\n if (!ArrayExtensions.hasElements(this._stores)) {\n return null;\n }\n\n this.storeCounter = 0;\n\n return (\n
    \n {this._stores.map((store, index) => {\n return this._renderStoreLocation(store, index);\n })}\n
    \n );\n }\n\n /**\n * On click Handler function.\n * @param orgUnitLocation -OrgUnit location.\n * @returns Click action on orgUnit Location.\n */\n private readonly onClickHandler = (orgUnitLocation: OrgUnitLocation | undefined) => () => {\n this.props.onClick(orgUnitLocation?.OrgUnitNumber);\n };\n\n private _renderStoreLocation(store: IFullOrgUnitAvailability, index: number): JSX.Element | undefined {\n const orgUnitLocation = store?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocationId = this.props.selectedStoreLocationId;\n const deliveryOptions = store?.OrgUnitPickUpDeliveryModes;\n const defaultAriaSetsize = 0;\n if (orgUnitLocation) {\n ++this.storeCounter;\n return (\n \n \n
    \n );\n }\n return undefined;\n }\n\n /**\n * Sort store.\n * @param stores - Array of stores data.\n * @returns Sorted stores array.\n */\n private _sortStores(stores: IFullOrgUnitAvailability[]): IFullOrgUnitAvailability[] {\n /**\n * IsPreferredStore.\n * @param value - Array of stores data.\n * @returns IsPreferred store boolean value.\n */\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n this.props.isPreferredStoreEnabled &&\n this.props.preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Scroll into view.\n */\n private readonly _scrollIntoView = () => {\n const selectedLocationDiv = this.selectedLocationRef.current;\n const parent = selectedLocationDiv?.parentElement;\n if (selectedLocationDiv && parent) {\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\n parent.scrollTop = selectedLocationDiv.offsetTop;\n } else if (selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight > parent.scrollTop + parent.clientHeight) {\n parent.scrollTop = selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight - parent.clientHeight;\n }\n }\n };\n\n /**\n * Is current location.\n * @param location - Org unit location.\n * @returns The current location.\n */\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined): boolean =>\n (this.props.alreadySelectedLocation && location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) ||\n false;\n\n /**\n * Check the product is in stock or not.\n * @param itemAvailabilities - Item availabilities.\n * @returns If the product is in stock.\n */\n private readonly _isProductInStock = (itemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!this.props.enableOutOfStockCheck) {\n return true;\n }\n\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > 0 : false;\n }\n\n return false;\n };\n\n /**\n * Get the stock inventory label.\n * @param availabilityWithHours - Full org unit availability.\n * @returns The stock label.\n */\n private readonly _stockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours && ArrayExtensions.hasElements(availabilityWithHours.ProductInventoryInformation)) {\n for (let i = 0; i < availabilityWithHours.ProductInventoryInformation.length; i++) {\n if (\n availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n availabilityWithHours.ProductInventoryInformation[i].InventLocationId\n ) {\n return availabilityWithHours.ProductInventoryInformation[i].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n /**\n * Map resources.\n * @param resources - Store resources.\n * @returns Resources.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n KeyCodes,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { StorePickUpOptionList } from './store-pickup-option-list';\n\n/**\n * Store Selector Search Form Props interface.\n */\nexport interface IStoreSelectorSearchFormProps {\n resources: {\n searchInputAriaLabel: string;\n searchButtonAriaLabel: string;\n searchPlaceholderText: string;\n seeAllStoresText: string;\n viewListText: string;\n viewMapText: string;\n pickupFilterByHeading?: string;\n pickupFilterMenuHeading?: string;\n };\n\n id: string;\n value: string;\n isMapDisabled?: boolean;\n showAllStores?: boolean;\n displayList?: boolean;\n locatorView?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n hasEnabledPickupFilterToShowStore?: boolean;\n filteredPickupMode?: string;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n onShowAllStores(): void;\n onToggleListMapViewState(): void;\n performSearch(searchTerm: string): Promise;\n searchTermChanged(searchTerm: string): Promise;\n filterPickupModeSelected(pickupMode: string): void;\n}\n\n/**\n * Simple search form consisting of search text and a search button.\n */\nexport class StoreSelectorSearchForm extends React.PureComponent {\n private readonly searchBoxRef: React.RefObject = React.createRef();\n\n private readonly storeSearchAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly showAllStoreAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly toggleMapViewAttributes: Msdyn365.IDictionary | undefined;\n\n private previousValue: string = '';\n\n private isSearchResultOpened: boolean = false;\n\n public constructor(props: IStoreSelectorSearchFormProps) {\n super(props);\n this.state = { value: '' };\n this._handleKeyPressPrev = this._handleKeyPressPrev.bind(this);\n const payLoad: IPayLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SearchStore);\n this.storeSearchAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ShowAllStore;\n this.showAllStoreAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ToggleMapView;\n this.toggleMapViewAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n searchButtonAriaLabel,\n searchPlaceholderText,\n seeAllStoresText,\n viewListText,\n viewMapText,\n pickupFilterByHeading,\n pickupFilterMenuHeading\n },\n id,\n value,\n isMapDisabled,\n showAllStores,\n displayList,\n locatorView,\n onShowAllStores,\n productPickUpDeliveryOptions,\n hasEnabledPickupFilterToShowStore\n } = this.props;\n\n const toggleButtonText = displayList ? viewMapText : viewListText;\n\n return (\n
    \n \n
    \n )}\n {this.renderPickupModesList(\n this.props,\n toggleButtonText,\n productPickUpDeliveryOptions,\n pickupFilterMenuHeading,\n locatorView,\n pickupFilterByHeading,\n hasEnabledPickupFilterToShowStore,\n displayList\n )}\n \n );\n }\n\n /**\n * Handles the key press on the input box.\n * @param event - Event object.\n */\n private readonly _handleInputKeyPress = (event: React.KeyboardEvent): void => {\n // When the user navigates through the up and down arrow on the result returned by the auto suggest and press enter.\n // At that time, two requests were made to fetch the store details due to which incorrect result is shown and causes flickering.\n // In order to avoid that. Checking if the search result is open or not.\n if (event.keyCode === KeyCodes.ArrowUp || event.keyCode === KeyCodes.ArrowDown) {\n const activeDescedantValue = (event.target as HTMLInputElement).getAttribute('aria-activedescendant');\n if (activeDescedantValue) {\n if (this.previousValue === '') {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n return;\n }\n\n if (activeDescedantValue !== this.previousValue) {\n this.previousValue = activeDescedantValue;\n this.isSearchResultOpened = true;\n } else {\n this.isSearchResultOpened = false;\n }\n }\n }\n };\n\n /**\n * Calls method display result.\n * @param event - The first number.\n */\n private readonly _handleKeyPressPrev = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter || event.keyCode === KeyCodes.Space) {\n this.props.onShowAllStores();\n }\n };\n\n /**\n * Method called on search text changed.\n * @param event - Input value.\n */\n private readonly _searchTextChanged = async (event: React.ChangeEvent): Promise => {\n const inputValue: string = event.target.value;\n\n await this.props.searchTermChanged(inputValue);\n };\n\n /**\n * Method called on search submit.\n * @param event - Input value.\n */\n private readonly _onSubmit = async (event: React.SyntheticEvent): Promise => {\n event.preventDefault(); // Prevents form submission\n this.searchBoxRef.current?.blur();\n if (!this.isSearchResultOpened) {\n await this.props.performSearch(this.props.value);\n }\n this.isSearchResultOpened = false;\n };\n\n /**\n * Method called on product pickup option change.\n * @returns - Void.\n */\n private readonly _onChangeHandler = () => async (deliveryCode: string): Promise => {\n this.props.filterPickupModeSelected(deliveryCode);\n return Promise.resolve();\n };\n\n /**\n * Method to render pickup mode list.\n * @param props - Store selector search form props.\n * @param toggleButtonText - Locator view button text.\n * @param productPickUpDeliveryOptions - Product DeliveryOption List.\n * @param pickupFilterMenuHeading - Pickup store button text.\n * @param locatorView - Locator View is on\\off.\n * @param pickupFilterByHeading - Pickup list label text.\n * @param hasEnabledPickupFilterToShowStore - Flag to check header filter is enabled.\n * @param shouldDisplayList - Display List.\n * @returns Jsx component.\n */\n private readonly renderPickupModesList = (\n props: IStoreSelectorSearchFormProps,\n toggleButtonText: string,\n productPickUpDeliveryOptions: DeliveryOption[] | undefined,\n pickupFilterMenuHeading: string | undefined,\n locatorView: boolean | undefined,\n pickupFilterByHeading: string | undefined,\n hasEnabledPickupFilterToShowStore: boolean | undefined,\n shouldDisplayList?: boolean\n ): JSX.Element | null => {\n const toggleButtonClass = shouldDisplayList ? 'view-map' : 'list-view';\n if (hasEnabledPickupFilterToShowStore) {\n return (\n
    \n {locatorView && (\n \n {toggleButtonText}\n \n )}\n \n
    {pickupFilterByHeading}
    \n
    \n );\n }\n if (locatorView) {\n return (\n \n {toggleButtonText}\n \n );\n }\n return null;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IStoreSelectorResources, ITermsOfServiceLinkData } from '../store-selector.props.autogenerated';\n\nexport interface IStoreSelectorEmptyMessageProps {\n resources: IStoreSelectorResources;\n}\nexport const StoreSelectorEmptyMessage: React.FC = ({ resources }) => (\n
    \n

    {resources.emptyLocationsText}

    \n
    \n);\n\nexport const StoreSelectorWaiting: React.FC = () =>
    ;\n\nexport interface IStoreSelectorTermsOfServiceProps {\n link?: ITermsOfServiceLinkData;\n requestContext: Msdyn365.IRequestContext;\n onTextChange?(event: Msdyn365.ContentEditableEvent): void;\n}\n\nexport const StoreSelectorTermsOfService: React.FC = ({ link, requestContext, onTextChange }) => {\n if (link) {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-store-select__terms-link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link'\n };\n\n return (\n
    \n \n
    \n );\n }\n return null;\n};\n\nexport interface IStoreSelectorFoundLocationsMessage {\n resources: IStoreSelectorResources;\n locations?: IFullOrgUnitAvailability[];\n searchRadius: number;\n preferredDistanceUnit: string;\n isSeeAllStore: boolean;\n}\nexport const StoreSelectorFoundLocationsMessage: React.FC = ({\n locations,\n searchRadius,\n resources,\n isSeeAllStore,\n preferredDistanceUnit\n}) => {\n if (locations) {\n const storeCountMessage =\n preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n return (\n
    \n {isSeeAllStore\n ? resources.storeAllCountMessage.replace('{count}', locations.length.toString())\n : storeCountMessage.replace('{count}', locations.length.toString()).replace('{radius}', searchRadius.toString())}\n
    \n );\n }\n\n return null;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\n/**\n * Interface Pickup option list.\n */\nexport interface IPickUpOptionListProps {\n pickupListOptionMenuText: string;\n pickupmodeList?: DeliveryOption[];\n onChange(deliveryCode: string): Promise;\n}\n\n/**\n * Interface pickup option list state.\n */\nexport interface IPickOptionListState {\n expandSiteOptions: boolean;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option.\n */\nexport class PickUpOptionList extends React.PureComponent {\n private readonly _pickupListOptionMenu: React.RefObject;\n\n private readonly _pickupListOptionButton: React.RefObject;\n\n private readonly eventsToBeBind = ['click', 'touchstart'];\n\n public constructor(props: IPickUpOptionListProps) {\n super(props);\n this._renderDeliveryOptions = this._renderDeliveryOptions.bind(this);\n this._pickupListOptionMenu = React.createRef();\n this._pickupListOptionButton = React.createRef();\n this.state = {\n expandSiteOptions: false\n };\n }\n\n public componentDidMount(): void {\n for (const event of this.eventsToBeBind) {\n window.addEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public componentWillUnmount(): void {\n for (const event of this.eventsToBeBind) {\n window.removeEventListener(event, this.handleDocumentClick, true);\n }\n }\n\n public render(): JSX.Element {\n const { pickupListOptionMenuText, pickupmodeList } = this.props;\n\n return (\n
    \n \n {pickupListOptionMenuText}\n \n \n {this.state.expandSiteOptions ? (\n
      \n {pickupmodeList?.map((delivery: DeliveryOption) => {\n return (\n
    • \n \n \n {delivery.Description}\n \n \n
    • \n );\n })}\n
    \n ) : null}\n
    \n );\n }\n\n /**\n * Handle the document click.\n * @param event -- Event object.\n */\n private readonly handleDocumentClick = (event: Event): void => {\n const htmlElement = event.target as HTMLElement;\n if (\n !(\n (this._pickupListOptionButton.current !== null &&\n (event.target === this._pickupListOptionButton.current ||\n this._pickupListOptionButton.current.contains(htmlElement))) ||\n (this._pickupListOptionMenu.current !== null &&\n (event.target === this._pickupListOptionMenu.current || this._pickupListOptionMenu.current.contains(htmlElement)))\n )\n ) {\n this.setState({\n expandSiteOptions: false\n });\n }\n };\n\n private _renderDeliveryOptions(event: React.MouseEvent): void {\n event.stopPropagation();\n const isExpandSiteOptionsState = this.state.expandSiteOptions;\n this.setState({\n expandSiteOptions: !isExpandSiteOptionsState\n });\n }\n\n /**\n * Select Delivery option.\n * @param event -- Event Object.\n */\n private readonly _onSelect = async (event: React.MouseEvent): Promise => {\n event.preventDefault();\n const deliveryCode = event.currentTarget.getAttribute('data-value');\n if (deliveryCode && deliveryCode.length > 0) {\n await this.props.onChange(deliveryCode);\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\n\nimport { IStoreSelectorLocationLineItemResources } from '.';\n\nexport interface IHoursDisplayInfo {\n startDayShort: string;\n startDayFull: string;\n endDayShort?: string;\n endDayFull?: string;\n timeRange: string;\n}\n\ninterface IHoursInfo {\n isClosed: boolean;\n openTime?: number;\n closeTime?: number;\n}\n\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\n\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\n if (seconds === undefined) {\n return undefined;\n }\n let hours = Math.floor(seconds / (60 * 60));\n const ampm = hours >= 12 ? 'pm' : 'am';\n hours %= 12;\n hours = hours ? hours : 12;\n const divisorForMinutes = seconds % (60 * 60);\n const minutes = Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\n return `${hours}:${minutes} ${ampm}`;\n};\n\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.monday;\n case 'TUE':\n return resources.days.tuesday;\n case 'WED':\n return resources.days.wednesday;\n case 'THU':\n return resources.days.thursday;\n case 'FRI':\n return resources.days.friday;\n case 'SAT':\n return resources.days.saturday;\n default:\n // Case 'SUN':\n return resources.days.sunday;\n }\n};\n\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.mondayFull;\n case 'TUE':\n return resources.days.tuesdayFull;\n case 'WED':\n return resources.days.wednesdayFull;\n case 'THU':\n return resources.days.thursdayFull;\n case 'FRI':\n return resources.days.fridayFull;\n case 'SAT':\n return resources.days.saturdayFull;\n default:\n // Case 'SUN':\n return resources.days.sundayFull;\n }\n};\n\nconst buildHoursDisplayInfo = (\n startDay: DayType,\n endDay: DayType,\n hoursInfo: string,\n resources: IStoreSelectorLocationLineItemResources\n): IHoursDisplayInfo => {\n return {\n startDayShort: getShortTimeString(startDay, resources),\n startDayFull: getFullTimeString(startDay, resources),\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\n timeRange: hoursInfo\n };\n};\n\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\n if (firstLine.isClosed && secondLine.isClosed) {\n return true;\n }\n\n if (!firstLine.isClosed && !secondLine.isClosed) {\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\n }\n\n return false;\n};\n\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\n return {\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\n };\n};\n\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\n if (hoursInfo.isClosed) {\n return resources.closedText;\n }\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\n\n return `${openFrom}–${openTo}`;\n};\n\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\n const storeHoursList: IHoursDisplayInfo[] = [];\n\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\n\n let periodStart: DayType = 'MON';\n let periodEnd: DayType = 'MON';\n\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\n\n periodStart = 'TUE';\n }\n periodEnd = 'TUE';\n\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\n\n periodStart = 'WED';\n }\n periodEnd = 'WED';\n\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\n\n periodStart = 'THU';\n }\n periodEnd = 'THU';\n\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\n\n periodStart = 'FRI';\n }\n periodEnd = 'FRI';\n\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\n\n periodStart = 'SAT';\n }\n periodEnd = 'SAT';\n\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\n\n periodStart = 'SUN';\n }\n periodEnd = 'SUN';\n\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\n\n return storeHoursList;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './date-time-helpers';\n\n/**\n * Store Locator line item resources.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n\n closedText: string;\n\n outOfStock: string;\n inStock: string;\n\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * Store Locator line item props.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n filteredPickupMode?: string;\n shouldShowIndex?: boolean;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n };\n}\n\n/**\n * Store Locator line item action component.\n */\nconst storeSelectorLocationLineItemComponentActions = {\n onLocationSelected(props: IStoreSelectorLocationLineItemProps, deliveryMode?: string): void {\n props.handlers.onSelected(props.location, deliveryMode);\n },\n onSetAsPreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onSetAsPreferredStore(props.location.OrgUnitNumber);\n },\n onRemovePreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onRemovePreferredStore();\n }\n};\n\n/**\n * Function to render store hours.\n * @param storeHours - Store Hours object.\n * @param location - Store Unit.\n * @param resources - Resources.\n * @returns - Jsx element.\n */\nconst renderStoreHours = (\n storeHours: StoreHours | undefined,\n location: OrgUnitLocation,\n resources: IStoreSelectorLocationLineItemResources\n): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day houts\n if (storeHours?.RegularStoreHours) {\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\n\n return (\n
    \n {storeHoursList.map(displayTime => (\n
    \n {displayTime.endDayShort ? (\n
    \n {displayTime.startDayShort}–\n {displayTime.endDayShort}\n
    \n ) : (\n
    \n {displayTime.startDayShort}\n
    \n )}\n
    {displayTime.timeRange}
    \n
    \n ))}\n
    \n );\n }\n\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\n\n return (\n
    \n {storeOpenFrom}-{storeOpenTo}\n
    \n );\n};\n\n/**\n * Function to retrun distance measure unit.\n * @param distance - Store location within radius.\n * @param preferredDistanceUnit - Unit configuration.\n * @param isLocationDisabled - Flag to check user location.\n * @returns - Unit of distance.\n */\nexport const buildDistanceString = (\n distance: number | undefined,\n preferredDistanceUnit: string,\n isLocationDisabled?: boolean\n): string | undefined => {\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < 1) {\n return `(<1 ${preferredDistanceUnit})`;\n }\n return `(${Math.floor(distance)} ${preferredDistanceUnit})`;\n};\n\n/**\n * Function to store contact.\n * @param contacts - Store location within radius.\n * @returns - Return primary contact number of store.\n */\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\n\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props);\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: IStoreSelectorLocationLineItemProps, pickupMode?: string) => () => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, pickupMode);\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onSetAsPreferredStore(props);\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: IStoreSelectorLocationLineItemProps) => () => {\n storeSelectorLocationLineItemComponentActions.onRemovePreferredStore(props);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: IStoreSelectorLocationLineItemProps) => async (deliveryCode: string): Promise => {\n storeSelectorLocationLineItemComponentActions.onLocationSelected(props, deliveryCode);\n return Promise.resolve();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: IStoreSelectorLocationLineItemProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns DeliveryOptionList.\n */\nexport const matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined\n): DeliveryOption[] => {\n const deliveryOption: DeliveryOption[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(_delivery => _delivery.Code === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n });\n\n return deliveryOption;\n};\n\n/**\n * Renders store location line items.\n * @param props - Store location line items props.\n * @returns - HTML.\n */\nconst storeSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\n const {\n hideStockStatus,\n isCurrentLocation,\n isInStock,\n location,\n resources,\n storeHours,\n stockStatusLabel,\n storeLocatorView,\n index,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n shouldShowIndex\n } = props;\n\n const storeName: string | undefined = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(location.Distance, props.preferredDistanceUnit, isLocationDisabled);\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n const stockText: string | undefined = hideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = hideStockStatus || isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName || '');\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n /* eslint-disable prettier/prettier */\n return (\n
    \n
    \n {(shouldShowIndex || storeLocatorView) && {index}}\n {storeName}\n {distanceAsString ? \n {' '}\n {distanceAsString}\n : false}\n
    \n
    \n
    \n

    {resources.contactInfoHeader}

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

    {resources.storeHoursHeader}

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

    {resources.availabilityInfoHeader}

    \n {stockText &&

    {stockText}

    }\n {isCurrentLocation ? (\n

    {resources.currentLocation}

    \n ) : canSelectLocation ? (\n deliveryOptionList.length === 0 ? (\n \n {pickupInStoreButtonText}\n \n ) : (\n renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel)\n )\n ) : (\n false\n )}\n
    \n )}\n {isPreferredStoreEnabled ? (\n isPreferredStore ? (\n \n {resources.preferredStoreText}\n \n ) : (\n \n {resources.setAsPreferredStoreText}\n \n )\n ) : null}\n
    \n
    \n );\n};\n\n/**\n * Store location line item component.\n */\nexport const StoreSelectorLocationLineItemComponent = storeSelectorLocationLineItem as (\n props: IStoreSelectorLocationLineItemProps\n) => JSX.Element;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DeliveryOption, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n NodeTag,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PickUpOptionList } from '../pickup-option-list';\nimport { buildDistanceString, matchDeliveryOptions } from '../store-selector-location-line-item';\n\n/**\n * Store Locator line item resources.\n */\nexport interface ISelectedStoreResources {\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreProps {\n className?: string;\n shouldHideStockStatus?: boolean;\n isCurrentLocation?: boolean;\n isInStock?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n resources: ISelectedStoreResources;\n stockStatusLabel?: string;\n preferredStoreLocationId: string | null;\n isPreferredStoreEnabled?: boolean;\n isLocationDisabled?: boolean;\n telemetryContent?: ITelemetryContent;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n preferredDistanceUnit: string;\n filteredPickupMode?: string;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * Store Selector resources.\n */\nexport interface ISelectedStoreViewProps {\n isCurrentLocation?: boolean;\n canSelectLocation?: boolean;\n selectedStore?: IFullOrgUnitAvailability;\n deliveryOptions?: DeliveryOption[];\n isPreferredStore?: boolean;\n resources: ISelectedStoreResources;\n\n storeDetailsMain: INodeProps;\n storeHeader: INodeProps;\n storeName: React.ReactNode;\n storeDistance: React.ReactNode;\n storeDetailsAvailabilityContainer: INodeProps;\n productAvailability: React.ReactNode;\n stockStatus: React.ReactNode;\n currentLocation: React.ReactNode;\n pickUpDeliveryOptionButton: React.ReactNode;\n pickupModes?: React.ReactNode;\n preferredStoreButton?: React.ReactNode;\n removePreferredStoreButton?: React.ReactNode;\n storeDetailsCloseButton?: React.ReactNode;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n}\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupInStoreClickHandler = (props: ISelectedStoreProps) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation);\n }\n};\n\n/**\n * Set Preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onSetPreferredStoreClickHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onSetAsPreferredStore(props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber);\n};\n\n/**\n * On Change functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onChangeHandler = (props: ISelectedStoreProps) => async (deliveryCode: string): Promise => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, deliveryCode);\n }\n return Promise.resolve();\n};\n\n/**\n * Remove preferred store functionality.\n * @param props -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst removePreferredStoreHandler = (props: ISelectedStoreProps) => () => {\n props.handlers.onRemovePreferredStore();\n};\n\n/**\n * On Store locator click functionality.\n * @param props -Store locator location items.\n * @param pickupMode -Store locator location items.\n * @returns Store locator selected location line item action.\n */\nconst onPickupModeSelectHandler = (props: ISelectedStoreProps, pickupMode?: string) => () => {\n if (props.selectedStore?.OrgUnitAvailability?.OrgUnitLocation) {\n props.handlers.onSelected(props.selectedStore.OrgUnitAvailability.OrgUnitLocation, pickupMode);\n }\n};\n\n/**\n * On store details close functionality.\n * @param props -Store locator location items.\n * @returns Void promise.\n */\nconst storeDetailsModalHandler = (props: ISelectedStoreProps) => async (): Promise => {\n await props.handlers.closeStoreDetailsModal();\n};\n\n/**\n * Method to render pickup modes.\n * @param props - StoreSelector Line item props.\n * @param deliveryOptionList - Product DeliveryOption List.\n * @param pickupInStoreButtonText - Pickup store button text.\n * @param pickupInStoreAriaLabel - Pickup store aria label.\n * @returns Jsx component.\n */\nconst renderPickupModes = (\n props: ISelectedStoreProps,\n deliveryOptionList: DeliveryOption[],\n pickupInStoreButtonText: string,\n pickupInStoreAriaLabel: string\n): JSX.Element | null => {\n if (props.filteredPickupMode === undefined) {\n return (\n \n );\n }\n return (\n \n {pickupInStoreButtonText}\n \n );\n};\n\n/**\n * Renders selected store details.\n * @param props - Store location details props.\n * @returns - Selected Store view props.\n */\nconst selectedStoreDetails = (props: ISelectedStoreProps): ISelectedStoreViewProps => {\n const {\n className,\n shouldHideStockStatus,\n isCurrentLocation,\n isInStock,\n selectedStore,\n resources,\n stockStatusLabel,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList,\n preferredDistanceUnit\n } = props;\n\n const parentClassName = className ? className : 'ms-store-select__map__selected_store';\n const storeName: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\n const location = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const distanceAsString: string | undefined = buildDistanceString(location?.Distance, preferredDistanceUnit, isLocationDisabled);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n // eslint-disable-next-line no-nested-ternary -- Required to check stock Label\n const stockText: string | undefined = shouldHideStockStatus ? undefined : stockLabel ? stockLabel : resourceLabel;\n const canSelectLocation = !shouldHideStockStatus && isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\n const isPreferredStore = preferredStoreLocationId === location?.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n\n const viewProps: ISelectedStoreViewProps = {\n selectedStore,\n isCurrentLocation,\n canSelectLocation,\n isPreferredStore,\n resources,\n deliveryOptions: deliveryOptionList,\n storeDetailsMain: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__main`\n },\n storeHeader: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__header`\n },\n storeName: {storeName},\n storeDetailsCloseButton: \n ),\n pickupModes: renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel),\n preferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.preferredStoreText}\n \n ) : null,\n removePreferredStoreButton: isPreferredStoreEnabled ? (\n \n {resources.setAsPreferredStoreText}\n \n ) : null,\n handlers: {\n onSelected: props.handlers.onSelected,\n onSetAsPreferredStore: props.handlers.onSetAsPreferredStore,\n onRemovePreferredStore: props.handlers.onRemovePreferredStore,\n closeStoreDetailsModal: props.handlers.closeStoreDetailsModal\n }\n };\n\n return viewProps;\n};\n\n/**\n * Store location line item component.\n */\nexport const SelectedStoreComponent = selectedStoreDetails as (props: ISelectedStoreProps) => ISelectedStoreViewProps;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreInfo, IStoreSelectionStateContext } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n ArrayExtensions,\n getFullAvailableInventoryNearby,\n GetFullAvailableInventoryNearbyInput,\n getOrgUnitLocationsByArea,\n GetOrgUnitLocationsByAreaInput,\n IFullOrgUnitAvailability\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n NodeTag,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n StoreSelectorEmptyMessage,\n StoreSelectorFoundLocationsMessage,\n StoreSelectorLocationLines,\n StoreSelectorSearchForm,\n StoreSelectorTermsOfService,\n StoreSelectorWaiting\n} from './components';\nimport { ISelectedStoreProps, ISelectedStoreViewProps, SelectedStoreComponent } from './components/selected-store/selected-store';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './components/store-selector-location-line-item/date-time-helpers';\nimport { IStoreSelectorData } from './store-selector.data';\nimport {\n IStoreSelectorProps,\n IStoreSelectorResources,\n mode as modeEnum,\n searchRadiusUnit as SearchRadiusUnit,\n style as styleEnum\n} from './store-selector.props.autogenerated';\n\n/**\n * StoreSelector State Interface.\n */\nexport interface IStoreSelectorState {\n isSearchInProgress: boolean;\n searchTerm?: string;\n isSeeAllStoreValue: boolean;\n isLocationDisabled?: boolean;\n filteredPickupMode?: string;\n}\n\n/**\n * StoreSelector View Props Interface.\n */\nexport interface IStoreSelectorViewProps extends IStoreSelectorProps {\n state: IStoreSelectorState;\n\n // Containers:\n ModuleProps: IModuleProps;\n BodyContainerProps: INodeProps;\n FooterContainerProps: INodeProps;\n HeaderContainerProps: INodeProps;\n HeaderProps?: React.ReactNode;\n\n // Components\n locationsMessage?: React.ReactNode;\n search?: React.ReactNode;\n spinner?: React.ReactNode;\n locationsList?: React.ReactNode;\n selectedLocation?: ISelectedStoreViewProps;\n noLocationsMessage?: React.ReactNode;\n terms?: React.ReactNode;\n headerText?: React.ReactNode;\n sortLocations?: IFullOrgUnitAvailability[];\n locationListProps?: IStoreSelectorLocationLineItemProps[];\n bodyWrapperProps?: INodeProps;\n storeResultContainerProps?: INodeProps;\n mapContainerProps?: INodeProps;\n maps?: React.ReactNode;\n isMobileView?: boolean;\n storeDetailsModal?: INodeProps;\n\n callbacks: {\n closeDialog(): Promise;\n searchTermChanged(searchTerm: string): Promise;\n performSearch(searchTerm: string): Promise;\n selectedLocation(location: OrgUnitLocation | undefined): Promise;\n getAndUpdateUserLocation(): Promise;\n attachMapAutoSuggest(): Promise;\n onSuggestionSelected(result: Microsoft.Maps.ISuggestionResult): Promise;\n setPreferredStore(storeId: string | undefined): Promise;\n removePreferredStore(): Promise;\n setSelectedStore(storeId: string | undefined): Promise;\n setOrgUnitStoreInformation(location: OrgUnitLocation | undefined): Promise;\n };\n}\n\n/**\n * StoreSelectorLocation Line Resources Interface.\n */\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n closedText: string;\n outOfStock: string;\n inStock: string;\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\n/**\n * ILocationHours Interface.\n */\nexport interface ILocationHours {\n openFrom?: string;\n openTo?: string;\n}\n\n/**\n * StoreSelectorLocation Line Item Props Interface.\n */\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n storeHoursList?: IHoursDisplayInfo[];\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n selectedStoreLocationId?: string;\n locationOpen?: ILocationHours;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n closeStoreDetailsModal(): Promise;\n };\n onClick: (locationId: string | undefined) => void;\n}\n\n/**\n *\n * Pick Up In Store module.\n * @extends React.Component>}\n */\n@observer\nclass StoreSelector extends React.Component, IStoreSelectorState> {\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private storeCounter: number;\n\n private isPreferredStoreEnabled?: boolean;\n\n public constructor(props: IStoreSelectorProps) {\n super(props);\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.state = { isSearchInProgress: true, searchTerm: '', isSeeAllStoreValue: false, filteredPickupMode: undefined };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.storeCounter = 0;\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled: isAutoSuggestionEnabled }\n } = this.props;\n\n // Adding Timeout to make sure it loads the data based upon the preferred store.\n setTimeout(() => {\n this._getAndUpdateStoreLocation();\n }, 0);\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isDialogOpen,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context?.id === this.props.id) {\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.context?.id,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (!context || context.id === this.props.id) {\n await this._searchTermChanged('');\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n if (this.props.data.storeSelectorStateManager.result?.loadMapApi) {\n await this.props.data.storeSelectorStateManager.result.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n });\n }\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\n () => {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsEnabled ? channel.BingMapsApiKey : '',\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context.actionContext.requestContext.channel?.ChannelCountryRegionISOCode\n });\n }\n );\n\n reaction(\n () => this.props.data.availabilitiesWithHours.result,\n async () => {\n if (this.props.data.storeSelectorStateManager.result?.isDialogOpen) {\n const storeLocationList = this.props.data.availabilitiesWithHours.result;\n if (storeLocationList) {\n await this._setOrgUnitStoreInformation(storeLocationList);\n }\n }\n }\n );\n\n if (isAutoSuggestionEnabled) {\n when(\n () => {\n const isMapApiLoaded = !!this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n const isDialogOpen = !!this.props.data.storeSelectorStateManager.result?.isDialogOpen;\n const isSameContext = this.props.data.storeSelectorStateManager.result?.context?.id === this.props.id;\n return isMapApiLoaded && isDialogOpen && isSameContext;\n },\n () => {\n setTimeout(async () => {\n await this._attachMapAutoSuggest();\n }, 0);\n }\n );\n }\n }\n\n public shouldComponentUpdate(): boolean {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n if (context && context.id === this.props.id) {\n return true;\n }\n return false;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element {\n const {\n config: {\n termsOfServiceLink,\n className,\n heading,\n mode,\n style,\n setAsPreferredStore: shouldSetAsPreferredStore,\n showAllStores: shouldShowAllStores,\n lookupRadius,\n enablePickupFilterToShowStore: hasEnablePickupFilterToShowStore,\n searchRadiusUnit\n },\n context: {\n telemetry,\n app: { config: appConfig },\n actionContext: {\n requestContext: { channel, cookies }\n }\n },\n slots: { maps: mapSlot },\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n this.storeCounter = 0;\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n const isMapDisabled = !(channel?.BingMapsApiKey && channel.BingMapsEnabled);\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const isDialogOpen: boolean = storeSelectorStateManager\n ? storeSelectorStateManager.isDialogOpen && context?.id === this.props.id\n : false;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const isInlineView = styleDefault === styleEnum.inline;\n const isLocatorView = modeDefault === modeEnum.findStores;\n const shouldHideInventory = isLocatorView;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n const shouldDisplayList = storeSelectorStateManager?.listMapViewState?.displayList;\n this.isPreferredStoreEnabled = shouldSetAsPreferredStore && cookies?.isConsentGiven();\n const canShowLocationView =\n context && (context.showMapViewLink === undefined || context.showMapViewLink) && storeSelectorStateManager?.isMapModuleLoaded;\n\n const storeSelectorActions = {\n async toggleListMapViewState(): Promise {\n await storeSelectorStateManager?.toggleListMapViewState();\n }\n };\n\n if (!channel?.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n }\n\n const configHeading = heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText;\n const preferredDistanceUnit =\n searchRadiusUnit === SearchRadiusUnit.kilometers ? resources.kilometersShortText : resources.milesShortText;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n let storeLocationList: IFullOrgUnitAvailability[] | undefined = shouldHideInventory ? storeLocations : availabilitiesWithHours;\n let sortLocation = null;\n if (storeLocationList) {\n sortLocation = this._sortStores(storeLocationList, this.isPreferredStoreEnabled, preferredLocationId);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Reading value from app config.\n const isEnableOutofStock: boolean = appConfig?.enableStockCheck || false;\n const alreadySelectedLocation = context ? context.alreadySelectedLocation : undefined;\n const productPickUpOptionList = storeSelectorStateManager?.context?.deliveryOptions?.DeliveryOptions;\n if (this.state.filteredPickupMode && storeLocationList) {\n storeLocationList = this.onFilterLocations(storeLocationList, this.state.filteredPickupMode);\n }\n const locationListProps = this._getStoreLocationListProps(\n isEnableOutofStock,\n isLocatorView,\n preferredLocationId,\n this.isPreferredStoreEnabled,\n selectedStoreLocationId,\n sortLocation ?? null,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n\n const hasMapSlot = ArrayExtensions.hasElements(mapSlot);\n const dialogClassName = hasMapSlot ? 'ms-store-select__map' : '';\n const viewProps: IStoreSelectorViewProps = {\n ...(this.props as IStoreSelectorProps),\n state: this.state,\n maps: hasMapSlot ? mapSlot[0] : undefined,\n\n ModuleProps: {\n tag: isInlineView ? ('div' as NodeTag) : Modal,\n moduleProps: this.props,\n className: classname(\n `ms-store-${isInlineView ? 'locate' : 'select'}`,\n className,\n dialogClassName,\n isInlineView ? '' : 'msc-modal-input-required'\n ),\n autoFocus: true,\n fade: true,\n isOpen: isDialogOpen,\n 'aria-label': configHeading,\n onClosed: this._closeDialog,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n toggle: this._closeDialog\n },\n isMobileView: isMobileDevice,\n HeaderContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalHeader,\n className: `ms-store-select__${isInlineView ? 'header' : 'modal-header'}`,\n toggle: this._closeDialog\n },\n HeaderProps: configHeading && (\n \n ),\n FooterContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalFooter,\n className: `ms-store-select__${isInlineView ? 'footer' : 'modal-footer'} ${!shouldDisplayList ? 'map-only-view' : ''}`\n },\n BodyContainerProps: {\n tag: isInlineView ? ('div' as NodeTag) : ModalBody,\n className: `ms-store-select__${isInlineView ? 'body' : 'modal-body'}`\n },\n bodyWrapperProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__body_wrapper'\n },\n storeResultContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__store_container'\n },\n mapContainerProps: {\n tag: 'div' as NodeTag,\n className: 'ms-store-select__map_container'\n },\n storeDetailsModal: {\n tag: 'div' as NodeTag,\n className: `ms-store-select__map__selected_store__modal ${\n selectedStoreLocationId && isDialogOpen && !shouldDisplayList ? 'show' : 'hide'\n }`\n },\n locationsMessage: !this.state.isLocationDisabled && (\n \n ),\n selectedLocation: this.renderSelectedStore(\n shouldHideInventory,\n preferredDistanceUnit,\n preferredStore,\n this.isPreferredStoreEnabled,\n isEnableOutofStock,\n productPickUpOptionList,\n shouldDisplayList\n ),\n search: (\n \n ),\n spinner: ,\n locationsList: ArrayExtensions.hasElements(storeLocationList) ? (\n \n ) : (\n undefined\n ),\n noLocationsMessage: ,\n terms: (\n \n ),\n\n // Not being used in current context, we can use it here to pass more props.\n headerText: (\n {heading ? heading : isLocatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText}\n ),\n sortLocations: sortLocation,\n locationListProps,\n callbacks: {\n searchTermChanged: this._searchTermChanged,\n performSearch: this._performSearch,\n closeDialog: this._closeDialog,\n selectedLocation: this._onOrgUnitLocationSelected,\n getAndUpdateUserLocation: async () => {\n this._getAndUpdateStoreLocation();\n return Promise.resolve();\n },\n attachMapAutoSuggest: this._attachMapAutoSuggest,\n onSuggestionSelected: this._onOrgUnitLocationSelected,\n setPreferredStore: this._setPreferredStore,\n removePreferredStore: this._removePreferredStore,\n setSelectedStore: this._setSelectedStore,\n setOrgUnitStoreInformation: this._setOrgUnitStoreInformation\n }\n } as IStoreSelectorViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Render the selected store for the mobile devices.\n * @param shouldHideInventory -- Hide Inventory.\n * @param preferredDistanceUnit -- Preferred Distance Unit.\n * @param preferredStore -- Preferred Store.\n * @param isPreferredStoreEnabled -- Is Preferred Store Enabled.\n * @param hasEnabledOutOfStockCheck -- Stock check is enabled or not.\n * @param productPickUpOptionList -- Product pickup option list.\n * @param shouldDisplayList - Should Display list.\n * @returns -- Returns the view props.\n */\n public renderSelectedStore = (\n shouldHideInventory: boolean,\n preferredDistanceUnit: string,\n preferredStore: IStoreInfo | undefined,\n isPreferredStoreEnabled: boolean | undefined,\n hasEnabledOutOfStockCheck: boolean,\n productPickUpOptionList?: DeliveryOption[],\n shouldDisplayList?: boolean\n ): ISelectedStoreViewProps | undefined => {\n const {\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const selectedStore = (shouldHideInventory ? storeLocations : availabilitiesWithHours)?.find(\n store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === selectedStoreLocationId\n );\n const orgUnitLocation = selectedStore?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreResources = this._mapResources(resources);\n\n if (!shouldDisplayList && selectedStore) {\n const selectedProps: ISelectedStoreProps = {\n shouldHideStockStatus: shouldHideInventory,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, context?.alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, selectedStore.OrgUnitAvailability?.ItemAvailabilities),\n selectedStore,\n resources: selectedStoreResources,\n stockStatusLabel: this._stockInventoryLabel(selectedStore),\n preferredStoreLocationId: preferredStore?.StoreId ? preferredStore.StoreId : '',\n isPreferredStoreEnabled,\n isLocationDisabled: this.state.isLocationDisabled,\n telemetryContent: this.telemetryContent,\n storePickUpOptionList: selectedStore.OrgUnitPickUpDeliveryModes?.DeliveryOptions,\n productPickUpOptionList,\n preferredDistanceUnit,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n\n return SelectedStoreComponent(selectedProps);\n }\n\n return undefined;\n };\n\n /**\n * Method to be called on link text change.\n * @param event -Content Edit Event.\n */\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.termsOfServiceLink) {\n this.props.config.termsOfServiceLink.linkText = event.target.value;\n }\n };\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading = event.target.value;\n };\n\n /**\n * Show all stores handler function.\n */\n private readonly onShowAllStoresHandler = () => {\n this._getAndUpdateStoreLocation(true);\n this.setState({ filteredPickupMode: undefined });\n };\n\n /**\n * Method to be called for filtered the store location based on the filter selected by the user.\n * @param stores -All the stores from the API.\n * @param filteredPickupMode -Filter selected by the user.\n * @returns -Filtered stores.\n */\n private readonly onFilterLocations = (stores: IFullOrgUnitAvailability[], filteredPickupMode: string) => {\n return stores.filter(location => {\n return location.OrgUnitPickUpDeliveryModes?.DeliveryOptions?.some(deliveryOption => {\n return deliveryOption.Code === filteredPickupMode;\n });\n });\n };\n\n /**\n * Filter Store by pickup mode.\n * @param deliveryCode -Delivery Code.\n */\n private readonly onFilteredPickupMode = (deliveryCode: string) => {\n this.setState({ filteredPickupMode: deliveryCode });\n };\n\n /**\n * Method will sort all stores.\n * @param stores -Stores List.\n * @param isPreferredStoreEnabled -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @returns List of Stores.\n */\n // eslint-disable-next-line class-methods-use-this -- No need of introducing new variable.\n private _sortStores(\n stores: IFullOrgUnitAvailability[],\n isPreferredStoreEnabled: boolean | undefined,\n preferredStoreLocationId: string\n ): IFullOrgUnitAvailability[] {\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n isPreferredStoreEnabled &&\n preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreLocationId;\n\n return [...stores.filter(isPreferredStore), ...stores.filter(store => !isPreferredStore(store))];\n }\n\n /**\n * Method will list of store selector location line.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param stores -Store Id.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns List of StoreSelectorLocation Line.\n */\n private _getStoreLocationListProps(\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n stores: IFullOrgUnitAvailability[] | null,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps[] {\n const storeList: IStoreSelectorLocationLineItemProps[] = [];\n if (ArrayExtensions.hasElements(stores)) {\n stores.map((store, index: number) => {\n const storeLineProps = this._createStoreLocationList(\n store,\n index,\n hasEnabledOutOfStockCheck,\n isStoreLocatorView,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n selectedStoreLocationId,\n preferredDistanceUnit,\n alreadySelectedLocation,\n productPickUpOptionList\n );\n if (storeLineProps) {\n storeList.push(storeLineProps);\n }\n });\n }\n return storeList;\n }\n\n /**\n * Initialize Map AutoSuggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n config: { autoSuggestOptions },\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded && !this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n /**\n * Callback for the autosuggest API.\n */\n callback: () => {\n const options = { ...autoSuggestOptions, countryCode: channel?.ChannelCountryRegionISOCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(\n `#ms-store-select__search-box_${this.props.id}`,\n `#ms-store-select__search-box-container_${this.props.id}`,\n this._onSuggestionSelected\n );\n },\n\n /**\n * Error call back for autosuggest API.\n */\n errorCallback: () => {\n if (telemetry) {\n telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: channel?.BingMapsApiKey\n });\n }\n };\n\n /**\n * On Selecting Location Suggestion.\n * @param result - Map Suggestions List.\n */\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context && context.id === this.props.id) {\n await this._searchTermChanged(result.formattedSuggestion);\n await this._performSearch(result.formattedSuggestion);\n }\n };\n\n /**\n * On Selecting Preferred Store.\n * @param storeId - Store Id.\n */\n private readonly _setPreferredStore = async (storeId: string | undefined): Promise => {\n if (!storeId) {\n return;\n }\n\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n config: { mode },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations },\n availabilitiesWithHours: { result: availabilitiesWithHours }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n\n let stores: IFullOrgUnitAvailability[];\n if (modeDefault === modeEnum.findStores && storeLocations) {\n stores = storeLocations;\n } else {\n stores = availabilitiesWithHours!;\n }\n\n const preferredStore = stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === storeId);\n\n await storeSelectorStateManager.setPreferredStoreLocation(\n storeId,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName,\n cookies.isConsentGiven(),\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude,\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude\n );\n };\n\n /**\n * On Removing Preferred Store.\n */\n private readonly _removePreferredStore = async (): Promise => {\n const {\n context: {\n actionContext: {\n requestContext: { cookies }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.clearPreferredStore(cookies.isConsentGiven());\n };\n\n /**\n * Method called to close the store details modal that comes up on clicking the pushpin.\n * @returns Void promise.\n */\n private readonly _closeStoreDetailModal = async (): Promise => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n await storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n };\n\n /**\n * On Selecting Store for pickup.\n * @param storeId - Store Id.\n */\n private readonly _setSelectedStore = async (storeId: string | undefined): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n await storeSelectorStateManager.setSelectedStoreLocationId(storeId);\n };\n\n /**\n * Method to be called on search.\n * @param searchTerm - Search string.\n */\n private readonly _performSearch = async (searchTerm: string): Promise => {\n const {\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!searchTerm || !storeSelectorStateManager) {\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n const location = await storeSelectorStateManager.geoLocate(searchTerm.trim() !== '' ? searchTerm : '0', actionContext);\n\n if (location) {\n await this._updateLocations(location.latitude, location.longitude);\n } else {\n await this._updateLocations();\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n };\n\n /**\n * Method to be called on search term changed.\n * @param searchTerm - Search string.\n */\n private readonly _searchTermChanged = async (searchTerm: string): Promise => {\n this.setState({ searchTerm });\n };\n\n /**\n * Method to be called updating the store location.\n * @param shouldShowAllStores - Flag to show all stores.\n */\n private readonly _getAndUpdateStoreLocation = (shouldShowAllStores?: boolean): void => {\n const {\n config: { style },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n\n if (styleDefault !== styleEnum.inline && (!storeSelectorStateManager || !storeSelectorStateManager.isDialogOpen)) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n if (navigator?.geolocation) {\n navigator.geolocation.getCurrentPosition(\n async position => {\n // eslint-disable-next-line react/no-unused-state -- This state is used in the views.\n this.setState({ isLocationDisabled: false, isSearchInProgress: true });\n if (shouldShowAllStores) {\n this.setState({ isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(position.coords.latitude, position.coords.longitude, 0);\n } else {\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n async error => {\n // If the location setting is turned off\n if (error.PERMISSION_DENIED) {\n this.setState({ isLocationDisabled: true, isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(0, 0, 0);\n }\n\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n },\n { timeout: 5000 }\n );\n } else {\n // eslint-disable-next-line react/no-unused-state -- State is used in the view.\n this.setState({ isSearchInProgress: false });\n }\n };\n\n /**\n * Method to be called closing the store selector dialog.\n * @returns Void promise.\n */\n private readonly _closeDialog = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n this.setState({ searchTerm: '' });\n\n if (storeSelectorStateManager) {\n storeSelectorStateManager.context?.parentElementRef?.current?.focus();\n return storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method to set store info.\n * @param orgUnitStoreInformation - Store Info Object.\n * @returns Void promise.\n */\n private readonly _setOrgUnitStoreInformation = async (orgUnitStoreInformation: IFullOrgUnitAvailability[]): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n config: { style },\n telemetry\n } = this.props;\n\n if (!storeSelectorStateManager) {\n return;\n }\n\n const context = storeSelectorStateManager.context;\n const moduleId: string = context?.id ? context.id : this.props.id;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n let input: IStoreSelectionStateContext = {\n /**\n * On Location selected.\n * @returns - Returns promise.\n */\n onLocationSelected: async () => {\n // TO-DO handle event for when location in selected\n return Promise.resolve();\n }\n };\n\n if (storeSelectorStateManager.context) {\n input = storeSelectorStateManager.context;\n }\n\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager.preferredStore;\n const preferredLocationId = preferredStore?.StoreId ? preferredStore.StoreId : '';\n const storeLocationList = this._sortStores(orgUnitStoreInformation, this.isPreferredStoreEnabled, preferredLocationId);\n\n input = {\n ...input,\n id: moduleId,\n showMapViewLink: context?.showMapViewLink,\n parentElementRef: context?.parentElementRef,\n isDialog: styleDefault === styleEnum.dialog,\n orgUnitStoreInformation: storeLocationList,\n product: context?.product\n };\n\n await storeSelectorStateManager.setOrgUnitStoreInformation(input).catch((error: Error) => {\n if (telemetry) {\n telemetry.error(error.message);\n telemetry.debug('Unable to Update store location state');\n }\n });\n };\n\n /**\n * Method to update user location.\n * @param latitude - User location.\n * @param longitude - User location.\n * @param radius - Search Criteria Radius.\n * @returns Void promise.\n */\n private readonly _updateLocations = async (latitude?: number, longitude?: number, radius?: number): Promise => {\n const {\n config: { mode, lookupRadius, style, searchRadiusUnit },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const calRadius = radius || radius === 0 ? radius : lookupRadius || 50;\n const distanceUnitValue = searchRadiusUnit === SearchRadiusUnit.kilometers ? 1 : 0;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n let localLatitude = this.state.searchTerm || !preferredStore?.Latitude ? latitude : preferredStore.Latitude;\n let long = this.state.searchTerm || !preferredStore?.Longitude ? longitude : preferredStore.Longitude;\n if (styleDefault === styleEnum.inline) {\n const lastInlineStoreLocation = storeSelectorStateManager?.lastInlineShownStoreInfo;\n if (lastInlineStoreLocation && !this.state.searchTerm) {\n localLatitude = lastInlineStoreLocation.Latitude ? lastInlineStoreLocation.Latitude : localLatitude;\n long = lastInlineStoreLocation.Longitude ? lastInlineStoreLocation.Longitude : long;\n }\n await storeSelectorStateManager?.setLastInlineStoreInfo(localLatitude, long);\n }\n\n if (modeDefault === modeEnum.findStores) {\n await this.getOrgUnitLocationByArea(calRadius, distanceUnitValue, localLatitude, long);\n return;\n }\n\n await this.getFullAvailableInventoryNearby(calRadius, distanceUnitValue, localLatitude, long);\n };\n\n /**\n * Get org unit location by area.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getOrgUnitLocationByArea = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n context: { actionContext }\n } = this.props;\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\n latitude,\n longitude,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\n if (orgUnitLocations) {\n await this._setOrgUnitStoreInformation(orgUnitLocations);\n await this._setSelectedStore(undefined);\n }\n };\n\n /**\n * Get full available inventory nearby.\n * @param calRadius - Radius.\n * @param distanceUnitValue - Distance unit value.\n * @param latitude - Latitude.\n * @param longitude - Longitude.\n * @returns - Returns a void promise.\n */\n private readonly getFullAvailableInventoryNearby = async (\n calRadius: number,\n distanceUnitValue: number,\n latitude?: number,\n longitude?: number\n ): Promise => {\n const {\n telemetry,\n context: { actionContext },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager || !storeSelectorStateManager.context) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n if (!storeSelectorStateManager.context.product) {\n // TODO: Use alternative search method here to not make inventory check\n return;\n }\n\n const input = new GetFullAvailableInventoryNearbyInput(\n storeSelectorStateManager.context.product.RecordId,\n latitude ?? 0,\n longitude ?? 0,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n await getFullAvailableInventoryNearby(input, actionContext).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get full available inventory near by');\n });\n };\n\n /**\n * Method to called on store selected.\n * @param location - Store Info.\n * @param deliveryMode - Pickup mode.\n * @returns Void promise.\n */\n private readonly _onOrgUnitLocationSelected = async (location: OrgUnitLocation | undefined, deliveryMode?: string): Promise => {\n const {\n telemetry,\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager) {\n if (location && storeSelectorStateManager.context) {\n // Want to eat exceptions here so that the dialog still closes even if the onLocationSelected call goes wrong\n await storeSelectorStateManager.context.onLocationSelected(location, deliveryMode).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug('Unable to get on org unit location selected');\n });\n }\n\n await storeSelectorStateManager.closeDialog();\n }\n };\n\n /**\n * Method will list of store selector location line.\n * @param store -Store Info.\n * @param index - List index.\n * @param hasEnabledOutOfStockCheck -Stores List.\n * @param isStoreLocatorView -Module config value.\n * @param preferredStoreLocationId -Store Id.\n * @param isPreferredStoreEnabled -Stores List.\n * @param selectedStoreLocationId -Module config value.\n * @param preferredDistanceUnit -Module config value.\n * @param alreadySelectedLocation -Already Selected Location.\n * @param productPickUpOptionList -Product supported Pickup Modes List.\n * @returns StoreSelectorLocation Line Prop.\n */\n private _createStoreLocationList(\n store: IFullOrgUnitAvailability,\n index: number,\n hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean,\n preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]\n ): IStoreSelectorLocationLineItemProps | undefined {\n const orgUnitLocation = store.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocation = selectedStoreLocationId;\n const deliveryOptions = store.OrgUnitPickUpDeliveryModes;\n const lineResources = this._mapResources(this.props.resources);\n const storeOpenFrom: string | undefined = secondsToTime(orgUnitLocation?.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(orgUnitLocation?.OpenTo);\n const storeHours = store.StoreHours;\n\n if (orgUnitLocation) {\n ++this.storeCounter;\n return {\n location: orgUnitLocation,\n selectedStoreLocationId: selectedStoreLocation,\n storeHours,\n resources: lineResources,\n preferredDistanceUnit: preferredDistanceUnit!,\n isCurrentLocation: this._isCurrentLocation(orgUnitLocation, alreadySelectedLocation),\n isInStock: this._isProductInStock(hasEnabledOutOfStockCheck, store.OrgUnitAvailability?.ItemAvailabilities),\n stockStatusLabel: this._stockInventoryLabel(store),\n storeLocatorView: isStoreLocatorView,\n index: this.storeCounter.toString(),\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n telemetryContent: this.telemetryContent,\n isLocationDisabled: this.state.isLocationDisabled,\n storePickUpOptionList: deliveryOptions?.DeliveryOptions,\n productPickUpOptionList,\n locationOpen: { openFrom: storeOpenFrom, openTo: storeOpenTo },\n storeHoursList: storeHours?.RegularStoreHours ? buildStoreHours(storeHours.RegularStoreHours, lineResources) : [],\n onClick: this._setSelectedStore,\n handlers: {\n onSelected: this._onOrgUnitLocationSelected,\n onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\n };\n }\n return undefined;\n }\n\n /**\n * Method to map resources with Location Item.\n * @param resources - List of strings for module.\n * @returns Resources for StoreSelector location line.\n */\n private readonly _mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n };\n\n private readonly _isCurrentLocation = (location: OrgUnitLocation | undefined, selectedLocation?: OrgUnitLocation): boolean =>\n (selectedLocation && location && selectedLocation.OrgUnitNumber === location.OrgUnitNumber) || false;\n\n /**\n * Method to get stock.\n * @param hasEnableOutOfStockCheck - Config to check for stock check enabled.\n * @param itemAvailabilities - Item quantity availability.\n * @returns Boolean value for item stock.\n */\n private readonly _isProductInStock = (\n hasEnableOutOfStockCheck: boolean,\n itemAvailabilities: ItemAvailability[] | undefined\n ): boolean => {\n if (!hasEnableOutOfStockCheck) {\n return true;\n }\n const quantityCount = 0;\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[0].AvailableQuantity ? itemAvailabilities[0].AvailableQuantity > quantityCount : false;\n }\n\n return false;\n };\n\n /**\n * Method to get stocklevel label.\n * @param isInStock - Stock available in store.\n * @returns Label for stock status.\n */\n private readonly _stockInventoryLabel = (isInStock: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (isInStock?.ProductInventoryInformation && ArrayExtensions.hasElements(isInStock.ProductInventoryInformation)) {\n for (let index = 0; index < isInStock.ProductInventoryInformation.length; index++) {\n if (\n isInStock.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n isInStock.ProductInventoryInformation[index].InventLocationId\n ) {\n return isInStock.ProductInventoryInformation[index].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n}\n\nexport default StoreSelector;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISelectedStoreViewProps } from './components/selected-store/selected-store';\nimport { IStoreSelectorViewProps } from './store-selector';\n\n/**\n * Renders the pickup Delivery options.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderDeliveryOptions: React.FC = props => {\n const { canSelectLocation, deliveryOptions, pickUpDeliveryOptionButton, pickupModes } = props;\n\n return (\n <>\n {/* eslint-disable-next-line no-nested-ternary -- Need this.*/}\n {canSelectLocation ? (ArrayExtensions.hasElements(deliveryOptions) ? pickupModes : pickUpDeliveryOptionButton) : false}\n \n );\n};\n\n/**\n * Render the selected store.\n * @param props -- Selected store view props.\n * @returns -- HTML.\n */\nconst renderSelectedStore: React.FC = props => {\n const {\n storeDetailsMain,\n storeHeader,\n storeName,\n storeDetailsCloseButton,\n storeDistance,\n storeDetailsAvailabilityContainer,\n productAvailability,\n stockStatus,\n isCurrentLocation,\n currentLocation,\n isPreferredStore,\n preferredStoreButton,\n removePreferredStoreButton\n } = props;\n\n return (\n \n \n {storeDetailsCloseButton}\n {storeName}\n {storeDistance}\n \n \n {productAvailability}\n {stockStatus}\n \n {isCurrentLocation ? currentLocation : renderDeliveryOptions(props)}\n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\n \n );\n};\n\n/**\n * Render the body of the popup.\n * @param props -- Store selector view props.\n * @returns -- Returns the html.\n */\nconst renderBody: React.FC = props => {\n const {\n BodyContainerProps,\n locationsMessage,\n search,\n state,\n spinner,\n locationsList,\n noLocationsMessage,\n maps,\n bodyWrapperProps,\n storeResultContainerProps,\n mapContainerProps,\n isMobileView,\n storeDetailsModal,\n selectedLocation\n } = props;\n\n if (isMobileView) {\n return (\n \n {locationsMessage}\n {search}\n \n \n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n {maps}\n {selectedLocation && renderSelectedStore(selectedLocation)}\n \n \n \n );\n }\n\n return (\n \n \n \n {locationsMessage}\n {search}\n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}}\n \n {maps}\n \n \n );\n};\n\n/**\n * Store selector view props.\n * @param props - Store selector view props.\n * @returns - HTML.\n */\nconst StoreSelectorView: React.FC = props => {\n const {\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n\n terms\n } = props;\n\n return (\n \n {HeaderProps}\n {renderBody(props)}\n {terms}\n \n );\n};\n\nexport default StoreSelectorView;\n","/*!\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 { Button, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISubscribeConfig, ISubscribeProps } from './subscribe.props.autogenerated';\n\n/**\n * Subscribe view props.\n */\nexport interface ISubscribeViewProps extends ISubscribeProps {\n subscribe: IModuleProps;\n subscribeContainer: INodeProps;\n heading: React.ReactNode;\n text: React.ReactNode;\n submitButton?: INodeProps;\n submitButtonLabelText?: string;\n subscribeForm?: INodeProps;\n emailInput?: INodeProps;\n handleText(): void;\n}\n\n/**\n * Subscribe component.\n * @extends {React.PureComponent>}\n */\nexport class Subscribe extends React.PureComponent> {\n private readonly _emailAddressInputRef: React.RefObject;\n\n public constructor(props: ISubscribeViewProps) {\n super(props);\n this._emailAddressInputRef = React.createRef();\n }\n\n public render(): JSX.Element | null {\n const { heading, paragraph } = this.props.config;\n\n const moduleClassName = 'ms-subscribe';\n\n const subscribeParagraph = paragraph && (\n \n );\n\n const subscribeHeading = heading && (\n \n );\n const viewProps = {\n ...this.props,\n handleText: this.handleTextChange,\n subscribe: {\n moduleProps: this.props,\n className: moduleClassName\n },\n subscribeContainer: {\n className: 'ms-subscribe__details'\n },\n heading: subscribeHeading,\n text: subscribeParagraph,\n subscribeForm: {\n className: 'ms-subscribe__details__form',\n tag: 'form',\n 'aria-label': this.props.resources.subscribeFormAriaLabel,\n name: 'subscribeForm',\n role: 'form',\n autoComplete: 'off'\n },\n emailInput: {\n className: 'ms-subscribe__details__form__email',\n tag: 'input',\n ref: this._emailAddressInputRef,\n type: 'email',\n 'aria-label': this.props.resources.subscribeFormEmailAriaLabel,\n placeholder: this.props.resources.subscribeEmailPlaceholderText\n },\n submitButton: {\n className: 'ms-subscribe__details__form__submit',\n tag: Button,\n 'aria-label': this.props.resources.subscribeFormSubmitAriaLabel,\n type: 'submit',\n title: this.props.resources.subscribeButtonLabel\n },\n submitButtonLabelText: this.props.resources.subscribeButtonLabel\n };\n\n return this.props.renderView(viewProps);\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 this.props.config.paragraph = event.target.value;\n };\n}\n\nexport default Subscribe;\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 { ISubscribeViewProps } from './subscribe';\n\n/**\n * Override form action and button action below.\n * @param event - The form event.\n */\nconst onSubmit = (event: React.FormEvent): void => {\n event.preventDefault();\n};\n\n/**\n * View component.\n * @param props - The view properties.\n * @returns - Returns nothing.\n */\nexport const subscribeView: React.FC = props => {\n const { subscribe, subscribeContainer, heading, text, subscribeForm, emailInput, submitButton } = props;\n return (\n \n \n {heading}\n {text}\n \n \n \n {props.submitButtonLabelText}\n \n \n \n \n );\n};\n\nexport default subscribeView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ContactInformationType, DeliveryOption, OrgUnitContact, OrgUnitLocation, StoreHours } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n buildStoreHours,\n IHoursDisplayInfo,\n ILocationHours,\n IStoreSelectorFoundLocationsMessage,\n IStoreSelectorLocationLineItemProps,\n IStoreSelectorLocationLineItemResources,\n IStoreSelectorViewProps,\n secondsToTime\n} from '@msdyn365-commerce-modules/store-selector';\nimport { ISelectedStoreViewProps } from '@msdyn365-commerce-modules/store-selector/src/modules/store-selector/components/selected-store/selected-store';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IPayLoad,\n isMobile,\n Module,\n Node,\n TelemetryConstant,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IStoreSelectorProps, IStoreSelectorResources } from '../definition-extensions/store-selector.ext.props.autogenerated';\n\n/**\n * PickUpMethodComponent View Props Interface.\n */\nexport interface IPickupComponent extends IStoreSelectorLocationLineItemProps {\n pickUpStatesProps: IStoreSelectorViewProps;\n}\n\n/**\n * Found Locations Message component in Store Selector.\n * @param props - The component props.\n * @returns The JSX Element.\n */\nconst StoreSelectorFoundLocationsMessageComponent: React.FC = props => {\n const { locations, searchRadius, resources, isSeeAllStore, preferredDistanceUnit } = props;\n if (locations) {\n const storeCountMessage =\n preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n\n return (\n ${locations.length.toString()}`\n )\n : storeCountMessage\n .replace(\n '{count}',\n `${locations.length.toString()}`\n )\n .replace(\n '{radius}',\n `${searchRadius.toString()}`\n )\n }\n />\n );\n }\n\n return null;\n};\n\n/**\n * Build distance string.\n * @param distance - The distance.\n * @param preferredDistanceUnit - The preferred distance unit.\n * @param resources - The module resources.\n * @param isLocationDisabled - True if location is disabled.\n * @returns The distance string.\n */\nconst buildDistanceString = (\n distance: number | undefined,\n preferredDistanceUnit: string,\n resources: IStoreSelectorResources & IStoreSelectorResources,\n isLocationDisabled?: boolean\n): string | undefined => {\n const closeDistance: number = 1;\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < closeDistance) {\n const closeDistanceString: string = resources.closeDistanceString;\n return closeDistanceString.replace('{preferredDistanceUnit}', preferredDistanceUnit);\n }\n const distanceAsString: string = resources.distanceString;\n return distanceAsString\n .replace('{preferredDistanceUnit}', preferredDistanceUnit)\n .replace('{distance}', Math.floor(distance).toString());\n};\n\n/**\n * Extract phone number.\n * @param contacts - Contacts array.\n * @returns Phone number.\n */\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === ContactInformationType.Phone && !contact.IsPrivate);\n\n if (ArrayExtensions.hasElements(allPhoneContacts)) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n/**\n * Render Store Hours Day.\n * @param displayTime - Store Hours Information.\n * @param storeHoursDayPeriodString - The string for store hours day period.\n * @param storeHoursDayString - The string for store hours day period.\n * @returns JSX element with store hours day.\n */\nconst buildStoreHoursDay = (displayTime: IHoursDisplayInfo, storeHoursDayPeriodString: string, storeHoursDayString: string) => {\n return (\n ${displayTime.startDayShort}`)\n .replace(\n '{endDay}',\n `${displayTime.endDayShort}`\n )\n : storeHoursDayString.replace(\n '{startDay}',\n `${displayTime.startDayShort}`\n )\n }\n />\n );\n};\n\n/**\n * Render Store Hours.\n * @param storeHours - Store hours.\n * @param storeHoursList - Store hours list.\n * @param locationOpen - Location open.\n * @param resources - The module resources.\n * @returns JSX element with store hours.\n */\nconst renderStoreHours = (\n storeHours: StoreHours | undefined,\n storeHoursList: IHoursDisplayInfo[] | undefined,\n locationOpen: ILocationHours | undefined,\n resources: IStoreSelectorResources & IStoreSelectorResources\n): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day hours\n if (storeHours?.RegularStoreHours) {\n return (\n
    \n {storeHoursList?.map(displayTime => (\n
    \n {buildStoreHoursDay(displayTime, resources.storeHoursDayPeriod, resources.storeHoursDay)}\n
    {displayTime.timeRange}
    \n
    \n ))}\n
    \n );\n }\n\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string = locationOpen?.openFrom ? locationOpen.openFrom : '';\n const storeOpenTo: string = locationOpen?.openTo ? locationOpen.openTo : '';\n return (\n
    \n {resources.storeHoursDayPeriod.replace('{startDay}', storeOpenFrom).replace('{endDay}', storeOpenTo)}\n
    \n );\n};\n\n/**\n * Match delivery options.\n * @param productDeliveryOptions - The list of product delivery options.\n * @param storePickUpOptionList - The list of store pick up options.\n * @returns Matched delivery option.\n */\nconst matchDeliveryOptions = (\n productDeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined\n): DeliveryOption[] => {\n if (!productDeliveryOptions) {\n return [] as DeliveryOption[];\n }\n return productDeliveryOptions\n .map(productDeliveryOption => storePickUpOptionList?.find(delivery => delivery.Code === productDeliveryOption.Code))\n .filter(productDeliveryOption => productDeliveryOption) as DeliveryOption[];\n};\n\n/**\n * PickUpMethod Resources Interface.\n */\nexport interface IPickUpMethodResources {\n selectStoreText: string;\n pickUpMethodLabel: string;\n pickUpOptionPlaceholder: string;\n pickupOptionDropdownError: string;\n pickupButtonAriaLabel: string;\n}\n\n/**\n * PickUp method dropdown component.\n * @param props - The view props.\n * @returns JSX Element.\n */\nconst PickUpMethodDropdownComponent = (props: IPickupComponent & IPickUpMethodResources) => {\n const {\n handlers,\n location,\n pickUpStatesProps,\n selectStoreText,\n pickUpMethodLabel,\n pickUpOptionPlaceholder,\n pickupOptionDropdownError,\n pickupButtonAriaLabel,\n productPickUpOptionList,\n storePickUpOptionList\n } = props;\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n const [selectedStorePickUpOption, selectStorePickUpOption] = React.useState('');\n const [currentStorePickUpOption, setCurrentStorePickUpOption] = React.useState(pickUpOptionPlaceholder);\n const [isDropdownOpen, toggleDropdown] = React.useState(false);\n const [isError, setError] = React.useState(false);\n\n /**\n * Method to handle the store pickup option change.\n * @param event - Change Event.\n */\n const onChangeHandler = React.useCallback((event: React.MouseEvent) => {\n event.preventDefault();\n selectStorePickUpOption(event.currentTarget.value);\n setCurrentStorePickUpOption(event.currentTarget.dataset.description ? event.currentTarget.dataset.description : '');\n toggleDropdown(false);\n setError(false);\n }, []);\n\n /**\n * Method to render store location line pick up button.\n * @param filteredDeliveryMode - Filtered Delivery Mode.\n * @returns JSX Element.\n */\n const renderLocationLinePickupButton = (filteredDeliveryMode: DeliveryOption | undefined) => {\n return filteredDeliveryMode !== undefined ? (\n
    \n \n {filteredDeliveryMode.Description}\n \n
    \n ) : null;\n };\n\n /**\n * Method to handle the store pickup option submit.\n */\n const onClickHandler = React.useCallback(() => {\n if (!StringExtensions.isNullOrEmpty(selectedStorePickUpOption)) {\n handlers.onSelected(location, selectedStorePickUpOption);\n } else if (pickUpStatesProps.state.filteredPickupMode !== undefined) {\n handlers.onSelected(location, pickUpStatesProps.state.filteredPickupMode);\n } else {\n toggleDropdown(false);\n setError(true);\n }\n }, [location, selectedStorePickUpOption, handlers, pickUpStatesProps.state.filteredPickupMode]);\n\n const handleDropdownToggle = React.useCallback(() => {\n toggleDropdown(!isDropdownOpen);\n setError(false);\n }, [isDropdownOpen]);\n\n const filterDeliveryOption = deliveryOptionList.find(\n (delivery: DeliveryOption) => delivery.Code === pickUpStatesProps.state.filteredPickupMode\n );\n\n const pickupInStoreButtonText: string = selectStoreText;\n const filteredDeliveryMode: DeliveryOption | undefined =\n pickUpStatesProps.state.filteredPickupMode !== undefined ? filterDeliveryOption : undefined;\n\n return (\n \n
    {pickUpMethodLabel}
    \n {pickUpStatesProps.state.filteredPickupMode === undefined ? (\n
    \n \n {currentStorePickUpOption}\n \n
      \n {deliveryOptionList.map((delivery: DeliveryOption) => (\n \n \n {delivery.Description}\n \n \n ))}\n
    \n
    {pickupOptionDropdownError}
    \n
    \n ) : (\n renderLocationLinePickupButton(filteredDeliveryMode)\n )}\n \n
    \n );\n};\n\n/**\n * Method to render store location line item.\n * @param locationLineItem - The Location Line item view props.\n * @param props - The view props.\n * @returns JSX Element.\n */\nconst renderStoreLocationLineItem = (\n locationLineItem: IStoreSelectorLocationLineItemProps,\n props: IStoreSelectorViewProps & IStoreSelectorProps\n) => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\n hideStockStatus,\n index,\n isInStock,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n location,\n resources,\n storeHours,\n storeHoursList,\n stockStatusLabel,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\n storeLocatorView,\n telemetryContent\n } = locationLineItem;\n const storeName = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(\n location.Distance,\n locationLineItem.preferredDistanceUnit,\n props.resources,\n locationLineItem.isLocationDisabled\n );\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockStatus = stockStatusLabel ? stockStatusLabel : resourceLabel;\n const stockText: string | undefined = hideStockStatus ? undefined : stockStatus;\n\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n\n /**\n * Method to handle the change for preferred store.\n * @returns Void.\n */\n const onSetPreferredStoreClickHandler = () => () => {\n locationLineItem.handlers.onSetAsPreferredStore(locationLineItem.location.OrgUnitNumber);\n };\n\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const removePreferredStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n
    \n
    \n {storeLocatorView && {index}}\n {storeName}\n {distanceAsString ? {distanceAsString} : false}\n
    \n
    \n
    \n

    {locationLineItem.resources.contactInfoHeader}

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

    {locationLineItem.resources.storeHoursHeader}

    \n {renderStoreHours(storeHours, storeHoursList, locationLineItem.locationOpen, props.resources)}\n
    \n {!storeLocatorView && (\n
    \n

    {resources.availabilityInfoHeader}

    \n {stockText &&

    {stockText}

    }\n
    \n )}\n {isPreferredStoreEnabled &&\n (isPreferredStore ? (\n \n {resources.preferredStoreText}\n \n ) : (\n \n {resources.setAsPreferredStoreText}\n \n ))}\n
    \n
    \n );\n};\n\n/**\n * Render Store Location.\n * @param location - The location props.\n * @param index - The location index.\n * @param props - The view props.\n * @param selectedLocationReference - The ref.\n * @returns The JSX Element.\n */\nconst renderStoreLocation = (\n location: IStoreSelectorLocationLineItemProps,\n index: number,\n props: IStoreSelectorViewProps & IStoreSelectorProps,\n selectedLocationReference: React.RefObject\n): JSX.Element | undefined => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from store-selector.tsx file\n hideStockStatus,\n storeLocatorView,\n isCurrentLocation,\n isInStock,\n productPickUpOptionList,\n resources,\n storePickUpOptionList,\n telemetryContent\n } = location;\n\n const orgUnitLocation = location.location;\n const selectedStoreLocationId = location.selectedStoreLocationId;\n const defaultAriaSetsize = 0;\n const canSelectLocation = hideStockStatus ?? isInStock;\n const storeName = location.location.OrgUnitName;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName ?? '');\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickUpOptionDropdownPlaceholderText: string = props.resources.pickupOptionDropdownPlaceholderText;\n\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n const selectStoreText = props.resources.selectStoreText;\n const pickUpMethodLabel = props.resources.pickUpMethodLabel;\n\n /**\n * Method to handle the pick up in store.\n * @returns Void.\n */\n const onPickupInStoreClickHandler = () => () => {\n location.handlers.onSelected(location.location);\n };\n\n /**\n * Render Store Locations.\n * @param unitLocation - The org unit location.\n * @returns Handler for onClick.\n */\n const onClickHandler = (unitLocation: OrgUnitLocation | undefined) => () => {\n location.onClick(unitLocation?.OrgUnitNumber);\n };\n\n const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\n \n {pickupInStoreButtonText}\n \n ) : (\n \n );\n const pickUpMethodSelection = canSelectLocation ? canSelectPickUpMethod : false;\n\n return (\n \n \n {renderStoreLocationLineItem(location, props)}\n \n {!storeLocatorView &&\n (isCurrentLocation ? (\n

    {resources.currentLocation}

    \n ) : (\n pickUpMethodSelection\n ))}\n \n );\n};\n\n/**\n * Render Store Locations.\n * @param props - The view props.\n * @param selectedLocationReference - The ref.\n * @returns The JSX Element.\n */\nconst renderStoreLocations = (\n props: IStoreSelectorViewProps & IStoreSelectorProps,\n selectedLocationReference: React.RefObject\n) => {\n return (\n \n {props.locationListProps?.map((store, index) => {\n return renderStoreLocation(store, index, props, selectedLocationReference);\n })}\n \n );\n};\n\n/**\n * Method to map resources with Location Item.\n * @param resources - List of strings for module.\n * @returns Resources for StoreSelector location line.\n */\nconst mapResources = (resources: IStoreSelectorResources): IStoreSelectorLocationLineItemResources => {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\n};\n\n/**\n * Render the selected store.\n * @param selectedLocationProps -- Selected store view props.\n * @param storeSelectorViewProps -- Store selector view props.\n * @returns -- HTML.\n */\nexport const renderSelectedStore = (\n selectedLocationProps: ISelectedStoreViewProps,\n storeSelectorViewProps: IStoreSelectorViewProps & IStoreSelectorProps\n): JSX.Element => {\n const {\n storeDetailsMain,\n storeHeader,\n storeName,\n storeDetailsCloseButton,\n storeDistance,\n storeDetailsAvailabilityContainer,\n productAvailability,\n stockStatus,\n isPreferredStore,\n preferredStoreButton,\n removePreferredStoreButton,\n selectedStore\n } = selectedLocationProps;\n\n const storeAddress: string | undefined = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.Contacts);\n const storeHoursList = selectedStore?.StoreHours?.RegularStoreHours\n ? buildStoreHours(selectedStore.StoreHours.RegularStoreHours, mapResources(storeSelectorViewProps.resources))\n : [];\n const storeOpenFrom: string | undefined = secondsToTime(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OpenTo);\n const locationOpen = { openFrom: storeOpenFrom, openTo: storeOpenTo };\n const storeNameValue = selectedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName;\n const pickupInStoreAriaLabel: string = selectedLocationProps.resources.selectLocationAriaLabelFormat.replace(\n '{StoreName}',\n storeNameValue ?? ''\n );\n const telemetryContent = getTelemetryObject(\n storeSelectorViewProps.context.request.telemetryPageName!,\n storeSelectorViewProps.friendlyName,\n storeSelectorViewProps.telemetry\n );\n const payLoad = getPayloadObject('click', telemetryContent, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n const pickupInStoreButtonText: string = selectedLocationProps.resources.selectLocation;\n const selectStoreText = storeSelectorViewProps.resources.selectStoreText;\n const pickUpMethodLabel = storeSelectorViewProps.resources.pickUpMethodLabel;\n const pickUpOptionDropdownPlaceholderText: string = storeSelectorViewProps.resources.pickupOptionDropdownPlaceholderText;\n const orgUnitNumber = selectedStore?.OrgUnitAvailability?.OrgUnitLocation!.OrgUnitNumber;\n const productPickUpOptionList = storeSelectorViewProps.data.storeSelectorStateManager.result?.context?.deliveryOptions?.DeliveryOptions;\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, selectedLocationProps.deliveryOptions);\n const selectedLocation = storeSelectorViewProps.locationListProps?.find(location => location.location.OrgUnitNumber === orgUnitNumber);\n\n /**\n * Method to handle the pick up in store.\n * @returns Void.\n */\n const onPickupInStoreClickHandler = () => () => {\n selectedLocationProps.handlers.onSelected(selectedStore!.OrgUnitAvailability!.OrgUnitLocation!);\n };\n const canSelectPickUpMethod = !ArrayExtensions.hasElements(deliveryOptionList) ? (\n \n {pickupInStoreButtonText}\n \n ) : (\n selectedLocation && (\n \n )\n );\n\n return (\n \n \n {storeDetailsCloseButton}\n {storeName}\n {storeDistance}\n \n \n
    \n

    {storeSelectorViewProps.resources.contactText}

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

    {storeSelectorViewProps.resources.timeText}

    \n {renderStoreHours(selectedStore?.StoreHours, storeHoursList, locationOpen, storeSelectorViewProps.resources)}\n
    \n {productAvailability && (\n
    \n

    {productAvailability}

    \n {stockStatus &&

    {stockStatus}

    }\n
    \n )}\n
    \n {isPreferredStore ? preferredStoreButton : removePreferredStoreButton}\n {canSelectPickUpMethod}\n
    \n );\n};\n\n/**\n * Store Selector View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst StoreSelectorViewComponent: React.FC> = props => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Store-Selector.tsx file\n const {\n BodyContainerProps,\n storeResultContainerProps,\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n locationsMessage,\n search,\n state,\n spinner,\n maps,\n locationsList,\n noLocationsMessage,\n terms,\n storeDetailsModal,\n selectedLocation,\n bodyWrapperProps,\n data,\n context\n } = props;\n const selectedLocationReference = React.useRef(null);\n const [isDesktopPort, setIsDesktopPort] = React.useState(false);\n\n const isDesktopViewport = React.useCallback(() => {\n const portView = isMobile({ variant: VariantType.Browser, context: context.request });\n const isDesktopPorts = portView === 'md' || portView === 'xl' || portView === 'lg';\n setIsDesktopPort(isDesktopPorts);\n }, [context]);\n\n React.useEffect(() => {\n if (props.locationsList) {\n /**\n * Method to handle scrolling.\n */\n const scrollIntoView = () => {\n const selectedLocationDiv = (selectedLocationReference as React.RefObject).current;\n if (selectedLocationDiv !== null) {\n const offset = selectedLocationDiv.getBoundingClientRect();\n const parent = selectedLocationDiv.parentElement?.parentElement;\n if (parent && offset) {\n const totalHeight = parent.scrollTop + offset.top;\n parent.scrollTop = totalHeight - parent.clientHeight;\n }\n }\n };\n scrollIntoView();\n }\n }, [props.locationsList]);\n\n React.useEffect(() => {\n if (MsDyn365.isBrowser) {\n window.addEventListener('resize', isDesktopViewport);\n }\n isDesktopViewport();\n }, [isDesktopViewport]);\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\n\n const isDesktopView = viewport === 'md' || viewport === 'lg' || viewport === 'xl';\n\n if (!isDesktopView || !isDesktopPort) {\n return (\n \n {HeaderProps}\n \n \n {locationsMessage && (\n \n )}\n {search}\n \n \n {state.isSearchInProgress ? (\n spinner\n ) : (\n <>{locationsList ? renderStoreLocations(props, selectedLocationReference) : noLocationsMessage}\n )}\n \n {maps}\n \n {selectedLocation && renderSelectedStore(selectedLocation, props)}\n \n \n \n \n {terms}\n \n );\n }\n return (\n \n {HeaderProps}\n \n \n {locationsMessage && (\n \n )}\n {search}\n {state.isSearchInProgress ? (\n spinner\n ) : (\n <>{locationsList ? renderStoreLocations(props, selectedLocationReference) : noLocationsMessage}\n )}\n \n \n {maps}\n \n \n {terms}\n \n );\n};\n\nexport default StoreSelectorViewComponent;\n"],"names":["Aaa_b2c_order_history","React","constructor","props","super","getRequestOrderList","async","response","getRequestOrderHistoryB2CAsync","callerContext","this","context","actionContext","queryResultSettings","RequestOrder","mappedRequestOrder","customerInfo","handleMouseEnterEvent","index","setState","mouseOverIndex","handleMouseOutEvent","handlePageItemsChange","totalItemPerPage","activePage","pageCount","currentPageItems","state","searchPageItems","length","Math","ceil","requestOrderLines","getEndOrderIndexInPage","getStartOrderIndexInPage","push","handleOnChangeInput","searchString","toLowerCase","getOrderDetailPageUrl","requestId","lineNum","request","orderDetailUrl","url","requestUrl","origin","sitePath","window","location","href","config","redirectToOrderDetailUrl","searchItems","filter","f","b2BCUSTOMERNAME","includes","console","log","resetItems","headers","AccountNumber","products","isLoading","data","customerInformation","result","requestOrders","mappedProducts","requestOrder","RequestOrderId","imageUrl","LowResImageURL","stockistName","orderNumber","totalPrice","B2CPrice","toLocaleString","orderLinesPriceInfo","parseData","JSON","parse","RequestOrderLines","_forEach","orderLine","name","DetailName","price","snapShotId","Snapshotid","statusName","StatusName","LineNum","toString","render","viewProps","_objectSpread","renderView","style","pagination","marginRight","marginBottom","a","color","float","padding","textDecoration","transition","border","cursor","active","backgroundColor","hover","disabled","searchInput","height","width","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","cropFocalRegion","className","type","placeholder","value","onChange","event","target","Button","title","onClick","key","map","line","Image","requestContext","altText","productName","src","fallBackSrc","fallbackImage","gridSettings","imageSettings","loadFailureBehavior","marginTop","orderLinePriceInfo","disabledWrapper","Array","p","onMouseEnter","onMouseLeave","_props$data$operation","b2bRequestsStatus","heading","table","continueShoppingButtonTitle","resources","operationRequests","Module","Object","assign","Node","headingForEmptyRequestStatus","textForEmptyRequestStatus","role","getUrlSync","renderCategorySuggestionsTitle","inCategoriesHeading","categoryAutoSuggestionHeading","CategorySuggestionsComponent","noResultText","isLoadingAutoSuggest","isLoadingNode","autosuggestCategory","CategorySuggest","UlCategory","text","MobileAutoSuggestEmptyComponent","noSearchResultImage","renderProductNotFoundResultsImage","emptyMobileSearchTextHeading","emptyMobileSearchText","FormComponent","form","searchForm","formWrapper","isMobile","clearSearchButtonText","isSearchText","clearSearch","cancelButtonNode","cancelBtnAriaLabel","cancelBtn","input","renderClearButton","submitBtn","renderKeywordSuggestionsTitle","keywordsHeading","KeywordSuggestionsComponent","keywordSuggest","ulKeyword","keywordSuggestions","renderProductSuggestionsTitle","productSuggestionsHeading","productAutoSuggestionHeading","renderProductNotFoundResults","noResultContentHeadingText","noResultContentParagraphText","ProductSuggestionsComponent","productSuggest","ulProduct","productSuggestions","productSuggestionHeading","items","item","_item$id","LiProduct","id","AProduct","thumbnail","tag","renderTitle","searchSuggestionHeading","searchText","searchTextString","concat","searchAutoSuggestionHeading","format","Search","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","UlKeyword","UlProduct","autosuggestKeyword","autosuggestProduct","SearchForm","FormWrapper","label","categorySuggestionHeading","setSearchTextString","useState","isMobilePort","setIsMobile","useEffect","propsFormInput","propsFormInputCurrent","ref","current","action","isMobileViewport","useCallback","isMobileView","variant","VariantType","Browser","addEventListener","viewport","StringExtensions","isNullOrEmpty","isSearchFormExpanded","StoreSelectorFoundLocationsMessageComponent","locations","searchRadius","isSeeAllStore","preferredDistanceUnit","storeCountMessage","milesShortText","storeCountMessageInKm","RichTextComponent","storeAllCountMessage","replace","extractPhoneNumber","contacts","allPhoneContacts","contact","ContactTypeValue","ContactInformationType","Phone","IsPrivate","ArrayExtensions","hasElements","primaryPhoneContact","find","IsPrimary","Locator","renderStoreHours","storeHours","storeHoursList","locationOpen","RegularStoreHours","displayTime","stringify","buildStoreHoursDay","storeHoursDayPeriodString","storeHoursDayString","endDayShort","startDayFull","startDayShort","endDayFull","storeHoursDayPeriod","storeHoursDay","timeRange","storeOpenFrom","openFrom","storeOpenTo","openTo","matchDeliveryOptions","productDeliveryOptions","storePickUpOptionList","productDeliveryOption","delivery","Code","PickUpMethodDropdownComponent","handlers","pickUpStatesProps","selectStoreText","pickUpMethodLabel","pickUpOptionPlaceholder","pickupOptionDropdownError","pickupButtonAriaLabel","productPickUpOptionList","deliveryOptionList","selectedStorePickUpOption","selectStorePickUpOption","currentStorePickUpOption","setCurrentStorePickUpOption","isDropdownOpen","toggleDropdown","isError","setError","onChangeHandler","preventDefault","currentTarget","dataset","description","onClickHandler","undefined","filteredPickupMode","onSelected","handleDropdownToggle","filterDeliveryOption","pickupInStoreButtonText","filteredDeliveryMode","classnames","Description","renderLocationLinePickupButton","renderStoreLocationLineItem","locationLineItem","hideStockStatus","isInStock","preferredStoreLocationId","isPreferredStoreEnabled","stockStatusLabel","storeLocatorView","telemetryContent","storeName","OrgUnitName","distanceAsString","buildDistanceString","distance","isLocationDisabled","closeDistanceString","distanceString","floor","Distance","storeAddress","Address","phoneNumber","Contacts","resourceLabel","inStock","outOfStock","stockText","payLoad","getPayloadObject","TelemetryConstant","PickupInStore","isPreferredStore","OrgUnitNumber","contentAction","etext","PreferredStore","preferredStoreAttribute","getTelemetryAttributes","RemovePreferredStore","removePreferredStoreAttribute","contactInfoHeader","storeHoursHeader","availabilityInfoHeader","preferredStoreAriaLabel","onRemovePreferredStore","preferredStoreText","setAsPreferredStoreTextAriaLabel","onSetAsPreferredStore","setAsPreferredStoreText","renderStoreLocations","selectedLocationReference","_props$data$storeSele","_props$locationListPr","show","storeSelectorStateManager","listMapViewState","displayList","locationListProps","store","renderStoreLocation","isCurrentLocation","orgUnitLocation","selectedStoreLocationId","canSelectLocation","pickupInStoreAriaLabel","selectLocationAriaLabelFormat","selectLocation","pickUpOptionDropdownPlaceholderText","pickupOptionDropdownPlaceholderText","attributes","unitLocation","canSelectPickUpMethod","pickupOptionDropdownErrorText","pickUpMethodSelection","selected","Number","parseInt","onKeyDown","currentLocation","renderSelectedStore","selectedLocationProps","storeSelectorViewProps","_selectedStore$OrgUni","_selectedStore$OrgUni2","_selectedStore$StoreH","_selectedStore$OrgUni3","_selectedStore$OrgUni4","_selectedStore$OrgUni5","_selectedStore$OrgUni6","_storeSelectorViewPro","_storeSelectorViewPro2","storeDetailsMain","storeHeader","storeDetailsCloseButton","storeDistance","storeDetailsAvailabilityContainer","productAvailability","stockStatus","preferredStoreButton","removePreferredStoreButton","selectedStore","OrgUnitAvailability","OrgUnitLocation","StoreHours","buildStoreHours","contactText","timeText","availabilityText","closedText","storeHoursClosedText","outOfStockText","inStockText","selectedStoreLocationText","selectStoreAriaFormatText","days","monday","storeHoursMondayText","tuesday","storeHoursTuesdayText","wednesday","storeHoursWednesdayText","thursday","storeHoursThursdayText","friday","storeHoursFridayText","saturday","storeHoursSaturdayText","sunday","storeHoursSundayText","mondayFull","storeHoursMondayFullText","tuesdayFull","storeHoursTuesdayFullText","wednesdayFull","storeHoursWednesdayFullText","thursdayFull","storeHoursThursdayFullText","fridayFull","storeHoursFridayFullText","saturdayFull","storeHoursSaturdayFullText","sundayFull","storeHoursSundayFullText","secondsToTime","OpenFrom","OpenTo","storeNameValue","getTelemetryObject","telemetryPageName","friendlyName","telemetry","orgUnitNumber","deliveryOptions","DeliveryOptions","selectedLocation","_data$storeSelectorSt2","_data$storeSelectorSt3","BodyContainerProps","storeResultContainerProps","FooterContainerProps","HeaderContainerProps","HeaderProps","ModuleProps","locationsMessage","search","spinner","maps","locationsList","noLocationsMessage","terms","storeDetailsModal","bodyWrapperProps","isDesktopPort","setIsDesktopPort","isDesktopViewport","portView","scrollIntoView","selectedLocationDiv","_selectedLocationDiv$","totalTopHeight","offsetTop","clientHeight","parent","parentElement","scrollTop","MsDyn365","isBrowser","_data$storeSelectorSt","isSearchInProgress","displayMap","_ref","ariaLabel","message","errorClassName","GetMaxLength","maxLength","parsedMaxLength","isNaN","pattern","forId","htmlFor","successClassName","PasswordResetVerification","moduleClassName","handleHeadingChange","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","isInitialized","getValue","v1Value","v2Value","templateVersion","emailRegex","EmailRegex","defaultRegex","source","componentDidMount","componentDidUpdate","shouldComponentUpdate","nextProps","nextState","viewState","isShowLoading","passwordResetVerification","moduleProps","loading","modal","Modal","isOpen","modalBody","ModalBody","icon","PasswordResetVerificationLoadingIconComponent","PasswordResetVerificationLoadingMessageComponent","loadingMessage","defaultAADConainer","display","aadConainer","Msdyn365","editProps","onEdit","passwordResetVerificationLocalAccount","_renderLocalAccount","obj","ID","PAT","verifying_blurb","localAccount","verificationControlWrapper","_renderInput","emailAddressLabelText","verificationCodeLabelText","successMessage","PasswordResetVerificationSuccessComponent","verificationCodeSendSuccess","emailAddressVerifiedSuccess","errorMessage","PasswordResetVerificationErrorComponent","retryError","retryNotAllowedError","throttledError","codeExpiredError","serverError","invalidEmailError","verificationButtonsWrapper","verificationButtons","PasswordResetVerificationButtonComponent","sendCodeButtonAriaLabel","sendCodeButtonText","verifyCodeButtonAriaLabel","verifyCodeButtonText","resendCodeButtonAriaLabel","resendCodeButtonText","changeEmailButtonAriaLabel","changeEmailButtonText","buttonsWrapper","buttons","continueButtonAriaLabel","continueButtonText","cancelButtonAriaLabel","cancelButtonText","verificationSuccessModal","verificationSuccessModalMessage","labelText","cssClassName","wrapper","PasswordResetVerificationLabelComponent","PasswordResetVerificationInputComponent","__decorate","observable","observer","PasswordResetVerificationItem","PasswordResetVerificationLoading","_ref3","_ref2","error","button","LocalAccount","CountryPicker","_telemetryContent","_preferredSiteStorageKey","_cookieExpirationTime","closeModal","isModalOpen","_handleStayOnSiteButtonClick","_this$props$context$r","currentBaseUrl","marketSettings","urlToStore","_appendProtocolToUrl","_writeToCookie","_handleClick","storageKey","storageValue","cookieOptions","secure","sameSite","maxAge","cookies","set","baseUrl","isCookieValueSet","get","_heading$tag","subheading","countryList","actionLink","isConsentGiven","countryPickerHeading","handleTextChange","countryPickerSubHeading","handleParagraphChange","countryPickerActionLink","createLink","currentSiteButton","tabIndex","stayOnCurrentSiteButtonText","viewprops","modalContainer","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","modalHeaderContainer","ModalHeader","closeButtonTabIndex","modalFooterContainer","ModalFooter","modalBodyContainer","link","renderCountryList","stayOnCurrentSiteButton","handleLinkTextChange","_this$props$config$ac","linkText","linkUrl","destinationUrl","_link$linkText","editableLink","openInNewTab","additionalProperties","onTelemetryClick","onTextChange","localeItems","renderCountry","localeItem","_image$imageSettings","_image$src","localeBaseUrl","matchedCountryItem","imageSize","image","imageProps","displayString","shouldSkipToMainImage","displaySubString","countryPickerView","country","FooterCategory","slots","content","categories","FooterList","FooterListItem","FooterCategoryView","category","InvoiceDetailsHeaderComponent","msdyn365Commerce","createComponent","component","invoiceDetails","onError","invoiceNumberText","invoiceIdLabel","invoiceOrderItemsText","lines","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","date","invoiceDate","cultureFormatter","formatDate","year","month","day","formatShortDate","dueDate","formatLongDate","dueDateText","invoicePaymentDueDateText","isOnBehalfOfRequest","isOboRequest","invoicePlacedByLabel","customerName","invoiceAmountDueText","formatAmount","amount","currencyCode","formatCurrency","amountDue","PayInvoiceComponent","typeName","invoice","InvoiceDetailsPaymentDetailsComponent","invoicePaymentDetails","lineClassName","ObjectExtensions","isNullOrUndefined","totalDiscount","invoicePaymentDiscounts","subtotal","invoicePaymentSubtotal","totalCharges","invoicePaymentCharges","totalTax","invoicePaymentTax","totalAmount","invoicePaymentInvoiceTotal","InvoiceDetailsProductsComponent","productLineClass","productLineInfoContainerClass","productLineDetailsClass","productLineSmallDetailsClass","product","quantity","Quantity","productUrl","ProductName","ProductId","getProductPageUrlSync","RecordId","_renderProductImage","getFallbackImageUrl","ItemId","apiSettings","primaryImageUrl","_renderProductDimensions","isNullOrWhitespace","ColorName","invoiceProductColor","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","Price","invoiceQuantity","NetAmount","InvoiceDetailsModel","Id","InvoiceDate","Date","CustomerName","InvoiceDueDate","AmountBalance","status","InvoicePaidStatusValue","SalesInvoiceLine","_products$find","PrimaryImageUrl","TotalDiscount","InvoiceSubtotal","TotalCharges","TotalTaxAmount","TotalAmount","CurrencyCode","InvoicePaidStatus","Paid","InvoiceDetails","_onAddToCartFailed","bind","_setPayInvoiceErrorModalClose","_getProducts","ChannelId","invoiceDetailsModel","payInvoiceErrorModalOpen","header","_renderHeader","_renderProducts","paymentDetails","_renderPaymentDetails","payInvoiceError","_renderInvoiceErrors","_className","channelId","arguments","productInputs","ProductInput","getSimpleProductsAction","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","cartUrl","InvoiceErrorComponent","showError","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","setPayInvoiceErrorModalClose","InvoiceDetailsView","messageHeader","otherError","errorMessages","Alert","assertive","InvoicesFilterState","getInvoicesFilterStateResources","filterState","ShowAll","invoicesFilterShowAll","invoiceStatusPaid","PartiallyPaid","invoiceStatusPartiallyPaid","Unpaid","invoiceStatusUnpaid","Error","onStateClick","InvoicesFilterComponent","popoverRef","popoverState","setPopoverState","togglePopover","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","innerRef","Popover","placement","EnumExtensions","getEnumValues","renderFilterStateItem","stateStringRepresentation","InvoicesTableHeaderComponent","rowClassName","switchCheckedState","onSelectAll","isSelectedAll","headerCells","getMobileHeaderCells","invoiceListSelectAllRadioAriaLabelText","checked","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","onRequestSpecificInvoice","requestInvoiceButtonReference","onRequestInvoice","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","isShowActions","setShowActions","shouldShowActions","extraActionsPopup","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","invoiceActionsButtonIsOnBehalfOfTextAriaLabel","showActions","getInvoiceDetailsPageUrlSync","actionsContainerClassName","payInvoiceClassName","reference","payInvoiceReferences","RequestInvoiceButton","innerReference","invoiceReferences","requestInvoiceButtonLabel","invoiceRequestButtonLabel","onClicked","InvoicesTableRowComponent","onSelectLine","isSelected","rowCells","getMobileRowCells","invoiceRowArialabel","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","getDesktopRowCells","customer","isCurrentUser","customerAccountNumber","invoiceCurrentUser","_window","device","Type","innerWidth","sm","md","getViewport","onSelectAllHandler","invoices","forEach","InvoicesTableComponent","updateViewport","headerClassName","all","isAdmin","IsB2bAdmin","invoiceButtonReferences","payInvoiceButtonReferences","MakePaymentComponentActions","_event","setDisabled","payInvoices","errorState","buttonReferences","MakePaymentComponent","hasInvoices","canBePaid","makePaymentButtonAriaLabel","makePaymentButtonText","PayInvoiceComponentActions","payInvoiceButtonAriaLabel","payInvoiceButtonText","InvoiceModel","CustomerAccountNumber","invoiceStatus","None","invoiceStatusNone","invoicesToAdd","errorReason","failureReason","cartState","getCartState","addInvoicesToCart","invoiceIds","_result$errorDetails","_result$errorDetails2","errorDetails","LocalizedMessage","errorCode","ErrorResourceId","onSubmitRequestClick","onClosing","filteredInvoices","onSubmitRequest","checkboxRef","closingFlag","_inputInvoice$current","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","_invoice","i","_checkboxRef$current$","onInvoiceSelect","onInvoiceSelectHandler","checkboxId","checkboxName","RequestInvoiceModal","email","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","selectedInvoiceIndex","setFilteredInvoices","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","_focusElement$current","focus","searchEntered","searchEnteredHandler","updatedInvoices","toLocaleUpperCase","searchResultString","invoicesFoundReplaceIndex","indexOf","horizontalPosition","verticalPosition","autoFocus","fade","onOpened","setFilteredInvoicesToSelectedInvoices","selectedInvoices","requestInvoiceDialogAriaLabel","substring","InvoicesList","buttonChildReference","buttonChildPayButtonReference","_onToggleInvoiceRequestParentModal","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","fromModuleData","QueryResultSettings","makePaymentReference","_updateInvoicesState","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","invoicesFilterState","isPageLoaded","isInvoiceRequestModalOpen","_customerBalance$resu","_customerBalance$resu2","_heading$text","channel","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","toFixed","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","Heading","invoiceRequestModal","_renderInvoiceRequestModal","_renderInvoicesFilter","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","_addInvoices","newInvoices","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","BusinessPartnerId","getCustomer","GetCustomerInput","CustomerId","InvoicePaidStatusValues","_getInvoicesSearchCriteria","Paging","Skip","getInvoices","GetInvoicesInput","filterClassName","tableClassName","newErrorState","_newErrorState$errorR","errorHost","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","shouldShowAdditionalInfoInPopup","makePaymentResources","_getSelectedInvoices","moduleId","moduleTypeName","navigationUrl","_this$state$selectedB","invoiceErrorMessageHeader","_data$invoices","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","Email","_this$state$selectedB2","invoiceId","_this$props$data$b2bU","b2bUserId","b2bUserInformation","B2BUserId","BusinessPartnerUsersDataActions","BusinessPartnerOperationDeliveryType","specificInvoice","InvoiceListView","StorePickUpOptionList","_rendeDeliveryOptions","isExpandOptionsState","isFilterExpanded","_onSelect","deliveryCode","getAttribute","selectedPickupMode","_onKeyDown","_storePickupListOptionMenu","_productPickupModeLis","productPickupListOptionMenuText","productPickupModeList","defaultOptionText","selectedPickupModeDesc","StoreSelectorLocationLines","_scrollIntoView","selectedLocationRef","_isCurrentLocation","alreadySelectedLocation","_isProductInStock","itemAvailabilities","enableOutOfStockCheck","AvailableQuantity","_stockInventoryLabel","availabilityWithHours","ProductInventoryInformation","_availabilityWithHour","InventoryLocationId","InventLocationId","StockLevelLabel","_mapResources","storeCounter","previousProps","_stores","_sortStores","reaction","_renderStoreLocation","_store$OrgUnitAvailab","OrgUnitPickUpDeliveryModes","_store$OrgUnitAvailab2","StoreSelectorLocationLineItemComponent","ItemAvailabilities","onLocationSelected","productPickUpDeliveryOptions","shouldShowIndex","stores","_value$OrgUnitAvailab","StoreSelectorSearchForm","searchBoxRef","previousValue","isSearchResultOpened","_handleInputKeyPress","keyCode","KeyCodes","ArrowUp","ArrowDown","activeDescedantValue","_handleKeyPressPrev","Enter","Space","onShowAllStores","_searchTextChanged","inputValue","searchTermChanged","_onSubmit","_this$searchBoxRef$cu","blur","performSearch","_onChangeHandler","filterPickupModeSelected","Promise","resolve","renderPickupModesList","toggleButtonText","pickupFilterMenuHeading","locatorView","pickupFilterByHeading","hasEnabledPickupFilterToShowStore","shouldDisplayList","toggleButtonClass","onToggleListMapViewState","toggleMapViewAttributes","SearchStore","storeSearchAttributes","ShowAllStore","showAllStoreAttributes","ToggleMapView","searchButtonAriaLabel","searchPlaceholderText","seeAllStoresText","viewListText","viewMapText","isMapDisabled","showAllStores","autoComplete","onSubmit","searchInputAriaLabel","onKeyUp","StoreSelectorEmptyMessage","emptyLocationsText","StoreSelectorWaiting","StoreSelectorTermsOfService","StoreSelectorFoundLocationsMessage","PickUpOptionList","eventsToBeBind","handleDocumentClick","htmlElement","_pickupListOptionButton","contains","_pickupListOptionMenu","expandSiteOptions","_renderDeliveryOptions","componentWillUnmount","removeEventListener","pickupListOptionMenuText","pickupmodeList","stopPropagation","isExpandSiteOptionsState","seconds","hours","ampm","divisorForMinutes","getShortTimeString","getFullTimeString","buildHoursDisplayInfo","startDay","endDay","hoursInfo","shouldMergeLines","firstLine","secondLine","isClosed","openTime","closeTime","getStoreHoursData","dateForLookup","buildStoreHoursString","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","storeSelectorLocationLineItemComponentActions","deliveryMode","onPickupInStoreClickHandler","onPickupModeSelectHandler","pickupMode","onSetPreferredStoreClickHandler","removePreferredStoreHandler","productdeliveryOptions","deliveryOption","pickup","_delivery","stockLabel","preferredStoreAttributes","removePreferredStoreAttributes","renderPickupModes","_props$selectedStore","_props$selectedStore2","_props$selectedStore3","_props$selectedStore4","storeDetailsModalHandler","closeStoreDetailsModal","SelectedStoreComponent","shouldHideStockStatus","parentClassName","pickUpDeliveryOptionButton","pickupModes","StoreSelector","shouldHideInventory","preferredStore","hasEnabledOutOfStockCheck","availabilitiesWithHours","storeLocations","selectedStoreResources","selectedProps","StoreId","_onOrgUnitLocationSelected","_setPreferredStore","_removePreferredStore","_closeStoreDetailModal","termsOfServiceLink","onShowAllStoresHandler","_getAndUpdateStoreLocation","onFilterLocations","_location$OrgUnitPick","some","onFilteredPickupMode","_attachMapAutoSuggest","autoSuggestOptions","isMapApiLoaded","autoSuggestManager","Microsoft","Maps","loadModule","callback","options","countryCode","ChannelCountryRegionISOCode","AutosuggestManager","attachAutosuggest","_onSuggestionSelected","errorCallback","debug","credentials","BingMapsApiKey","_this$props$data$stor","_searchTermChanged","formattedSuggestion","_performSearch","_preferredStore$OrgUn","_preferredStore$OrgUn2","_preferredStore$OrgUn3","storeId","mode","setPreferredStoreLocation","Latitude","Longitude","clearPreferredStore","setSelectedStoreLocationId","_setSelectedStore","searchTerm","isSeeAllStoreValue","geoLocate","trim","_updateLocations","latitude","longitude","shouldShowAllStores","_navigator","isDialogOpen","navigator","geolocation","getCurrentPosition","position","coords","PERMISSION_DENIED","_closeDialog","_storeSelectorStateMa","parentElementRef","closeDialog","_setOrgUnitStoreInformation","styleDefault","preferredLocationId","storeLocationList","orgUnitStoreInformation","showMapViewLink","isDialog","setOrgUnitStoreInformation","catch","radius","lookupRadius","searchRadiusUnit","calRadius","distanceUnitValue","modeDefault","localLatitude","long","lastInlineStoreLocation","lastInlineShownStoreInfo","setLastInlineStoreInfo","getFullAvailableInventoryNearby","getOrgUnitLocationByArea","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","GetFullAvailableInventoryNearbyInput","warning","hasEnableOutOfStockCheck","_isInStock$OrgUnitAva","_this$props$data$stor6","autoSuggestionEnabled","isAutoSuggestionEnabled","_this$props$context","_this$props$data$stor2","_this$props$data$stor3","_this$props$data$stor4","_this$props$data$stor5","loadMapApi","BingMapsEnabled","lang","locale","market","_this$props$data$stor7","_this$props$data$stor8","_this$props$context$a","_this$props$data$stor9","when","_this$props$data$stor10","_this$props$data$stor11","_this$props$data$stor12","isSameContext","_storeSelectorStateMa2","_storeSelectorStateMa3","_sortLocation","_storeSelectorStateMa4","_storeSelectorStateMa5","setAsPreferredStore","shouldSetAsPreferredStore","enablePickupFilterToShowStore","hasEnablePickupFilterToShowStore","app","appConfig","mapSlot","isMobileDevice","Viewport","isInlineView","isLocatorView","canShowLocationView","isMapModuleLoaded","storeSelectorActions","toggleListMapViewState","configHeading","storeLocatorHeaderText","storeSelectorHeaderText","kilometersShortText","sortLocation","isEnableOutofStock","enableStockCheck","_getStoreLocationListProps","hasMapSlot","dialogClassName","classname","onClosed","mapContainerProps","outOfStockThreshold","headerText","sortLocations","callbacks","getAndUpdateUserLocation","attachMapAutoSuggest","onSuggestionSelected","setPreferredStore","removePreferredStore","setSelectedStore","isStoreLocatorView","storeList","storeLineProps","_createStoreLocationList","_store$OrgUnitAvailab3","selectedStoreLocation","lineResources","_store$OrgUnitAvailab4","renderDeliveryOptions","renderBody","Subscribe","paragraph","_emailAddressInputRef","subscribeParagraph","subscribeHeading","handleText","subscribe","subscribeContainer","subscribeForm","subscribeFormAriaLabel","emailInput","subscribeFormEmailAriaLabel","subscribeEmailPlaceholderText","submitButton","subscribeFormSubmitAriaLabel","subscribeButtonLabel","submitButtonLabelText","subscribeView","_subscribeForm$classN","_emailInput$className","_submitButton$classNa","offset","getBoundingClientRect","totalHeight","top"],"sourceRoot":""}