{"version":3,"sources":["webpack:///src/modules/store-selector/store-selector.view.tsx?b873","webpack:///src/modules/fabrikam/views/reviews-list.view.tsx?39a2","webpack:///src/modules/account-profile-edit/components/account-profile-edit-loading-icon.tsx?e178","webpack:///src/index.ts?c6ae","webpack:///src/modules/store-selector/components/selected-store/selected-store.tsx?8d1a","webpack:///src/modules/store-selector/store-selector.tsx?ce13","webpack:///src/modules/account-profile-edit/components/account-profile-edit-button.tsx?8f71","webpack:///src/modules/tile-list/tile-list.tsx?f539","webpack:///src/modules/loyalty-sign-up/components/loyalty-sign-up-small-components.tsx?d781","webpack:///src/modules/loyalty-sign-up/loyalty-sign-up.tsx?f29d","webpack:///./src/themes/loacker/views/navigation-menu.view.tsx?fbae","webpack:///src/modules/account-profile-edit/components/account-profile-edit-label.tsx?505c","webpack:///src/modules/tile-list/tile-list.view.tsx?d2bd","webpack:///src/modules/account-profile-edit/components/account-profile-edit-error.tsx?a0b2","webpack:///src/modules/loyalty-sign-up/loyalty-sign-up.view.tsx?ed3f","webpack:///src/modules/store-selector/components/store-pickup-option-list.tsx?27e0","webpack:///src/modules/store-selector/components/store-selector-location-lines.tsx?0668","webpack:///src/modules/store-selector/components/store-selector-search-form.tsx?1a99","webpack:///src/modules/store-selector/components/store-selector-small-components.tsx?c26d","webpack:///src/modules/account-profile-edit/account-profile-edit.view.tsx?72b7","webpack:///src/modules/store-selector/components/pickup-option-list.tsx?9a9c","webpack:///src/modules/check-in-for-pickup/check-in-confirmation.tsx?9d47","webpack:///src/modules/check-in-for-pickup/check-in-error.tsx?9f7f","webpack:///src/modules/check-in-for-pickup/check-in-for-pickup.tsx?404b","webpack:///src/modules/store-selector/components/store-selector-location-line-item/store-selector-location-line-item.components.tsx?5a50","webpack:///src/modules/check-in-for-pickup/check-in-for-pickup.view.tsx?26b3","webpack:///src/modules/account-profile-edit/components/account-profile-edit-loading-message.tsx?2c6f","webpack:///src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers.ts?89f3","webpack:///src/modules/account-profile-edit/components/account-profile-edit-input.tsx?3bba","webpack:///src/modules/account-profile-edit/account-profile-edit.tsx?a9d6"],"names":["renderSelectedStore","props","storeDetailsMain","storeHeader","storeName","storeDetailsCloseButton","storeDistance","storeDetailsAvailabilityContainer","productAvailability","stockStatus","isCurrentLocation","currentLocation","isPreferredStore","preferredStoreButton","removePreferredStoreButton","React","Node","Object","canSelectLocation","deliveryOptions","pickUpDeliveryOptionButton","pickupModes","ArrayExtensions","hasElements","renderDeliveryOptions","StoreSelectorView","FooterContainerProps","HeaderContainerProps","HeaderProps","ModuleProps","terms","Module","BodyContainerProps","locationsMessage","search","state","spinner","locationsList","noLocationsMessage","maps","bodyWrapperProps","storeResultContainerProps","mapContainerProps","isMobileView","storeDetailsModal","selectedLocation","isSearchInProgress","renderBody","buildReviewCard","cardProps","headerProps","rating","name","date","cardBodyProps","reviewProps","reviewTitle","reviewText","responseProps","responseName","responseDate","responseText","controlsProps","ratingHelpfulLabel","like","dislike","edit","report","createReviewModal","moduleProps","modal","modalHeader","modalBody","form","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","error","modalFooter","submitButton","cancelButton","createReportModal","reported","headerSubmitted","header","reportSubmittedMessage","reportMessage","radioButtons","succesfulButton","ReviewsListview","averageRating","filterByDropdown","noReviewsMessage","noReviewsWithFilterMessage","pageControls","refineReviewsProps","reportReviewModal","reviewsListProps","reviewCards","reviewCount","reviewModal","sortByDropdown","userReview","length","isFilterApplied","map","review","AccountProfileEditLoadingIcon","className","onPickupInStoreClickHandler","selectedStore","OrgUnitAvailability","OrgUnitLocation","handlers","onSelected","onSetPreferredStoreClickHandler","onSetAsPreferredStore","OrgUnitNumber","onChangeHandler","async","deliveryCode","Promise","resolve","removePreferredStoreHandler","onRemovePreferredStore","onPickupModeSelectHandler","pickupMode","storeDetailsModalHandler","closeStoreDetailsModal","renderPickupModes","deliveryOptionList","pickupInStoreButtonText","pickupInStoreAriaLabel","undefined","filteredPickupMode","PickUpOptionList","pickupListOptionMenuText","pickupmodeList","onChange","onClick","SelectedStoreComponent","shouldHideStockStatus","isInStock","resources","stockStatusLabel","preferredStoreLocationId","isPreferredStoreEnabled","isLocationDisabled","telemetryContent","storePickUpOptionList","productPickUpOptionList","preferredDistanceUnit","parentClassName","OrgUnitName","location","distanceAsString","buildDistanceString","Distance","resourceLabel","inStock","outOfStock","stockLabel","stockText","selectLocation","selectLocationAriaLabelFormat","replace","payLoad","getPayloadObject","TelemetryConstant","PickupInStore","attributes","getTelemetryAttributes","contentAction","etext","PreferredStore","preferredStoreAttributes","RemovePreferredStore","removePreferredStoreAttributes","matchDeliveryOptions","tag","Button","availabilityInfoHeader","role","preferredStoreAriaLabel","preferredStoreText","setAsPreferredStoreTextAriaLabel","setAsPreferredStoreText","StoreSelector","constructor","super","shouldHideInventory","preferredStore","hasEnabledOutOfStockCheck","shouldDisplayList","data","availabilitiesWithHours","result","storeSelectorStateManager","storeLocations","this","context","selectedStoreLocationId","find","store","orgUnitLocation","selectedStoreResources","_mapResources","selectedProps","_isCurrentLocation","alreadySelectedLocation","_isProductInStock","ItemAvailabilities","_stockInventoryLabel","StoreId","OrgUnitPickUpDeliveryModes","DeliveryOptions","_onOrgUnitLocationSelected","_setPreferredStore","_removePreferredStore","_closeStoreDetailModal","handleLinkTextChange","event","config","termsOfServiceLink","linkText","target","value","handleHeadingChange","heading","onShowAllStoresHandler","_getAndUpdateStoreLocation","setState","onFilterLocations","stores","filter","some","deliveryOption","Code","onFilteredPickupMode","_attachMapAutoSuggest","autoSuggestOptions","telemetry","actionContext","requestContext","channel","isMapApiLoaded","autoSuggestManager","Microsoft","Maps","loadModule","callback","options","countryCode","ChannelCountryRegionISOCode","AutosuggestManager","attachAutosuggest","id","_onSuggestionSelected","errorCallback","debug","credentials","BingMapsApiKey","_searchTermChanged","formattedSuggestion","_performSearch","storeId","cookies","mode","setPreferredStoreLocation","isConsentGiven","Latitude","Longitude","clearPreferredStore","setSelectedStoreLocationId","_setSelectedStore","searchTerm","isSeeAllStoreValue","geoLocate","trim","_updateLocations","latitude","longitude","shouldShowAllStores","style","isDialogOpen","navigator","geolocation","getCurrentPosition","position","coords","PERMISSION_DENIED","timeout","_closeDialog","parentElementRef","current","focus","closeDialog","_setOrgUnitStoreInformation","moduleId","styleDefault","input","onLocationSelected","preferredLocationId","storeLocationList","_sortStores","orgUnitStoreInformation","showMapViewLink","isDialog","product","setOrgUnitStoreInformation","catch","message","radius","lookupRadius","searchRadiusUnit","calRadius","distanceUnitValue","modeDefault","localLatitude","long","lastInlineStoreLocation","lastInlineShownStoreInfo","setLastInlineStoreInfo","getFullAvailableInventoryNearby","getOrgUnitLocationByArea","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","GetFullAvailableInventoryNearbyInput","RecordId","warning","deliveryMode","contactInfoHeader","contactText","storeHoursHeader","timeText","availabilityText","closedText","storeHoursClosedText","outOfStockText","inStockText","selectedStoreLocationText","selectStoreText","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","hasEnableOutOfStockCheck","itemAvailabilities","AvailableQuantity","ProductInventoryInformation","index","InventoryLocationId","InventLocationId","StockLevelLabel","getTelemetryObject","request","telemetryPageName","friendlyName","storeCounter","autoSuggestionEnabled","isAutoSuggestionEnabled","setTimeout","reaction","loadMapApi","key","BingMapsEnabled","lang","locale","market","when","isSameContext","shouldComponentUpdate","render","setAsPreferredStore","shouldSetAsPreferredStore","showAllStores","enablePickupFilterToShowStore","hasEnablePickupFilterToShowStore","app","appConfig","slots","mapSlot","isMobileDevice","isMobile","variant","VariantType","Viewport","isMapDisabled","isInlineView","isLocatorView","listMapViewState","displayList","canShowLocationView","isMapModuleLoaded","storeSelectorActions","toggleListMapViewState","configHeading","storeLocatorHeaderText","storeSelectorHeaderText","kilometersShortText","milesShortText","sortLocation","isEnableOutofStock","enableStockCheck","locationListProps","_getStoreLocationListProps","hasMapSlot","dialogClassName","viewProps","Modal","classname","autoFocus","fade","isOpen","onClosed","horizontalPosition","verticalPosition","toggle","ModalHeader","Msdyn365","text","editProps","onEdit","ModalFooter","ModalBody","StoreSelectorFoundLocationsMessage","locations","searchRadius","isSeeAllStore","StoreSelectorSearchForm","performSearch","searchTermChanged","onShowAllStores","onToggleListMapViewState","locatorView","productPickUpDeliveryOptions","filterPickupModeSelected","hasEnabledPickupFilterToShowStore","StoreSelectorWaiting","StoreSelectorLocationLines","outOfStockThreshold","enableOutOfStockCheck","storeLocatorView","shouldShowIndex","StoreSelectorEmptyMessage","StoreSelectorTermsOfService","link","onTextChange","headerText","sortLocations","callbacks","getAndUpdateUserLocation","attachMapAutoSuggest","onSuggestionSelected","setPreferredStore","removePreferredStore","setSelectedStore","renderView","isStoreLocatorView","storeList","storeLineProps","_createStoreLocationList","push","selectedStoreLocation","lineResources","storeOpenFrom","secondsToTime","OpenFrom","storeOpenTo","OpenTo","storeHours","StoreHours","toString","locationOpen","openFrom","openTo","storeHoursList","RegularStoreHours","buildStoreHours","observer","AccountProfileEditButton","ariaLabel","disabled","TileList","_telemetryContent","StringExtensions","isNullOrWhitespace","Heading","headingTag","title","propsCarousel","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","vertical","_createHeading","singleSlideCarouselComponentProps","tileItemContainer","tileListContainer","classnames","tileListHeading","tiles","content","SignUpText","LoyaltySignUp","handleMemberHeadingChange","memberHeading","_issueLoyalty","user","isAuthenticated","clicked","IssueLoyaltyInput","apiSettings","issueLoyalty","then","MsDyn365","isBrowser","window","assign","SignIn","loyaltySignInAttributes","SignUp","loyaltySignUpAttributes","LoyaltyDetailLink","loyaltyDetailsLinkAttributes","LoyaltyTermsLink","loyaltyTermsLinkAttributes","nextProps","nextState","signInUrl","loyaltyCard","termsUrl","loyaltyJoinUrl","origin","signInurl","completeClass","hasLoyaltyAccount","CardTenderTypeValue","loading","status","signInLink","href","joinLoyaltyButtonText","signUpText","loyaltyProgramText","signUpButton","detailsLink","viewLoyaltyPageText","termsLink","loyaltyTermsLinkText","MenuTypeIndexId","MenuSource","NavigationMenuView","currentLevel","_positionInSetOffset","escapeKey","_updateCategoryImage","categoryImageSrc","option","promotionalImage","src","altText","promotionalContent","item","image","imageSrc","promotionalItemImageSettings","imageSettings","additionalProperties","linkUrl","destinationUrl","categoryImage","categoryImageAltText","_handleDropdownToggle","activeMenu","parentMenu","showCategoryImage","imageSource","_resetFocus","menuNode","_handleClickOutside","contains","_handleFocusOutside","relatedTarget","_closeSubmenu","_escFunction","keyCode","navDrawerList","Array","from","childNodes","navDrawerButton","firstChild","getAttribute","_getCategoryImage","categoryImageUrl","generateImageUrl","defaultImageSettings","viewports","xs","q","w","h","sm","md","lg","lazyload","ImageData","Image","gridSettings","categoryImageSettings","loadFailureBehavior","_onDrawerChange","drawerState","drawerKeyValue","newPair","buttonText","bind","beforeMenu","_mapData","componentDidMount","document","body","addEventListener","componentWillUnmount","removeEventListener","mergedData","cmsNavItemsBefore","_constructMenuItemData","_constructTopMenuItemData","_renderMobileMenu","_renderDesktopMenu","menuItemData","Navigation","menuItem","posinset","_renderDrawerMenu","MenuList","ref","tabIndex","_renderDisplay","setSize","subMenu","_renderDrawer","_renderLinkMenuItem","toggleButtonText","keyValue","isDrawerOpen","colProps","Drawer","toggleButtonProps","openGlyph","onToggle","collapseProps","closeGlyph","glyphPlacement","_renderLinkText","menuSubItem","currentPos","_renderDrawerLink","linkURL","_renderSpanMenuItem","ListItem","menuItemList","menuItemDatum","_getFromSubMenu","_createMenuItemList","count","forEach","_getCMSNestedChildren","category","nestedChildren","subMenus","enabletopMenu","mergedRootMenuData","topMenu","rootMenuNavigation","cmsItem","CMSItemIdInit","imageDestinationURL","imageLink","menuSource","Cms","shouldOpenNewTab","i","found","_renderSubMenu","_renderButtonMenuItem","IsSubMenu","enableMultiSupportMenu","enableMultilevelMenu","multiLevelSupportedMenu","menuLevelSupport","levelClassName","menuOptions","idx","hasOptions","haveSubmenu","Math","round","_renderMenu","onFocus","hoverEffect","isParent","Link","imagesource","onMouseOver","onTelemetryClick","_renderPromotionalLink","Span","level","currentItem","submenu","DivContainer","ImageDivContainer","showPromotionalContent","categoryImageDisplay","promotionalContentDisplay","DivContainerClass","AccountProfileEditLabel","forId","htmlFor","tileListView","tileItem","keyIndex","AccountProfileEditError","type","errorClassName","LoyaltySignUpView","StorePickUpOptionList","_rendeDeliveryOptions","isExpandOptionsState","isFilterExpanded","_onSelect","preventDefault","currentTarget","selectedPickupMode","_onKeyDown","_storePickupListOptionMenu","productPickupListOptionMenuText","productPickupModeList","defaultOptionText","selectedPickupModeDesc","delivery","Description","onKeyDown","onClickHandler","_scrollIntoView","selectedLocationDiv","selectedLocationRef","parent","parentElement","scrollTop","offsetTop","clientHeight","availabilityWithHours","componentDidUpdate","previousProps","_stores","show","_renderStoreLocation","selected","StoreSelectorLocationLineItemComponent","__decorate","observable","searchBoxRef","previousValue","isSearchResultOpened","_handleInputKeyPress","KeyCodes","ArrowUp","ArrowDown","activeDescedantValue","_handleKeyPressPrev","Enter","Space","_searchTextChanged","inputValue","_onSubmit","blur","_onChangeHandler","renderPickupModesList","pickupFilterMenuHeading","pickupFilterByHeading","toggleButtonClass","toggleMapViewAttributes","SearchStore","storeSearchAttributes","ShowAllStore","showAllStoreAttributes","ToggleMapView","searchButtonAriaLabel","searchPlaceholderText","seeAllStoresText","viewListText","viewMapText","autoComplete","onSubmit","searchInputAriaLabel","placeholder","onKeyUp","color","emptyLocationsText","editableLink","openInNewTab","storeCountMessage","storeCountMessageInKm","storeAllCountMessage","AccountProfileEditItem","wrapper","label","errorMessage","AccountProfileEditLoading","icon","AccountProfileEditView","accountProfileEdit","viewState","defaultAADConainer","aadConainer","accountProfileEditLocalAccount","isShowLoading","localAccount","items","buttonsWrapper","buttons","verificationSuccessModal","verificationSuccessModalMessage","button","LocalAccount","eventsToBeBind","handleDocumentClick","htmlElement","_pickupListOptionButton","_pickupListOptionMenu","expandSiteOptions","_renderDeliveryOptions","stopPropagation","isExpandSiteOptionsState","CheckInConfirmationComponent","confirmationText","shouldShowQrCode","channelReferenceIdLabel","channelReferenceId","QRCode","size","CheckInErrorComponent","CheckInForPickup","checkInForOrderPickup","channelId","Number","parseInt","query","packingSlipId","additionalInformationToSubmit","additionalInformationList","additionalInformationKeyValuePair","formKey","resourceId","extensionPropertyList","ObjectExtensions","isNullOrUndefined","additionalInformation","Key","Value","StringValue","SalesOrdersDataActions","checkInForOrderPickupAsync","callerContext","queryResultSettings","headerErrorMessage","genericErrorMessage","isCheckedIn","_onInit","isNaN","params","isEditor","isPreview","requiredParameterMissingErrorMessage","additionalInformationKeys","isHeaderError","headerError","confirmationComponent","defaultConfirmationText","confirmationIdLabel","additionalInformationValues","additionalInformationHeading","storeSelectorLocationLineItemComponentActions","distance","floor","productdeliveryOptions","pickup","_delivery","hideStockStatus","storeAddress","Address","phoneNumber","contacts","allPhoneContacts","contact","ContactTypeValue","IsPrivate","primaryPhoneContact","IsPrimary","Locator","extractPhoneNumber","Contacts","displayTime","JSON","stringify","endDayShort","startDayFull","startDayShort","endDayFull","timeRange","renderStoreHours","CheckInViewComponent","FormBuilder","additionalInformationDefaultHeading","submitButtonText","additionalInformationSubmitButtonText","keys","requiredValueMissingErrorMessage","AccountProfileEditLoadingMessage","seconds","hours","ampm","divisorForMinutes","minutes","getShortTimeString","day","getFullTimeString","buildHoursDisplayInfo","startDay","endDay","hoursInfo","shouldMergeLines","firstLine","secondLine","isClosed","openTime","closeTime","getStoreHoursData","dateForLookup","get","buildStoreHoursString","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","GetMaxLength","maxLength","parsedMaxLength","AccountProfileEditInput","pattern","AccountProfileEdit","moduleClassName","onTextBoxChange","toLowerCase","givenName","surname","emailRegex","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","clearInterval","isInitialized","invalidEmailAddressError","obj","PRE","_htmlDecode","ID","email","PAT","PAT_DESC","required_field","requiredFieldMissingError","verifying_blurb","loadingMessage","EmailRegex","defaultRegex","source","AccountProfileEditLoadingIconComponent","AccountProfileEditLoadingMessageComponent","display","_renderLocalAccount","str","e","createElement","innerHTML","nodeValue","_renderInput","firstNameLabelText","firstNameMaxLength","lastNameLabelText","lastNameMaxLength","AccountProfileEditErrorComponent","requiredFieldMissingSummaryError","fieldIncorrectError","AccountProfileEditButtonComponent","saveButtonAriaLabel","saveButtonText","cancelButtonText","showEmail","emailAddressLabelText","labelText","AccountProfileEditLabelComponent","AccountProfileEditInputComponent"],"mappings":"2KAiBA,MAqBMA,EAAyDC,IAC3D,MAAM,iBACFC,EADE,YAEFC,EAFE,UAGFC,EAHE,wBAIFC,EAJE,cAKFC,EALE,kCAMFC,EANE,oBAOFC,EAPE,YAQFC,EARE,kBASFC,EATE,gBAUFC,EAVE,iBAWFC,EAXE,qBAYFC,EAZE,2BAaFC,GACAb,EAEJ,OACIc,gBAACC,OAAIC,iBAAKf,GACNa,gBAACC,OAAIC,iBAAKd,GACLE,EACAD,EACAE,GAELS,gBAACC,OAAIC,iBAAKV,GACLC,EACAC,GAEJC,EAAoBC,EAjDgCV,KAC7D,MAAM,kBACFiB,EADE,gBAEFC,EAFE,2BAGFC,EAHE,YAIFC,GACApB,EAEJ,OACIc,kCAEKG,IAAqBI,kBAAgBC,YAAYJ,GAAmBE,EAAcD,KAsC5CI,CAAsBvB,GAC5DW,EAAmBC,EAAuBC,IA4FxCW,UAtB8CxB,IACzD,MAAM,qBACFyB,EADE,qBAEFC,EAFE,YAGFC,EAHE,YAI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AAXC,KAAW,iCAEAD,aAAXC,KAAW,oCAdVmM,EAAkB,aADvBne,KACKme,GAoSSA","file":"static/js/14.ae19a147d642d2ec3e0b.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 {\n canSelectLocation,\n deliveryOptions,\n pickUpDeliveryOptionButton,\n pickupModes\n } = 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 } = props;\n\n if (isMobileView) {\n return (\n \n {locationsMessage}\n {search}\n \n \n {state.isSearchInProgress ? spinner : <>\n {locationsList ? locationsList : noLocationsMessage}\n }\n {maps}\n \n {selectedLocation && renderSelectedStore(selectedLocation)}\n \n \n \n \n );\n }\n\n return (\n \n \n \n {locationsMessage}\n {search}\n {state.isSearchInProgress ? spinner : <>\n {locationsList ? locationsList : noLocationsMessage}\n }\n \n \n {maps}\n \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 } = props;\n\n return (\n \n \n {HeaderProps}\n \n {renderBody(props)}\n \n {terms}\n \n \n );\n};\n\nexport default StoreSelectorView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IReviewModalViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { IReportReviewModalViewProps, IReviewCardViewProps, IReviewsListState, IReviewsListViewProps } from '@msdyn365-commerce-modules/ratings-reviews/src/modules/reviews-list';\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst ReviewsListview: React.FC = props => {\n const {\n averageRating,\n filterByDropdown,\n moduleProps,\n noReviewsMessage,\n noReviewsWithFilterMessage,\n pageControls,\n refineReviewsProps,\n reportReviewModal,\n reviewsListProps,\n reviewCards,\n reviewCount,\n reviewModal,\n sortByDropdown,\n state,\n userReview\n } = props;\n\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\n return (\n {noReviewsMessage}\n );\n }\n\n return (\n \n {averageRating}\n {reviewCount}\n \n {sortByDropdown}\n {filterByDropdown}\n \n \n {userReview && buildReviewCard(userReview)}\n {reviewCards.map(review => {\n return buildReviewCard(review);\n })}\n \n { reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\n {pageControls}\n {createReviewModal(reviewModal, moduleProps)}\n {createReportModal(reportReviewModal, state)}\n \n );\n};\n\nconst buildReviewCard = (props: IReviewCardViewProps) => {\n return (\n \n \n {props.rating}\n {props.name}\n {props.date}\n \n \n \n {props.reviewTitle}\n {props.reviewText}\n \n \n {props.responseName}\n {props.responseDate}\n {props.responseText}\n \n \n {props.ratingHelpfulLabel}\n {props.like}\n {props.dislike}\n {props.edit}\n {props.report}\n \n \n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\n return (\n \n \n {state.reported ? props.headerSubmitted : props.header}\n \n \n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\n \n \n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\n \n \n );\n};\n\nexport default ReviewsListview;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nexport interface IAccountProfileEditLoadingIcon {\n className: string;\n}\n\nconst AccountProfileEditLoadingIcon: React.FC = ({ className }) => (\n
\n);\n\nexport default AccountProfileEditLoadingIcon;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport StoreSelector from './modules/store-selector/store-selector';\nimport StoreSelectorView from './modules/store-selector/store-selector.view';\n\nexport * from './modules/store-selector/components';\nexport * from './modules/store-selector/components/store-selector-location-line-item/date-time-helpers';\nexport * from './modules/store-selector/store-selector';\nexport * from './modules/store-selector/store-selector.data';\nexport * from './modules/store-selector/store-selector.props.autogenerated';\nexport * from './modules/store-selector/store-selector.view';\n\nexport {\n StoreSelector,\n StoreSelectorView\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 { Button, getPayloadObject, getTelemetryAttributes, INodeProps, IPayLoad,\n ITelemetryContent, NodeTag, TelemetryConstant } 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 = (props: ISelectedStoreProps,\n deliveryOptionList: DeliveryOption[], pickupInStoreButtonText: string, pickupInStoreAriaLabel: string): 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\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: \n {storeName}\n ,\n storeDetailsCloseButton: ,\n storeDistance: distanceAsString ? \n {/* eslint-disable-next-line react-native/no-raw-text -- Need whitespace */}\n {' '}\n {distanceAsString}\n : '',\n storeDetailsAvailabilityContainer: {\n tag: 'div' as NodeTag,\n className: `${parentClassName}__container`\n },\n productAvailability: !shouldHideStockStatus &&

\n {resources.availabilityInfoHeader}\n

,\n stockStatus: stockText &&

\n {stockText}\n

,\n currentLocation:

\n {resources.currentLocation}\n

,\n pickUpDeliveryOptionButton: \n {pickupInStoreButtonText}\n ,\n pickupModes: renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel),\n preferredStoreButton: isPreferredStoreEnabled ? \n {resources.preferredStoreText}\n : null,\n removePreferredStoreButton: isPreferredStoreEnabled ? \n {resources.setAsPreferredStoreText}\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/**\n * Store location line item component.\n */\nexport const SelectedStoreComponent = selectedStoreDetails as (props: ISelectedStoreProps) => ISelectedStoreViewProps;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n DeliveryOption,\n ItemAvailability,\n OrgUnitLocation,\n StoreHours\n} 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, IStoreSelectorResources, mode as modeEnum, 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(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n this.storeCounter = 0;\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n actionContext: {\n requestContext: {\n channel\n }\n }\n },\n config: {\n autoSuggestionEnabled: isAutoSuggestionEnabled\n }\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: {\n config: appConfig\n },\n actionContext: {\n requestContext: {\n channel,\n cookies\n }\n }\n },\n slots: {\n maps: mapSlot\n },\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 ? storeSelectorStateManager.isDialogOpen && (context?.id === this.props.id) : 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 = (context && (context.showMapViewLink === undefined || context.showMapViewLink)) &&\n 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 = 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(isEnableOutofStock, isLocatorView, preferredLocationId, this.isPreferredStoreEnabled,\n selectedStoreLocationId, storeLocationList ?? null, preferredDistanceUnit, alreadySelectedLocation, productPickUpOptionList);\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(`ms-store-${isInlineView ? 'locate' : 'select'}`, className, dialogClassName,\n isInlineView ? '' : 'msc-modal-input-required'),\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 ${selectedStoreLocationId && isDialogOpen && !shouldDisplayList ? 'show' : 'hide'}`\n },\n locationsMessage: !this.state.isLocationDisabled && (\n \n ),\n selectedLocation: this.renderSelectedStore(shouldHideInventory, preferredDistanceUnit, preferredStore, this.isPreferredStoreEnabled,\n isEnableOutofStock, productPickUpOptionList, shouldDisplayList),\n search: (\n \n ),\n spinner: ,\n locationsList: ArrayExtensions.hasElements(storeLocationList) ? (\n \n ) : undefined,\n noLocationsMessage: ,\n terms: ,\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(); 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 = (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 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, onSetAsPreferredStore: this._setPreferredStore,\n onRemovePreferredStore: this._removePreferredStore,\n closeStoreDetailsModal: this._closeStoreDetailModal\n }\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(stores: IFullOrgUnitAvailability[],\n isPreferredStoreEnabled: boolean | undefined,\n preferredStoreLocationId: string): IFullOrgUnitAvailability[] {\n const isPreferredStore = (value: IFullOrgUnitAvailability) => isPreferredStoreEnabled && preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreLocationId;\n\n return [\n ...stores.filter(isPreferredStore),\n ...stores.filter(store => !isPreferredStore(store))\n ];\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, preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n stores: IFullOrgUnitAvailability[] | null,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation,\n productPickUpOptionList?: DeliveryOption[]): IStoreSelectorLocationLineItemProps[] {\n const storeList: IStoreSelectorLocationLineItemProps[] = [];\n if (ArrayExtensions.hasElements(stores)) {\n stores.map((store, index: number) => {\n const storeLineProps = this._createStoreLocationList(store, index,\n hasEnabledOutOfStockCheck, isStoreLocatorView, preferredStoreLocationId, isPreferredStoreEnabled,\n selectedStoreLocationId, preferredDistanceUnit, alreadySelectedLocation, productPickUpOptionList);\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: {\n autoSuggestOptions\n },\n context: {\n telemetry,\n actionContext: {\n requestContext: {\n channel\n }\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(`#ms-store-select__search-box_${this.props.id}`,\n `#ms-store-select__search-box-container_${this.props.id}`, this._onSuggestionSelected);\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: {\n cookies\n }\n }\n },\n config: {\n mode\n },\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(storeId, preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName,\n cookies.isConsentGiven(),\n preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude, preferredStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude);\n };\n\n /**\n * On Removing Preferred Store.\n */\n private readonly _removePreferredStore = async (): Promise => {\n const {\n context: {\n actionContext: {\n requestContext: {\n cookies\n }\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: {\n actionContext\n },\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: {\n style\n },\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: {\n style\n },\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)\n .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\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: {\n mode,\n lookupRadius,\n style,\n searchRadiusUnit\n },\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 (calRadius: number, distanceUnitValue: number,\n latitude?: number, longitude?: number): Promise => {\n\n const {\n context: {\n actionContext\n }\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 (calRadius: number, distanceUnitValue: number,\n latitude?: number, longitude?: number): Promise => {\n\n const {\n telemetry,\n context: {\n actionContext\n },\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(store: IFullOrgUnitAvailability,\n index: number, hasEnabledOutOfStockCheck: boolean,\n isStoreLocatorView: boolean, preferredStoreLocationId: string,\n isPreferredStoreEnabled: boolean | undefined,\n selectedStoreLocationId: string | undefined,\n preferredDistanceUnit?: string | undefined,\n alreadySelectedLocation?: OrgUnitLocation, productPickUpOptionList?: DeliveryOption[]): 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, 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,\n selectedLocation?: OrgUnitLocation): boolean => (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 = (hasEnableOutOfStockCheck: boolean, itemAvailabilities: ItemAvailability[] | undefined): 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 (isInStock.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId === isInStock.ProductInventoryInformation[index].InventLocationId) {\n return isInStock.ProductInventoryInformation[index].StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n}\n\nexport default StoreSelector;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAccountProfileEditButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst AccountProfileEditButton: React.FC = ({ id, className, text, ariaLabel, disabled, telemetryContent, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n {text}\n );\n};\n\nexport default AccountProfileEditButton;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject,\n Heading,\n IComponentNodeProps,\n INodeProps,\n ISingleSlideCarouselProps,\n ITelemetryContent,\n NodeTag,\n SingleSlideCarousel } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ITileListProps, ITitleData } from './tile-list.props.autogenerated';\n\n/**\n * Tile-list view props.\n */\nexport interface ITileListViewProps extends ITileListProps<{}> {\n title?: React.ReactNode;\n tiles: React.ReactNode[];\n tileItemContainer: INodeProps;\n tileListContainer: INodeProps;\n tileListHeading: INodeProps;\n singleSlideCarouselComponentProps: INodeProps;\n}\n\n/**\n *\n * TileList component.\n * @extends {React.PureComponent>}\n */\nexport class TileList extends React.PureComponent> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n\n public constructor(props: ITileListProps<{}>) {\n super(props);\n }\n\n private static _createHeading(heading?: ITitleData): React.ReactNode | null {\n if (!heading || !heading.text || StringExtensions.isNullOrWhitespace(heading.text)) {\n return null;\n }\n return (\n \n );\n }\n\n public render(): JSX.Element | null {\n const { resources } = this.props;\n const { title, className } = this.props.config;\n const propsCarousel: IComponentNodeProps = {\n tag: SingleSlideCarousel,\n className: this.props.config.className ?? '',\n flipperPrevLabel: resources.flipperPrevious,\n flipperNextLabel: resources.flipperNext,\n parentId: this.props.id,\n telemetryContent: this._telemetryContent,\n vertical: false\n };\n\n const viewProps = {\n ...this.props,\n title: TileList._createHeading(title),\n singleSlideCarouselComponentProps: propsCarousel,\n tileItemContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-tile__item',\n role: 'listitem'\n },\n tileListContainer: { className: classnames('ms-tile-list', className) },\n tileListHeading: { className: 'ms-tile-list__heading' },\n tiles: this.props.slots.content\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n}\n\nexport default TileList;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport React from 'react';\n\nexport const SignUpText: React.FC<{ text: string }> = (props: { text: string }) => {\n return (

