\r\n {links}\r\n \r\n );\r\n};\r\n\r\nexport default AccountLoyaltyTileView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IStoreSelectorViewProps } from '@msdyn365-commerce-modules/store-selector';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nconst StoreSelectorView: React.FC = props => {\r\n const {\r\n BodyContainerProps,\r\n FooterContainerProps,\r\n HeaderContainerProps,\r\n HeaderProps,\r\n ModuleProps,\r\n // headerText,\r\n locationsMessage,\r\n search,\r\n state,\r\n spinner,\r\n locationsList,\r\n noLocationsMessage,\r\n terms\r\n } = props;\r\n const currentUrl = ModuleProps.moduleProps.context.request.url.requestUrl.href;\r\n const baseUrl = currentUrl.substring(0, currentUrl.lastIndexOf('/') + 1);\r\n React.useEffect(() => {\r\n const titles = Array.from(document.querySelectorAll('.ms-store-select__location-line-item-store-name'));\r\n if (titles.length > 0) {\r\n titles.forEach(el => {\r\n const storeName = el.textContent;\r\n if (storeName && storeName.startsWith('R ')) {\r\n el.closest('.ms-store-select__location-line-item')?.classList.add('location-type__dealer');\r\n el.textContent = storeName.replace('R ', '');\r\n }\r\n // @ts-ignore\r\n if (props.config.renderLinkToStorePage) {\r\n const goToStoreCtn = el.closest('.ms-store-select__location-line-item')?.querySelector('.go-to-store');\r\n if (goToStoreCtn === null) {\r\n const storeUrl = storeName\r\n ?.replace('R ', '')\r\n .toLowerCase()\r\n .replace(/[ .&@',]/g, '-')\r\n .replace(/-+/g, '-');\r\n const goToStore = document.createElement('div');\r\n goToStore.className = 'go-to-store';\r\n // tslint:disable-next-line:no-inner-html\r\n goToStore.innerHTML = `${\r\n // @ts-ignore\r\n props.resources.goToStorePage ? props.resources.goToStorePage : 'Go to Store page'\r\n }`;\r\n el.closest('.ms-store-select__location-line-item:not(.location-type__dealer)')\r\n ?.querySelector('.ms-store-select__location-line-item-content')\r\n ?.appendChild(goToStore);\r\n }\r\n }\r\n });\r\n }\r\n }, [locationsList]);\r\n\r\n return (\r\n \r\n {HeaderProps}\r\n \r\n {locationsMessage}\r\n {search}\r\n {state.isSearchInProgress ? spinner : <>{locationsList ? locationsList : noLocationsMessage}>}\r\n \r\n {terms}\r\n \r\n );\r\n};\r\n\r\nexport default StoreSelectorView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport QRCode from 'qrcode.react';\nimport * as React from 'react';\n\n/**\n * CheckInConfirmation component Properties.\n */\nexport interface ICheckInConfirmationProps {\n /**\n * The confirmation text to show.\n */\n confirmationText: string;\n\n /**\n * Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n */\n shouldShowQrCode: boolean;\n\n /**\n * The label shows for channel reference ID.\n */\n channelReferenceIdLabel: string;\n\n /**\n * The channel reference ID to show. When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n */\n channelReferenceId?: string;\n}\n\n/**\n * CheckInConfirmation component for showing confirmation information after check-in succeed.\n * @param confirmationProps - The confirmation properties.\n * @param confirmationProps.confirmationText - The confirmation text.\n * @param confirmationProps.shouldShowQrCode - Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n * @param confirmationProps.channelReferenceIdLabel - The label shows for channel reference ID.\n * @param confirmationProps.channelReferenceId - The channel reference ID to show.\n * When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n * @returns The check-in confirmation component.\n */\nexport const CheckInConfirmationComponent: React.FC = ({\n confirmationText,\n shouldShowQrCode,\n channelReferenceIdLabel,\n channelReferenceId\n}) => {\n return (\n