\n {props.text}\n

);\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { SignUpText } from './components/loyalty-sign-up-small-components';\nimport { ILoyaltySignUpData } from './loyalty-sign-up.data';\nimport { ILoyaltySignUpProps } from './loyalty-sign-up.props.autogenerated';\n\nexport interface IAccountLoyaltyJoinState {\n clicked: boolean;\n}\nexport interface ILoyaltySignUpViewProps extends ILoyaltySignUpProps {\n LoyaltySignUp: IModuleProps;\n heading: React.ReactNode;\n memberHeading: React.ReactNode;\n signInLink: React.ReactElement;\n signUpText: React.ReactElement;\n signUpButton: React.ReactElement;\n detailsLink: React.ReactElement;\n termsLink: React.ReactElement;\n loading: boolean;\n}\n\n/**\n *\n * LoyaltySignUp component.\n * @extends {React.Component>}\n */\n@observer\nclass LoyaltySignUp extends React.Component, IAccountLoyaltyJoinState> {\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly loyaltySignInAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly loyaltySignUpAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly loyaltyDetailsLinkAttributes: Msdyn365.IDictionary | undefined;\n\n private readonly loyaltyTermsLinkAttributes: Msdyn365.IDictionary | undefined;\n\n constructor(props: ILoyaltySignUpProps) {\n super(props);\n this.state = { clicked: false };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n this.loyaltySignInAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.SignUp;\n this.loyaltySignUpAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyDetailLink;\n this.loyaltyDetailsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsLink;\n this.loyaltyTermsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltySignUpProps,\n nextState: IAccountLoyaltyJoinState): 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, memberHeading },\n resources,\n context: {\n actionContext,\n request: {\n user: {\n signInUrl,\n isAuthenticated\n }\n }\n },\n data: { loyaltyCard }\n } = this.props;\n\n const termsUrl = Msdyn365.getUrlSync('loyaltyTerms', actionContext);\n let loyaltyJoinUrl = `${Msdyn365.getUrlSync('loyaltyJoin', actionContext)}?joiningLoyalty=true`;\n if (MsDyn365.isBrowser) {\n loyaltyJoinUrl = `${window.location.origin}${loyaltyJoinUrl}`;\n }\n const signInurl = `${signInUrl}?ru=${loyaltyJoinUrl}`;\n const completeClass = classname('ms-loyalty-signup', className);\n\n const hasLoyaltyAccount = loyaltyCard.result && loyaltyCard.result.CardTenderTypeValue !== undefined;\n\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltySignUp: {\n moduleProps: this.props,\n className: completeClass\n },\n loading: loyaltyCard.status === 'LOADING',\n heading: !hasLoyaltyAccount && heading && heading.text && (\n \n ),\n memberHeading: hasLoyaltyAccount && memberHeading && memberHeading.text && (\n \n ),\n signInLink: !isAuthenticated && ,\n signUpText: !hasLoyaltyAccount && ,\n signUpButton: !hasLoyaltyAccount && isAuthenticated && ,\n detailsLink: hasLoyaltyAccount &&\n ,\n termsLink: !hasLoyaltyAccount && \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n public handleMemberHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.memberHeading!.text = event.target.value;\n\n private readonly _issueLoyalty = () => {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(() => {\n if (MsDyn365.isBrowser) {\n window.location.assign(Msdyn365.getUrlSync('loyalty', this.props.context.actionContext) || '');\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n };\n}\n\nexport default LoyaltySignUp;\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 MsDyn365, {IDictionary, IGridSettings, IImageData, IImageSettings, Image} from '@msdyn365-commerce/core';\r\nimport { IMenuItemData } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n ICollapseProps,\r\n IDrawerState, IModuleProps, INodeProps,\r\n IPayLoad,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport {\r\n ICmsNavItemsData,\r\n INavigationMenuProps,\r\n ISubMenusData\r\n} from \"../definition-extensions/navigation-menu.ext.props.autogenerated\";\r\n\r\nimport {\r\n INavigationMenuData\r\n} from \"@msdyn365-commerce-modules/navigation-menu/dist/types/modules/navigation-menu/navigation-menu.data\";\r\n\r\n\r\ninterface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?: IImageData[] | null;\r\n categoryImageAltText: string;\r\n drawerKeyValue: IDictionary;\r\n}\r\n\r\nexport interface INavigationMenuViewProps extends INavigationMenuProps {\r\n className: string;\r\n menuItemData: IMenuItemData[];\r\n Navigation: IModuleProps;\r\n MenuList: INodeProps;\r\n ListItem: INodeProps;\r\n Link: INodeProps;\r\n Button: INodeProps;\r\n Span: INodeProps;\r\n ImageContainer: INodeProps;\r\n MobileDescriptionContainer: INodeProps;\r\n MobileBackButton: INodeProps;\r\n MobileDescriptionLabel: INodeProps;\r\n imageSettings: IImageSettings;\r\n gridSettings: IGridSettings;\r\n isMobileView: boolean;\r\n DivContainer?: INodeProps;\r\n ImageDivContainer?: INodeProps;\r\n showCategoryImage?: boolean;\r\n showPromotionalContent?: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * Menu type index id.\r\n */\r\nexport enum MenuTypeIndexId {\r\n Cms = 1000,\r\n Retail = 5000\r\n}\r\n\r\n/**\r\n *\r\n * Menu type source.\r\n */\r\nexport enum MenuSource {\r\n Cms = 'Cms',\r\n Retail = 'Retail'\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenuView component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuView extends React.PureComponent {\r\n private currentLevel: number = 0;\r\n\r\n private readonly _positionInSetOffset: number = 1;\r\n\r\n private readonly escapeKey: number = 27;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly beforeMenu: IMenuItemData[];\r\n\r\n constructor(props: INavigationMenuViewProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.state = { activeMenu: undefined, parentMenu: undefined, categoryImageAltText: '', drawerKeyValue: {} };\r\n this._closeSubmenu = this._closeSubmenu.bind(this);\r\n this._escFunction = this._escFunction.bind(this);\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.beforeMenu = this._mapData();\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.body.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n document.body.addEventListener('focusout', this._handleFocusOutside);\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.removeEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\r\n }\r\n }\r\n\r\n private _mapData(): IMenuItemData[] {\r\n const mergedData: IMenuItemData[] = [];\r\n if (this.props.config.cmsNavItemsBefore && this.props.config.cmsNavItemsBefore.length > 0) {\r\n this.props.config.cmsNavItemsBefore.map((item: ICmsNavItemsData) => (\r\n mergedData.push(this._constructMenuItemData(item))\r\n ));\r\n }\r\n const beforeMenuData = this._constructTopMenuItemData(mergedData);\r\n return beforeMenuData;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { isMobileView } = this.props;\r\n this.currentLevel = 1;\r\n return (\r\n <>\r\n {isMobileView ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render mobile menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderMobileMenu(): JSX.Element {\r\n const { isMobileView, menuItemData, Navigation } = this.props;\r\n return (\r\n \r\n {this.beforeMenu.map((menuItem: IMenuItemData, posinset: number) => {\r\n return this._renderDrawerMenu(menuItem, menuItemData.length, posinset + this._positionInSetOffset);\r\n })}\r\n {menuItemData.map((menuItem: IMenuItemData, posinset: number) => {\r\n return this._renderDrawerMenu(menuItem, menuItemData.length, posinset + this._positionInSetOffset);\r\n })}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render desktop menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { MenuList, Navigation } = this.props;\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render drawer menu.\r\n * @param menuItem -Menuitem data.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderDrawerMenu(menuItem: IMenuItemData, setSize: number, posinset: number): JSX.Element | null {\r\n if (menuItem && menuItem.subMenu && ArrayExtensions.hasElements(menuItem.subMenu)) {\r\n return (this._renderDrawer(menuItem, setSize, posinset));\r\n }\r\n return (this._renderLinkMenuItem(menuItem, undefined, true, false, setSize, posinset));\r\n\r\n }\r\n\r\n /**\r\n * Method to render drawer component.\r\n * @param menuItem -Menuitem data.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderDrawer(menuItem: IMenuItemData, setSize?: number, posinset?: number): JSX.Element | null {\r\n const toggleButtonText = menuItem.linkText;\r\n const keyValue = this.state.drawerKeyValue;\r\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\r\n const keys = keyValue !== undefined ? keyValue : {};\r\n\r\n let isDrawerOpen = false;\r\n if (keys[buttonText]) {\r\n isDrawerOpen = true;\r\n }\r\n const colProps: ICollapseProps = { isOpen: isDrawerOpen };\r\n return (\r\n \r\n
\r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData, currentPos: number) => {\r\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\r\n return (this._renderDrawer(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset));\r\n }\r\n return this._renderDrawerLink(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\r\n })}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render link.\r\n * @param linkText -Text on Menu link.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderLinkText(linkText: string | undefined, setSize: number | undefined, posinset: number | undefined): JSX.Element {\r\n return (\r\n \r\n {linkText}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render drawer link.\r\n * @param item -Single Menuitem.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderDrawerLink(item: IMenuItemData, setSize: number | undefined, posinset: number): JSX.Element | null {\r\n if (item && item.linkText && item.linkURL && item.linkURL.length > 0) {\r\n return (\r\n this._renderLinkMenuItem(item, undefined, true, false, setSize, posinset)\r\n );\r\n } else if (item && item.linkText && !item.linkURL) {\r\n return (\r\n this._renderSpanMenuItem(item)\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Method to generate menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem, menuItemData, isMobileView } = this.props;\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\r\n let menuItem: IMenuItemData = {};\r\n for (const menuItemDatum of this.beforeMenu) {\r\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\r\n menuItem = menuItemDatum;\r\n this.setState({ parentMenu: undefined });\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n for (const menuItemDatum of menuItemData) {\r\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\r\n menuItem = menuItemDatum;\r\n this.setState({ parentMenu: undefined });\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n menuItem && menuItemList.push(\r\n \r\n {' '}\r\n {this._createMenuItemList(menuItem)}\r\n {' '}\r\n \r\n );\r\n } else {\r\n let count = 0;\r\n this.beforeMenu.forEach((item: IMenuItemData, index: number) => {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n count++;\r\n });\r\n menuItemData.forEach((item: IMenuItemData, index: number) => {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n });\r\n }\r\n return menuItemList;\r\n }\r\n\r\n private static CMSItemIdInit: number = MenuTypeIndexId.Cms;\r\n private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\r\n const nestedChildren: IMenuItemData[] = [];\r\n\r\n if (!category || !category.subMenus || category.subMenus.length === 0) {\r\n return [];\r\n }\r\n\r\n category.subMenus.map((item: ISubMenusData) => {\r\n nestedChildren.push(this._constructMenuItemData(item));\r\n });\r\n return nestedChildren;\r\n }\r\n private _constructTopMenuItemData(mergedData: IMenuItemData[]): IMenuItemData[] {\r\n const enableTopLevelMenu = this.props.config.enabletopMenu || false;\r\n if (!enableTopLevelMenu) {\r\n return mergedData;\r\n }\r\n const mergedRootMenuData: IMenuItemData[] = [];\r\n const topMenu = {\r\n id: 1,\r\n linkText: this.props.config.rootMenuNavigation || '...',\r\n linkURL: '#',\r\n imageSource: undefined,\r\n subMenu: mergedData\r\n } as IMenuItemData;\r\n mergedRootMenuData.push(topMenu);\r\n\r\n return mergedRootMenuData;\r\n }\r\n private _constructMenuItemData(cmsItem?: ICmsNavItemsData): IMenuItemData {\r\n return {\r\n id: NavigationMenuView.CMSItemIdInit++,\r\n linkText: cmsItem && cmsItem.linkText || '',\r\n linkURL: cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl || '',\r\n imageDestinationURL: cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl || '',\r\n imageSource: cmsItem && cmsItem.image && cmsItem.image.src || '',\r\n subMenu: this._getCMSNestedChildren(cmsItem),\r\n menuSource: MenuSource.Cms,\r\n shouldOpenNewTab: false\r\n } as IMenuItemData;\r\n\r\n }\r\n /**\r\n * Method to get data for submenu.\r\n * @param item -Single Menuitem.\r\n * @returns IMenuItemData.\r\n */\r\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n const subMenus = item && item.subMenu;\r\n if (subMenus && subMenus.length > 0) {\r\n for (let i = 0; i <= subMenus.length - 1; i++) {\r\n if (subMenus[i].id === this.state.activeMenu) {\r\n this.setState({ parentMenu: item?.id });\r\n return subMenus[i];\r\n }\r\n const found = this._getFromSubMenu(subMenus[i]);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Method to create item list.\r\n * @param menuItemData -Single Menuitem.\r\n * @returns Jsx element.\r\n */\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\r\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\r\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id));\r\n }\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n );\r\n\r\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\r\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true));\r\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\r\n return (this._renderSpanMenuItem(menuItemData, menuItemData.id, true));\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\r\n const { isMobileView, ListItem } = this.props;\r\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\r\n const subMenuLevel = 3;\r\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || subMenuLevel;\r\n // Const isParentMenu:boolean= false;\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n if (!subMenus || subMenus.length === 0) {\r\n this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus && subMenus.map((option: IMenuItemData, idx: number) => {\r\n const hasOptions = (option.subMenu && option.subMenu.length > 0);\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && isMobileView) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\r\n } else {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option)\r\n );\r\n }\r\n let subMenu;\r\n const haveSubmenu = hasOptions && enableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1);\r\n if (haveSubmenu) {\r\n this.currentLevel++;\r\n levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\r\n }\r\n return (\r\n \r\n { menuItem }\r\n { subMenu }\r\n \r\n );\r\n });\r\n return (this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu));\r\n }\r\n\r\n /**\r\n * Method to render button menu item.\r\n * @param option -Single Menuitem.\r\n * @param activeMenu -Active menu number.\r\n * @param index -Active menu index.\r\n * @returns Jsx element.\r\n */\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n const { Button } = this.props;\r\n return (\r\n \r\n { option.linkText }\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render link menu item.\r\n * @param option -Single Menuitem.\r\n * @param index -Active menu index.\r\n * @param hoverEffect -Active menu effect.\r\n * @param isParent -Is parent menu.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number, hoverEffect: boolean = true, isParent: boolean = false,\r\n setSize?: number, posinset?: number): JSX.Element | null {\r\n const { Link, isMobileView } = this.props;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText }\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render promotional link.\r\n * @param linkText -Link text.\r\n * @param linkUrl -Link url.\r\n * @returns Jsx element.\r\n */\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n { linkText }\r\n \r\n );\r\n }\r\n return null;\r\n\r\n }\r\n\r\n /**\r\n * Method to render span menu item.\r\n * @param option -Single Menu Item.\r\n * @param index -Index.\r\n * @param isParent -Is parent menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\r\n const { Span } = this.props;\r\n return (\r\n \r\n { option.linkText }\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render menu.\r\n * @param level -Menu level.\r\n * @param menuOptions -Menu lists.\r\n * @param currentItem -Menu current.\r\n * @param submenu -Mneu has submenu or not.\r\n * @returns Jsx element.\r\n */\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\r\n\r\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, isMobileView, showPromotionalContent } = this.props;\r\n const categoryImageDisplay = !isMobileView && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !submenu;\r\n const promotionalContentDisplay = !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\r\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = 1;\r\n return (\r\n \r\n 2 && 'navmenu-multi-level')}>\r\n { menuOptions }\r\n \r\n
\r\n {\r\n categoryImageDisplay && this.state.categoryImage && this.state.categoryImage.map(item => (\r\n \r\n { this.state.categoryImage && this._getCategoryImage(item) }\r\n { promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n ))\r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\r\n const linkText = option && option.linkText ? option.linkText : '';\r\n const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n option.promotionalContent.map(item => {\r\n if (item && item.image) {\r\n const imageSrc = item.image.src;\r\n const promotionalItemImageSettings = item.image.imageSettings;\r\n promotionalImage.push({ src: imageSrc, altText: item.text, imageSettings: promotionalItemImageSettings,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n }\r\n });\r\n }\r\n this.setState({\r\n categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\r\n categoryImageAltText: linkText\r\n });\r\n };\r\n\r\n /**\r\n * Method to handle dropdwon change.\r\n * @param data -Menuitem data.\r\n * @param parentId -Menu parent.\r\n * @returns Jsx element.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.props.isMobileView) {\r\n this.setState({\r\n activeMenu: (this.state.activeMenu && this.state.activeMenu === data.id!) ? undefined : data.id!,\r\n parentMenu: parentId\r\n });\r\n if (this.props.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n }\r\n\r\n this._resetFocus();\r\n };\r\n\r\n /**\r\n * Method to call when focus lost from menu.\r\n */\r\n private readonly _resetFocus = () => {\r\n if (this.props.isMobileView) {\r\n setTimeout(() => {\r\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\r\n }, 0);\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle click outside of menu.\r\n * @param event -HTML event.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\r\n this.setState(\r\n {\r\n activeMenu: undefined,\r\n categoryImage: null\r\n }\r\n );\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle click outside of menu.\r\n * @param event -HTML event.\r\n */\r\n private readonly _handleFocusOutside = (event: FocusEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\r\n this._closeSubmenu();\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle close submenu event.\r\n */\r\n private _closeSubmenu(): void {\r\n if (!this.props.isMobileView) {\r\n this.setState({ activeMenu: undefined });\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle escape key event.\r\n * @param event -HTML event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey) {\r\n if (!this.props.isMobileView) {\r\n const navDrawerList = Array.from(this.menuNode.current!.childNodes);\r\n for (const item of navDrawerList) {\r\n const navDrawerButton = item.firstChild as HTMLButtonElement;\r\n if (navDrawerButton.getAttribute('aria-expanded') === 'true') {\r\n navDrawerButton.focus();\r\n }\r\n }\r\n }\r\n this._closeSubmenu();\r\n }\r\n };\r\n\r\n private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\r\n\r\n if (!categoryImage || !categoryImage.src) {\r\n return null;\r\n }\r\n\r\n const categoryImageUrl = generateImageUrl(categoryImage.src, this.props.context.actionContext.requestContext.apiSettings);\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n if (categoryImageUrl !== undefined) {\r\n const ImageData: IImageData = { src: categoryImageUrl };\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Method to handle escape key event.\r\n * @param drawerState -HTML event.\r\n */\r\n private readonly _onDrawerChange = (drawerState: IDrawerState) => {\r\n const { drawerKeyValue } = this.state;\r\n const drawerText: string = drawerState.buttonText !== undefined ? drawerState.buttonText : '';\r\n const newPair = { [drawerText]: drawerState.isOpen };\r\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\r\n };\r\n}\r\n\r\nexport default NavigationMenuView;\r\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nexport interface IAccountProfileEditLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst AccountProfileEditLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default AccountProfileEditLabel;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { ITileListViewProps } from './tile-list';\n\n/**\n * View component.\n * @param props - The view properties.\n * @returns Returns props.\n */\nexport const tileListView: React.FC = (props) => {\n const { title, tiles, tileListContainer, tileListHeading, tileItemContainer, singleSlideCarouselComponentProps } = props;\n return (\n \n \n {title}\n \n \n { tiles.map((tileItem: ReactNode, index: number) => {\n const keyIndex = `tile-list-item__${index}`;\n return (\n \n {tileItem}\n \n );\n })}\n \n \n );\n};\n\nexport default tileListView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IAccountProfileEditErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst AccountProfileEditError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n
\n );\n\n};\n\nexport default AccountProfileEditError;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILoyaltySignUpViewProps } from './loyalty-sign-up';\n\nconst LoyaltySignUpView: React.FC = props => {\n const { LoyaltySignUp, heading, memberHeading, signInLink, signUpText, signUpButton, detailsLink, termsLink, loading } = props;\n\n if (loading) {\n props.context.telemetry.error('LoyaltySignUp data is empty, module wont render');\n return null;\n }\n\n return (\n \n {memberHeading}\n {heading}\n {detailsLink}\n {signUpText}\n {termsLink}\n {signUpButton}\n {signInLink}\n \n );\n};\n\nexport default LoyaltySignUpView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 {\n productPickupListOptionMenuText,\n productPickupModeList,\n defaultOptionText\n } = this.props;\n const selectedPickupModeDesc = defaultOptionText ? defaultOptionText : productPickupModeList?.find(\n (delivery: DeliveryOption) => delivery.Code === this.state.selectedPickupMode)?.Description;\n const role = 'menu';\n return (\n
\n \n {this.state.isFilterExpanded ?
    \n { productPickupModeList?.map((delivery: DeliveryOption) => {\n return (\n \n \n {delivery.Description}\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. All rights reserved.\n * See License.txt 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 {\n this._stores.map((store, index) => {\n return this._renderStoreLocation(store, index);\n })\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) => this.props.isPreferredStoreEnabled && this.props.preferredStoreLocationId &&\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\n\n return [\n ...stores.filter(isPreferredStore),\n ...stores.filter(store => !isPreferredStore(store))\n ];\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 => (this.props.alreadySelectedLocation &&\n location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) || 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 (availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId === availabilityWithHours.ProductInventoryInformation[i].InventLocationId) {\n return availabilityWithHours.ProductInventoryInformation[i].StockLevelLabel;\n }\n\n }\n }\n\n return undefined;\n };\n\n /**\n * Map resources.\n * @param resources - Store resoureces.\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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, KeyCodes, TelemetryConstant } 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: { searchButtonAriaLabel, searchPlaceholderText, seeAllStoresText, viewListText,\n viewMapText, pickupFilterByHeading, pickupFilterMenuHeading },\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 {this.renderPickupModesList(this.props, toggleButtonText, productPickUpDeliveryOptions, pickupFilterMenuHeading,\n locatorView, pickupFilterByHeading, hasEnabledPickupFilterToShowStore, displayList)}\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 /**\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 = (props: IStoreSelectorSearchFormProps, toggleButtonText: string,\n productPickUpDeliveryOptions: DeliveryOption[] | undefined,\n pickupFilterMenuHeading: string | undefined, locatorView: boolean | undefined,\n pickupFilterByHeading: string | undefined, hasEnabledPickupFilterToShowStore: boolean | undefined,\n shouldDisplayList?: boolean): JSX.Element | null => {\n\n const toggleButtonClass = shouldDisplayList ? 'view-map' : 'list-view';\n if (hasEnabledPickupFilterToShowStore) {\n return (\n
\n {locatorView && \n {toggleButtonText}\n }\n \n
\n {pickupFilterByHeading}\n
\n
);\n }\n if (locatorView) {\n return (\n {toggleButtonText}\n );\n }\n return null;\n\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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

\n {resources.emptyLocationsText}\n

\n
\n);\n\nexport const StoreSelectorWaiting: React.FC = () => (\n
\n);\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 }\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 = ({ locations, searchRadius, resources, isSeeAllStore, preferredDistanceUnit }) => {\n if (locations) {\n const storeCountMessage = preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n return (\n
\n { isSeeAllStore ? resources.storeAllCountMessage\n .replace('{count}', locations.length.toString()) : storeCountMessage\n .replace('{count}', locations.length.toString())\n .replace('{radius}', searchRadius.toString())}\n
\n );\n }\n\n return null;\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IAccountProfileEditItem, IAccountProfileEditLoading, IAccountProfileEditLocalAccount,\n IAccountProfileEditViewProps\n} from './account-profile-edit';\n\nconst AccountProfileEditItem: React.FC = ({\n wrapper,\n label,\n errorMessage,\n input\n}) => {\n\n return (\n \n {label}\n {errorMessage}\n {input}\n \n );\n};\n\nconst LocalAccount: React.FC = ({\n localAccount,\n items,\n errorMessage,\n buttonsWrapper,\n buttons,\n verificationSuccessModal,\n verificationSuccessModalMessage\n}) => {\n\n return (\n \n {items && items.map((item: IAccountProfileEditItem) => {\n return (\n\n \n );\n })}\n {errorMessage && errorMessage.map((error: React.ReactNode, index: number) => {\n return (\n \n {error}\n \n );\n })}\n \n {buttons && buttons.map((button: React.ReactNode, index: number) => {\n return (\n \n {button}\n \n );\n })}\n \n\n \n \n \n \n );\n};\n\nconst AccountProfileEditLoading: React.FC = ({\n modal,\n modalBody,\n icon,\n message\n}) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst AccountProfileEditView: React.FC = props => {\n\n const {\n accountProfileEdit,\n viewState,\n loading,\n defaultAADConainer,\n aadConainer,\n heading,\n accountProfileEditLocalAccount\n } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(accountProfileEditLocalAccount)}\n \n \n );\n};\n\nexport default AccountProfileEditView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 {\n pickupListOptionMenuText,\n pickupmodeList\n } = this.props;\n\n return (\n
\n \n {this.state.expandSiteOptions ?
    \n { pickupmodeList?.map((delivery: DeliveryOption) => {\n return (
  • \n \n \n {delivery.Description}\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 (this._pickupListOptionButton.current !== null && (event.target === this._pickupListOptionButton.current ||\n // eslint-disable-next-line xss/no-mixed-html -- Need to check if any option inside the div is clicked or not.\n this._pickupListOptionButton.current.contains(htmlElement))) ||\n (this._pickupListOptionMenu.current !== null &&\n // eslint-disable-next-line xss/no-mixed-html -- Need to check if any option inside the div is clicked or not.\n (event.target === this._pickupListOptionMenu.current || this._pickupListOptionMenu.current.contains(htmlElement))))) {\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. All rights reserved.\n * See License.txt 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 /**\n * The confirmation text to show.\n */\n confirmationText: string;\n\n /**\n * Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n */\n shouldShowQrCode: boolean;\n\n /**\n * The label shows for channel reference ID.\n */\n channelReferenceIdLabel: string;\n\n /**\n * The channel reference ID to show. When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n */\n channelReferenceId?: string;\n}\n\n/**\n * CheckInConfirmation component for showing confirmation information after check-in succeed.\n * @param confirmationProps - The confirmation properties.\n * @param confirmationProps.confirmationText - The confirmation text.\n * @param confirmationProps.shouldShowQrCode - Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n * @param confirmationProps.channelReferenceIdLabel - The label shows for channel reference ID.\n * @param confirmationProps.channelReferenceId - The channel reference ID to show.\n * When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n * @returns The check-in confirmation component.\n */\nexport const CheckInConfirmationComponent: React.FC = ({\n confirmationText,\n shouldShowQrCode,\n channelReferenceIdLabel,\n channelReferenceId\n}) => {\n return (\n
\n

\n {confirmationText}\n

\n {\n channelReferenceId &&\n

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

\n }\n {\n channelReferenceId &&\n shouldShowQrCode &&\n \n \n \n }\n
\n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\n/**\n * Check-in error properties.\n */\nexport interface ICheckInErrorProps {\n errorMessage?: string;\n}\n\n/**\n * Check-in error.\n * @param errorProps - The error properties.\n * @param errorProps.errorMessage - The error message to show.\n * @returns The alert element showing check-in errors.\n */\nexport const CheckInErrorComponent: React.FC = ({\n errorMessage\n}) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \n \n );\n};\n\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IDictionary } from '@msdyn365-commerce/core';\nimport { CommerceProperty, SalesOrdersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { CheckInConfirmationComponent } from './check-in-confirmation';\nimport { CheckInErrorComponent } from './check-in-error';\nimport { IAdditionalInformationKeysData, ICheckInForPickupConfig, ICheckInForPickupProps } from './check-in-for-pickup.props.autogenerated';\n\n/**\n * The interface representing a piece of additional information data.\n */\ninterface IAdditionalInformation {\n formKey: IAdditionalInformationKeysData;\n value: string;\n}\n\n/**\n * The state for check-in view.\n */\nexport interface ICheckInViewState {\n\n /**\n * If the module has header error to show.\n */\n isHeaderError: boolean;\n\n /**\n * If the customer has checked in.\n */\n isCheckedIn: boolean;\n\n /**\n * Additional information to capture.\n */\n additionalInformation: IDictionary[];\n}\n\n/**\n * The properties for check-in view.\n */\nexport interface ICheckInViewProps extends ICheckInForPickupProps {\n headerError: React.ReactNode;\n confirmationComponent: React.ReactNode;\n viewState: ICheckInViewState;\n additionalInformationValues: string[];\n checkInForOrderPickup(additionalInformation?: IAdditionalInformation[]): Promise;\n}\n\n/**\n * The state of the CheckInForPickup module.\n */\nexport interface ICheckInForPickupState {\n\n /**\n * The header error message.\n */\n headerErrorMessage: string;\n\n /**\n * If the customer has checked in successfully.\n */\n isCheckedIn: boolean;\n}\n\n/**\n *\n * CheckIn component.\n * @extends {React.Component, ICheckInForPickupState>}\n */\nclass CheckInForPickup extends React.Component, ICheckInForPickupState> {\n\n public constructor(props: ICheckInForPickupProps) {\n super(props);\n this.state = {\n headerErrorMessage: '',\n isCheckedIn: false\n };\n }\n\n public render(): JSX.Element | null {\n const isHeaderError: boolean = this.state.headerErrorMessage !== '';\n\n const viewProps = {\n ...this.props,\n headerError: ,\n confirmationComponent: ,\n checkInForOrderPickup: this.checkInForOrderPickup,\n additionalInformationValues: this.props.config.additionalInformationKeys ? this.props.config.additionalInformationKeys.map(() => {\n return {};\n }) : undefined,\n viewState: {\n isHeaderError,\n isCheckedIn: this.state.isCheckedIn\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public shouldComponentUpdate(nextProps: ICheckInForPickupProps, nextState: ICheckInForPickupState): boolean {\n if (this.props.config.additionalInformationHeading !== nextProps.config.additionalInformationHeading ||\n this.props.config.confirmationText !== nextProps.config.confirmationText) {\n\n return true;\n }\n if (this.state.headerErrorMessage !== nextState.headerErrorMessage ||\n this.state.isCheckedIn !== nextState.isCheckedIn) {\n return true;\n }\n return false;\n }\n\n public async componentDidMount(): Promise {\n await this._onInit();\n }\n\n /**\n * The async callback for submitting check-in.\n * @param additionalInformationList - The optional additional information captured.\n * @returns The async result.\n */\n public checkInForOrderPickup = async (additionalInformationList?: IAdditionalInformation[]): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query!.channelId, 10);\n const channelReferenceId: string = this.props.context.request.query!.channelReferenceId;\n const packingSlipId: string = this.props.context.request.query!.packingSlipId;\n\n const additionalInformationToSubmit: { formKey: string; value: string }[] | undefined =\n additionalInformationList?.map(additionalInformationKeyValuePair => {\n return { formKey: additionalInformationKeyValuePair.formKey.resourceId ?? '', value: additionalInformationKeyValuePair.value };\n });\n const extensionPropertyList: CommerceProperty[] = [];\n if (!ObjectExtensions.isNullOrUndefined(additionalInformationToSubmit)) {\n for (const additionalInformation of additionalInformationToSubmit) {\n extensionPropertyList.push({\n Key: additionalInformation.formKey,\n Value: {\n StringValue: additionalInformation.value\n }\n });\n }\n }\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId,\n extensionPropertyList);\n } catch (error) {\n this.state = { headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false };\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n return Promise.resolve();\n };\n\n /**\n * The action performed on module initialization.\n * @returns The async result.\n */\n private readonly _onInit = async (): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query?.channelId ?? '', 10);\n const channelReferenceId: string | undefined = this.props.context.request.query?.channelReferenceId;\n const packingSlipId: string | undefined = this.props.context.request.query?.packingSlipId;\n if (Number.isNaN(channelId) || !channelReferenceId || !packingSlipId) {\n // No error message shown in editor mode.\n if (this.props.context.request.params.isEditor) {\n return Promise.resolve();\n } else if (this.props.context.request.params.isPreview) {\n this.setState({ headerErrorMessage: this.props.resources.requiredParameterMissingErrorMessage });\n } else {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage });\n }\n this.props.context.telemetry.error('One or more required URL parameters are missing. ' +\n 'Please make sure you have pass in channelId, channelReferenceId and packingSlipId through URL parameter.');\n return Promise.resolve();\n }\n\n const {\n additionalInformationKeys\n } = this.props.config;\n\n const hasAdditionalInformation: boolean = ArrayExtensions.hasElements(additionalInformationKeys);\n\n // Call check-in-for-pickup directly if no additional information to capture.\n if (!hasAdditionalInformation) {\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId);\n } catch (error) {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false });\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n }\n return Promise.resolve();\n };\n}\n\nexport default CheckInForPickup;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport {\n DeliveryOption,\n OrgUnitContact,\n OrgUnitLocation,\n StoreHours\n} from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } 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 = (storeHours: StoreHours | undefined, location: OrgUnitLocation,\n resources: IStoreSelectorLocationLineItemResources): 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 \n {displayTime.startDayShort}\n \n –\n \n {displayTime.endDayShort}\n \n
\n ) : (\n
\n \n {displayTime.startDayShort}\n \n
\n )}\n
\n {displayTime.timeRange}\n
\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}\n -\n {storeOpenTo}\n
\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 = (distance: number | undefined, preferredDistanceUnit: string, isLocationDisabled?: boolean): 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/**\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 = (props: IStoreSelectorLocationLineItemProps,\n deliveryOptionList: DeliveryOption[], pickupInStoreButtonText: string, pickupInStoreAriaLabel: string): 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 = (productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: DeliveryOption[] | undefined): 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\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\n return (\n
\n
\n {(shouldShowIndex || storeLocatorView) && \n {index}\n }\n \n {storeName}\n \n {distanceAsString ? \n {' '}\n {distanceAsString}\n : false}\n
\n
\n
\n

\n {resources.contactInfoHeader}\n

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

\n {resources.storeHoursHeader}\n

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

\n {resources.availabilityInfoHeader}\n

\n {stockText &&

\n {stockText}\n

}\n {isCurrentLocation ? (\n

\n {resources.currentLocation}\n

\n ) : (canSelectLocation ? deliveryOptionList.length === 0 ? (\n \n {pickupInStoreButtonText}\n \n ) : renderPickupModes(props, deliveryOptionList, pickupInStoreButtonText, pickupInStoreAriaLabel) : (\n false\n ))}\n
\n }\n {\n isPreferredStoreEnabled ? (isPreferredStore ? \n {resources.preferredStoreText}\n : \n {resources.setAsPreferredStoreText}\n ) : null\n }\n
\n
\n );\n};\n\n/**\n * Store location line item component.\n */\nexport const StoreSelectorLocationLineItemComponent = storeSelectorLocationLineItem as (props: IStoreSelectorLocationLineItemProps) => JSX.Element;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { FormBuilder } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckInViewProps } from './check-in-for-pickup';\n\n/**\n * The check-in view for submitting check-in, capturing additional information, and showing check-in confirmation.\n * @param props - The check-in view properties.\n * @returns The check-in view as a react component.\n */\nconst CheckInViewComponent: React.FC = (props: ICheckInViewProps) => {\n const {\n headerError,\n checkInForOrderPickup,\n confirmationComponent,\n viewState\n } = props;\n return (\n <>\n { viewState.isHeaderError && headerError }\n { !viewState.isHeaderError && ArrayExtensions.hasElements(props.config.additionalInformationKeys) &&\n }\n {\n !viewState.isHeaderError && !ArrayExtensions.hasElements(props.config.additionalInformationKeys) && viewState.isCheckedIn &&\n confirmationComponent\n }\n \n );\n};\n\nexport default CheckInViewComponent;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nexport interface IAccountProfileEditLoadingMessage {\n className: string;\n message: string;\n}\n\nconst AccountProfileEditLoadingMessage: React.FC = ({ className, message }) => (\n
\n {message}\n
\n);\n\nexport default AccountProfileEditLoadingMessage;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 =\n Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\n return `${hours}:${minutes} ${ampm}`;\n\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: // 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: // Case 'SUN':\n return resources.days.sundayFull;\n }\n};\n\nconst buildHoursDisplayInfo = (startDay: DayType, endDay: DayType, hoursInfo: string, resources: IStoreSelectorLocationLineItemResources): 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};\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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAccountProfileEditInputProps {\n id?: string;\n\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IAccountProfileEditInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst AccountProfileEditInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n onChange\n}) => (\n \n);\n\nexport default AccountProfileEditInput;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 {\n getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody\n} 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 {\n IAccountProfileEditConfig, IAccountProfileEditProps\n} from './account-profile-edit.props.autogenerated';\nimport AccountProfileEditButtonComponent from './components/account-profile-edit-button';\nimport AccountProfileEditErrorComponent from './components/account-profile-edit-error';\nimport AccountProfileEditInputComponent from './components/account-profile-edit-input';\nimport AccountProfileEditLabelComponent from './components/account-profile-edit-label';\nimport AccountProfileEditLoadingIconComponent from './components/account-profile-edit-loading-icon';\nimport AccountProfileEditLoadingMessageComponent from './components/account-profile-edit-loading-message';\n\nexport interface IAccountProfileEditViewState {\n isShowLoading: boolean;\n}\n\nexport interface IAccountProfileEditItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IAccountProfileEditLocalAccount {\n localAccount: INodeProps;\n items: IAccountProfileEditItem[];\n errorMessage: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IAccountProfileEditLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAccountProfileEditViewProps {\n className: string;\n viewState: IAccountProfileEditViewState;\n loading: IAccountProfileEditLoading;\n accountProfileEdit: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n accountProfileEditLocalAccount: IAccountProfileEditLocalAccount;\n}\n\n/**\n *\n * AccountProfileEdit component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component>}\n */\n@observer\nclass AccountProfileEdit extends React.Component> {\n\n private readonly moduleClassName: string = 'ms-account-profile-edit';\n\n private readonly telemetryContent: ITelemetryContent;\n\n @observable private givenName: string;\n\n @observable private surname: string;\n\n @observable private email: string;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n private initializationTimer: any;\n\n constructor(props: IAccountProfileEditProps) {\n super(props);\n this.givenName = '';\n this.surname = '';\n this.email = '';\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\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(nextProps: IAccountProfileEditProps,\n nextState: IAccountProfileEditViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config, resources } = this.props;\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n accountProfileEdit: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n heading: config.heading && config.heading.text && (\n \n ),\n accountProfileEditLocalAccount: this._renderLocalAccount()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading.text = event.target.value;\n\n public onTextBoxChange = (event: React.ChangeEvent) => {\n const id = event.target.id;\n const value = event.target.value;\n\n switch (id.toLowerCase()) {\n case 'givenname': {\n this.givenName = value;\n break;\n }\n case 'surname': {\n this.surname = value;\n break;\n }\n case 'email': {\n this.emailRegex = value;\n break;\n }\n default:\n }\n };\n\n public _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n const { resources } = this.props;\n const invalidEmailAddressError = resources.invalidEmailAddressError || 'Please enter a valid email address.';\n\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['SA_FIELDS']['AttributeFields'].map((obj: { ID: string; PRE: string; PAT: string; UX_INPUT_TYPE: string; PAT_DESC: string }) => {\n const value = obj.PRE ? this._htmlDecode(obj.PRE) : '';\n switch (obj.ID.toLowerCase()) {\n case 'givenname': {\n this.givenName = value;\n break;\n }\n case 'surname': {\n this.surname = value;\n break;\n }\n case 'email': {\n this.email = value;\n this.emailRegex = obj.PAT;\n obj.PAT_DESC = invalidEmailAddressError;\n break;\n }\n default:\n }\n\n });\n }\n };\n\n private _htmlDecode(str: string): string {\n const e = document.createElement('div');\n\n e.innerHTML = str;\n return e.childNodes.length === 0 ? '' : e.childNodes[0].nodeValue || '';\n }\n\n private readonly _updateErrorMessage = () => {\n const { resources } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n\n const message = {\n required_field: resources.requiredFieldMissingError,\n verifying_blurb: resources.loadingMessage\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], message);\n }\n };\n\n private _renderLocalAccount(): IAccountProfileEditLocalAccount {\n const { config, resources } = this.props;\n const localAccount = {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n items: [\n this._renderInput('givenName', 'text', this.givenName, resources.firstNameLabelText, resources.firstNameMaxLength),\n this._renderInput('surname', 'text', this.surname, resources.lastNameLabelText, resources.lastNameMaxLength)\n ],\n errorMessage: [\n ,\n ,\n \n ],\n buttonsWrapper: {\n className: `${this.moduleClassName}__buttons`\n },\n buttons: [\n ,\n \n ],\n verificationSuccessModal: {\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\n },\n verificationSuccessModalMessage: {\n id: 'verifying_blurb',\n className: `${this.moduleClassName}__verifying-modal-message`\n }\n };\n\n if (config.showEmail && this.email !== '') {\n localAccount.items.push(this._renderInput('email', 'email', this.email, resources.emailAddressLabelText, undefined, this.emailRegex));\n }\n\n return localAccount;\n }\n\n private _renderInput(id: string, type: string, value: string, labelText: string, maxLength?: string, pattern?: string): IAccountProfileEditItem {\n const className = `${this.moduleClassName}__account-item`;\n return (\n {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n\n }\n );\n }\n\n}\n\nexport default AccountProfileEdit;\n"],"sourceRoot":""}