{"version":3,"sources":["webpack:///./src/modules/smwe-order-details/components/wine-club-details.tsx?7a40","webpack:///./src/modules/smwe-order-details/smwe-order-details.view.tsx?23fb","webpack:///src/modules/order-details/components/get-order-summary.tsx?eb46","webpack:///src/common/get-order-information.tsx?d70b","webpack:///src/modules/fabrikam/views/components/promocode.component.tsx?7eef","webpack:///src/modules/header/header.view.tsx?40e5","webpack:///src/modules/order-confirmation/components/index.ts?2e1f","webpack:///src/modules/social-share-item/social-share-item.tsx?e01b","webpack:///./src/themes/elicit/views/smwe-order-details.view.tsx?b6af","webpack:///src/modules/order-template-list/components/order-template-list.tsx?f2fd","webpack:///src/modules/order-template-list/components/orderTemplateList-status-message.tsx?dbea","webpack:///./src/modules/wine-club-signup/wine-club-data.ts?aeec","webpack:///src/modules/video-player/video-player.tsx?cfb9","webpack:///src/modules/order-details/components/get-payment-methods.tsx?aeee","webpack:///src/common/address.tsx?6c70","webpack:///src/modules/order-confirmation/index.ts?bf5f","webpack:///src/modules/header/components/logo.tsx?be23","webpack:///src/modules/header/components/nav-icon.tsx?49a1","webpack:///src/modules/header/components/header-preferred-store.tsx?9138","webpack:///src/modules/header/header.tsx?4703","webpack:///src/modules/order-confirmation/components/get-help.tsx?58bd","webpack:///src/modules/order-confirmation/order-confirmation.tsx?67f9","webpack:///src/modules/ratings-histogram/component/components.tsx?2a0b","webpack:///src/modules/ratings-histogram/ratings-histogram.tsx?4c32","webpack:///src/common/get-groups.tsx?8b6a","webpack:///src/modules/wishlist-items/components/wishlist-items-dimensions.tsx?671e","webpack:///src/modules/wishlist-items/components/wishlist-item.tsx?1fe2","webpack:///src/modules/wishlist-items/components/wishlist-items-status-message.tsx?7062","webpack:///src/modules/wishlist-items/wishlist-items.tsx?3721","webpack:///src/modules/order-details/components/get-help.tsx?85e2","webpack:///src/modules/cart/components/cart-pick-up-in-store.tsx?f7bf","webpack:///src/modules/cart/components/cart-line-items.tsx?a1e3","webpack:///src/modules/cart/components/cart-line-groups.tsx?b88f","webpack:///src/modules/cart/utils/get-promotion-in-cart.ts?1379","webpack:///src/modules/cart/cart.tsx?f1c3","webpack:///src/modules/cart/components/cart-line-items-promotion.tsx?6882","webpack:///src/modules/product-collection/product-collection.view.tsx?9eb3","webpack:///src/modules/buybox/utilities/error-utilities.ts?63c8","webpack:///src/modules/buybox/components/buybox-small-components.tsx?5a8f","webpack:///src/modules/buybox/components/buybox-find-in-store.tsx?24db","webpack:///src/modules/buybox/components/dropdown/dropdown.tsx?2922","webpack:///src/modules/buybox/components/buybox-product-configure.tsx?7d15","webpack:///src/modules/buybox/buybox.tsx?8cd9","webpack:///src/modules/checkout-order-confirmation/checkout-order-confirmation.tsx?1533","webpack:///src/modules/order-confirmation/components/get-payment-methods.tsx?0bc9","webpack:///src/modules/order-history/index.ts?9849","webpack:///src/modules/order-details/order-details.tsx?673a","webpack:///src/modules/product-collection/product-collection.tsx?b9b8","webpack:///src/modules/order-history/actions/get-order-shipment-history.ts?2cf8","webpack:///src/modules/cart/cart.view.tsx?394b","webpack:///src/modules/buybox/buybox.view.tsx?7b02","webpack:///src/common/index.ts?ee63","webpack:///src/modules/video-player/video-player.view.tsx?2e40","webpack:///src/common/get-sales-lines.tsx?a840","webpack:///src/modules/order-history/components/get-sales-order.tsx?ac68","webpack:///src/index.ts?c6ae","webpack:///src/modules/order-details/order-details.view.tsx?018c","webpack:///src/modules/search/search.view.tsx?e62d","webpack:///src/modules/order-history/components/order-history-filter.tsx?ac38","webpack:///src/common/get-sales-line.tsx?39dd","webpack:///src/common/label.tsx?223a","webpack:///src/modules/order-template-list/components/create-order-template.tsx?81ed","webpack:///src/modules/order-template-list/order-template-list.tsx?bc4a","webpack:///src/modules/order-confirmation/components/get-order-summary.tsx?fa69","webpack:///src/modules/social-share-item/social-share-item.view.tsx?ce9b","webpack:///src/modules/wishlist-items/wishlist-items.view.tsx?caf1","webpack:///src/modules/order-confirmation/order-confirmation.view.tsx?8166","webpack:///src/modules/order-history/order-history.view.tsx?251d","webpack:///src/modules/ratings-histogram/ratings-histogram.view.tsx?4481","webpack:///./src/modules/smwe-order-details/components/get-help.tsx?adc0","webpack:///./src/modules/smwe-order-details/components/get-order-summary.tsx?fa70","webpack:///./src/modules/smwe-order-details/components/get-payment-methods.tsx?5f0e","webpack:///./src/modules/smwe-order-details/components/address.tsx?da2b","webpack:///./src/modules/smwe-order-details/components/label.tsx?8767","webpack:///./src/modules/smwe-order-details/components/utilities.ts?88d4","webpack:///./src/modules/smwe-order-details/components/get-sales-line.tsx?b41d","webpack:///./src/modules/smwe-order-details/smwe-order-details.tsx?99d9","webpack:///./src/modules/smwe-order-details/components/get-sales-lines.tsx?52b5","webpack:///src/modules/checkout-order-confirmation/checkout-order-confirmation.view.tsx?504a","webpack:///src/common/utilities.ts?0d8b","webpack:///src/search-state.ts?b5d7","webpack:///src/modules/search/actions/get-auto-suggest-suggestions.ts?6ade","webpack:///src/modules/search/components/search.keywordsuggest.tsx?59ca","webpack:///src/modules/search/components/search.productsuggest.tsx?d6fa","webpack:///src/modules/search/components/search.categorysuggest.tsx?3bc4","webpack:///src/modules/search/components/search.form.tsx?3c4b","webpack:///src/modules/search/components/search.label.tsx?91cb","webpack:///src/modules/search/search.tsx?3f45","webpack:///src/modules/order-template-list/order-template-list.view.tsx?20f7","webpack:///src/modules/order-history/order-history.tsx?33c9"],"names":["WineClubDetails","React","constructor","props","super","render","this","wineClubData","variantPreference","className","_shipTypeJSX","_isGiftJSX","shipType","deliveryType","pickupLocationName","pickupLocationAddress","display","selectedLocation","orderDetailProps","context","app","config","wineClubPickupLocations","find","location","id","pickupLocationId","name","address","forMyself","OrderDetailsOrderInfomation","orderInformationProps","salesId","createdDate","count","amount","channelReferenceId","channelName","channelAddress","isWineClubOrder","Node","Object","WineClubDetailsRender","OrderDetailsSalesLine","salesLineProps","salesLine","buyAgainButton","OrderDetailsGroupDelivery","deliveryProps","heading","trackingInfo","OrderDetailsGroup","groupProps","delivery","salesLinesProps","salesLines","map","key","data","LineId","salesStatus","OrderDetailsGroups","groupsProps","groups","isWineClubPickup","classnames","group","index","OrderDetailsOrderSummary","orderSummaryProps","subtotal","shipping","tax","totalAmount","earnedPoints","OrderDetailsPayment","paymentMethodsProps","title","methods","OrderDetailsHelp","helpProps","needHelpLabel","helpLineNumberLabel","contactNumber","OrderDetailsView","moduleProps","alert","loading","orderInfomation","orderSummary","payment","help","Module","OrderSummaryLine","label","value","priceContext","PriceComponent","price","CustomerContextualPrice","getOrderDetailsOrderSummary","order","resource","orderSummaryHeading","orderSummaryItemsTotalLabel","orderSummaryShippingFeeLabel","orderSummaryTaxLabel","orderSummaryGrandTotalLabel","pointsEarnedLabel","canShip","SubtotalAmount","ChargeAmount","TaxAmount","TotalAmount","undefined","getOrderInformation","moduleName","showChannelInfo","receiptEmail","receiptId","resources","receiptEmailMessage","orderItemLabel","orderItemsLabel","orderIdLabel","receiptIdLabel","confirmationIdLabel","posChannelNameText","onlineStoreChannelNameText","orderPlacedOnLabel","isSalesInvoice","getOrderInfomationInput","channelIdentities","orgUnitLocations","request","apiSettings","channelId","locale","ChannelId","get","SalesLines","length","countItems","orderChannel","filter","channel","RecordId","orderOrgUnitLocation","CreatedDateTime","Date","toLocaleDateString","SalesId","ReceiptId","ReceiptEmail","ChannelReferenceId","Name","Address","PromoCode","state","_onInputChange","e","error","target","setState","promoCodeInputValue","canApply","_applyPromotion","cartState","cart","appliedPromo","addPromoCode","promoCode","then","result","status","substatus","duplicatePromoCodeErrorText","invalidPromoCodeErrorText","catch","failedToAddPromoCodeErrorText","_renderForm","promoPlaceholderText","promoCodeApplyButtonText","attributes","getTelemetryAttributes","telemetryContent","payLoad","onSubmit","event","preventDefault","onChange","placeholder","Button","onClick","disabled","_removePromotion","code","currentTarget","getAttribute","removePromoCodes","promoCodes","failedToRemovePromoCodeErrorText","_calculateDiscount","CartLines","discountAmount","line","DiscountLines","discountLine","DiscountCode","DiscountCost","_renderAppliedPromoCode","Coupons","promoCodTotalDiscount","reduce","coupon","Code","appliedPromoCodeHeadingText","typeName","ariaLabel","removePromoAriaLabelFormat","format","removePromoText","getPayloadObject","TelemetryConstant","ApplyPromoCode","isCollapseOpen","promoCodeHeadingText","_renderReactFragment","items","slot","headerView","HeaderTag","HeaderContainer","HeaderTopBarContainer","MobileMenuContainer","MobileMenuBodyContainer","MobileMenuLinksContainer","Divider","navIcon","logo","search","preferredStore","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","link","telemetry","_renderDesktopAccountBlock","wishListIconDesktop","cartIcon","siteOptions","MobileMenuHeader","menuBar","wishListIconMobile","SocialShareItem","_getSocialShareItem","bind","viewprops","SocialShareItemElement","renderView","src","icon","MsDyn365","isBrowser","socialMedia","SocialMediaComponent","SocialMedia","Facebook","postUrl","document","URL","Twitter","Pinterest","Linkedin","Mail","brandCode","brandCodeParser","description","product","Description","appContext","OrderTemplateActions","onRemoveOrderTemplate","handlers","itemKey","OrderTemplateRender","input","Id","orderTemplate","removeFromOrderTemplateListText","orderTemplateState","imageSettings","enableImageProductLink","onDismiss","orderTemplateImage","_renderOrderTemplateImages","orderTemplateLines","orderTemplateAriaLabel","_renderAriaLabel","orderTemplateName","href","url","getUrlSync","actionContext","separator","includes","_getOrderTemplatePageUrl","totalLines","color","addToCartButton","AddOrderTemplateToCartComponent","moduleTypeName","addToCartText","addToBagText","dialogStrings","removeButton","orderTemplateStatusMessage","isOpen","userMessage","Alert","statusCssString","toggle","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","slice","productUrl","fullProduct","getProductUrlSync","ProductDetails","Image","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","ItemId","requestContext","gridSettings","loadFailureBehavior","window","assign","OrderTemplateListStatusMessage","errorType","text","WineClubDataStore","LOCAL_STORAGE_LOCATION","changeEvents","previousWineData","localStorage","getItem","reset","JSON","parse","instance","push","getDeliveryMapFromConfig","coreContext","wineClubShippingLabels","standard","pickup","premium","edit","newData","forEach","_save","deleteKeys","keys","tosAgree","clubId","isInResetState","setItem","stringify","VideoPlayer","getTelemetryObject","telemetryPageName","friendlyName","options","video","playerResources","playAriaLabel","playLabel","pauseAriaLabel","pauseLabel","playingAriaLabel","playingLabel","pausedAriaLabel","pausedLabel","muteAriaLabel","muteLabel","unMuteAriaLabel","unMuteLabel","fullScreenAriaLabel","fullScreenLabel","exitFullScreenAriaLabel","exitFullScreenLabel","seekBarLabel","videoTimeDurationLabel","closedCaptionLabel","videoMetaData","videoId","duration","playTime","thumbnail","posterframeUrl","_links","binaryReferences","videoBinaryReferences","videoPlayerData","metaData","viewProps","player","editProps","Player","playerData","isEditor","params","getOrderDetailsPaymentMethods","tenderLines","tenderIdOperationIdMap","paymentMethodsTitle","creditCardEndingLabel","giftCardEndingLabel","amountCoveredLabel","loyaltyCardUsedLabel","cashUsedLabel","customerAccountUsedLabel","OPERATIONS","getLastFourDigit","digits","substr","lines","tenderLine","TenderTypeId","showAmount","cardLastFourDigit","MaskedCardNumber","isValidCardNumber","isNaN","AuthorizedAmount","Amount","showAmountCovered","CardTypeId","getCard","GiftCardId","getGiftCertificate","LoyaltyCardId","getLoyalty","getCash","CustomerId","getCustomerAccountPayment","showCompleteAddress","shipToLabel","storeLabel","phoneLabel","Street","City","State","County","ZipCode","ThreeLetterISORegionName","Phone","FullAddress","Logo","_renderLogo","linkUrl","destinationUrl","openInNewTab","_renderImage","Msdyn365","image","NavIcon","toggleNavBar","mobileHamburgerAriaLabel","isExpanded","targetId","observer","HeaderPreferredStore","handleClick","_findPreferreStoreOnClick","storeSelectorStateManager","slots","storeSelector","storeName","StoreName","headerPreferredStoreText","headerPreferredStoreAriaLabel","modules","storeSelectorId","openDialog","showMapViewLink","onLocationSelected","orgUnitLocation","Promise","resolve","message","debug","Header","handleLinkTextChange","linkIndex","myAccountLinks","linkText","popOverRef","_toggleNavbar","_togglePopover","_keydown","mobileMenuCollapsed","signinPopoverOpen","customer","accountInformation","FirstName","componentDidMount","addEventListener","reaction","componentWillUnmount","removeEventListener","user","cartLabel","cartQtyLabel","logoLink","logoImage","headerClassName","cartIconSlot","_getSlot","menuBarSlot","searchSlot","siteOptionsSlot","preferredStoreSlot","WishListIconComponent","showButtonTooltip","wishlistTooltipText","CartIconComponent","tag","Modal","wrapClassName","ModalHeader","ModalBody","displayName","Popover","placement","_getSigninButton","_getSignOutButton","_getAccountInfoDropdownButton","_getAccountLinks","slotName","SignIn","signInLinkText","signInUrl","signInLinkAriaText","onTelemetryClick","SignOut","signOutLinkText","signOutUrl","signOutLinkAriaText","MyProfile","innerRef","cta","contentAction","etext","editableLink","role","additionalProperties","onTextChange","keyCode","__decorate","computed","getOrderConfirmationHelp","helpLineContactAriaLabel","attribute","OrderConfirmation","handleOrderConfirmationHeadingChange","getDeliveryMode","featureSate","channelDeliveryOptionConfig","pickupDeliveryMode","PickupDeliveryModeCodes","deliveryMode","DeliveryMode","BackToShopping","backToShoppingAttributes","freePriceText","loyaltyCard","RewardPoints","pointPrograms","point","RewardPointId","rewardLines","LoyaltyRewardPointLines","total","RewardPointAmountQuantity","indexOf","featureState","retailMultiplePickUpOptionEnabled","item","IsEnabled","pickupDeliveryModeCode","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","orderDetailsLines","some","orderDetailsLine","tenderTypes","TenderLines","getTenderIdOperationIdMap","noSalesOrderText","genericErrorMessage","loadingLabel","backToShopping","pickupItemsHeader","pickingItemsLabel","shippingAddressTitle","shippingItemToYouLabel","emailItemsHeader","emailingItemsLabel","showTimeslot","classname","backToShoppingUrl","onEdit","backToShoppingLink","footerProps","hasError","LabelComponent","isDataReady","TransactionTypeValue","salesLinesInput","getSalesLinesInput","products","deliveryOptions","getSalesLines","orderInfomationInput","salesOrder","getGroups","isConfirmationView","getOrderConfirmationOrderSummary","getOrderConfirmationPaymentMethods","HistogramItems","ratingsSummary","totalRatingsCount","renderItem","star5Count","star4Count","star3Count","star2Count","star1Count","stars","totalCount","percentage","formattedPercent","Intl","NumberFormat","style","barItemAriaLabel","starLabel","bar","Progress","max","buttonProps","AverageRatingNumber","summary","averageRating","TotalReviews","RatingsHistogram","handleHeadingChange","selectFilterBy","ratingCount","completeClass","callbacks","histogramItems","RatingComponent","avgRating","averageRatingAriaLabel","readOnly","hideCount","averageNumber","totalReviews","ratingsSummaryProps","histogramProps","filterKey","update","createRatingsReviewsStateInput","showAddress","groupSalesLines","_salesLines","itemLabel","pickingItemsLabelText","shippingItemsToYouText","emailingItemsLabelText","multiplePickup","isProcessing","pickDateTimeslot","pickupDateTimeslot","shippedStatusCheck","multiplePickUp","pickupProps","processing","shippingItemsToYou","WishlistItemDimension","dimensionType","dimensionValue","WishListItemActions","onAddToCart","onRemoveItem","_renderProductImage","fallbackImage","cropFocalRegion","altText","_renderPrice","moduleId","originalPriceText","currentPriceText","_renderProductDimensions","Dimensions","dimension","DimensionValue","Value","type","DimensionTypeValue","productDimensionTypeColor","productDimensionTypeSize","productDimensionTypeStyle","formattedPrice","dimensions","BasePrice","cultureFormatter","formatCurrency","CurrencyCode","productDimension","join","WishlistItemsStatusMessage","WishlistItems","_onDismiss","_renderHeading","_addItemToCart","async","productAvailability","addedToCartSuccessMessage","addedToCartFailureMessage","productInventoryInformation","_getProductInventory","isOrderQuantityLimitsFeatureEnabledInHq","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","isOrderQuantityLimitsFeatureEnabledInSiteSettings","IsB2b","isOrderQuantityLimitsFeatureEnabled","getDeliveryOptionsAsync","callerContext","queryResultSettings","addProductToCartInput","quantity","enableStockCheck","availableQuantity","ProductAvailableQuantity","AvailableQuantity","orderQuantityLimitsFeatureIsEnabled","isAddEmailDeliveryItemToCart","ArrayExtensions","hasElements","DeliveryOptions","addProductToCart","productId","messageGlyph","curQuantity","ProductId","Quantity","maxQtyLimitReachedMessage","_getInventoryValueMessage","errorDetails","LocalizedMessage","warning","_removeItemFromWishlist","wishlists","userToken","isAuthenticated","token","wishlistLineId","_getWishlistLineIdFromProductId","removeLinesAsync","commerceList","castCommerceList","createGetByCustomerInput","getItemsInWishlists","ActiveWishlistInput","castSimpleProducts","_inventoryLabel","StockLevelLabel","_inventoryClassName","StockLevelCode","toLowerCase","_isProductInStock","productResult","IsProductAvailable","CommerceListLines","foundWishlistItem","commerceListLine","emptyWishlistText","wishlistErrorGettingWishlist","errorProps","statusMessage","productsList","emptyViewProps","Products","Product","ProductDimensions","_renderProductList","priceFree","addToCartButtonText","outOfStockText","removeButtonText","productDimensionTypeAmount","isInStock","removeFromWishlistText","wishlistState","inventoryInformationLabel","inventoryLabelClassName","inventoryCssName","toString","productAttributes","isServiceItem","ItemTypeValue","productImage","productLink","productDimensions","productPrice","entireProductLink","productAriaLabel","productName","inventoryInformation","productStatusMessage","WishlistItem","ProductPrice","IsGiftCard","maxQuantityLimitText","maxQuantityForLineItem","maxQuantityForCartLineItem","replace","minInventory","Math","min","productInventoryCollection","getOrderDetailsHelp","ContactNumber","PickUpInStore","_toggleBOPIS","isBopisSelected","cartline","storeSelectorModuleId","alreadySelectedLocation","OrgUnitNumber","FulfillmentStoreId","updateCartLinePickupLocation","cartLineId","locationChangedHandler","_onLocationChangedCallback","ShippingAddress","clearCartLinePickupLocation","_getOrgUnitName","fulfillmentStoreId","foundLocation","OrgUnitName","option","toggleBopis","defaultComponent","cartLine","shipItText","pickupInStoretext","changeStoreText","orgUnitName","bopisSelected","toggleBOPIS","checked","_renderShippingMethod","shipitText","pickUpInStoreText","deliveryOption","pickupStore","_getDeliveryOption","ContainerProps","assembleCartlines","cartlines","reactNodes","_getProduct","foundProductAvailability","foundProductDeliveryOption","productAvailabilites","InventLocationId","WarehouseId","productDeliveryOptions","foundProductDeliveryOptions","removeItemClickHandler","moveToWishlistSuccessHandler","addToOrderTemplateButtonText","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","addToWishlistButtonText","removeFromWishlistButtonText","orderTemplates","defaultWishlistName","nameOfWishlist","maxQuantity","maxCartlineQuantity","isStockCheckEnabled","productMaxQuantity","lineMaxQuantity","_getCartItemMaxQuantity","isQuantityLimitsFeatureEnabled","Behavior","MaximumQuantity","errorMessage","ObjectExtensions","isNullOrUndefined","currentQuantity","lineIndex","finalErrorMessage","includeErrors","outOfRangeOneText","outOfRangeFormatText","cartlinesErrors","i","LineIndex","DataValidationFailure","ErrorContext","_getErrorMessage","payload","TelemetryEvent","RemoveFromCart","inventoryLbl","inventoryCode","isCustomPriceSelected","CartLineItemComponent","isOutOfStock","isQuantityEditable","quantityOnChange","updateCartLinesQuantitySuccessHandler","primaryImageUrl","isCartStateReady","showShippingChargesForLineItems","pickUpInStore","pickitUpText","remove","addToWishlist","AddToWishlistComponent","showButtonText","showStatusMessage","showRemoveButton","onSuccess","addToOrderTemplate","AddToOrderTemplateComponent","_assembleNode","CartLineGroupItems","getGroupByStorePickup","groupBy","groupDelivery","cartLinesGroup","entries","groupByDeliveryType","cartLines","carLineViewProps","_assembleGroupCartlines","getPromotionData","ctx","promotionData","getPromotionOptionsForCartLineItems","PromotionOptionsForCartLineItems","promotionOptions","exception","Cart","Component","showPromotionDialog","promotionPopupId","promotionLinkClick","promotionCloseButtonclick","_hidePromotionDialog","_getImageSettings","sm","_removeItemFromCartHandler","cartlineToRemove","cartLineIds","removeCartLines","_validateCart","_moveToWishlistSuccessHandler","_updateCartlineQuantity","cartlineToUpdate","newQuantity","updateCartLineQuantity","_fulfillmentStoreIdUpdated","_getOrderQuantityLimitsFeatureFlag","showAvailablePromotions","guestCheckoutUrl","checkoutURL","_getCheckoutURL","isCartEmpty","_getCartLines","RetailMulitplePickupFeatureState","_getCartLinesGroup","Checkout","checkoutBySignInAttributes","GuestCheckout","checkoutByGuestAttributes","backtoShoppingAttributes","hasErrors","cartTitle","CartlinesWrapper","OrderSummaryWrapper","OrderSummaryItems","_getPromoCode","_getPromotions","mulitplePickUpEnabled","orderSummaryTitle","orderSummaryLineitems","_getOrderSummaryLineItems","checkoutAsSignInUserButton","checkoutButtonTitle","checkoutAsGuestButton","guestCheckoutButtonTitle","backToShoppingButton","backToShoppingButtonTitle","createTemplateFromCartButton","_displayAddCartToTemplate","SaveCartToOrderTemplateComponent","_generateAddToOrderTemplateDialogResources","_generateOrderTemplateNameDialogResources","linesAddedToOrderTemplateDialogResources","_generateLinesAddedToOrderTemplateDialogResources","createOrderTemplateFromCartButton","waitingComponent","Waiting","cartLoadingStatus","cartLoadingErrorMessage","cartDataResult","isEmpty","OrderSummaryErrors","_getOrderSummaryErrors","RetailB2BEcommerceFeatureState","showPromotionPopup","promotions","promotionLinkText","promotionPopupHeading","onCloseButtonClick","onSeeAllClick","titleId","promotionMessageWrapper","promotionMessage","Fragment","promotionStringHeading","promotionSeeAllLink","promotionDialog","_promotion","Promotion","OfferName","ModalFooter","cartPromotions","promotionCloseButtonAriaLabel","allErrors","fullError","Wrapper","assertive","outOfStockErrorMessageHeader","header","errors","channelConfiguration","OrderSummary","subTotalLabel","itemsWithCountLabel","shippingLabel","estimatedShippingLabel","otherChargeLabel","otherCharges","taxLabel","estimatedTaxLabel","orderTotalLabel","orderTotal","totalDiscountsLabel","toBeCalculatedText","yetToBeCalculatedText","freeText","PromoCodeComponent","collapseTimeOut","duplicatePromotionErrorText","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","_generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","linesAddedToOrderTemplateHeaderItemsOneText","linesAddedToOrderTemplateHeaderItemsFormatText","linesAddedToOrderTemplateHeaderLinesOneText","linesAddedToOrderTemplateHeaderLinesFormatText","linesAddedToOrderTemplateHeaderMessageText","_generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","CartLineItems","sizeString","colorString","configString","productDimensionTypeConfiguration","styleString","amountString","quantityDisplayString","quantityDisplayText","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","discountStringText","shippingChargesText","shippingCharges","removeCartButtonText","shipInsteadDisplayText","pickItUpDisplayText","changeStoreDisplayText","outOfStockErrorMessage","errorMessageOutOfRangeOneLeft","errorMessageOutOfRangeFormat","showOutOfStockErrors","addToOrderTemplateMessage","addItemToOrderTemplateError","isAbsoluteUrl","RegExp","test","returnURL","origin","retry","AsyncResult","cartResult","cartVersion","Version","validationResult","validateForCheckoutAsync","ValidationFailuresByCartLines","refreshCart","refreshError","validateError","featureStatuses","_renderCarousel","carouselContainer","_renderProduct","_renderGrid","gridContainer","ProductContainer","productComponent","ProductCollectionView","ProductCollectionContainer","SingleSlideCarouselComponentProps","GridComponentProps","isCarousel","getGenericError","failureReason","cartActionResult","elementFoundAt","productIdToFind","availableQty","quantityLimit","getConfigureErrors","isGiftCard","dimensionTypeValue","productDimensionTypeColorErrorMessage","productDimensionTypeConfigurationErrorMessage","productDimensionTypeSizeErrorMessage","productDimensionTypeAmountErrorMessage","productDimensionTypeStyleErrorMessage","getDimensionErrorString","getBuyBoxInventoryLabel","productAvailableQuantity","inventoryClassName","getBuyboxProductTitle","titleHeadingTag","Heading","headingTag","getBuyboxProductDescription","getBuyboxAddToCart","defaultMinimumKeyInPrice","defaultMaximumKeyInPrice","minimumKeyInPrice","maximumKeyInPrice","errorState","configureErrors","quantityError","customAmountError","otherError","errorHost","selectedProduct","isUpdatingDimension","isUpdatingDeliveryOptions","keyInPriceAmount","goToCartText","buyBoxGoToCartText","continueShoppingText","buyBoxContinueShoppingText","headerItemOneText","buyBoxSingleItemText","headerItemFormatText","buyBoxMultiLineItemFormatText","headerMessageText","buyBoxHeaderMessageText","isLoading","changeUpdatingDimension","isLoadingDeliveryOptions","changeUpdatingDeliveryOptions","isEmailDelivery","button","AddToCartComponent","navigationUrl","onError","quantityErrorForState","customAmountErrorForState","otherErrorForState","stockLeft","errorMessageOutOfStock","getQuantityError","formatedAmountLimit","invalidSmallCustomAmountText","invalidLargeCustomAmountText","updateErrorState","missingDimensions","getSelectedProduct","isAddServiceItemToCart","isPriceKeyedIn","customPriceAmount","_isOrderQuantityLimitsFeatureEnabled","errorBlock","BuyboxErrorBlock","showError","getBuyboxProductPrice","getBuyboxProductRating","ratingComponent","reviewsCount","generateAddToOrderTemplateDialogResources","generateOrderTemplateNameDialogResources","generateItemAddedToOrderTemplateDialogResources","generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","getBuyboxProductAddToOrderTemplate","getBuyboxProductAddToWishlist","addToWishlistMessage","removedFromWishlistMessage","addItemToWishlistError","removeItemFromWishlistError","getBuyboxProductQuantity","LabelContainerProps","htmlFor","productQuantityHeading","currentCount","newValue","updateQuantity","getBuyboxShopSimilarLook","ShopSimliarLooks","shopSimilarLooksText","searchURL","getBuyboxKeyInPrice","buyboxKeyInPriceLabelHeading","updateKeyInPrice","Number","parseFloat","errorMessages","values","buyboxErrorMessageHeader","getQuantityLimitsMessages","_renderMaxLabel","maxQuantityText","_renderMinLabel","minQuantityText","MAX_VALUE","getBuyboxFindInStore","findInStoreHeaderText","findInStoreDescriptionText","findInStoreLinkText","descriptionTextToShowAllPickupOptions","retailMulitplePickupMFeatureState","modalOpen","dataProduct","behavior","addToCartBehavior","changeModalOpen","failureResult","findInStoreOnClick","priceComponent","popupProps","productQuantity","setModalOpen","renderModalPopup","Popup","openFindInStoreDialog","productPickupOptionList","modal","Dropdown","selectMenu","_onChanged","selectedIndex","dropdownId","selectId","selectedValue","innerText","dropdownName","current","dropdownList","dropdownToggleName","ref","selected","hidden","getBuyboxProductConfigure","getDropdownName","onChanged","notification","dimensionSelectedAsync","dropdowns","productDimensionFull","_mapProductDimensionFullToDropdownViewProps","dimensionChanged","dropdownCallback","selectDimensionFormatString","toLocaleLowerCase","DimensionValues","select","Buybox","dimensionUpdateQueue","FinitePromiseQueue","buyboxCallbacks","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","_updatePrice","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","reason","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","_getDropdownName","isModalOpen","customPrice","dimensionsToUpdate","clearOtherErrorState","mappedDimensions","_updateDimensionValue","ExtensionProperties","reject","newProduct","getSelectedVariant","SelectedVariantInput","MasterProductId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","getPriceForSelectedVariant","PriceForSelectedVariantInput","RetailMulitplePickupMFeatureState","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","_updateQuantitiesInState","newValueId","PRODUCTASSERVICE","mediaGallery","ModuleProps","ProductInfoContainerProps","MediaGalleryContainerProps","configure","findInStore","addToCart","rating","hideRating","inventoryLabel","shopSimilarLook","enableShopSimilarLooks","keyInPrice","enableKeyInPrice","quantityLimitsMessages","DefaultQuantity","MinimumQuantity","information","handleCheckoutOrderConfirmationHeadingChange","OrderDetails","handleOrderDetailsHeadingChange","noSalesOrderDetailsText","addressOptions","showFullAddress","channels","salesLInput","ProductCollection","trace","allowBackNavigation","breaCrumbType","breadcrumbType","allowBack","ProductComponent","ratingAriaLabel","_getActivePrice","productRecIds","prod","projectDomain","CatalogId","catalogId","affliations","customerInput","GetCustomerInput","getCustomer","CustomerAffiliations","affliation","aff","AffiliationId","RetailAffiliationId","AccountNumber","getActivePricesAsync","activePricesResponse","productPrices","activePrice","Price","TradeAgreementPrice","AdjustedPrice","Error","productCollection","enableAffiliationBasedPricing","layout","headingComponent","productCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","GetSalesOrderHistoryWithHydrationsInput","paging","filterState","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","OrderHistoryFilterState","CurrentUser","getSalesOrderHistoryWithHydrationsAction","salesOrders","getOrderShipmentsHistoryAsync","Paging","Top","top","Skip","skip","OrganizationWide","queryResultSetting","getOrganizationWideOrderHistory","GetOrganizationWideOrderHistoryInput","getOrganizationWideOrderShipmentHistory","productIdsByChannelId","currentChannelId","productIdsByChannel","orderProductId","orderChannelId","splitProductsByChannelId","getProductsPromise","entryChannelId","entryProductIdsList","productIds","productInputs","ProductInput","getSimpleProducts","getProducts","getProductsCall","all","productList","memo","list","createObservableDataAction","action","CartView","renderModuleAttributes","cartEmptyText","emptyCartText","orderSummaryLines","otherCharge","totalDiscounts","_renderOrderSummarylines","errorData","_renderAddToCart","_renderAddToOrderTemplate","_renderAddToWishlist","_renderConfigure","_renderConfigureDropdown","_renderSocialShare","socialShare","dropdown","_renderFindInStore","_renderQuantity","_renderKeyInPrice","_renderShopSimilarItem","shopSimilarItem","BuyboxView","VideoPlayerView","moduleComponentProps","shipments","isCurrentChannel","imageOnly","_product","shipment","_shipment","ShipmentLines","_shipmentLine","getSalesLine","Shipments","getSalesOrder","detailsAriaLabel","detailsLabel","salesOrderProps","TransactionId","orderDetailsAttributes","orderDetailsLink","_getorderDetailsPageUrl","form","SearchForm","FormWrapper","submitBtn","cancelBtn","_renderKeywordSuggestions","KeywordSuggest","UlKeyword","keywordSuggestions","_renderProductSuggestions","ProductSuggest","UlProduct","productSuggestions","LiProduct","AProduct","_renderCategorySuggestions","CategorySuggest","UlCategory","categorySuggestions","SearchView","Search","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","searchText","AutoSuggest","autosuggestCategory","autosuggestKeyword","autosuggestProduct","getOrderHistoryFilterStateResources","orderHistoryFilterYourOrderHistory","orderHistoryFilterOrganizationWide","OrderHistoryFilterComponent","msdyn365Commerce","createComponent","component","IsB2bAdmin","popoverRef","createRef","popoverState","setPopoverState","useState","togglePopover","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","EnumExtensions","getEnumValues","onStateClick","stateStringRepresentation","renderFilterStateItem","salesLineQuantityText","phoneAriaLabel","buyItAgainLabel","buyItAgainAriaLabel","orderStatusReadyForPickup","orderStatusProcessing","orderStatusShipped","orderStatusPickedUp","orderStatusCanceled","orderStatusEmailed","pickedUpSalesLines","deliveredSalesLines","carryOutSalesLines","emailSalesLines","trackingLabel","trackingAriaLabel","trackingComingSoonLabel","pickupDateTimeslotText","pickupTimeslotPlaceHolder","salesStatusStringMap","canceled","readyForPickup","pickedUp","shipped","unknown","emailed","deliveryTypeStringMap","pickUp","ship","carryOut","email","pickupMode","getPickupModeDesc","getPickupDeliveryMode","getSalesStatusCode","SalesStatusValue","salesStatusString","salesStatusComp","deliveryTypeString","getdeliveryTypeString","deliveryTypeClass","getdeliveryTypeClassName","storePickUp","getStoreName","deliveryTypeComp","TrackingUrl","TrackingNumber","BuyItAgain","buyItAgainAttributes","fallbackImageUrl","canShowTimeslot","PickupTimeslotStartDateTime","PickupTimeslotEndDateTime","getDateTimeslot","pickupDateTimeslotInfo","isSalesLine","salesLineDeliveryMode","retailMultiplePickupOption","dM","deliveryO","deliveryDesc","Label","CreateOrderTemplateButton","createOrderTemplateDialogOpen","setOrderTemplateNameDialogOpen","createOrderTemplateText","OrderTemplateNameDialog","isUpdateDialog","onCancel","onOrderTemplateCreated","OrderTemplateList","_reloadPage","reload","_onRemoveFromOrderTemplateList","productListId","p","deleteAsync","headerStatusMessage","deleteOrderTemplateFailedText","emptyOrderTemplateText","createNewTemplateButtonText","orderTemplatesData","orderTemplateListTitle","createOrderTemplateButton","CreateNewTemplateButtonComponent","templateHeaderStatusMessage","OrderTemplates","OrderTemplate","_renderOrderTemplateList","currentTemplateProps","addToBagButtonText","closeWindowButtonText","addToCartFailureMessage","addToCartSuccessMessage","addToCartProcessMessage","linesAddedToCartDialogResources","viewCartButtonText","orderTemplateCloseButtonText","linesAddedToCartHeaderItemsOneText","linesAddedToCartHeaderLinesOneText","linesAddedToCartHeaderLinesFormatText","linesAddedToCartHeaderMessageText","SocialShareItemView","_renderItem","WishlistItemsView","OrderConfirmationOrderInfomation","OrderConfirmationSalesLine","OrderConfirmationGroupDelivery","OrderConfirmationGroup","OrderConfirmationGroups","OrderConfirmationOrderSummary","OrderConfirmationPayment","OrderConfirmationHelp","OrderConfirmationView","OrderHistoryOrderInfomation","OrderHistoryGroupDelivery","OrderHistoryGroup","OrderHistoryGroups","OrderHistoryHeader","headerProps","orderCountLabel","extraActions","OrderHistorySalesOder","OrderHistoryList","listProps","OrderHistoryView","orderHistoryProps","emptyMessage","moreButton","histogramItem","RatingsHistogramView","statusValue","placeHolder","startDate","endDate","date","DateTimeFormat","timeZone","timeslotformatter","hour","minute","hour12","timeslot","parsedProductAttributes","getInstance","wineClub","wineClubSetup","ids","club","variants","variant","itemId","wineClubIds","emitAnalyticsEvent","orderHydration","_setProductAttributes","_generatePurchaseAnalyticsEvent","entry","isSubscription","ext","Key","subscription","discounts","NetAmount","toFixed","publish","revenue","affiliation","fakeCartLines","getAttributesForCart","tenderType","OperationId","getSalesLinesByDelivery","flatGroup","getGroupBySalesStatusCode","groupBySalesStatusCode","getGroupByAddressId","addressId","groupByAddressId","TrackingId","getGroupByTrackingId","trackingId","groupByTrackingId","SearchState","observable","AutoSuggestInput","suggestionType","hitPrefix","hitSuffix","searchQuery","topResultsCount","_getAutoSuggest","autosuggest","searchCriteria","ProductSearchCriteria","SearchCondition","Context","HitPrefix","HitSuffix","SuggestionType","searchSuggestions","getSearchSuggestionsAsync","ImageUrl","generateImageUrl","AllSearchResults","autoSuggestPromises","inputData","KeywordSuggestionsComponent","suggestions","_generateLink","_getHighlightedText","suggestion","searchPageURL","searchQsp","formattedLink","route","formattedText","dangerouslySetInnerHTML","getRichTextHtml","ProductSuggestionsComponent","autoSuggestProps","productSuggestionHeading","moduleType","_renderTitle","productAutoSuggestionHeading","_renderThumbnail","Value3","DecimalValue","_getLiWrapper","_getAWrapper","recid","getProductPageUrlSync","adjustedPrice","basePrice","CategorySuggestionsComponent","categorySuggestionHeading","categoryAutoSuggestionHeading","splitValue","split","pop","_getCategoryLink","searchRefiners","urlPath","categoryRefiners","refiners","KeyName","refiner","Values","RefinerRecordId","parseInt","encodedRefiner","encodeURIComponent","compressRefiners","compressedRefinerKeys","compressedRefiners","compressedRefiner","refinerKey","FormComponent","searchPlaceholder","hideSearchLabel","isSearchFormExpanded","searchTextInput","handleInputChange","maxChars","disableSubmitSearch","handleCancelSearchChange","query","ariaLabelCancel","ariaLabelSearch","ariaLabelSubmit","onInputChange","inputNode","maxLength","submitBtnNode","searchLabelClass","searchLabelArialLabel","searchtext","searchCollapsedLabel","waitTime","_focusOutTarget","closest","_clearAutoSuggestState","_keyup","formReference","contains","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","createSearchStateInput","_handleInputChange","cancellabelDebounce","cancel","getSearchSuggestionsAction","_getSuggestionType","inputSuggestionType","results","_getSearchRefiners","autoSuggestAriaLabel","_setAutoSuggestResultCount","setTimeout","suggestionTypes","distinctSuggestionTypes","suggestionTypeItem","charAt","toUpperCase","_handleSubmit","focus","_appendQueryParams","_handleCancelSearchChange","isInitialState","qsp","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","setAttribute","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","searchInputMaxLength","suggestionTypeCriterion","searchFormClass","body","componentDidUpdate","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","autoComplete","getProductSearchRefinersAsync","OrderTemplateListView","_renderOrderTemplate","OrderHistory","handleOrderHistoryHeadingChange","onMoreButtonClick","getOrderHistory","renderExtraActions","initState","orderHistory","viewState","isShowMoreButton","pageSize","ex","response","noOrderHistoryLable","moreButtonText","ordersCountLabel","_orderCountLabel","ViewMore","viewMoreAttributes"],"mappings":"ooBAaM,MAAOA,UAAwBC,YACjCC,YAAYC,GACRC,MAAMD,GAGHE,SACH,OAAkD,OAA9CC,KAAKH,MAAMI,aAAaC,kBACjBP,4BAGPA,uBAAKQ,UAAU,+BACVH,KAAKI,aACLJ,KAAKK,YAKM,mBACpB,MAAMC,EAAWN,KAAKH,MAAMI,aAAaM,aAEzC,IACIC,EACAC,EAFAC,EAAU,UAGd,GAAiB,WAAbJ,EAAuB,CACvBI,EAAU,SACV,MACMC,GADYX,KAAKH,MAAMe,iBAAiBC,QAAQC,IAAIC,OAAOC,yBAAsD,IACpFC,KAAKC,GAAYA,EAASC,KAAOnB,KAAKH,MAAMI,aAAamB,kBACxFT,IACAH,EAAqBG,EAAiBU,KACtCZ,EAAwBE,EAAiBW,SAIjD,OACI3B,gBAACA,WAAc,KACXA,uBAAKQ,UAAU,yCACXR,wBAAMQ,UAAU,qCAAmC,oBACnDR,wBAAMQ,UAAU,qCAAqCO,IAGxC,WAAbJ,GACIX,uBAAKQ,UAAU,6CACXR,wBAAMQ,UAAU,qCAAmC,eACnDR,wBAAMQ,UAAU,oFAAoFK,EAApG,OACAb,wBAAMQ,UAAU,uFAAuFM,KAQzG,iBAClB,OACId,uBAAKQ,UAAU,mDACXR,wBAAMQ,UAAU,qCAAmC,oBACnDR,wBAAMQ,UAAU,qCAERH,KAAKH,MAAMI,aAAasB,UAAY,KAAO,SCnD5D,MAAMC,EAA2H,QAAC,sBACrIC,EADqI,QAErIC,EAFqI,YAGrIC,EAHqI,MAIrIC,EAJqI,OAKrIC,EALqI,mBAMrIC,EANqI,YAOrIC,EAPqI,eAQrIC,EARqI,gBASrIC,EATqI,MAUrIpC,GAVoI,SAYpIF,gBAACuC,OAAIC,iBAAKV,GACL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,KAAKmL,sBAInCygD,WAAYuN,GACRx5D,gBAAC+L,SAAMvJ,eAAChC,UAAS,qCAAgCusC,EAAY,UAAY,KAAUktB,EAAkB,CAAEhuD,SAAU8gC,EAAW/gC,QAAS3L,KAAK64D,oBACrIW,KAKNx5D,KAAKH,MAAMmQ,WAAW2J,KA7HrB0J,sBAAX+rC,KAAW,mCACA/rC,sBAAX+rC,KAAW,gCAFVuJ,EAAY,sBADjB96C,KACK86C,GA2MSA","file":"static/js/8.5066d7b0f97e6173f0e3.chunk.js","sourcesContent":["import * as React from 'react';\r\nimport { wineClubPickupLocations } from '../../../settings/app.settings';\r\nimport { WineClubDataRef } from '../../wine-club-signup/wine-club-data';\r\nimport { IOrderDetailsViewProps } from '../smwe-order-details';\r\n\r\nexport interface IWineClubDetailsProps {\r\n orderDetailProps: IOrderDetailsViewProps;\r\n wineClubData: WineClubDataRef;\r\n}\r\n\r\n/**\r\n * renders wine club details ONCE, and wipes\r\n */\r\nexport class WineClubDetails extends React.Component {\r\n constructor(props: IWineClubDetailsProps) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element {\r\n if (this.props.wineClubData.variantPreference === null) {\r\n return
;\r\n }\r\n return (\r\n
\r\n {this._shipTypeJSX}\r\n {this._isGiftJSX}\r\n
\r\n );\r\n }\r\n\r\n private get _shipTypeJSX(): JSX.Element {\r\n const shipType = this.props.wineClubData.deliveryType;\r\n\r\n let display = 'Ship To';\r\n let pickupLocationName: string | undefined;\r\n let pickupLocationAddress: string | undefined;\r\n if (shipType === 'PICKUP') {\r\n display = 'Pickup';\r\n const locations = this.props.orderDetailProps.context.app.config.wineClubPickupLocations as wineClubPickupLocations || [];\r\n const selectedLocation = locations.find(location => location.id === this.props.wineClubData.pickupLocationId);\r\n if (selectedLocation) {\r\n pickupLocationName = selectedLocation.name;\r\n pickupLocationAddress = selectedLocation.address;\r\n }\r\n }\r\n\r\n return (\r\n \r\n
\r\n Delivery Method:\r\n {display}\r\n
\r\n {\r\n shipType === 'PICKUP' && (\r\n
\r\n Deliver To:\r\n {pickupLocationName} at\r\n {pickupLocationAddress}\r\n
\r\n )\r\n }\r\n
\r\n );\r\n }\r\n\r\n private get _isGiftJSX(): JSX.Element {\r\n return (\r\n
\r\n Gift Membership:\r\n \r\n {\r\n this.props.wineClubData.forMyself ? 'No' : 'Yes'\r\n }\r\n \r\n
\r\n );\r\n }\r\n\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport {\r\n IGroup,\r\n IGroupDelivery,\r\n IGroups,\r\n IHelp,\r\n IOrderInformation,\r\n IOrderSummary,\r\n IPaymentMethods,\r\n ISalesLine\r\n} from '@msdyn365-commerce-modules/order-management';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { WineClubDetails } from './components/wine-club-details';\r\nimport { IOrderDetailsViewProps } from './smwe-order-details';\r\n\r\nexport const OrderDetailsOrderInfomation: React.FC = ({\r\n orderInformationProps,\r\n salesId,\r\n createdDate,\r\n count,\r\n amount,\r\n channelReferenceId,\r\n channelName,\r\n channelAddress,\r\n isWineClubOrder,\r\n props\r\n}) => (\r\n \r\n {channelName}\r\n {channelAddress}\r\n {channelReferenceId}\r\n {salesId}\r\n {createdDate}\r\n {count}\r\n {amount}\r\n {isWineClubOrder && props && WineClubDetailsRender(props)}\r\n \r\n);\r\n\r\nexport const OrderDetailsSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\r\n \r\n {salesLine}\r\n {buyAgainButton}\r\n \r\n);\r\n\r\nexport const OrderDetailsGroupDelivery: React.FC = ({ deliveryProps, heading, count, address, trackingInfo, isWineClubOrder }) => {\r\n return (\r\n \r\n {heading}\r\n {count}\r\n {address}\r\n {trackingInfo}\r\n \r\n );\r\n};\r\n\r\nexport const OrderDetailsGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines, isWineClubOrder }) => (\r\n \r\n {delivery && }\r\n {salesLines && (\r\n \r\n {salesLines.map(salesLine => (\r\n \r\n \r\n {salesLine.salesStatus}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n);\r\n\r\nexport const OrderDetailsGroups: React.FC = ({ groupsProps, groups, isWineClubOrder, isWineClubPickup }) => (\r\n \r\n {groups.map((group, index) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nexport const OrderDetailsOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\r\n \r\n {heading}\r\n {subtotal}\r\n {shipping}\r\n {tax}\r\n {totalAmount}\r\n {earnedPoints}\r\n \r\n);\r\n\r\nexport const OrderDetailsPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\r\n \r\n {title}\r\n {methods}\r\n \r\n);\r\n\r\nexport const OrderDetailsHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\r\n \r\n {needHelpLabel}\r\n {helpLineNumberLabel}\r\n {contactNumber}\r\n \r\n);\r\n\r\nexport const WineClubDetailsRender = (props: IOrderDetailsViewProps) => {\r\n return ;\r\n};\r\n\r\nconst OrderDetailsView: React.FC = (props) => {\r\n const {\r\n moduleProps,\r\n heading,\r\n alert,\r\n loading,\r\n orderInfomation,\r\n orderSummary,\r\n payment,\r\n help,\r\n groups,\r\n isWineClubOrder,\r\n isWineClubPickup\r\n } = props;\r\n\r\n return (\r\n \r\n {heading}\r\n {alert}\r\n {loading}\r\n {orderInfomation && }\r\n {groups && }\r\n {orderSummary && }\r\n {payment && }\r\n {help && }\r\n \r\n );\r\n};\r\n\r\nexport default OrderDetailsView;\r\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { PriceComponent } from '@msdyn365-commerce/components';\n\nimport * as React from 'react';\nimport { IGetOrderSummaryInput, IOrderSummary, IPriceContext } from '../../../common/';\n\ninterface ISummaryLineProps {\n priceContext?: IPriceContext;\n name: string;\n label: string;\n value?: number;\n}\n\nconst OrderSummaryLine: React.SFC = ({ name, label, value = 0, priceContext }) => (\n

\n {label}\n {priceContext ? (\n \n ) : (\n {value}\n )}\n

\n);\n\nexport const getOrderDetailsOrderSummary = ({\n order,\n priceContext,\n earnedPoints,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n orderSummaryGrandTotalLabel,\n pointsEarnedLabel\n },\n canShip\n}: IGetOrderSummaryInput): IOrderSummary => {\n return {\n orderSummaryProps: { className: 'ms-order-details__order-summary' },\n heading:

{orderSummaryHeading}

,\n subtotal: (\n \n ),\n shipping: canShip ? (\n \n ) : '',\n tax: ,\n totalAmount: (\n \n ),\n earnedPoints: earnedPoints ? : undefined\n };\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ChannelIdentity, OrderShipments, OrgUnitLocation, SalesOrder } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\nimport * as React from 'react';\nimport { countItems, IModuleComponentProps, IPriceContext } from './utilities';\n\nexport interface IOrderInformationInputResources {\n receiptEmailMessage?: string;\n orderItemLabel: string;\n orderItemsLabel: string;\n processingLabel: string;\n orderIdLabel: string;\n receiptIdLabel: string;\n confirmationIdLabel: string;\n trackingLabel: string;\n trackingAriaLabel: string;\n trackingComingSoonLabel: string;\n posChannelNameText?: string;\n onlineStoreChannelNameText?: string;\n orderPlacedOnLabel?: string;\n}\nexport interface IOrderInformationInput {\n moduleName: string;\n channelReferenceId?: string;\n channelName?: string;\n channelAddress?: string;\n showChannelInfo?: boolean;\n receiptEmail?: string;\n createdDate?: string;\n amount?: number;\n priceContext: IPriceContext;\n salesId?: string;\n receiptId?: string;\n hasTrackingInfo?: boolean;\n count?: number;\n resources: IOrderInformationInputResources;\n isSalesInvoice?: boolean;\n}\n\nexport interface IOrderInformation {\n orderInformationProps: INodeProps;\n channelName: React.ReactNode;\n channelAddress: React.ReactNode;\n salesId: React.ReactNode;\n receiptId: React.ReactNode;\n receiptEmail: React.ReactNode;\n createdDate: React.ReactNode;\n count: React.ReactNode;\n amount: React.ReactNode;\n channelReferenceId: React.ReactNode;\n}\n\nexport const getOrderInformation = ({\n moduleName,\n channelReferenceId,\n channelName,\n channelAddress,\n showChannelInfo,\n receiptEmail,\n createdDate,\n amount,\n priceContext,\n salesId,\n receiptId,\n count,\n resources: { receiptEmailMessage, orderItemLabel, orderItemsLabel, orderIdLabel, receiptIdLabel, confirmationIdLabel, posChannelNameText, onlineStoreChannelNameText, orderPlacedOnLabel },\n isSalesInvoice\n}: IOrderInformationInput): IOrderInformation => ({\n orderInformationProps: { className: `${moduleName}__order-information` },\n channelName: showChannelInfo && channelName && (\n channelAddress ? {`${posChannelNameText} ${channelName}`}\n : {onlineStoreChannelNameText}),\n channelAddress: showChannelInfo && channelAddress && {channelAddress},\n salesId: salesId ? {`${orderIdLabel} ${salesId}`} : '',\n receiptId: receiptId ? {`${receiptIdLabel} ${receiptId}`} : '',\n receiptEmail: receiptEmail && (\n \n {receiptEmailMessage}\n {receiptEmail}\n \n ),\n createdDate: !isSalesInvoice && createdDate && {orderPlacedOnLabel} {createdDate},\n count: !isSalesInvoice && count !== undefined && count > 0 && (\n \n {count === 1 ? `${count} ${orderItemLabel}` : `${count} ${orderItemsLabel}`}\n \n ),\n amount: !isSalesInvoice && (amount || amount === 0) && (\n \n ),\n channelReferenceId: channelReferenceId && (\n {`${confirmationIdLabel} `}{channelReferenceId}\n )\n});\n\ninterface IProps extends IModuleComponentProps {\n resources: IOrderInformationInputResources;\n}\n\nexport const getOrderInfomationInput = (\n props: IProps,\n moduleName: string,\n order: SalesOrder | OrderShipments,\n priceContext: IPriceContext,\n channelIdentities?: ChannelIdentity[],\n orgUnitLocations?: OrgUnitLocation[],\n showChannelInfo?: boolean,\n isSalesInvoice?: boolean\n): IOrderInformationInput => {\n const {\n resources,\n context: {\n request: {\n apiSettings: { channelId }\n }\n }\n } = props;\n\n // @ts-ignore OrderShipments doesnt has ChannelId\n const showTrackingInfo = !!order.ChannelId && order.ChannelId === channelId;\n\n const locale = get(props, 'context.request.locale') || 'en-US';\n const count = order.SalesLines && order.SalesLines.length ? countItems(order.SalesLines) : 0;\n\n const orderChannel = channelIdentities ? channelIdentities.filter(channel => { return channel.RecordId === order.ChannelId; }) : '';\n const orderOrgUnitLocation = orgUnitLocations ? orgUnitLocations.filter(location => { return location.ChannelId === order.ChannelId; }) : '';\n\n return {\n moduleName: moduleName,\n createdDate: (order.CreatedDateTime && new Date(order.CreatedDateTime).toLocaleDateString(locale)) || '',\n salesId: order.SalesId,\n receiptId: order.ReceiptId,\n showChannelInfo: showChannelInfo,\n // @ts-ignore OrderShipments doesnt has ReceiptEmail\n receiptEmail: order.ReceiptEmail,\n channelReferenceId: order.ChannelReferenceId,\n channelName: orderChannel && orderChannel.length > 0 ? orderChannel[0].Name : '',\n channelAddress: orderOrgUnitLocation && orderOrgUnitLocation.length > 0 ? orderOrgUnitLocation[0].Address : '',\n amount: order.TotalAmount || 0,\n priceContext: priceContext,\n count,\n resources,\n isSalesInvoice\n };\n};\n","import * as React from 'react';\n\nimport { Button, format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Coupon } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\n\nexport interface IPromoCodeProps extends IComponentProps<{}> {\n cart: ICartState | undefined;\n promoCodeHeadingText: string;\n appliedPromoCodeHeadingText: string;\n removePromoAriaLabelFormat: string;\n promoPlaceholderText: string;\n promoCodeApplyButtonText: string;\n collapseTimeOut: number;\n removePromoText: string;\n invalidPromoCodeErrorText: string;\n failedToAddPromoCodeErrorText: string;\n duplicatePromoCodeErrorText: string;\n failedToRemovePromoCodeErrorText: string;\n /** The telemetry content */\n telemetryContent?: ITelemetryContent;\n promoCodeApplyCallback?(): void;\n}\n\ninterface IPromoCodeState {\n isCollapseOpen: boolean;\n promoCodeInputValue: string;\n error: string;\n canApply: boolean;\n}\n\n/**\n *\n * The PromoCode component renders the promocode section.\n * @extends {React.PureComponent}\n */\nclass PromoCode extends React.Component {\n\n private payLoad: IPayLoad;\n\n constructor(props: IPromoCodeProps, state: IPromoCodeState) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, TelemetryConstant.ApplyPromoCode);\n this.state = {\n isCollapseOpen: false,\n promoCodeInputValue: '',\n error: '',\n canApply: false\n };\n }\n\n public render(): JSX.Element {\n return (\n
\n
{this.props.promoCodeHeadingText}
\n {this._renderForm(this.props.promoPlaceholderText, this.props.promoCodeApplyButtonText, this.props.cart)}\n

{this.state.error}

\n {this._renderAppliedPromoCode(this.props)}\n
\n );\n }\n\n private _onInputChange = (e: React.ChangeEvent) => {\n const error = e.target.value === '' ? '' : this.state.error;\n this.setState({\n promoCodeInputValue: e.target.value, error: error,\n canApply: e.target.value ? true : false\n });\n }\n\n private _applyPromotion = (cartState: ICartState | undefined) => {\n if (!cartState || !cartState.cart) {\n return;\n }\n const appliedPromo = this.state.promoCodeInputValue;\n\n cartState.addPromoCode({ promoCode: appliedPromo })\n .then(result => {\n if (result.status === 'SUCCESS') {\n // show success text\n this.setState({ promoCodeInputValue: '', error: '', canApply: false});\n } else if (result.substatus === 'ALREADYADDED') {\n this.setState({ error: this.props.duplicatePromoCodeErrorText });\n } else {\n this.setState({ error: this.props.invalidPromoCodeErrorText });\n }\n })\n .catch(error => {\n this.setState({ error: this.props.failedToAddPromoCodeErrorText });\n });\n }\n\n private _renderForm = (promoPlaceholderText: string, promoCodeApplyButtonText: string, cartState: ICartState | undefined) => {\n const _onSubmit = (event: React.FormEvent) => {event.preventDefault(); this._applyPromotion(cartState);};\n const _applyPromotion = (event: React.MouseEvent) => {this._applyPromotion(cartState);};\n const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
\n
\n \n \n {promoCodeApplyButtonText}\n \n
\n
\n );\n }\n\n private _removePromotion = (cartState: ICartState | undefined, event: React.MouseEvent) => {\n if (!cartState) {\n return;\n }\n const code = event.currentTarget.getAttribute('data-value') || '';\n cartState.removePromoCodes({\n promoCodes: [\n code\n ]\n })\n .then(result => {\n if (result.status === 'SUCCESS') {\n this.setState({ error: ''});\n }\n })\n .catch(() => {\n this.setState({ error: this.props.failedToRemovePromoCodeErrorText});\n });\n\n }\n private _calculateDiscount = (code: string, cartState: ICartState | undefined) => {\n if (!cartState || !cartState.cart || !cartState.cart.CartLines || cartState.cart.CartLines.length === 0 || !code) {\n return;\n }\n let discountAmount = 0;\n for (const line of cartState.cart.CartLines) {\n if (line.DiscountLines) {\n for (const discountLine of line.DiscountLines) {\n if (discountLine.DiscountCode === code) {\n discountAmount += discountLine.DiscountCost!;\n }\n }\n }\n }\n return discountAmount * -1;\n }\n\n private _renderAppliedPromoCode = (props: IPromoCodeProps) => {\n if (!props.cart || !props.cart.cart || !props.cart.cart.Coupons || !(props.cart.cart.Coupons.length > 0)) {\n return;\n }\n\n const _removePromotion = (event: React.MouseEvent) => {this._removePromotion(props.cart, event);};\n\n const promoCodTotalDiscount = props.cart.cart.Coupons.reduce(\n (count: number, coupon: Coupon) => {\n return count + (this._calculateDiscount(coupon.Code || '', props.cart) || 0);\n },\n 0);\n\n return (\n <>\n
\n
{this.props.appliedPromoCodeHeadingText}
\n \n
\n {\n props.cart.cart.Coupons.map((coupon: Coupon) => {\n const ariaLabel = props.removePromoAriaLabelFormat ? format(props.removePromoAriaLabelFormat, props.removePromoText, coupon.Code) : '';\n\n return (\n
\n
\n {coupon.Code} (\n )\n
\n \n {props.removePromoText}\n \n
\n );\n })\n }\n \n );\n }\n}\n\nexport default PromoCode;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n \n \n { props.MobileMenuHeader }\n {_renderReactFragment(props.menuBar)}\n \n { props.accountLinks ? props.accountLinks.map(link => link) : false }\n { props.siteOptions }\n { props.wishListIconMobile }\n { props.signInLink }\n { props.signOutLink }\n \n \n \n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks,\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n { accountLinks ? accountLinks.map(link => link) : false }\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n props.context.telemetry.error('Header content is empty, module wont render.');\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n \n {items && items.length\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;","export * from './get-help';\nexport * from './get-order-summary';\nexport * from './get-payment-methods';","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { SocialMedia, SocialMediaComponent } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\nimport { ISocialShareItemConfig, ISocialShareItemProps, socialMedia } from './social-share-item.props.autogenerated';\n\nexport interface ISocialShareItemViewProps extends ISocialShareItemProps {\n SocialShareItemElement: React.ReactNode | null;\n SocialShareItem: IModuleProps;\n}\n\n/**\n *\n * SocialShareItem component\n * @extends {React.PureComponent>}\n */\nclass SocialShareItem extends React.PureComponent> {\n constructor(props: ISocialShareItemProps) {\n super(props);\n\n this._getSocialShareItem = this._getSocialShareItem.bind(this);\n }\n\n public render(): JSX.Element | null {\n const viewprops = {\n ...this.props,\n SocialShareItem: {\n moduleProps: this.props,\n className: 'ms-social-share-item'\n },\n SocialShareItemElement: this._getSocialShareItem()\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n\n private _getSocialShareItem(): React.ReactNode | null {\n const src = this.props.config.icon;\n if (MsDyn365.isBrowser) {\n switch (this.props.config.socialMedia) {\n case socialMedia.facebook:\n return ;\n case socialMedia.twitter:\n return ;\n case socialMedia.pinterest:\n return ;\n case socialMedia.linkedin:\n return ;\n case socialMedia.mail:\n return ;\n default:\n return null;\n }\n }\n return null;\n }\n}\n\nexport default SocialShareItem;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport {\r\n IGroup,\r\n IGroupDelivery,\r\n IGroups,\r\n IOrderDetailsViewProps,\r\n IOrderInformation,\r\n IOrderSummary,\r\n IPaymentMethods,\r\n ISalesLine\r\n} from '@msdyn365-commerce-modules/order-management';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\r\nimport * as React from 'react';\r\nimport { brandCodeParser } from '../../../Utilities/brand-code-parser';\r\n\r\nexport const OrderDetailsOrderInfomation: React.FC = ({\r\n orderInformationProps,\r\n salesId,\r\n createdDate,\r\n channelReferenceId,\r\n count\r\n}) => (\r\n \r\n {salesId}\r\n {createdDate}\r\n {channelReferenceId}\r\n {count}\r\n \r\n);\r\n\r\nexport const OrderDetailsSalesLine: React.FC<{line: ISalesLine; context: ICoreContext}> = ({ line: { salesLineProps, salesLine, buyAgainButton, data }, context }) => {\r\n const brandCode = brandCodeParser({ description: data.product.Description, appContext: context });\r\n return (\r\n \r\n {brandCode &&
{brandCode}
}\r\n {salesLine}\r\n {buyAgainButton}\r\n
\r\n );\r\n};\r\n\r\nexport const OrderDetailsGroupDelivery: React.FC = ({ deliveryProps, address, trackingInfo }) => (\r\n \r\n {address}\r\n {trackingInfo}\r\n \r\n);\r\n\r\nexport const OrderDetailsGroup: React.FC<{group: IGroup; context:ICoreContext}> = ({ group: { groupProps, delivery, salesLinesProps, salesLines }, context }) => (\r\n \r\n {delivery && }\r\n {salesLines && (\r\n \r\n {salesLines.map(salesLine => (\r\n \r\n \r\n \r\n ))}\r\n \r\n )}\r\n \r\n);\r\n\r\nexport const OrderDetailsGroups: React.FC<{groups: IGroups; context: ICoreContext}> = ({ groups: { groupsProps, groups }, context }) => (\r\n \r\n {groups.map((group, index) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nexport const OrderDetailsOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount }) => (\r\n \r\n {heading}\r\n {subtotal}\r\n {shipping}\r\n {tax}\r\n {totalAmount}\r\n \r\n);\r\n\r\nexport const OrderDetailsPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\r\n \r\n {title}\r\n {methods}\r\n \r\n);\r\n\r\nconst OrderDetailsView: React.FC = ({\r\n moduleProps,\r\n alert,\r\n loading,\r\n orderInfomation,\r\n orderSummary,\r\n payment,\r\n groups,\r\n context\r\n}) => {\r\n return (\r\n \r\n {alert}\r\n {loading}\r\n {orderInfomation && }\r\n
\r\n {groups && }\r\n
\r\n
\r\n
\r\n {groups && }\r\n {payment && }\r\n
\r\n
\r\n {orderSummary && }\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default OrderDetailsView;\r\n","import { getFallbackImageUrl, getProductUrlSync, OrderTemplate, OrderTemplateLine } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { AddOrderTemplateToCartComponent, ILinesAddedToCartDialogResources } from '@msdyn365-commerce/components';\nimport { getUrlSync, ICoreContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport * as React from 'react';\nimport { IOrderTemplateActionMessageState } from '../order-template-list';\n\nexport interface ISingleOrderTemplateProps extends ProductList {\n orderTemplateState: IOrderTemplateActionMessageState;\n name?: string;\n orderTemplate: OrderTemplate;\n context: ICoreContext;\n imageSettings?: IImageSettings;\n enableImageProductLink?: boolean;\n removeFromOrderTemplateListText: string;\n addToBagText: string;\n index: number;\n itemKey: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n handlers: {\n onRemoveOrderTemplate(id: string): void | undefined;\n onDismiss(): void;\n };\n resources: {\n closeWindowButtonText: string;\n addToCartFailureMessage: string;\n addToCartSuccessMessage: string;\n addToCartProcessMessage: string;\n linesAddedToCartDialogResources: ILinesAddedToCartDialogResources;\n };\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface ISingleOrderTemplateViewProps {\n key: string;\n orderTemplateImage: React.ReactNode;\n addToCartButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n orderTemplateStatusMessage?: React.ReactNode;\n orderTemplateName?: React.ReactNode;\n orderTemplateAriaLabel?: string;\n orderTemplateHeaderDivider?: React.ReactNode;\n}\n\nconst _removeItemFromOrderTemplateList = (props: ISingleOrderTemplateProps): void => {\n const { onRemoveOrderTemplate } = props.handlers;\n const { itemKey } = props;\n\n onRemoveOrderTemplate && itemKey && onRemoveOrderTemplate(itemKey);\n};\n\nconst OrderTemplateActions = {\n removeOrderTemplate: _removeItemFromOrderTemplateList,\n};\n\nexport const OrderTemplateRender = (input: ISingleOrderTemplateProps): ISingleOrderTemplateViewProps | null => {\n const { Id, orderTemplate, removeFromOrderTemplateListText, orderTemplateState, handlers, name, imageSettings, context, telemetryContent, enableImageProductLink } = input;\n\n if (!Id) {\n return null;\n }\n\n const _getOrderTemplatePageUrl = (): string => {\n const url = getUrlSync('ordertemplate', context.actionContext) || '';\n const separator = url.includes('?') ? '&' : '?';\n if (Id) {\n return `${url}${separator}id=${Id}`;\n } else {\n return '';\n }\n };\n\n const removeOrderTemplateAction = (event: React.MouseEvent) => { return OrderTemplateActions.removeOrderTemplate(input); };\n const { onDismiss } = handlers;\n\n return {\n key: `${Id}-template`,\n orderTemplateImage: _renderOrderTemplateImages(context, orderTemplate.orderTemplateLines, imageSettings, enableImageProductLink),\n orderTemplateAriaLabel: _renderAriaLabel(input),\n orderTemplateName:\n (\n
\n \n
{orderTemplate.totalLines} line items
\n
\n
\n ),\n addToCartButton:\n (\n
\n \n
\n ),\n removeButton:\n (\n \n ),\n orderTemplateStatusMessage: orderTemplateState && orderTemplateState.isOpen && orderTemplateState.userMessage &&\n (\n
\n \n {orderTemplateState.userMessage}\n \n
\n )\n\n };\n\n};\n\nconst _renderOrderTemplateImages = (context: ICoreContext, orderTemplateLines?: OrderTemplateLine[],\n imageSettings?: IImageSettings, enableImageProductLink?: boolean): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: `w=140&h=140&m=6`, w: 0, h: 0 },\n lg: { q: `w=140&h=140&m=6`, w: 0, h: 0 },\n xl: { q: `w=140&h=140&m=6`, w: 0, h: 0 }\n },\n lazyload: true\n };\n\n if (orderTemplateLines) {\n const count = orderTemplateLines.length < 4 ? orderTemplateLines.length : 4;\n\n return (\n
\n {orderTemplateLines?.slice(0, count).map(line => {\n const productUrl = line.fullProduct ? getProductUrlSync(line.fullProduct.ProductDetails, context.actionContext, undefined) : '';\n\n return ( window.location.assign(productUrl))}\n className={enableImageProductLink ? 'product-link' : ''}\n />);\n })}\n
\n );\n } else {\n return (\n
\n );\n }\n};\n\nconst _renderAriaLabel = (props: ISingleOrderTemplateProps): string => {\n const { name } = props;\n return (`${name}`);\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { orderTemplateListStatus } from '../order-template-list';\n\nexport interface IOrderTemplateListStatusMessageProps {\n className?: string;\n errorType: orderTemplateListStatus;\n text?: string;\n}\n\nexport const OrderTemplateListStatusMessage: React.FC = ({className, errorType, text}) => {\n switch(errorType) {\n case 'EMPTY':\n return (\n

{ text }

\n );\n case 'FAILED':\n return (\n

{ text }

\n );\n case 'LOADING':\n default:\n return (\n

{ text }

\n );\n }\n};\n","import { ICoreContext } from '@msdyn365-commerce/core-internal';\r\nimport { wineClubShippingLabels } from '../../settings/app.settings';\r\n\r\nexport type WineClubDataRef = {\r\n variantPreference: string | null;\r\n forMyself: boolean | null;\r\n deliveryType: DeliveryType;\r\n clubId: number | null;\r\n tosAgree: boolean;\r\n pickupLocationId?: string;\r\n};\r\n\r\nexport type DeliveryType = 'STANDARD' | 'PREMIUM' | 'PICKUP';\r\nexport type DeletableKeys = 'variantPreference' | 'forMyself' | 'deliveryType' | 'clubId' | 'tosAgree' | 'pickupLocationId';\r\n\r\n/**\r\n * singleton class responsible for the users selections\r\n */\r\nexport class WineClubDataStore {\r\n private static instance: WineClubDataStore;\r\n\r\n private readonly LOCAL_STORAGE_LOCATION: string = 'WINE-CLUB-SELECTIONS';\r\n\r\n private wineClubData!: WineClubDataRef;\r\n\r\n private changeEvents: ((newData: WineClubDataRef) => void)[] = [];\r\n\r\n /**\r\n * get the current pages data\r\n * @returns singleton data of data store\r\n */\r\n public static getInstance(onChange?: (newData: WineClubDataRef) => void): WineClubDataStore {\r\n if (!WineClubDataStore.instance) {\r\n WineClubDataStore.instance = new WineClubDataStore();\r\n }\r\n\r\n if (onChange) {\r\n WineClubDataStore.instance.changeEvents.push(onChange);\r\n }\r\n\r\n return WineClubDataStore.instance;\r\n }\r\n\r\n // tslint:disable-next-line: no-any\r\n public getDeliveryMapFromConfig(coreContext: ICoreContext<{ [x: string]: any }>): {\r\n standard: string; premium: string; pickup: string;\r\n } {\r\n const config = coreContext.app.config.wineClubShippingLabels || {};\r\n return {\r\n standard: config.standard,\r\n pickup: config.pickup,\r\n premium: config.premium\r\n };\r\n }\r\n\r\n public edit(newData: WineClubDataRef): void {\r\n this.wineClubData = newData;\r\n this.changeEvents.forEach(event => event(newData));\r\n this._save();\r\n }\r\n\r\n public get(): WineClubDataRef {\r\n return { ...this.wineClubData };\r\n }\r\n\r\n public deleteKeys(...keys: DeletableKeys[]): void {\r\n keys.forEach(key => delete this.wineClubData[key]);\r\n this.changeEvents.forEach(event => event(this.wineClubData));\r\n this._save();\r\n }\r\n\r\n public reset(): WineClubDataStore {\r\n this.wineClubData = {\r\n deliveryType: 'STANDARD',\r\n tosAgree: false,\r\n forMyself: null,\r\n clubId: null,\r\n variantPreference: null\r\n };\r\n this.changeEvents.forEach(event => event(this.wineClubData));\r\n this._save();\r\n return this;\r\n }\r\n\r\n public isInResetState(): boolean {\r\n const {\r\n deliveryType,\r\n tosAgree,\r\n forMyself,\r\n clubId,\r\n variantPreference\r\n } = this.wineClubData;\r\n\r\n return deliveryType === 'STANDARD' &&\r\n tosAgree === false &&\r\n forMyself === null &&\r\n clubId === null &&\r\n variantPreference === null;\r\n }\r\n\r\n private constructor() {\r\n // tslint:disable-next-line: no-typeof-undefined\r\n if (typeof window !== 'undefined') {\r\n const previousWineData = window && window.localStorage.getItem(this.LOCAL_STORAGE_LOCATION);\r\n\r\n if (!previousWineData) {\r\n this.reset();\r\n return;\r\n }\r\n\r\n this.wineClubData = JSON.parse(previousWineData);\r\n }\r\n }\r\n\r\n private _save(): void {\r\n // tslint:disable-next-line: no-typeof-undefined\r\n if (typeof window !== 'undefined') {\r\n window.localStorage.setItem(this.LOCAL_STORAGE_LOCATION, JSON.stringify(this.wineClubData));\r\n }\r\n }\r\n}","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { IVideoMetadata, Player } from '@msdyn365-commerce/components';\nimport { IPlayerOptions } from '@msdyn365-commerce/components/dist/types/videoplayer/components/data/player-options';\nimport { IPlayerResources } from '@msdyn365-commerce/components/dist/types/videoplayer/components/data/player-resources';\nimport { IPlayerData } from '@msdyn365-commerce/components/dist/types/videoplayer/players/player/Player.props';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\nimport { IVideoPlayerConfig, IVideoPlayerProps } from './video-player.props.autogenerated';\n\nexport interface IVideoPlayerViewProps extends IVideoPlayerProps<{}> {\n player: React.ReactNode;\n}\n\n/**\n *\n * VideoPlayer component\n * @extends {React.PureComponent>}\n */\nclass VideoPlayer extends React.PureComponent> {\n private telemetryContent: ITelemetryContent;\n constructor(props: IVideoPlayerProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n }\n\n public render(): JSX.Element {\n const options: IPlayerOptions = this.props.config;\n const video: MsDyn365.IVideoData = this.props.config.video;\n const playerResources: IPlayerResources = {\n playAriaLabel: this.props.resources.playLabel,\n pauseAriaLabel: this.props.resources.pauseLabel,\n playingAriaLabel: this.props.resources.playingLabel,\n pausedAriaLabel: this.props.resources.pausedLabel,\n muteAriaLabel:this.props.resources.muteLabel,\n unMuteAriaLabel:this.props.resources.unMuteLabel,\n fullScreenAriaLabel:this.props.resources.fullScreenLabel,\n exitFullScreenAriaLabel:this.props.resources.exitFullScreenLabel,\n seekBarLabel:this.props.resources.seekBarLabel,\n videoTimeDurationLabel:this.props.resources.videoTimeDurationLabel,\n closedCaptionLabel:this.props.resources.closedCaptionLabel\n };\n const videoMetaData: IVideoMetadata = {};\n\n if (video) {\n videoMetaData.videoId = video.id;\n videoMetaData.title = video.title;\n videoMetaData.duration = video.playTime;\n\n if (video.thumbnail) {\n videoMetaData.posterframeUrl = video.thumbnail.src;\n }\n\n if (video._links\n && video._links.binaryReferences) {\n videoMetaData.videoBinaryReferences = video._links.binaryReferences;\n }\n }\n const videoPlayerData: IPlayerData = { options: options, metaData: videoMetaData };\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n // tslint:disable-next-line: jsx-wrap-multiline\n player: \n \n \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n}\n\nexport default VideoPlayer;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { TenderLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport * as React from 'react';\nimport { IPaymentMethods, IPaymentMethodsInput } from '../../../common';\n\n// tslint:disable-next-line:max-func-body-length\nexport const getOrderDetailsPaymentMethods = ({\n priceContext,\n tenderLines,\n tenderIdOperationIdMap,\n resource: { paymentMethodsTitle, creditCardEndingLabel, giftCardEndingLabel, amountCoveredLabel, loyaltyCardUsedLabel, cashUsedLabel, customerAccountUsedLabel }\n}: IPaymentMethodsInput): IPaymentMethods => {\n\n const OPERATIONS = {\n PayCard: 201,\n PayGiftCertificate: 214,\n PayLoyalty: 207,\n PayCash: 200,\n PayCustomerAccount: 202,\n };\n\n const getLastFourDigit = (digits = '') => digits.substr(-4);\n\n const getCard = (tenderLine: TenderLine, showAmount: boolean = false) => {\n const cardLastFourDigit = getLastFourDigit(tenderLine.MaskedCardNumber);\n // @ts-ignore\n const isValidCardNumber = cardLastFourDigit && !isNaN(cardLastFourDigit);\n const amount = (tenderLine.AuthorizedAmount || 0) > 0 ? tenderLine.AuthorizedAmount : tenderLine.Amount;\n const showAmountCovered = showAmount && amount && amount > 0 ? true : false;\n\n return (\n
\n

\n {`${tenderLine.CardTypeId} ${isValidCardNumber ? `${creditCardEndingLabel} ${cardLastFourDigit}` : ``}`}\n

\n {showAmountCovered &&

\n {amountCoveredLabel}\n \n

}\n
\n );\n };\n\n const getCustomerAccountPayment = (tenderLine: TenderLine) => (\n
\n

\n {customerAccountUsedLabel} {tenderLine.CustomerId}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getGiftCertificate = (tenderLine: TenderLine) => (\n
\n

\n {giftCardEndingLabel} {getLastFourDigit(tenderLine.GiftCardId)}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getLoyalty = (tenderLine: TenderLine) => (\n
\n

\n {loyaltyCardUsedLabel} {tenderLine.LoyaltyCardId}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getCash = (tenderLine: TenderLine) => (\n
\n

{cashUsedLabel}

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n return {\n paymentMethodsProps: { className: 'ms-order-details__payment-methods' },\n title:
{paymentMethodsTitle}
,\n methods: tenderLines.reduce((lines: React.ReactNode[], tenderLine) => {\n if (!tenderLine.TenderTypeId) {\n return lines;\n }\n switch (tenderIdOperationIdMap[tenderLine.TenderTypeId]) {\n case OPERATIONS.PayCard:\n lines.push(getCard(tenderLine, tenderLines.length > 1));\n break;\n case OPERATIONS.PayGiftCertificate:\n lines.push(getGiftCertificate(tenderLine));\n break;\n case OPERATIONS.PayLoyalty:\n lines.push(getLoyalty(tenderLine));\n break;\n case OPERATIONS.PayCash:\n lines.push(getCash(tenderLine));\n break;\n case OPERATIONS.PayCustomerAccount:\n lines.push(getCustomerAccountPayment(tenderLine));\n break;\n default:\n // do nothing\n }\n return lines;\n }, [])\n };\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Address } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\nexport type addressType = 'store' | 'ship';\n\nexport interface IShippingAddressProps {\n moduleName: string;\n address: Address;\n deliveryType: string;\n showCompleteAddress?: boolean;\n resource: {\n shipToLabel: string;\n storeLabel: string;\n phoneLabel: string;\n phoneAriaLabel: string;\n };\n}\n\nconst Address: React.SFC = ({\n moduleName,\n address,\n deliveryType,\n showCompleteAddress,\n resource: { shipToLabel, storeLabel, phoneLabel }\n}) => (\n
\n
{deliveryType !== 'ship' ? storeLabel : shipToLabel}
\n {address.Name && {address.Name}}\n {showCompleteAddress ?\n (<>\n {address.Street && {address.Street} }\n {address.City && {address.City}}\n {address.State && {`, ${address.State}`}}\n {address.County && {`, ${address.County}`}}\n {address.ZipCode && {` ${address.ZipCode}`}}\n {address.ThreeLetterISORegionName && {` ${address.ThreeLetterISORegionName}`}}\n {address.Phone && (\n \n {phoneLabel}\n \n )}\n ) : address.FullAddress && {address.FullAddress}}\n
\n );\n\nexport default React.memo(Address);\n","import OrderConfirmation from './order-confirmation';\nimport OrderConfirmationView from './order-confirmation.view';\n\nexport * from './order-confirmation';\nexport * from './order-confirmation.data';\nexport * from './order-confirmation.view';\nexport * from './order-confirmation.props.autogenerated';\nexport * from './components';\n\nexport {\n OrderConfirmation,\n OrderConfirmationView\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\nexport interface ILogoProps {\n image: Msdyn365.IImageData;\n gridSettings?: Msdyn365.IGridSettings;\n link?: ILinkData;\n className?: string;\n telemetryContent?: ITelemetryContent;\n requestContext: Msdyn365.IRequestContext;\n}\n\nexport interface ILinkData {\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n linkText?: string;\n}\n\n/**\n *\n * Logo component\n * @extends {React.PureComponent}\n */\nexport class Logo extends React.PureComponent {\n\n private attributes?: Msdyn365.IDictionary;\n\n constructor(props: ILogoProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n public render():JSX.Element {\n return(\n
\n {this._renderLogo(this.props)}\n
\n );\n }\n\n private _renderLogo(config: ILogoProps):JSX.Element {\n if(config.link && config.link.linkUrl.destinationUrl) {\n return(\n \n {this._renderImage(config)}\n \n );\n }\n return(\n this._renderImage(config)\n );\n }\n\n private _renderImage(config: ILogoProps): JSX.Element {\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: `w=132&h=28&m=6`, w: 0, h: 0 },\n lg: { q: `w=160&h=48&m=6`, w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n}\n\nexport default Logo;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { IHeaderResources } from '../header.props.autogenerated';\n\nexport interface INavIconProps {\n resources: IHeaderResources;\n isExpanded: boolean;\n targetId: string;\n telemetryContent?: ITelemetryContent;\n toggleNavBar(): void;\n}\n\n/**\n *\n * NavIcon component\n * @extends {React.PureComponent}\n */\n\n@observer\nexport class NavIcon extends React.Component {\n\n private attributes?: Msdyn365.IDictionary;\n\n constructor(props: INavIconProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render():JSX.Element {\n return (\n \n );\n }\n}","import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { IHeaderData } from '../header.data';\nimport { IHeaderProps } from '../header.props.autogenerated';\n\n/**\n * The header preferred store component\n */\n@observer\nexport class HeaderPreferredStore extends React.PureComponent> {\n\n public handleClick = () => { return this._findPreferreStoreOnClick(this.props); };\n\n public render(): JSX.Element | undefined {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n slots,\n resources\n } = this.props;\n if (slots && slots.storeSelector && slots.storeSelector.length) {\n const storeName = storeSelectorStateManager!.preferredStore && storeSelectorStateManager!.preferredStore.StoreName ?\n storeSelectorStateManager!.preferredStore.StoreName :\n resources.headerPreferredStoreText;\n\n return (\n
\n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferreStoreOnClick(props: IHeaderProps): Promise {\n const { data: { storeSelectorStateManager: { result: storeSelectorStateManager } }, modules } = props;\n if (!storeSelectorStateManager) {\n return;\n }\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n storeSelectorStateManager.openDialog({\n id: storeSelectorId,\n showMapViewLink: false,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\n }).catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to set preferred store');\n }\n return;\n });\n }\n}\n\nexport default HeaderPreferredStore;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport {\n Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes, Modal,\n ModalBody, ModalHeader, onTelemetryClick, Popover, TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport classnames from 'classnames';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\nimport { IHeaderData } from './header.data';\nimport { IHeaderProps, IHeaderResources, IMyAccountLinksData } from './header.props.autogenerated';\n\nexport interface IHeaderState {\n mobileMenuCollapsed: boolean;\n signinPopoverOpen: boolean;\n}\n\nexport interface IHeaderViewProps extends IHeaderProps, IHeaderState {\n logo: React.ReactNode;\n wishListIconDesktop: React.ReactNode;\n wishListIconMobile: React.ReactNode;\n cartIcon: React.ReactNode;\n navIcon: React.ReactNode;\n className: string;\n menuBar: React.ReactNode[];\n search: React.ReactNode[];\n siteOptions: React.ReactNode[];\n HeaderTag: IModuleProps;\n HeaderContainer: INodeProps;\n MobileMenuContainer: INodeProps;\n MobileMenuHeader: React.ReactNode;\n MobileMenuBodyContainer: INodeProps;\n MobileMenuLinksContainer: INodeProps;\n HeaderTopBarContainer: INodeProps;\n Divider: INodeProps;\n\n AccountInfoDropdownParentContainer?: INodeProps;\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\n accountInfoDropdownButton?: React.ReactNode;\n\n signOutLink?: React.ReactNode;\n signInLink?: React.ReactNode;\n accountLinks?: React.ReactNode[];\n preferredStore?: React.ReactNode;\n}\n\n/**\n *\n * Header component\n * @extends {React.PureComponent>}\n */\n@observer\nclass Header extends React.PureComponent, IHeaderState> {\n private popOverRef: React.RefObject;\n private telemetryContent: ITelemetryContent;\n private cart: ICartState | undefined;\n @computed public get displayName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n\n constructor(props: IHeaderProps) {\n super(props);\n this.popOverRef = React.createRef();\n this._toggleNavbar = this._toggleNavbar.bind(this);\n this._togglePopover = this._togglePopover.bind(this);\n this._keydown = this._keydown.bind(this);\n this.state = {\n mobileMenuCollapsed: true,\n signinPopoverOpen: false\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('keydown', this._keydown);\n }\n reaction(\n () => this.props.data.cart.result,\n () => {\n this.cart = this.props.data.cart.result;\n }\n );\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('keydown', this._keydown, false);\n }\n }\n\n // tslint:disable-next-line: cyclomatic-complexity max-func-body-length\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n data: { accountInformation,\n storeSelectorStateManager: {result: storeSelectorStateManager}\n },\n context: {\n request: {\n user\n }\n },\n context,\n resources: {\n cartLabel,\n cartQtyLabel\n }\n } = this.props;\n const { logoLink, logoImage } = this.props.config;\n const headerClassName = classnames('ms-header', this.props.config.className);\n const navbarKey = 'header-nav-mobile';\n const customer = accountInformation && accountInformation.result;\n const cartIconSlot = this._getSlot('cartIcon');\n const menuBarSlot = this._getSlot('menuBar');\n const searchSlot = this._getSlot('search');\n const siteOptionsSlot = this._getSlot('siteOptions');\n const preferredStoreSlot = this._getSlot('storeSelector');\n const viewProps: IHeaderViewProps = {\n ...(this.props as IHeaderProps),\n ...(this.state),\n logo: ,\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: (cartIconSlot && cartIconSlot.length > 0)\n ? cartIconSlot[0]\n : ,\n navIcon: ,\n menuBar: menuBarSlot && menuBarSlot.length && menuBarSlot || [],\n search: searchSlot && searchSlot.length && searchSlot || [],\n siteOptions: siteOptionsSlot && siteOptionsSlot.length && siteOptionsSlot || [],\n className: headerClassName,\n HeaderTag: {\n moduleProps: this.props,\n className: classnames(headerClassName),\n tag: 'header'\n },\n HeaderContainer: {\n className: classnames('ms-header__container')\n },\n HeaderTopBarContainer: {\n className: classnames('ms-header__topbar')\n },\n Divider: {\n className: classnames('ms-header__divider')\n },\n MobileMenuContainer: {\n tag: Modal,\n id: navbarKey,\n className: 'ms-header__mobile-hamburger',\n isOpen: !this.state.mobileMenuCollapsed,\n wrapClassName: 'ms-header__modal',\n toggle: this._toggleNavbar\n },\n MobileMenuHeader: (\n \n ),\n MobileMenuBodyContainer: {\n tag: ModalBody,\n className: 'ms-header__mobile-hamburger-menu-body',\n },\n MobileMenuLinksContainer: {\n className: 'ms-header__mobile-hamburger-menu-links',\n },\n AccountInfoDropdownParentContainer: {\n className: 'ms-header__account-info'\n },\n AccountInfoDropdownPopoverConentContainer: customer && this.displayName && {\n tag: Popover,\n id: 'myprofilePopover',\n className: 'ms-header__account-info-content',\n placement: 'bottom',\n isOpen: this.state.signinPopoverOpen,\n target: this.popOverRef,\n toggle: this._togglePopover,\n } || undefined,\n signInLink: this._getSigninButton(customer, user, this.props.resources),\n signOutLink: this._getSignOutButton(customer, user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(customer),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: preferredStoreSlot\n && preferredStoreSlot.length\n && storeSelectorStateManager\n && ()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /* Handle link text change*/\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent) => {\n if (this.props.config.myAccountLinks && this.props.config.myAccountLinks[linkIndex]) {\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\n }\n }\n\n private _getSlot(slotName: string): React.ReactNode[] | null {\n const { slots } = this.props;\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\n }\n\n private _getSigninButton(customer: Customer | undefined, user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return !customer && (\n \n {resources.signInLinkText}\n \n );\n }\n\n private _getSignOutButton(customer: Customer | undefined, user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return customer && this.displayName && (\n \n {resources.signOutLinkText}\n \n );\n }\n\n private _getAccountInfoDropdownButton(customer: Customer | undefined): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return customer && this.displayName && (\n \n {this.displayName}\n \n );\n }\n\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\n const { myAccountLinks } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n if(!customer || ! this.displayName || !myAccountLinks || !myAccountLinks.length) {\n return undefined;\n }\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\n payLoad.contentAction.etext = cta.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: cta.ariaLabel,\n className: 'ms-signin-info__account-link-button',\n linkText: cta.linkText,\n linkUrl: cta.linkUrl.destinationUrl,\n openInNewTab: cta.openInNewTab,\n role: 'button',\n additionalProperties: attributes\n };\n\n return (\n \n );\n });\n }\n\n private _toggleNavbar(): void {\n this.setState({\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\n });\n }\n\n private _togglePopover(): void {\n this.setState({\n signinPopoverOpen: !this.state.signinPopoverOpen\n });\n }\n\n private _keydown(e: KeyboardEvent): void {\n if (e.keyCode === KeyCodes.Escape) {\n this.setState({ mobileMenuCollapsed: true });\n }\n }\n}\n\nexport default Header;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getPayloadObject, getTelemetryAttributes } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IGetHelpInput, IHelp } from '../../../';\n\nexport const getOrderConfirmationHelp = ({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel, telemetryContent }: IGetHelpInput): IHelp => {\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n return ({\n helpProps: { className: 'ms-order-confirmation__help' },\n needHelpLabel:

{needHelpLabel}

,\n helpLineNumberLabel: {helpLineNumberLabel},\n contactNumber: (\n \n {contactNumber}\n \n )\n });\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ChannelDeliveryOptionConfiguration, ProductDeliveryOptions, SalesLine, SalesOrder, SimpleProduct, TransactionType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport * as React from 'react';\nimport { IGetOrderSummaryInput, IHelp, IOrderSummary, IPaymentMethods, IPaymentMethodsInput } from '../../common';\nimport { getGroups, IGroups } from '../../common/get-groups';\nimport { getOrderInfomationInput, getOrderInformation, IOrderInformation } from '../../common/get-order-information';\nimport { ISalesLine } from '../../common/get-sales-line';\nimport { getSalesLines, getSalesLinesInput } from '../../common/get-sales-lines';\nimport LabelComponent from '../../common/label';\nimport { getTenderIdOperationIdMap, IPriceContext } from '../../common/utilities';\nimport { getOrderConfirmationHelp } from './components/get-help';\nimport { getOrderConfirmationOrderSummary } from './components/get-order-summary';\nimport { getOrderConfirmationPaymentMethods } from './components/get-payment-methods';\nimport { IOrderConfirmationData } from './order-confirmation.data';\nimport { IOrderConfirmationProps } from './order-confirmation.props.autogenerated';\n\nexport * from '../../common/get-groups';\nexport * from '../../common/get-order-information';\nexport * from '../../common/get-sales-line';\nexport * from '../../common/get-sales-lines';\nexport * from '../../common/utilities';\nexport * from './components/get-help';\nexport * from './components/get-order-summary';\nexport * from './components/get-payment-methods';\n\nexport interface IOrderConfirmationViewProps extends IOrderConfirmationProps {\n moduleProps: IModuleProps;\n salesOrder?: SalesOrder;\n footerProps?: INodeProps;\n alert?: React.ReactNode;\n loading?: React.ReactNode;\n heading: React.ReactNode;\n backToShoppingLink?: React.ReactNode;\n orderInfomation?: IOrderInformation;\n salesLines?: ISalesLine[];\n groups?: IGroups;\n orderSummary?: IOrderSummary;\n payment?: IPaymentMethods;\n help?: IHelp;\n}\n\n/**\n *\n * OrderConfirmation component\n * @extends {React.PureComponent>}\n */\nclass OrderConfirmation extends React.PureComponent> {\n private moduleName: string = 'ms-order-confirmation';\n private telemetryContent?: ITelemetryContent;\n private backToShoppingAttributes?: Msdyn365.IDictionary;\n\n constructor(props: IOrderConfirmationProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n this.backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n @computed get isCurrentChannel(): boolean {\n if (!this.order) {\n return false;\n }\n return this.order.ChannelId === get(this.props, 'context.request.apiSettings.channelId');\n }\n\n @computed get isDataReady(): boolean {\n return get(this.props, 'data.orderHydration.status') === 'SUCCESS';\n }\n\n @computed get hasError(): boolean {\n return get(this.props, 'data.orderHydration.status') === 'FAILED';\n }\n\n @computed get order(): SalesOrder | undefined {\n return get(this.props, 'data.orderHydration.result.salesOrder');\n }\n\n @computed get products(): SimpleProduct[] {\n return get(this.props, 'data.orderHydration.result.products') || [];\n }\n\n @computed get deliveryOptions(): ProductDeliveryOptions[] {\n return get(this.props, 'data.orderHydration.result.deliveryOptions') || [];\n }\n\n @computed get priceContext(): IPriceContext {\n const {\n id,\n typeName,\n context,\n telemetry,\n resources: { freePriceText }\n } = this.props;\n return {\n id,\n typeName,\n context,\n telemetry,\n freePriceText\n };\n }\n\n @computed get earnedPoints(): number {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n if (loyaltyCard && loyaltyCard.RewardPoints && this.order) {\n const pointPrograms = loyaltyCard.RewardPoints.map(point => point.RewardPointId);\n const rewardLines = this.order.LoyaltyRewardPointLines || [];\n let total = 0;\n rewardLines.forEach(line => {\n if ((line.RewardPointAmountQuantity || 0) > 0 && pointPrograms.indexOf(line.RewardPointId) > -1) {\n total += line.RewardPointAmountQuantity!;\n }\n });\n return total;\n }\n return 0;\n }\n\n @computed get orderSummaryProps(): IGetOrderSummaryInput | undefined {\n if (!this.order) {\n return;\n }\n const { request } = this.props.context;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n const orderDetailsLines = this.order?.SalesLines;\n const canShip = orderDetailsLines?.some(orderDetailsLine => (orderDetailsLine.DeliveryMode && orderDetailsLine.DeliveryMode !== '')\n ? (orderDetailsLine.DeliveryMode !== this.getDeliveryMode(orderDetailsLine, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig?.result, pickupDeliveryModeCode) && orderDetailsLine.DeliveryMode !== emailDeliveryModeCode)\n : orderDetailsLine);\n\n const {\n resources: { orderSummaryHeading, orderSummaryItemsTotalLabel, orderSummaryShippingFeeLabel, orderSummaryTaxLabel, orderSummaryGrandTotalLabel, pointsEarnedLabel }\n } = this.props;\n return {\n order: this.order,\n earnedPoints: this.earnedPoints,\n priceContext: this.priceContext,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n pointsEarnedLabel,\n orderSummaryGrandTotalLabel\n },\n canShip: canShip\n };\n }\n\n @computed get paymentMethodsProps(): IPaymentMethodsInput | undefined {\n const tenderTypes = this.props.data.tenderTypes.result;\n if (!this.order || !this.order.TenderLines || !tenderTypes) {\n return;\n }\n\n const locale = get(this.props, 'context.request.locale') || 'en-US';\n\n const {\n resources: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n } = this.props;\n\n return {\n priceContext: this.priceContext,\n tenderLines: this.order.TenderLines,\n tenderIdOperationIdMap: getTenderIdOperationIdMap(tenderTypes),\n locale,\n resource: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n };\n }\n\n // tslint:disable-next-line:max-func-body-length\n public render(): JSX.Element {\n const {\n resources: {\n noSalesOrderText,\n genericErrorMessage,\n needHelpLabel,\n helpLineNumberLabel,\n loadingLabel,\n backToShopping,\n orderItemLabel,\n orderItemsLabel,\n pickupItemsHeader,\n pickingItemsLabel,\n shippingAddressTitle,\n shippingItemToYouLabel,\n helpLineContactAriaLabel,\n emailItemsHeader,\n emailingItemsLabel\n },\n config: { heading, contactNumber, showTimeslot }\n } = this.props;\n\n const moduleProps = { moduleProps: this.props, className: classname('ms-order-confirmation', this.props.config.className) };\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n\n let viewProps: IOrderConfirmationViewProps = {\n ...this.props,\n moduleProps,\n heading: heading && heading.text && (\n \n ),\n backToShoppingLink: backToShoppingUrl && (\n \n ),\n footerProps: { className: 'ms-order-confirmation__footer' }\n };\n\n if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!this.isDataReady) {\n viewProps = {\n ...viewProps,\n loading: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!this.order) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n const isSalesInvoice = this.order.TransactionTypeValue === 15 as TransactionType.SalesInvoice;\n\n const salesLinesInput = getSalesLinesInput(this.props, this.moduleName, this.order, this.products, this.priceContext, true, showTimeslot, undefined,\n retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig?.result, this.deliveryOptions);\n const salesLines = salesLinesInput && getSalesLines(salesLinesInput);\n const orderInfomationInput = this.order && getOrderInfomationInput(this.props, this.moduleName, this.order, this.priceContext, undefined, undefined, undefined, isSalesInvoice);\n const orderInfomation = orderInfomationInput && getOrderInformation(orderInfomationInput);\n\n viewProps = {\n ...viewProps,\n salesOrder: this.order,\n orderInfomation,\n salesLines,\n groups: !isSalesInvoice && salesLines\n ? getGroups({\n moduleName: this.moduleName,\n salesLines,\n resources: {\n orderItemLabel, orderItemsLabel, pickupItemsHeader, pickingItemsLabel, shippingAddressTitle, shippingItemToYouLabel,\n emailItemsHeader, emailingItemsLabel\n },\n showTimeslot: showTimeslot,\n isConfirmationView: true,\n retailMultiplePickUpOptionEnabled\n })\n : undefined,\n orderSummary: !isSalesInvoice && this.orderSummaryProps ? getOrderConfirmationOrderSummary(this.orderSummaryProps) : undefined,\n payment: !isSalesInvoice && this.paymentMethodsProps ? getOrderConfirmationPaymentMethods(this.paymentMethodsProps) : undefined,\n help: !isSalesInvoice && contactNumber ? getOrderConfirmationHelp({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel, telemetryContent: this.telemetryContent }) : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleOrderConfirmationHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n private getDeliveryMode = (salesLine: SalesLine, featureSate: boolean = false, channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration, pickupDeliveryMode?: string) => {\n if(!featureSate) {\n return pickupDeliveryMode;\n } else {\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === salesLine.DeliveryMode);\n }\n };\n\n}\n\nexport default OrderConfirmation;\n","import {\n format,\n INodeProps,\n Progress\n} from '@msdyn365-commerce-modules/utilities';\nimport { RatingsSummary } from '@msdyn365-commerce/commerce-entities';\nimport React from 'react';\n\nexport interface IHistogramItemsProps {\n ratingsSummary: RatingsSummary;\n resources: IHistogramItemsResources;\n locale: string;\n onClick(stars: number): void;\n}\n\nexport interface IHistogramItemsResources {\n barItemAriaLabel: string;\n}\n\nexport interface IHistogramItemViewProps {\n starLabel: React.ReactElement;\n bar: React.ReactElement;\n percentage: React.ReactElement;\n buttonProps: INodeProps;\n}\n\n/**\n * CartLineItems component\n */\n\nexport const HistogramItems = (props: IHistogramItemsProps): IHistogramItemViewProps[] => {\n const {ratingsSummary} = props;\n const totalRatingsCount: number = ratingsSummary.totalRatingsCount || 0;\n return [\n renderItem(props, 5, ratingsSummary.star5Count, totalRatingsCount),\n renderItem(props, 4, ratingsSummary.star4Count, totalRatingsCount),\n renderItem(props, 3, ratingsSummary.star3Count, totalRatingsCount),\n renderItem(props, 2, ratingsSummary.star2Count, totalRatingsCount),\n renderItem(props, 1, ratingsSummary.star1Count, totalRatingsCount),\n ];\n};\n\nconst renderItem = (props: IHistogramItemsProps, stars: number, count?: number, totalCount?: number): IHistogramItemViewProps => {\n count = count || 0;\n totalCount = totalCount || 0;\n const percentage = totalCount === 0 ? 0 : count / totalCount;\n const formattedPercent = new Intl.NumberFormat(props.locale, { style: 'percent' }).format(percentage);\n const ariaLabel = format(props.resources.barItemAriaLabel, stars, formattedPercent);\n\n return {\n starLabel: {stars},\n percentage: {formattedPercent},\n bar: ,\n buttonProps: {tag: 'button', className: 'ms-ratings-histogram__item', onClick: () => {props.onClick(stars);}}\n };\n};\n\nexport const AverageRatingNumber: React.FC<{summary: RatingsSummary}> = (props: {summary: RatingsSummary}) => {\n return

{props.summary.averageRating} / 5

;\n};\n\nexport const TotalReviews: React.FC<{summary: RatingsSummary}> = (props: {summary: RatingsSummary}) => {\n return

{props.summary.totalRatingsCount}

;\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { format, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { RatingComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { createRatingsReviewsStateInput } from '../../actions/ratings-reviews-state-data-action';\nimport { AverageRatingNumber, HistogramItems, IHistogramItemViewProps, TotalReviews } from './component/components';\nimport { IRatingsHistogramData } from './ratings-histogram.data';\nimport { IRatingsHistogramProps } from './ratings-histogram.props.autogenerated';\n\nexport interface IRatingsHistogramViewProps extends IRatingsHistogramProps {\n className: string;\n histogramItems: IHistogramItemViewProps[];\n moduleProps: IModuleProps;\n heading: React.ReactNode;\n averageRating: React.ReactNode;\n averageNumber: React.ReactNode;\n totalReviews: React.ReactNode;\n histogramProps: INodeProps;\n ratingsSummaryProps: INodeProps;\n callbacks: IRatingsHistogramCallbacks;\n}\n\nexport interface IRatingsHistogramCallbacks {\n selectFilterBy(stars: number): void;\n}\n\n/**\n * RatingsHistogram component\n * @extends {React.Component>}\n */\n@observer\nclass RatingsHistogram extends React.Component> {\n\n constructor(props: IRatingsHistogramProps) {\n super(props);\n this.selectFilterBy = this.selectFilterBy.bind(this);\n }\n\n public render(): JSX.Element | null {\n const { resources } = this.props;\n const { className, heading } = this.props.config;\n const {ratingsSummary: {result: ratingsSummary}} = this.props.data;\n const ratingCount = ratingsSummary && ratingsSummary.totalRatingsCount ? `${ratingsSummary.totalRatingsCount}` : '0';\n\n const completeClass = classname('ms-ratings-histogram', className);\n const viewProps: IRatingsHistogramViewProps = {\n ...this.props,\n className: completeClass,\n callbacks: {\n selectFilterBy: this.selectFilterBy\n },\n moduleProps: {\n moduleProps: this.props,\n className: completeClass\n },\n histogramItems: ratingsSummary ? HistogramItems({ratingsSummary: ratingsSummary, resources: {...resources}, locale: this.props.context.request.locale, onClick: this.selectFilterBy}) : [],\n averageRating: ratingsSummary && (\n \n ),\n averageNumber: ratingsSummary && ,\n totalReviews: ratingsSummary && ,\n ratingsSummaryProps: {className: 'ms-ratings-histogram__summary'},\n heading: heading && (\n \n ),\n histogramProps: {className: 'ms-ratings-histogram__histogram'}\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 selectFilterBy(stars: number): void {\n const filterKey = `${stars}`;\n this.props.context.actionContext.update(createRatingsReviewsStateInput({filterKey}), {filterKey});\n }\n}\n\nexport default RatingsHistogram;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { format, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ISalesLine } from './get-sales-line';\nimport { groupSalesLines, IDeliveryType, ISalesStatusCode } from './utilities';\n\nexport interface IGroupDelivery {\n deliveryProps: INodeProps;\n pickupProps: INodeProps;\n showTimeslot: boolean;\n heading: React.ReactNode;\n count: React.ReactNode;\n processing: React.ReactNode;\n trackingInfo: React.ReactNode;\n address: React.ReactNode;\n shippingItemsToYou?: React.ReactNode;\n pickupDateTimeslot?: React.ReactNode;\n shippedStatusCheck?: React.ReactNode;\n}\n\nexport interface IGroup {\n groupProps: INodeProps;\n salesLinesProps: INodeProps;\n delivery: IGroupDelivery;\n salesLines: ISalesLine[];\n address: React.ReactNode;\n // row data\n data: {\n count: number;\n deliveryType: IDeliveryType;\n salesStatus: ISalesStatusCode;\n };\n}\n\nexport interface IGroupsInput {\n moduleName: string;\n salesLines: ISalesLine[];\n resources: {\n orderItemLabel: string;\n orderItemsLabel: string;\n pickupItemsHeader?: string;\n pickingItemsLabel?: string;\n shippingAddressTitle?: string;\n shippingItemToYouLabel?: string;\n emailItemsHeader?: string;\n emailingItemsLabel?: string;\n };\n showAddress?: boolean;\n isConfirmationView?: boolean;\n showTimeslot?: boolean;\n retailMultiplePickUpOptionEnabled?: boolean;\n}\n\nexport interface IGroups {\n groupsProps: INodeProps;\n groups: IGroup[];\n}\n\nexport const getGroups = ({ moduleName, salesLines, showAddress, showTimeslot, isConfirmationView, retailMultiplePickUpOptionEnabled,\n resources: {\n orderItemLabel,\n orderItemsLabel,\n pickupItemsHeader,\n pickingItemsLabel,\n shippingAddressTitle,\n shippingItemToYouLabel,\n emailItemsHeader,\n emailingItemsLabel }\n}: IGroupsInput): IGroups => {\n // tslint:disable-next-line:cyclomatic-complexity\n const groups = groupSalesLines(salesLines).map(group => {\n const { deliveryType, salesStatus, count, salesLines: _salesLines } = group;\n const itemLabel = count === 1 ? orderItemLabel : orderItemsLabel;\n const pickingItemsLabelText = pickingItemsLabel && format(pickingItemsLabel, count, itemLabel);\n const shippingItemsToYouText = shippingItemToYouLabel && format(shippingItemToYouLabel, count, itemLabel);\n const emailingItemsLabelText = emailingItemsLabel && format(emailingItemsLabel, count, itemLabel);\n const multiplePickup = deliveryType === 'ship' ? 'ship' : deliveryType === 'email' ? 'email' : 'pickup';\n const groupProps = { className: `${moduleName}__group-deliveryType-${multiplePickup} salesStatus-${salesStatus}` };\n const salesLinesProps = { className: `${moduleName}__sales-lines` };\n const address = _salesLines[0].address;\n const trackingInfo = _salesLines[0].trackingInfo;\n const isProcessing = _salesLines[0].data.salesStatus === 'processing';\n const pickDateTimeslot = _salesLines[0].pickupDateTimeslot;\n const shippedStatusCheck = _salesLines[0].data.salesStatus;\n const multiplePickUp = retailMultiplePickUpOptionEnabled ? 'multiple-pickUp' : '';\n const delivery: IGroupDelivery = {\n deliveryProps: { className: `${moduleName}__group-delivery ${multiplePickUp}` },\n pickupProps: { className: `${moduleName}__delivery-container` },\n heading: (\n \n {isProcessing\n ? isConfirmationView\n ? deliveryType === 'pickUp' ? pickupItemsHeader : deliveryType === 'ship' ? shippingAddressTitle : deliveryType === 'email' ? emailItemsHeader : deliveryType\n : _salesLines[0].deliveryType\n : _salesLines[0].salesStatus}\n \n ),\n processing: isProcessing ? (\n {_salesLines[0].salesStatus}\n ) : (\n undefined\n ),\n count: !isConfirmationView && {`(${count} ${itemLabel})`},\n shippingItemsToYou: isConfirmationView && deliveryType === 'ship'\n ? {shippingItemsToYouText}\n : deliveryType === 'pickUp'\n ? {pickingItemsLabelText}\n : deliveryType === 'email' ? {emailingItemsLabelText}\n : {pickingItemsLabelText},\n trackingInfo,\n address,\n pickupDateTimeslot: pickDateTimeslot,\n showTimeslot: showTimeslot || false,\n shippedStatusCheck:shippedStatusCheck\n };\n return {\n groupProps,\n salesLinesProps,\n delivery,\n salesLines: _salesLines,\n address: (showAddress) && address,\n data: {\n count,\n deliveryType,\n salesStatus\n }\n };\n });\n\n return {\n groupsProps: { className: `${moduleName}__groups` },\n groups\n };\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\nexport interface IWishlistItemDimension {\n key: string;\n className?: string;\n dimensionType: string;\n dimensionValue: string;\n}\n\nexport const WishlistItemDimension: React.FC = ({ key, className, dimensionType, dimensionValue }) => (\n
\n {dimensionType}:\n {dimensionValue}\n
\n);","import { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { CommerceListLine, ProductPrice, ReleasedProductType, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport * as React from 'react';\nimport { IWishlistItemActionMessageState } from '../wishlist-items';\nimport { WishlistItemDimension } from './wishlist-items-dimensions';\n\nexport interface IWishlistItemProps extends CommerceListLine {\n product: SimpleProduct;\n wishlistState: IWishlistItemActionMessageState;\n price?: ProductPrice;\n context: ICoreContext;\n productUrl: string;\n imageSettings?: IImageSettings;\n removeFromWishlistText: string;\n isInStock: boolean;\n addToCartText: string;\n outOfStockText: string;\n index: number;\n itemKey: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n enableImageProductLink?: boolean;\n inventoryInformationLabel?: string;\n inventoryLabelClassName?:string;\n telemetryContent?: ITelemetryContent;\n handlers: {\n onAddToCart(product: SimpleProduct, itemKey: string): void;\n onRemoveItem(productId: number): void | undefined;\n onDismiss(): void;\n };\n resources:{\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n originalPriceText: string;\n currentPriceText: string;\n freePriceText: string;\n };\n}\n\nexport interface IWishlistItemViewProps {\n key: string;\n productImage: React.ReactNode;\n productLink: React.ReactNode;\n productDimensions?: React.ReactNode[];\n productPrice?: React.ReactNode;\n addToCartButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n productStatusMessage?: React.ReactNode;\n productName?: React.ReactNode;\n productAriaLabel?: string;\n entireProductLink?: string;\n inventoryInformation?: React.ReactNode;\n}\n\nconst _addItemToCart = (props: IWishlistItemProps): void => {\n const { product, itemKey, handlers } = props;\n const { onAddToCart } = handlers;\n\n onAddToCart && product && itemKey && onAddToCart(product, itemKey);\n};\n\nconst _removeItemFromWishlist = (props: IWishlistItemProps): void => {\n const { onRemoveItem } = props.handlers;\n const { RecordId } = props.product;\n\n onRemoveItem && RecordId && onRemoveItem(RecordId);\n};\n\nconst WishListItemActions = {\n addToCart: _addItemToCart,\n removeItem: _removeItemFromWishlist,\n};\n\n// tslint:disable-next-line:cyclomatic-complexity\nexport const WishlistItem = (input: IWishlistItemProps): IWishlistItemViewProps | null => {\n const { product, productUrl, price, context, imageSettings, isInStock, removeFromWishlistText,\n addToCartText, outOfStockText, wishlistState, itemKey, handlers, enableImageProductLink, inventoryInformationLabel, inventoryLabelClassName, telemetryContent } = input;\n\n if (!product) {\n return null;\n }\n\n const { RecordId, Name, PrimaryImageUrl, Dimensions } = product;\n\n const addItemAction = (event: React.MouseEvent) => { return WishListItemActions.addToCart(input); };\n const removeItemAction = (event: React.MouseEvent) => { return WishListItemActions.removeItem(input); };\n const { onDismiss } = handlers;\n const inventoryCssName = inventoryLabelClassName? `ms-wishlist-items__inventory-label ${inventoryLabelClassName}` : 'ms-wishlist-items__inventory-label';\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n const payLoad = getPayloadObject('click', telemetryContent!, '', RecordId.toString());\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n // check if the product is service or not by product type\n const PRODUCTASSERVICE = 2 as ReleasedProductType.Service;\n const isServiceItem = product.ItemTypeValue === PRODUCTASSERVICE;\n\n return {\n key: `${RecordId}-item`,\n productImage: PrimaryImageUrl && Name && _renderProductImage(context, product.Name!, PrimaryImageUrl, fallbackImage, imageSettings),\n productLink: productUrl &&\n (\n \n {Name}\n \n ),\n productDimensions: Dimensions && _renderProductDimensions(input),\n productPrice: price && _renderPrice(input),\n entireProductLink: enableImageProductLink ? productUrl : undefined,\n productAriaLabel: enableImageProductLink ? _renderAriaLabel(input) : undefined,\n productName: enableImageProductLink &&\n (\n
{Name}
\n ),\n\n addToCartButton:\n (\n \n { (isServiceItem || isInStock) && addToCartText || outOfStockText }\n \n ),\n inventoryInformation: inventoryInformationLabel && (\n {inventoryInformationLabel}\n ),\n removeButton:\n (\n \n ),\n productStatusMessage: wishlistState && wishlistState.isOpen &&\n wishlistState.productId === RecordId && wishlistState.itemKey === itemKey &&\n (\n
\n \n {wishlistState.userMessage}\n \n
\n )\n\n };\n\n};\n\nconst _renderProductImage = (context: ICoreContext, heading: string, image?: string, fallbackImage?: string, imageSettings?: IImageSettings): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: `w=315&h=315&m=6`, w: 0, h: 0 },\n lg: { q: `w=315&h=315&m=6`, w: 0, h: 0 },\n xl: { q: `w=315&h=315&m=6`, w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if(imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (image) {\n return (\n \n );\n }\n return null;\n};\n\nconst _renderPrice = (props: IWishlistItemProps): JSX.Element | null => {\n const { price, context, moduleId, moduleTypeName, resources } = props;\n\n if (price) {\n return (\n \n );\n }\n return null;\n};\n\nconst _renderProductDimensions = (props: IWishlistItemProps): (React.ReactNode | undefined)[] => {\n const { product, resources } = props;\n\n if (!product || !product.Dimensions) {\n return [];\n }\n\n return product.Dimensions.map((dimension, index) => {\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\n return undefined;\n }\n\n let type = '';\n\n switch(dimension.DimensionTypeValue) {\n case 1: {\n type = resources.productDimensionTypeColor;\n break;\n }\n case 3: {\n type = resources.productDimensionTypeSize;\n break;\n }\n case 4: {\n type = resources.productDimensionTypeStyle;\n break;\n }\n default:\n return undefined;\n }\n\n return (\n \n );\n });\n};\n\nconst _renderAriaLabel = (props: IWishlistItemProps): string => {\n const { product, price, context, resources } = props;\n\n const { Name, Dimensions, } = product;\n const { productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle } = resources;\n\n let formattedPrice = 'Free';\n let dimensions = null;\n\n if (price) {\n formattedPrice = price.BasePrice === 0 ? resources.freePriceText : context.cultureFormatter.formatCurrency(price.BasePrice!, price.CurrencyCode);\n }\n\n if (Dimensions) {\n dimensions = Dimensions.map(productDimension => {\n switch(productDimension.DimensionTypeValue) {\n case 1:\n return (`${productDimensionTypeColor}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`);\n case 3:\n return (`${productDimensionTypeSize}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`);\n case 4:\n return (`${productDimensionTypeStyle}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`);\n default:\n return '';\n }\n });\n }\n\n return (`${Name} ${formattedPrice} ${dimensions && dimensions.join('') || ''}`);\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { wishlistStatus } from '../wishlist-items';\n\nexport interface IWishlistItemsStatusMessageProps {\n className?: string;\n errorType: wishlistStatus;\n text?: string;\n}\n\nexport const WishlistItemsStatusMessage: React.FC = ({className, errorType, text}) => {\n switch(errorType) {\n case 'EMPTY':\n return (\n

{ text }

\n );\n case 'FAILED':\n return (\n

{ text }

\n );\n case 'LOADING':\n default:\n return (\n

{ text }

\n );\n }\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { ArrayExtensions, getProductUrlSync, IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { AsyncResult, CommerceList, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { createGetByCustomerInput, removeLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CommerceListsDataActions.g';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport getItemsInWishlists, { ActiveWishlistInput } from './actions/get-items-in-wishlists';\nimport { IWishlistItemViewProps, WishlistItem, WishlistItemsStatusMessage } from './components/';\nimport { IWishlistItemsData } from './wishlist-items.data';\nimport { IHeadingData, IWishlistItemsProps } from './wishlist-items.props.autogenerated';\n\nexport interface IWishlistItemActionMessageState {\n productId: number;\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n}\n\nexport type wishlistStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\n\nexport interface IWishlistItemsViewProps extends IWishlistItemsProps {\n WishlistItems: IModuleProps;\n status?: wishlistStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n Products?: INodeProps;\n Product?: INodeProps;\n ProductDetails?: INodeProps;\n ProductDimensions?: INodeProps;\n products?: IWishlistItemViewProps[];\n telemetryContent?: ITelemetryContent;\n}\n\n/**\n *\n * WishlistItems component\n * @extends {React.PureComponent, IWishlistItemActionMessageState>}\n */\n@observer\nclass WishlistItems extends React.Component, IWishlistItemActionMessageState> {\n\n private telemetryContent: ITelemetryContent;\n\n constructor(props: IWishlistItemsProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public async componentDidMount(): Promise {\n this.setState({});\n }\n\n public render(): JSX.Element | null {\n const { heading, className } = this.props.config;\n const { emptyWishlistText, wishlistErrorGettingWishlist } = this.props.resources;\n const { cart, productAvailability, wishlists, products } = this.props.data;\n\n if (cart.status === 'LOADING' || productAvailability.status === 'LOADING' || wishlists.status === 'LOADING') {\n const errorProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className),\n },\n status: 'LOADING',\n // statusMessage: \n statusMessage: ,\n heading: this._renderHeading(heading)\n };\n return this.props.renderView(errorProps);\n }\n\n if (cart.status === 'FAILED' || productAvailability.status === 'FAILED' || wishlists.status === 'FAILED') {\n const errorProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className),\n },\n status: 'FAILED',\n statusMessage: ,\n heading: this._renderHeading(heading)\n };\n\n return this.props.renderView(errorProps);\n }\n\n const productsList = products && (products as AsyncResult).result;\n\n if (!!productsList && productsList.length === 0) {\n const emptyViewProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className),\n },\n status: 'EMPTY',\n statusMessage: ,\n heading: this._renderHeading(heading)\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className),\n },\n status: 'SUCCESS',\n heading: this._renderHeading(heading),\n Products: {\n className: 'ms-wishlist-items__products',\n tag: 'ul',\n },\n Product: {\n className: 'ms-wishlist-items__product',\n tag: 'li',\n },\n ProductDetails: {\n className: 'ms-wishlist-items__product-link',\n tag: 'a',\n },\n telemetryContent: this.telemetryContent,\n ProductDimensions: {\n className: 'ms-wishlist-items__product-dimensions',\n },\n products: productsList && this._renderProductList(productsList),\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 private _renderProductList(products: FullProduct[]): IWishlistItemViewProps[] {\n\n const { priceFree, originalPriceText, currentPriceText, addToCartButtonText, outOfStockText, removeButtonText, productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle, productDimensionTypeAmount} = this.props.resources;\n const { context, telemetry } = this.props;\n const { imageSettings, enableImageProductLink } = this.props.config;\n\n return products.map((product: FullProduct, index) => {\n const currentProductProps = {\n product: product.ProductDetails,\n price: product.ProductPrice,\n context: context,\n wishlistState: this.state,\n productUrl: getProductUrlSync(product.ProductDetails, context.actionContext, undefined),\n imageSettings: imageSettings,\n removeFromWishlistText: removeButtonText,\n isInStock: this._isProductInStock(product),\n addToCartText: addToCartButtonText,\n outOfStockText: outOfStockText,\n index: index,\n itemKey: `${product.ProductDetails.RecordId}-${product.ProductDetails.ItemId}-${index}`,\n telemetry: telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n enableImageProductLink: enableImageProductLink,\n inventoryInformationLabel: this._inventoryLabel(product),\n inventoryLabelClassName: this._inventoryClassName(product),\n telemetryContent: this.telemetryContent,\n handlers: {\n onAddToCart: this._addItemToCart,\n onRemoveItem: this._removeItemFromWishlist,\n onDismiss: this._onDismiss\n },\n resources: {\n productDimensionTypeColor: productDimensionTypeColor,\n productDimensionTypeSize: productDimensionTypeSize,\n productDimensionTypeStyle: product.ProductDetails.IsGiftCard ? productDimensionTypeAmount : productDimensionTypeStyle,\n freePriceText: priceFree,\n originalPriceText: originalPriceText,\n currentPriceText: currentPriceText\n }\n };\n\n return (\n WishlistItem(currentProductProps)!\n );\n });\n }\n\n // dismiss alert when addingToCart/removeItem\n private _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n }\n\n private _renderHeading = (heading?: IHeadingData): JSX.Element | undefined => {\n if(!heading) {\n return undefined;\n }\n return(\n \n );\n }\n\n private _addItemToCart = async (product: SimpleProduct, itemKey: string): Promise => {\n const { context, data, resources, telemetry } = this.props;\n const { cart, productAvailability } = data;\n const { addedToCartSuccessMessage, addedToCartFailureMessage } = resources;\n\n const productInventoryInformation = this._getProductInventory({ProductDetails:product}, productAvailability.result);\n\n if (context) {\n if (cart.result) {\n const isOrderQuantityLimitsFeatureEnabledInHq = this.props.data.featureState.result\n ?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')?.IsEnabled || false;\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings = defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n (customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\n\n const isOrderQuantityLimitsFeatureEnabled = isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings;\n\n // check if the product delivery mode is electronic\n const emailDeliveryModeCode = this.props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n\n const deliveryOptions = await getDeliveryOptionsAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n [product.RecordId]);\n\n const addProductToCartInput = {\n product: product,\n quantity: 1,\n enableStockCheck: context.app.config.enableStockCheck,\n availableQuantity: productInventoryInformation?productInventoryInformation.ProductAvailableQuantity.AvailableQuantity : 0,\n additionalProperties: { orderQuantityLimitsFeatureIsEnabled: isOrderQuantityLimitsFeatureEnabled },\n isAddEmailDeliveryItemToCart: ArrayExtensions.hasElements(deliveryOptions) && ArrayExtensions.hasElements(deliveryOptions[0].DeliveryOptions) && deliveryOptions[0].DeliveryOptions![0].Code === emailDeliveryModeCode\n };\n\n cart.result.addProductToCart(addProductToCartInput)\n .then(async result => {\n if (result.status === 'SUCCESS') {\n this.setState({\n productId: product.RecordId,\n itemKey: itemKey,\n userMessage: addedToCartSuccessMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n } else if (result.substatus === 'MAXQUANTITY') {\n const curQuantity = (await cart).cart?.CartLines?.find(item => item.ProductId === product.RecordId)?.Quantity || 0;\n const maxQtyLimitReachedMessage = this._getInventoryValueMessage(productInventoryInformation, curQuantity);\n\n this.setState({\n productId: product.RecordId,\n itemKey: itemKey,\n userMessage: maxQtyLimitReachedMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else if (result.substatus === 'QUANTITYLIMITS' && isOrderQuantityLimitsFeatureEnabled) {\n const maxQtyLimitReachedMessage = result.errorDetails?.LocalizedMessage!;\n\n this.setState({\n productId: product.RecordId,\n itemKey: itemKey,\n userMessage: maxQtyLimitReachedMessage || addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else {\n this.props.telemetry.debug('[wishlist-items] Unable to Update Cart Line from the wishlist');\n this.setState({\n productId: product.RecordId,\n itemKey: itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n }\n })\n .catch(error => {\n telemetry.warning(error);\n telemetry.debug('[wishlist-items] Error trying to Update Cart Line from the wishlist');\n this.setState({\n productId: product.RecordId,\n itemKey: itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n });\n }\n }\n };\n\n private _removeItemFromWishlist = (productId: number): void => {\n const { context, data, telemetry } = this.props;\n const { wishlists } = data;\n\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n const wishlistLineId = this._getWishlistLineIdFromProductId(productId);\n if (userToken && wishlists.result && wishlists.result[0] && wishlistLineId) {\n removeLinesAsync({ callerContext: context.actionContext }, wishlists.result[0].Id, [{ LineId: wishlistLineId }])\n .then(commerceList => {\n const castCommerceList: CommerceList | null = commerceList as (CommerceList | null);\n\n if (castCommerceList && castCommerceList.Id && context.request.user.isAuthenticated) {\n context.actionContext.update(createGetByCustomerInput({}, null), [castCommerceList]);\n getItemsInWishlists(new ActiveWishlistInput(), context.actionContext)\n .then((products) => {\n const castSimpleProducts: FullProduct[] | null = products as (FullProduct[] | null);\n if (castSimpleProducts && castSimpleProducts.length > 0) {\n context.actionContext.update(new ActiveWishlistInput(), castSimpleProducts);\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable to hyderate the wishlist with product information');\n telemetry.error(error);\n });\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist');\n telemetry.error(error);\n });\n } else {\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist user token or lineItemID wasn\\'t found');\n }\n }\n }\n\n private _getInventoryValueMessage(product: IProductInventoryInformation | undefined, curQuantity: number):string {\n const { context, resources } = this.props;\n const { maxQuantityLimitText } = resources;\n\n const maxQuantityForLineItem = context.app.config.maxQuantityForCartLineItem || 10;\n\n if(!product || !product.ProductAvailableQuantity.AvailableQuantity || !context.app.config.enableStockCheck) {\n return maxQuantityLimitText.replace('{maxQuantity}', maxQuantityForLineItem.toString()).replace('{curQuantity}', curQuantity.toString());\n }\n\n const minInventory = Math.min(maxQuantityForLineItem, product.ProductAvailableQuantity.AvailableQuantity);\n\n return maxQuantityLimitText.replace('{maxQuantity}', minInventory.toString()).replace('{curQuantity}', curQuantity.toString());\n }\n\n private _getProductInventory(product: FullProduct, productInventoryCollection: IProductInventoryInformation[] | undefined): IProductInventoryInformation | undefined {\n if(productInventoryCollection && productInventoryCollection.length) {\n for (const productResult of productInventoryCollection) {\n if(product.ProductDetails.RecordId === productResult.ProductAvailableQuantity.ProductId) {\n return productResult;\n }\n }\n }\n return undefined;\n }\n\n private _inventoryLabel = (product: FullProduct):string | undefined => {\n const { productAvailability } = this.props.data;\n if(productAvailability && productAvailability.result) {\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\n if(productInventoryInformation) {\n return productInventoryInformation.StockLevelLabel;\n }\n }\n\n return undefined;\n }\n\n private _inventoryClassName = (product: FullProduct):string | undefined => {\n const { productAvailability } = this.props.data;\n if(productAvailability && productAvailability.result) {\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\n if(productInventoryInformation && productInventoryInformation.StockLevelCode) {\n return `ms-wishlist-items__${productInventoryInformation.StockLevelCode.toLowerCase()}`;\n }\n }\n\n return undefined;\n }\n\n private _isProductInStock = (product: FullProduct): boolean => {\n const { data, context } = this.props;\n const { productAvailability } = data;\n\n if (!context.app.config.enableStockCheck) {\n return true;\n }\n\n if (!productAvailability.result || !product.ProductDetails) {\n return false;\n }\n\n for (const productResult of productAvailability.result) {\n if (productResult.ProductAvailableQuantity &&\n productResult.ProductAvailableQuantity.ProductId &&\n productResult.ProductAvailableQuantity.ProductId === product.ProductDetails.RecordId) {\n return productResult.IsProductAvailable;\n }\n }\n\n return false;\n }\n\n private _getWishlistLineIdFromProductId = (productId: number): number | null => {\n const { wishlists } = this.props.data;\n\n if (!wishlists.result || !(wishlists.result.length > 0) || !wishlists.result[0].CommerceListLines || !(wishlists.result[0].CommerceListLines.length > 0)) {\n this.props.telemetry.error('Wishlist content is empty, module wont render.');\n return null;\n }\n\n const foundWishlistItem = wishlists.result[0].CommerceListLines.filter((commerceListLine) => {\n return commerceListLine.ProductId === productId;\n });\n\n if (foundWishlistItem && foundWishlistItem[0].LineId) {\n return foundWishlistItem[0].LineId;\n } else {\n return null;\n }\n }\n}\n\nexport default WishlistItems;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IGetHelpInput, IHelp } from '../../../';\n\nexport const getOrderDetailsHelp = ({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel, telemetryContent }: IGetHelpInput): IHelp => {\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.ContactNumber);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return ({\n helpProps: { className: 'ms-order-details__help' },\n needHelpLabel:

{needHelpLabel}

,\n helpLineNumberLabel: {helpLineNumberLabel},\n contactNumber: (\n \n {contactNumber}\n \n )}\n );\n};\n","import { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { CartLine, OrgUnitLocation, ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\nexport interface IPickUpInStoreViewProps {\n callbacks: {\n toggleBopis(isBopisSelected: boolean): void;\n };\n defaultComponent?: React.ReactNode;\n orgUnitName?: string;\n isBopisSelected: boolean;\n ContainerProps: INodeProps;\n deliveryOption?: string;\n}\n\nexport interface IPickUpInStoreProps {\n cartline: CartLine;\n product: SimpleProduct;\n shipitText: string;\n pickUpInStoreText: string;\n changeStoreText: string;\n cartState: ICartState | undefined;\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\n orgUnitLocations?: OrgUnitLocation[] | undefined;\n deliveryOptions?: ProductDeliveryOptions;\n pickupDeliveryModeCode?: string;\n storeSelectorModuleId?: string;\n locationChangedHandler(): void;\n}\n\n// tslint:disable-next-line:max-func-body-length\nexport const PickUpInStore = (props: IPickUpInStoreProps): IPickUpInStoreViewProps | undefined => {\n const _onLocationChangedCallback = (orgUnitLocation: OrgUnitLocation, cartState: ICartState | undefined, cartline: CartLine, deliveryMode?: string) => {\n if(!cartState) {\n return Promise.resolve();\n }\n return cartState.updateCartLinePickupLocation({cartLineId: cartline.LineId!, location: orgUnitLocation, deliveryMode})\n .then(result => {\n if (result.status === 'SUCCESS') {\n props.locationChangedHandler();\n }\n })\n .catch(error => {\n return;\n });\n };\n\n const _toggleBOPIS = (isBopisSelected: boolean) => {\n const { storeSelectorStateManager, product, cartline, cartState, storeSelectorModuleId } = props;\n\n if(isBopisSelected) {\n if(!storeSelectorStateManager) {\n return;\n }\n storeSelectorStateManager.openDialog({\n id: storeSelectorModuleId,\n product,\n alreadySelectedLocation: {\n OrgUnitNumber: cartline.FulfillmentStoreId\n },\n deliveryOptions: props.deliveryOptions,\n onLocationSelected: (orgUnitLocation, deliveryMode: string | undefined) => {\n return _onLocationChangedCallback(orgUnitLocation, cartState, cartline, deliveryMode);\n }\n })\n .catch(error => {\n return;\n });\n } else {\n if(!cartState) {\n return;\n }\n cartline.DeliveryMode = '';\n cartline.FulfillmentStoreId = '';\n cartline.ShippingAddress = {};\n cartState.clearCartLinePickupLocation({cartLineId: cartline.LineId!})\n .then(result => {\n if (result.status === 'SUCCESS') {\n props.locationChangedHandler();\n }\n })\n .catch(error => {\n return;\n });\n }\n };\n\n const _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\n if(!orgUnitLocations || !fulfillmentStoreId || !(orgUnitLocations.length > 0)) {\n return '';\n }\n\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\n });\n\n if(foundLocation) {\n return foundLocation.OrgUnitName;\n } else {\n return fulfillmentStoreId;\n }\n };\n\n const _renderShippingMethod = (\n cartLine: CartLine,\n shipItText: string,\n pickupInStoretext: string,\n changeStoreText:string,\n orgUnitLocations: OrgUnitLocation[] | undefined):JSX.Element => {\n\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, orgUnitLocations);\n const bopisSelected = cartLine.FulfillmentStoreId ? true : false;\n\n const toggleBOPIS = (isBopisSelected: boolean) => { return () => _toggleBOPIS(isBopisSelected); };\n\n return (\n <>\n \n \n {\n cartLine.FulfillmentStoreId ? (\n
\n {orgUnitName}\n \n
\n ) : null\n }\n \n );\n };\n\n const _getDeliveryOption = (pickupStore: IPickUpInStoreProps, deliveryOptions: ProductDeliveryOptions) => {\n const delivery = deliveryOptions?.DeliveryOptions?.find(option => option.Code === pickupStore.pickupDeliveryModeCode);\n return delivery?.Description;\n };\n\n // If no delivery options present on the product, or none of the delivery options\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n if (!props.deliveryOptions ||\n !props.deliveryOptions.DeliveryOptions ||\n !props.pickupDeliveryModeCode ||\n !props.deliveryOptions.DeliveryOptions.find(option => option.Code === props.pickupDeliveryModeCode)) {\n return undefined;\n }\n\n return {\n callbacks: {\n toggleBopis: _toggleBOPIS\n },\n defaultComponent: _renderShippingMethod(props.cartline, props.shipitText, props.pickUpInStoreText, props.changeStoreText, props.orgUnitLocations),\n orgUnitName: _getOrgUnitName(props.cartline.FulfillmentStoreId, props.orgUnitLocations),\n isBopisSelected: props.cartline.FulfillmentStoreId ? true : false,\n deliveryOption: _getDeliveryOption(props, props.deliveryOptions),\n ContainerProps: {\n className: 'msc-cart-line__bopis-container'\n }\n };\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport { getProductUrlSync, IProductInventoryInformation, ObjectExtensions, OrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport {\n AddToOrderTemplateComponent, AddToWishlistComponent, CartLineItemComponent,\n IAddToOrderTemplateDialogResources, ICartlineResourceString, IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources, IOrderTemplateNameDialogResources, IWishlistActionSuccessResult } from '@msdyn365-commerce/components';\nimport { ICoreContext, IGridSettings, IImageSettings, ITelemetry, TelemetryEvent } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { CartLine, ChannelDeliveryOptionConfiguration, CommerceList,Customer, LineDataValidationFailure, OrgUnitLocation, ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ProductDimensionType, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport * as React from 'react';\nimport { IPickUpInStoreViewProps, PickUpInStore } from './cart-pick-up-in-store';\n\nexport interface ICartLineItemsProps {\n cartlines: CartLine[];\n cartlinesErrors: LineDataValidationFailure[];\n cartState: ICartState | undefined;\n orgUnitLocations: OrgUnitLocation[] | undefined;\n resources: ICartlineResourceString;\n productAvailabilites: IProductInventoryInformation[] | undefined;\n products: SimpleProduct[] | undefined;\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\n pickupDeliveryModeCode?: string;\n /** GridSettings for the product image in cartline */\n gridSettings: IGridSettings;\n /** ImageSettings for the product image in cartline */\n imageSettings: IImageSettings;\n id: string;\n typeName:string;\n context: ICoreContext;\n telemetry: ITelemetry;\n removeButtonText: string;\n addToWishlistButtonText: string;\n removeFromWishlistButtonText: string;\n shipItText: string;\n pickitUpText: string;\n changeStoreText: string;\n outOfStockText: string;\n outOfRangeOneText: string;\n outOfRangeFormatText: string;\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\n isStockCheckEnabled: boolean;\n wishlists: CommerceList[] | undefined;\n defaultWishlistName: string;\n maxCartlineQuantity: number;\n includeErrors?: boolean;\n showShippingChargesForLineItems?: boolean;\n telemetryContent?: ITelemetryContent;\n isQuantityLimitsFeatureEnabled: boolean;\n storeSelectorModuleId?: string;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n itemAddedToOrderTemplateDialogResources: IItemAddedToOrderTemplateDialogResources;\n duplicateItemsWhenAddingToOrderTemplateDialogResources: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\n\n addToOrderTemplateButtonText: string;\n addToOrderTemplateMessage: string;\n addItemToOrderTemplateError: string;\n orderTemplates: OrderTemplate[] | undefined;\n customerInformation: Customer | undefined;\n\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\n updateCartLinesQuantitySuccessHandler(cartline: CartLine, quantity: number): boolean;\n locationChangedHandler(): void;\n}\n\nexport interface ICartlinesViewProps {\n cartline: React.ReactNode;\n pickUpInStore?: IPickUpInStoreViewProps;\n remove: React.ReactNode;\n addToWishlist: React.ReactNode | undefined;\n addToOrderTemplate: React.ReactNode | undefined;\n\n error?: string;\n\n data?: {\n product?: SimpleProduct;\n cartline: CartLine;\n };\n}\n\nconst _getProduct = (productId: number | undefined, products?: SimpleProduct[]): SimpleProduct | undefined => {\n if (productId !== undefined && products) {\n return products.find(product => {\n return productId === product.RecordId;\n });\n }\n return undefined;\n};\n\nconst _getCartItemMaxQuantity = (maxCartlineQuantity: number, isStockCheckEnabled: boolean, productAvailability?: IProductInventoryInformation, productMaxQuantity?: number) => {\n const lineMaxQuantity = productMaxQuantity ? productMaxQuantity: maxCartlineQuantity;\n\n if(isStockCheckEnabled) {\n if(!productAvailability || !productAvailability.ProductAvailableQuantity || !productAvailability.IsProductAvailable || !productAvailability.ProductAvailableQuantity.AvailableQuantity) {\n return 0;\n }\n return productAvailability.ProductAvailableQuantity.AvailableQuantity >= lineMaxQuantity\n ? lineMaxQuantity\n : productAvailability.ProductAvailableQuantity.AvailableQuantity;\n }\n\n return lineMaxQuantity;\n};\n\nconst _getErrorMessage = (maxQuantity: number, currentQuantity: number, props: ICartLineItemsProps, lineIndex: number, isServiceItem: boolean): string | undefined => {\n const finalErrorMessage: string[] = [];\n if (props.includeErrors) {\n if (props.isStockCheckEnabled && !isServiceItem) {\n if (maxQuantity <= 0) {\n finalErrorMessage.push(props.outOfStockText);\n } else if (maxQuantity < currentQuantity) {\n if (maxQuantity === 1) {\n finalErrorMessage.push(props.outOfRangeOneText);\n } else {\n finalErrorMessage.push(props.outOfRangeFormatText.replace('{numLeft}', maxQuantity.toString()));\n }\n }\n }\n }\n\n // server-side validation\n props.cartlinesErrors\n .filter(i => i.LineIndex === lineIndex)\n .forEach(i => {\n if (i.DataValidationFailure?.ErrorContext) {\n finalErrorMessage.push(i.DataValidationFailure.ErrorContext);\n }\n });\n\n if(finalErrorMessage.length > 0) {\n return finalErrorMessage.join(' ');\n }\n\n return undefined;\n};\n\n// tslint:disable:max-func-body-length\n// tslint:disable-next-line:cyclomatic-complexity\nconst _assembleNode = (\n cartline: CartLine,\n product: SimpleProduct | undefined,\n props: ICartLineItemsProps,\n index: number,\n foundProductAvailability?: IProductInventoryInformation,\n foundProductDeliveryOptions?: ProductDeliveryOptions)\n : ICartlinesViewProps => {\n const { imageSettings, gridSettings, id, typeName, context, resources, removeButtonText,\n removeItemClickHandler, moveToWishlistSuccessHandler, addToOrderTemplateButtonText,\n addToOrderTemplateDialogResources, createOrderTemplateDialogResources,\n itemAddedToOrderTemplateDialogResources, duplicateItemsWhenAddingToOrderTemplateDialogResources,\n addToWishlistButtonText, removeFromWishlistButtonText, orderTemplates, customerInformation,\n wishlists, defaultWishlistName, storeSelectorModuleId } = props;\n\n const isAuthenticated = context.request.user.isAuthenticated;\n const nameOfWishlist = wishlists && wishlists.length > 0 && wishlists[0].Name ? wishlists[0].Name : defaultWishlistName ;\n const maxQuantity = product && _getCartItemMaxQuantity(\n props.maxCartlineQuantity,\n props.isStockCheckEnabled,\n foundProductAvailability,\n props.isQuantityLimitsFeatureEnabled ? product.Behavior?.MaximumQuantity : undefined);\n\n // check if the product is service or not by product type\n const PRODUCTASSERVICE = 2 as ReleasedProductType.Service;\n const isServiceItem = product?.ItemTypeValue === PRODUCTASSERVICE;\n\n const errorMessage = ObjectExtensions.isNullOrUndefined(maxQuantity) ? undefined : _getErrorMessage(maxQuantity, cartline.Quantity!, props, index, isServiceItem);\n\n const onRemoveClickHandler = (event: React.MouseEvent) => { removeItemClickHandler(cartline); };\n const payload = getPayloadObject(TelemetryEvent.RemoveFromCart, props.telemetryContent!, removeButtonText, '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\n\n const inventoryLbl = foundProductAvailability?.StockLevelLabel;\n const inventoryCode = foundProductAvailability? `ms-cart-line__inventory-code-${foundProductAvailability.StockLevelCode?.toLowerCase()}`:undefined;\n\n const isCustomPriceSelected = product?.Dimensions?.find(dimension => dimension.DimensionTypeValue === ProductDimensionType.Style)?.DimensionValue?.Value === 'Custom';\n\n return {\n data: {\n product: product,\n cartline: cartline\n },\n error: errorMessage,\n cartline: (\n ),\n pickUpInStore: product ? (\n PickUpInStore({\n storeSelectorModuleId: storeSelectorModuleId,\n cartState: props.cartState,\n cartline: cartline,\n product: product,\n shipitText: props.shipItText,\n pickUpInStoreText: props.pickitUpText,\n changeStoreText: props.changeStoreText,\n storeSelectorStateManager: props.storeSelectorStateManager,\n orgUnitLocations: props.orgUnitLocations,\n deliveryOptions: foundProductDeliveryOptions,\n pickupDeliveryModeCode: cartline.DeliveryMode !== (undefined || '')? cartline.DeliveryMode: props.pickupDeliveryModeCode,\n locationChangedHandler: props.locationChangedHandler\n })\n ) : undefined,\n remove: (\n \n {removeButtonText}\n \n ),\n addToWishlist: (\n isAuthenticated && product && !isCustomPriceSelected ? (\n \n ) :\n undefined\n ),\n addToOrderTemplate: (\n isAuthenticated && orderTemplates && product && !isCustomPriceSelected ? (\n \n ) :\n undefined\n )\n };\n};\n\nexport const assembleCartlines = (cartlines: CartLine[], products: SimpleProduct[] | undefined, props: ICartLineItemsProps): ICartlinesViewProps[] | null => {\n const reactNodes:ICartlinesViewProps[] = [];\n\n cartlines.map((cartline, index) => {\n const product = _getProduct(cartline.ProductId, products);\n let foundProductAvailability;\n if(props.productAvailabilites && props.productAvailabilites.length > 0) {\n foundProductAvailability = props.productAvailabilites.find((productAvailability) => {\n return productAvailability.ProductAvailableQuantity?.ProductId! === cartline.ProductId && productAvailability.InventLocationId === cartline.WarehouseId;\n });\n }\n let foundProductDeliveryOption;\n if(props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find((deliveryOption) => {\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\n });\n }\n reactNodes.push(_assembleNode(cartline, product, props, index, foundProductAvailability, foundProductDeliveryOption));\n });\n\n return reactNodes;\n};\n\n/**\n * CartLineItems component\n */\nexport const CartLineItems = (props: ICartLineItemsProps) => {\n const { products, cartlines } = props;\n return (\n assembleCartlines(cartlines, products, props)\n );\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport groupBy from 'lodash/groupBy';\nimport {assembleCartlines, ICartLineItemsProps, ICartlinesViewProps} from './cart-line-items';\n\nconst _assembleGroupCartlines = (cartlines: CartLine[], products: SimpleProduct[] | undefined, props: ICartLineItemsProps): ICartlinesViewProps[][] | null => {\n const reactNodes: ICartlinesViewProps[][] = [];\n if(!products || products.length === 0) {\n props.context.telemetry.error('Products content is empty, module wont render');\n return null;\n }\n\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => (item.DeliveryMode));\n const groupDelivery = getGroupByDelivery(cartlines);\n const cartLinesGroup: CartLine[] = [];\n\n // 1) Group by store and pick up mode\n Object.entries(groupDelivery).forEach(([deliveryType, groupByDeliveryType]) => {\n // @ts-ignore\n groupDelivery[deliveryType] = getGroupByStorePickup(groupByDeliveryType);\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\n });\n\n // 2) Create cartlines group\n Object.keys(cartLinesGroup).forEach(key => {\n const cartLines = cartLinesGroup[key];\n Object.keys(cartLines).forEach(index => {\n const cartLine = cartLines[index];\n const carLineViewProps = assembleCartlines(cartLine, products, props);\n if(carLineViewProps !== null) {\n reactNodes.push(carLineViewProps);\n }\n });\n\n });\n\n return reactNodes;\n};\n\n/**\n * CartLine Group component\n */\nexport const CartLineGroupItems = (props: ICartLineItemsProps) => {\n const { products, cartlines } = props;\n return (\n _assembleGroupCartlines(cartlines, products, props)\n );\n};","import { getPromotionOptionsForCartLineItems, PromotionOptionsForCartLineItems } from '@msdyn365-commerce-modules/retail-actions';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * IPromotionData entity interface.\n */\nexport interface IPromotionData {\n promotionOptions?: CartPromotionLine[];\n}\n\n/**\n * Calls the Retail API and returns a promotion data\n */\nexport async function getPromotionData(ctx: IActionContext): Promise {\n const promotionData: IPromotionData = {};\n\n await getPromotionOptionsForCartLineItems(\n new PromotionOptionsForCartLineItems(ctx.requestContext.apiSettings),\n ctx\n ) .then(promotionOptions => {\n if (promotionOptions) {\n promotionData.promotionOptions = promotionOptions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n return {};\n });\n\n return promotionData;\n}","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, INodeProps, IPayLoad, ITelemetryContent, TelemetryConstant, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport {\n IAddToOrderTemplateDialogResources, IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources, ILinesAddedToOrderTemplateDialogResources, IOrderTemplateNameDialogResources,\n IWishlistActionSuccessResult, PromoCodeComponent, SaveCartToOrderTemplateComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, CartLine, CartLineValidationResults, LineDataValidationFailure } from '@msdyn365-commerce/retail-proxy';\nimport { validateForCheckoutAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport React from 'react';\nimport { ICartData } from './cart.data';\nimport { ICartProps, ICartResources } from './cart.props.autogenerated';\nimport { CartLineGroupItems } from './components/cart-line-groups';\nimport { CartLineItems, ICartlinesViewProps } from './components/cart-line-items';\nimport { cartPromotions, ICartLineItemViewProps } from './components/cart-line-items-promotion';\nimport { getPromotionData, IPromotionData } from './utils/get-promotion-in-cart';\n\nexport interface ICartViewProps extends ICartProps {\n className: string;\n title?: React.ReactNode;\n CartlinesWrapper: INodeProps;\n cartlines?: ICartlinesViewProps[];\n cartLinesGroup?:ICartlinesViewProps[][];\n cart: ICartState | undefined;\n orderSummaryHeading: React.ReactNode;\n orderSummaryLineitems?: IOrderSummaryLines;\n OrderSummaryWrapper: INodeProps;\n OrderSummaryItems: INodeProps;\n OrderSummaryErrors?: IOrderSummaryErrors;\n checkoutAsGuestButton: React.ReactNode;\n checkoutAsSignInUserButton: React.ReactNode;\n storeSelector?: React.ReactNode;\n backToShoppingButton: React.ReactNode;\n waitingComponent: React.ReactNode;\n promotionOptions?: ICartLineItemViewProps;\n promoCode: React.ReactNode;\n cartLoadingStatus: string;\n cartDataResult: boolean;\n mulitplePickUpEnabled?: boolean;\n createTemplateFromCartButton: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\n}\n\nexport interface IOrderSummaryErrors {\n Wrapper: INodeProps;\n\n header: React.ReactNode;\n errors: React.ReactNode[];\n}\n\ninterface ICartComponentState {\n showPromotionDialog: boolean;\n cartlinesErrors: LineDataValidationFailure[];\n promotionData: IPromotionData;\n}\n\n/**\n *\n * Cart component\n * @extends {React.PureComponent>}\n */\n@observer\nclass Cart extends React.Component> {\n\n public state: ICartComponentState = {\n cartlinesErrors: [],\n showPromotionDialog: false,\n promotionData: {}\n };\n\n private telemetryContent: ITelemetryContent;\n private payLoad: IPayLoad;\n private isQuantityLimitsFeatureEnabled: boolean = false;\n private readonly promotionPopupId: string = 'cart-promotion-popup';\n\n constructor(props: ICartProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n this.promotionLinkClick = this.promotionLinkClick.bind(this);\n this.promotionCloseButtonclick = this.promotionCloseButtonclick.bind(this);\n }\n\n public async componentDidMount(): Promise {\n const {\n config: config,\n context: {\n actionContext: actionContext\n },\n } = this.props;\n\n this.isQuantityLimitsFeatureEnabled = await this._getOrderQuantityLimitsFeatureFlag();\n if (this.isQuantityLimitsFeatureEnabled) {\n await this._validateCart();\n }\n\n if (config.showAvailablePromotions) {\n if (this.props.data.cart.result?.cart.CartLines) {\n this.setState({ promotionData: await getPromotionData(actionContext) });\n }\n\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n this.setState({ promotionData: await getPromotionData(actionContext) });\n }\n );\n }\n }\n\n public render(): JSX.Element | null {\n const {\n data: {\n cart: { result: cart },\n products: { result: products },\n },\n context: {\n request: {\n user: {\n isAuthenticated,\n signInUrl\n }\n }\n },\n resources\n } = this.props;\n\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\n const checkoutURL = this._getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\n const cartLines = this._getCartLines();\n const RetailMulitplePickupFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\n const cartLinesGroup = RetailMulitplePickupFeatureState?.IsEnabled? this._getCartLinesGroup(): null;\n\n this.payLoad.contentAction.etext = TelemetryConstant.Checkout;\n const checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.GuestCheckout;\n const checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.BackToShopping;\n const backtoShoppingAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n const hasErrors = cartLines ? cartLines.some(cartline => cartline.error !== undefined) : false;\n\n const viewProps = {\n ...this.props,\n className: classnames('ms-cart'),\n title:

{resources.cartTitle}

,\n CartlinesWrapper: { className: 'msc-cartline-wraper' },\n OrderSummaryWrapper: { className: 'msc-order-summary-wrapper' },\n OrderSummaryItems: { className: 'msc-order-summary__items' },\n cartlines: cartLines,\n cartLinesGroup:cartLinesGroup,\n promoCode: this._getPromoCode(),\n promotionOptions: this._getPromotions(),\n cart: this.props.data.cart.result,\n context: this.props.context,\n typeName: this.props.typeName,\n telemetry: this.props.telemetry,\n id: this.props.id,\n mulitplePickUpEnabled: RetailMulitplePickupFeatureState?.IsEnabled,\n removePromoAriaLabelFormat: resources.removePromoAriaLabelFormat,\n orderSummaryHeading: ArrayExtensions.hasElements(cart?.cart.CartLines) ?\n (\n

{resources.orderSummaryTitle}

\n ) : null,\n orderSummaryLineitems: this._getOrderSummaryLineItems(),\n checkoutAsSignInUserButton: (!isCartEmpty) ?\n (\n \n ) : null,\n checkoutAsGuestButton: (!isCartEmpty && !isAuthenticated) ?\n (\n \n ) : null,\n backToShoppingButton: ,\n createTemplateFromCartButton: (this._displayAddCartToTemplate() && products) ?\n (\n \n ) : null,\n storeSelector: this.props.slots.storeSelector && this.props.slots.storeSelector.length > 0 ? this.props.slots.storeSelector[0] : null,\n removeItemClickHandler: this._removeItemFromCartHandler,\n moveToWishlistSuccessHandler: this._moveToWishlistSuccessHandler,\n waitingComponent: ,\n cartLoadingStatus: this.props.data.cart.status === 'FAILED' ? this.props.resources.cartLoadingErrorMessage : null,\n cartDataResult: this.props.data.cart.result && this.props.data.cart.result.isEmpty,\n OrderSummaryErrors: this._getOrderSummaryErrors(cartLines),\n telemetryContent: this.telemetryContent\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private promotionLinkClick = (event: React.MouseEvent) => {\n this.setState({\n showPromotionDialog: !this.state.showPromotionDialog\n });\n };\n\n private promotionCloseButtonclick = () => {\n this._hidePromotionDialog();\n };\n\n private _hidePromotionDialog(): void {\n this.setState({\n showPromotionDialog: false\n });\n }\n\n private _displayAddCartToTemplate(): boolean {\n const RetailB2BEcommerceFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailB2BEcommerceFeature');\n if (RetailB2BEcommerceFeatureState?.IsEnabled && this.props.data.customerInformation.result?.IsB2b && this.props.data.orderTemplates.result &&\n this.props.data.cart.result?.cart?.CartLines?.length && this.props.data.cart.result.cart.CartLines.length > 0 &&\n this.props.data.customerInformation.result) {\n return true;\n }\n\n return false;\n }\n\n private _getPromotions(): React.ReactNode {\n return(\n this.props.config.showAvailablePromotions &&\n cartPromotions({\n id: this.promotionPopupId,\n showPromotionPopup: this.state.showPromotionDialog,\n onSeeAllClick: this.promotionLinkClick,\n onCloseButtonClick: this.promotionCloseButtonclick,\n promotions: this.state.promotionData.promotionOptions,\n resources: {\n promotionStringHeading: this.props.resources.promotionStringHeading,\n promotionLinkText: this.props.resources.promotionLinkText,\n promotionPopupHeading: this.props.resources.promotionPopupHeading,\n promotionCloseButtonAriaLabel: this.props.resources.promotionCloseButtonAriaLabel\n }\n })\n );\n }\n\n private _getOrderSummaryErrors(cartLines: ICartlinesViewProps[] | null): IOrderSummaryErrors | undefined {\n const allErrors = cartLines && cartLines.map(cartline => {\n\n // check if the product is service or not by product type\n const PRODUCTASSERVICE = 2 as ReleasedProductType.Service;\n const isServiceItem = cartline.data?.product?.ItemTypeValue === PRODUCTASSERVICE;\n\n if (!isServiceItem && cartline.error) {\n const fullError = (cartline.data && cartline.data.product?.Name) ? `${cartline.data.product.Name}: ${cartline.error}` : cartline.error;\n\n return (\n
{fullError}
\n );\n }\n\n return null;\n }).filter((line): line is JSX.Element => !!line) || [];\n\n return {\n Wrapper: {\n tag: Alert,\n className: 'msc-alert',\n isOpen: allErrors.length > 0,\n color: 'danger',\n assertive: true,\n 'aria-label': this.props.resources.outOfStockErrorMessageHeader\n },\n header: (\n \n ),\n errors: allErrors\n };\n }\n\n private _getOrderSummaryLineItems(): IOrderSummaryLines | undefined {\n const {\n data: {\n cart: { result: cart },\n channelDeliveryOptionConfig\n },\n telemetry,\n resources\n } = this.props;\n\n const channelConfiguration = this.props.context && this.props.context.request && this.props.context.request.channel;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const featureState = this.props?.data?.featureState;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n\n return channelConfiguration && ArrayExtensions.hasElements(cart?.cart.CartLines) ?\n (\n OrderSummary({\n cart: cart!.cart,\n subTotalLabel: resources.itemsWithCountLabel,\n shippingLabel: resources.estimatedShippingLabel,\n otherChargeLabel: resources.otherCharges,\n taxLabel: resources.estimatedTaxLabel,\n orderTotalLabel: resources.orderTotal,\n totalDiscountsLabel: resources.totalDiscountsLabel,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n toBeCalculatedText: resources.yetToBeCalculatedText,\n freeText: resources.priceFree,\n channelConfiguration: channelConfiguration,\n retailMultiplePickUpOptionEnabled: retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\n telemetry: telemetry\n })\n ) : undefined;\n }\n\n private _getPromoCode(): React.ReactNode {\n const {\n data: {\n cart: { result: cart }\n },\n resources\n } = this.props;\n\n return cart && (\n \n );\n }\n\n private _generateAddToOrderTemplateDialogResources(resources: ICartResources): IAddToOrderTemplateDialogResources {\n return {\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\n\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\n\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\n\n selectTemplatesText: resources.selectTemplatesText,\n addToTemplateButtonText: resources.addToTemplateButtonText,\n lineItemsText: resources.lineItemsText\n };\n }\n\n private _generateItemAddedToOrderTemplateDialogResources(resources: ICartResources): IItemAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\n freePriceText: resources.freePriceText,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText\n };\n }\n\n private _generateLinesAddedToOrderTemplateDialogResources(resources: ICartResources): ILinesAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n linesAddedToOrderTemplateHeaderItemsOneText: resources.linesAddedToOrderTemplateHeaderItemsOneText,\n linesAddedToOrderTemplateHeaderItemsFormatText: resources.linesAddedToOrderTemplateHeaderItemsFormatText,\n linesAddedToOrderTemplateHeaderLinesOneText: resources.linesAddedToOrderTemplateHeaderLinesOneText,\n linesAddedToOrderTemplateHeaderLinesFormatText: resources.linesAddedToOrderTemplateHeaderLinesFormatText,\n linesAddedToOrderTemplateHeaderMessageText: resources.linesAddedToOrderTemplateHeaderMessageText\n };\n }\n\n private _generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(resources: ICartResources): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n return {\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\n updateQuantityButtonText: resources.updateQuantityButtonText,\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\n };\n }\n\n private _generateOrderTemplateNameDialogResources(resources: ICartResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n }\n\n private _getCartLines(): ICartlinesViewProps[] | null {\n const {\n data: {\n cart: { result: cart },\n wishlists: { result: wishlists },\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n context: {\n request: {\n channel: {\n PickupDeliveryModeCode\n } = { PickupDeliveryModeCode: undefined }\n }\n },\n config: config,\n telemetry,\n resources,\n modules\n } = this.props;\n\n const imageSettings = this._getImageSettings(config.imageSettings);\n\n const cartlinesErrors: LineDataValidationFailure[] = this.state.cartlinesErrors ;\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n return ArrayExtensions.hasElements(cart?.cart.CartLines) ? (\n CartLineItems({\n cartlines: cart!.cart.CartLines!,\n storeSelectorModuleId: storeSelectorId,\n cartlinesErrors: cartlinesErrors,\n products: this.props.data.products.result,\n productAvailabilites: this.props.data.productAvailabilites.result,\n productDeliveryOptions: this.props.data.deliveryOptions.result,\n imageSettings: imageSettings,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n maxCartlineQuantity: this.props.context.app.config.maxQuantityForCartLineItem,\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n resources: {\n sizeString: resources.productDimensionTypeSize,\n colorString: resources.productDimensionTypeColor,\n configString: resources.productDimensionTypeConfiguration,\n styleString: resources.productDimensionTypeStyle,\n amountString: resources.productDimensionTypeAmount,\n quantityDisplayString: resources.quantityDisplayText,\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\n discountStringText: resources.discountStringText,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n shippingChargesText: resources.shippingCharges\n },\n telemetry: telemetry,\n addToWishlistButtonText: resources.addToWishlistButtonText,\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\n removeButtonText: resources.removeCartButtonText,\n shipItText: resources.shipInsteadDisplayText,\n pickitUpText: resources.pickItUpDisplayText,\n changeStoreText: resources.changeStoreDisplayText,\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\n outOfStockText: resources.outOfStockErrorMessage,\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\n cartState: this.props.data.cart.result,\n orgUnitLocations: this.props.data.orgUnitLocations.result,\n removeItemClickHandler: this._removeItemFromCartHandler,\n moveToWishlistSuccessHandler: this._moveToWishlistSuccessHandler,\n updateCartLinesQuantitySuccessHandler: this._updateCartlineQuantity,\n locationChangedHandler: this._fulfillmentStoreIdUpdated,\n wishlists: wishlists,\n defaultWishlistName: resources.defaultWishlistName,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n includeErrors: config.showOutOfStockErrors,\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\n telemetryContent: this.telemetryContent,\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\n\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(resources),\n\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\n orderTemplates: orderTemplates,\n customerInformation: customerInformation\n })\n ) : null;\n }\n\n private _getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\n if (isAuthenticated) {\n return guestCheckoutUrl;\n }\n\n const absoluteUrlRegExp = new RegExp('^(?:[a-z]+:)?//', 'i');\n const isAbsoluteUrl = absoluteUrlRegExp.test(guestCheckoutUrl);\n let returnURL = guestCheckoutUrl;\n if (MsDyn365.isBrowser && !isAbsoluteUrl) {\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\n }\n\n return `${signInUrl}${signInUrl.indexOf('?') === -1 ? '?' : '&'}ru=${returnURL}`;\n }\n\n private _getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\n return imageSettings || {\n viewports: {\n xs: { q: `w=80&h=94&m=6`, w: 0, h: 0 },\n sm: { q: `w=148&h=174&m=6`, w: 0, h: 0 },\n lg: { q: `w=148&h=174&m=6`, w: 0, h: 0 }\n },\n lazyload: true\n };\n }\n\n private _removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\n if (this.props.data.cart.result) {\n const input = {\n cartLineIds: [cartlineToRemove.LineId!.toString()]\n };\n this.props.data.cart.result.removeCartLines(input)\n .then(() => {\n this._validateCart()\n .catch((error) => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n });\n })\n .catch((error) => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to Remove Cart Line');\n });\n }\n }\n\n private _moveToWishlistSuccessHandler = (result: IWishlistActionSuccessResult, cartline?: CartLine) => {\n if (result.status === 'ADDED' && cartline) {\n this._removeItemFromCartHandler(cartline);\n }\n }\n\n private _updateCartlineQuantity = (cartlineToUpdate: CartLine, quantity: number): boolean => {\n if (this.props.data.cart.result) {\n const input = {\n cartLineId: cartlineToUpdate.LineId!.toString(),\n newQuantity: quantity,\n additionalProperties: { orderQuantityLimitsFeatureIsEnabled: this.isQuantityLimitsFeatureEnabled }\n };\n this.props.data.cart.result.updateCartLineQuantity(input)\n .then((result: ICartActionResult) => {\n if(result.status === 'SUCCESS') {\n this._validateCart().catch((error) => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n });\n return true;\n }\n return false;\n })\n .catch((error) => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to update Cart Line quantity');\n });\n }\n\n return false;\n }\n\n private _fulfillmentStoreIdUpdated = () => {\n this._validateCart().catch((error) => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n });\n }\n\n private async _validateCart(retry: boolean = true): Promise {\n if (!this.isQuantityLimitsFeatureEnabled) {\n return AsyncResult.resolve();\n }\n\n const {\n data: { cart: cart }\n } = this.props;\n let cartResult: ICartState;\n try {\n cartResult = await cart;\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get cart');\n return AsyncResult.resolve();\n }\n const cartVersion = cartResult.cart?.Version;\n if (cartVersion) {\n try {\n const validationResult: CartLineValidationResults = await validateForCheckoutAsync({ callerContext: this.props.context.actionContext }, cartResult?.cart?.Id, cartVersion);\n this.setState({cartlinesErrors: validationResult.ValidationFailuresByCartLines || []});\n return AsyncResult.resolve();\n } catch (error) {\n if(retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n try {\n await cartResult.refreshCart({});\n } catch (refreshError) {\n this.props.telemetry.warning(refreshError);\n this.props.telemetry.debug('Unable to refresh Cart');\n return AsyncResult.resolve();\n }\n try {\n await this._validateCart(false);\n return AsyncResult.resolve();\n } catch (validateError) {\n this.props.telemetry.warning(validateError);\n this.props.telemetry.debug('Unable to validate Cart');\n return AsyncResult.resolve();\n }\n }\n\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n return AsyncResult.resolve();\n }\n } else {\n this.props.telemetry.warning('Cart version not found for Cart validation request.');\n return AsyncResult.resolve();\n }\n }\n\n private async _getOrderQuantityLimitsFeatureFlag(): Promise {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n try {\n const featureStatuses = await this.props.data.featureState;\n const isQuantityLimitsFeatureEnabledInHq = featureStatuses\n .find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')?.IsEnabled || false;\n if (!isQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get feature states');\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n try {\n const customerInfo = await this.props.data.customerInformation;\n return !!customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n } catch(error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get customer info');\n return false;\n }\n }\n\n private _getCartLinesGroup(): ICartlinesViewProps[][] | null {\n const {\n data: {\n cart: { result: cart },\n wishlists: { result: wishlists },\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n context: {\n request: {\n channel: {\n PickupDeliveryModeCode\n } = { PickupDeliveryModeCode: undefined }\n }\n },\n config: config,\n telemetry,\n resources,\n modules\n } = this.props;\n\n const imageSettings = this._getImageSettings(config.imageSettings);\n const isQuantityLimitsFeatureEnabled = this.props.data.featureState.result?.\n find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')?.IsEnabled || false;\n const cartlinesErrors: LineDataValidationFailure[] = this.state.cartlinesErrors ;\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n\n return this.props.data.products && this.props.data.products.result && cart && cart.cart.CartLines && cart.cart.CartLines.length > 0 && this.props.data.channelDeliveryOptionConfig?.result ? (\n CartLineGroupItems({\n cartlines: cart.cart.CartLines,\n storeSelectorModuleId: storeSelectorId,\n cartlinesErrors: cartlinesErrors,\n products: this.props.data.products.result,\n productAvailabilites: this.props.data.productAvailabilites.result,\n productDeliveryOptions: this.props.data.deliveryOptions.result,\n imageSettings: imageSettings,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n maxCartlineQuantity: this.props.context.app.config.maxQuantityForCartLineItem,\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n resources: {\n sizeString: resources.productDimensionTypeSize,\n colorString: resources.productDimensionTypeColor,\n configString: resources.productDimensionTypeConfiguration,\n styleString: resources.productDimensionTypeStyle,\n amountString: resources.productDimensionTypeAmount,\n quantityDisplayString: resources.quantityDisplayText,\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\n discountStringText: resources.discountStringText,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n shippingChargesText: resources.shippingCharges\n },\n telemetry: telemetry,\n addToWishlistButtonText: resources.addToWishlistButtonText,\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\n removeButtonText: resources.removeCartButtonText,\n shipItText: resources.shipInsteadDisplayText,\n pickitUpText: resources.pickItUpDisplayText,\n changeStoreText: resources.changeStoreDisplayText,\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\n outOfStockText: resources.outOfStockErrorMessage,\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\n cartState: this.props.data.cart.result,\n orgUnitLocations: this.props.data.orgUnitLocations.result,\n removeItemClickHandler: this._removeItemFromCartHandler,\n moveToWishlistSuccessHandler: this._moveToWishlistSuccessHandler,\n updateCartLinesQuantitySuccessHandler: this._updateCartlineQuantity,\n locationChangedHandler: this._fulfillmentStoreIdUpdated,\n wishlists: wishlists,\n defaultWishlistName: resources.defaultWishlistName,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n includeErrors: config.showOutOfStockErrors,\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\n telemetryContent: this.telemetryContent,\n isQuantityLimitsFeatureEnabled: isQuantityLimitsFeatureEnabled,\n\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(resources),\n\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\n orderTemplates: orderTemplates,\n customerInformation: customerInformation,\n channelDeliveryOptionConfig: this.props.data.channelDeliveryOptionConfig?.result\n })\n ) : null;\n }\n\n}\n\nexport default Cart;\n","import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\nimport React from 'react';\n\nexport interface ICartLineItemPromotion {\n id: string;\n showPromotionPopup: boolean;\n promotions: CartPromotionLine[] | undefined;\n resources: ICartLineItemPromotionResourceString;\n onSeeAllClick(event: React.MouseEvent): void;\n onCloseButtonClick(): void;\n}\n\nexport interface ICartLineItemViewProps {\n promotionMessageWrapper: INodeProps;\n promotionMessage: React.ReactNode;\n promotionSeeAllLink: React.ReactElement;\n promotionDialog: React.ReactNode;\n}\n\nexport interface ICartLineItemPromotionResourceString {\n promotionLinkText: string;\n promotionStringHeading: string;\n promotionPopupHeading: string;\n promotionCloseButtonAriaLabel: string;\n}\n\nexport const cartPromotions = (props: ICartLineItemPromotion): ICartLineItemViewProps | undefined => {\n\n const {\n id,\n showPromotionPopup,\n promotions,\n resources : {\n promotionLinkText,\n promotionPopupHeading\n },\n onCloseButtonClick,\n onSeeAllClick,\n } = props;\n\n if (!ArrayExtensions.hasElements(promotions)) {\n return;\n }\n\n const titleId = `${id}_title`;\n const className = 'msc-cart__promotion';\n return {\n promotionMessageWrapper: {\n className: 'msc-cart__promotion'\n },\n promotionMessage: (\n \n \n {props.resources.promotionStringHeading}\n \n ),\n promotionSeeAllLink: ( {promotionLinkText} ),\n promotionDialog: (\n \n \n
{promotionPopupHeading}
\n
\n \n
    \n {promotions!.map(_promotion => {\n return (\n
  • {_promotion.Promotion?.OfferName}
  • \n );\n }\n )}\n
\n
\n \n
\n )\n };\n};","import { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\n\nconst ProductCollectionView: React.FC = props => {\n const { heading, ProductCollectionContainer, products, SingleSlideCarouselComponentProps, GridComponentProps, isCarousel } = props;\n if (products) {\n return (\n \n {heading}\n {\n isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)\n }\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return (\n \n {items && items.map(_renderProduct)}\n \n );\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return (\n \n {items && items.map(_renderProduct)}\n \n );\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return (\n \n {productComponent}\n \n );\n};\n\nexport default ProductCollectionView;","import { IAddToCartFailureResult } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { OrgUnitLocation, ProductAvailableQuantity , ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IBuyboxResources } from '../buybox.props.autogenerated';\n\nexport function getQuantityError(stockLeft: number | undefined, resources: IBuyboxResources): string | undefined {\n if (!stockLeft || stockLeft <= 0) {\n return resources.errorMessageOutOfStock;\n } else if (stockLeft === 1) {\n return resources.errorMessageOutOfRangeOneLeft;\n } else {\n return resources.errorMessageOutOfRangeFormat.replace('{numLeft}', stockLeft.toString());\n }\n}\n\n// tslint:disable-next-line:cyclomatic-complexity\nexport function getGenericError(\n result: IAddToCartFailureResult,\n cart: ICartState | undefined,\n resources: IBuyboxResources,\n context: ICoreContext>,\n product: SimpleProduct | undefined,\n productAvailability: ProductAvailableQuantity | undefined,\n location: OrgUnitLocation | undefined)\n : string | undefined {\n if (result.failureReason === 'EMPTYINPUT') {\n return resources.addedToCartFailureMessage;\n } else if (result.failureReason === 'CARTACTIONFAILED') {\n if (result.cartActionResult && result.cartActionResult.substatus === 'MAXQUANTITY') {\n // get the quantity of the product in cart\n let elementFoundAt:number = -1;\n const productIdToFind = product?.RecordId;\n\n for (let i = 0; i < cart!.cart.CartLines!.length; i++) {\n if (cart!.cart.CartLines![i].ProductId === productIdToFind &&\n (cart!.cart.CartLines![i].DeliveryMode || '') === (location && context.actionContext.requestContext.channel?.PickupDeliveryModeCode || '') &&\n (cart!.cart.CartLines![i].FulfillmentStoreId || '') === (location?.OrgUnitNumber || '')) {\n elementFoundAt = i;\n\n break;\n }\n }\n\n let curQuantity: number = 0;\n\n if (elementFoundAt !== -1) {\n const cartLineToUpdate = {...cart!.cart.CartLines![elementFoundAt]};\n curQuantity = cartLineToUpdate.Quantity || 0;\n }\n\n // get the quantity limit for the product\n const maxQuantityForCartLineItem = context.app.config.maxQuantityForCartLineItem;\n const availableQty = productAvailability?.AvailableQuantity;\n\n let quantityLimit: number;\n\n if (maxQuantityForCartLineItem === undefined && availableQty === undefined) {\n quantityLimit = 10;\n } else if (availableQty === undefined) {\n quantityLimit = maxQuantityForCartLineItem;\n } else if (maxQuantityForCartLineItem === undefined) {\n quantityLimit = availableQty;\n } else {\n quantityLimit = Math.min(maxQuantityForCartLineItem, availableQty);\n }\n\n return resources.maxQuantityLimitText.replace('{curQuantity}', curQuantity.toString()).replace('{maxQuantity}', quantityLimit.toString());\n } else if (result.cartActionResult && result.cartActionResult.substatus === 'QUANTITYLIMITS') {\n return result.cartActionResult?.errorDetails?.LocalizedMessage;\n }\n\n return resources.addedToCartFailureMessage;\n }\n\n return undefined;\n}\n\nexport function getConfigureErrors(result: ProductDimension[] | undefined, resources: IBuyboxResources, isGiftCard?: Boolean): { [configureId: string]: string | undefined } {\n if (!result) {\n return {};\n }\n\n const dimensions: { [configureId: string]: string | undefined } = {};\n\n result.forEach(dimension => {\n dimensions[dimension.DimensionTypeValue] = getDimensionErrorString(dimension.DimensionTypeValue, resources, isGiftCard);\n });\n\n return dimensions;\n}\n\nexport function getDimensionErrorString(dimensionTypeValue: number, resources: IBuyboxResources, isGiftCard?: Boolean): string {\n switch (dimensionTypeValue) {\n case 1: // ProductDimensionType.Color\n return resources.productDimensionTypeColorErrorMessage;\n case 2: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfigurationErrorMessage;\n case 3: // ProductDimensionType.Size\n return resources.productDimensionTypeSizeErrorMessage;\n case 4: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmountErrorMessage : resources.productDimensionTypeStyleErrorMessage;\n default:\n return '';\n }\n}","import * as React from 'react';\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, Heading, INodeProps, ITelemetryContent, Node, Quantity, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport {\n AddToCartComponent,\n AddToOrderTemplateComponent,\n AddToWishlistComponent,\n IAddToCartFailureResult,\n IAddToOrderTemplateDialogResources,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n IOrderTemplateActionErrorResult,\n IOrderTemplateNameDialogResources,\n IWishlistActionErrorResult,\n PriceComponent,\n RatingComponent\n} from '@msdyn365-commerce/components';\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\nimport { IBuyboxCallbacks, IBuyboxData, IBuyboxProps, IBuyboxResources, IBuyboxState } from '../../../index';\nimport { getConfigureErrors, getGenericError, getQuantityError } from '../utilities/error-utilities';\n\nexport function getBuyBoxInventoryLabel(props: IBuyboxProps): React.ReactElement | undefined {\n const {\n data: { productAvailableQuantity: { result: productAvailableQuantity } },\n } = props;\n if (!productAvailableQuantity || !productAvailableQuantity.length) {\n return undefined;\n }\n if (productAvailableQuantity &&\n productAvailableQuantity.length &&\n productAvailableQuantity[0].StockLevelLabel) {\n const inventoryClassName = productAvailableQuantity[0].StockLevelCode ?\n `ms-buybox__inventory-label ms-buybox__inventory-code-${productAvailableQuantity[0].StockLevelCode.toLowerCase()}` :\n 'ms-buybox__inventory-label';\n return (
{productAvailableQuantity[0].StockLevelLabel}
);\n }\n\n return undefined;\n\n}\nexport function getBuyboxProductTitle(props: IBuyboxProps): React.ReactElement | undefined {\n const {\n data: { product: { result: product } },\n config: { titleHeadingTag = 'h1' }\n } = props;\n\n return product && (\n \n );\n}\n\nexport function getBuyboxProductDescription(props: IBuyboxProps): React.ReactElement | undefined {\n const {\n data: { product: { result: product } }\n } = props;\n\n return product && (\n

{product.Description}

\n );\n}\n\nexport interface IBuyboxAddToCartViewProps {\n ContainerProps: INodeProps;\n errorBlock?: React.ReactNode;\n button?: React.ReactNode;\n}\n\nlet telemetryContent: ITelemetryContent;\n\n// tslint:disable-next-line:max-func-body-length\nexport function getBuyboxAddToCart(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks,\n defaultMinimumKeyInPrice: number, defaultMaximumKeyInPrice: number): IBuyboxAddToCartViewProps {\n const {\n id,\n typeName,\n context,\n data: { cart: { result: cart }, product: { result: product }, productAvailableQuantity: { result: productAvailableQuantity } },\n resources,\n config: { minimumKeyInPrice, maximumKeyInPrice }\n } = props;\n\n const {\n quantity,\n errorState: {\n configureErrors,\n quantityError,\n customAmountError,\n otherError,\n errorHost\n },\n selectedProduct,\n isUpdatingDimension,\n isUpdatingDeliveryOptions,\n isServiceItem,\n keyInPriceAmount\n } = state;\n\n const productAvailability = state.productAvailableQuantity ?\n state.productAvailableQuantity.ProductAvailableQuantity :\n productAvailableQuantity && productAvailableQuantity.length ?\n productAvailableQuantity[0].ProductAvailableQuantity : undefined;\n\n const onAddToCartFailed = (result: IAddToCartFailureResult) => {\n let quantityErrorForState: string | undefined;\n let customAmountErrorForState: string | undefined;\n let otherErrorForState: string | undefined = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\n\n if(result.failureReason === 'OUTOFSTOCK') {\n quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, resources) : undefined;\n } else if(result.failureReason === 'CARTACTIONFAILED'\n && result.cartActionResult\n && (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult.substatus === 'QUANTITYLIMITS')) {\n quantityErrorForState = getGenericError(result, cart, resources, context, product, productAvailability, undefined);\n otherErrorForState = undefined; // prevent error duplication in otherError and quantityError\n }\n\n if(result.failureReason === 'INVALIDCUSTOMAMOUNT') {\n if (keyInPriceAmount === undefined || keyInPriceAmount < (minimumKeyInPrice || defaultMinimumKeyInPrice)) {\n const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(minimumKeyInPrice || defaultMinimumKeyInPrice);\n customAmountErrorForState = resources.invalidSmallCustomAmountText.replace('{minAmount}', formatedAmountLimit);\n } else if (keyInPriceAmount > (maximumKeyInPrice || defaultMaximumKeyInPrice)) {\n const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(maximumKeyInPrice || defaultMaximumKeyInPrice);\n customAmountErrorForState = resources.invalidLargeCustomAmountText.replace('{maxAmount}', formatedAmountLimit);\n }\n }\n\n callbacks.updateErrorState({\n errorHost: 'ADDTOCART',\n quantityError: quantityErrorForState,\n configureErrors: result.failureReason === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {},\n customAmountError: customAmountErrorForState,\n otherError: otherErrorForState\n });\n };\n\n const dialogStrings = {\n goToCartText: resources.buyBoxGoToCartText,\n continueShoppingText: resources.buyBoxContinueShoppingText,\n headerItemOneText: resources.buyBoxSingleItemText,\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\n headerMessageText: resources.buyBoxHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText\n };\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const isLoading = props.data.productAvailableQuantity.status === 'LOADING';\n if (isLoading) {\n callbacks.changeUpdatingDimension(false);\n }\n\n const isLoadingDeliveryOptions = typeName !== 'quickview' && props.data.deliveryOptions?.status === 'LOADING';\n if (isLoadingDeliveryOptions && callbacks.changeUpdatingDeliveryOptions) {\n callbacks.changeUpdatingDeliveryOptions(false);\n }\n\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!,\n props.friendlyName,\n props.telemetry);\n\n // check if the product delivery mode is electronic\n const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n const deliveryOptions = props.data.deliveryOptions?.result;\n const isEmailDelivery = deliveryOptions && deliveryOptions.DeliveryOptions && ArrayExtensions.hasElements(deliveryOptions.DeliveryOptions) && deliveryOptions.DeliveryOptions[0].Code === emailDeliveryModeCode;\n\n return {\n ContainerProps: {\n className: 'ms-buybox__add-to-cart-container'\n },\n button: product && (\n \n ),\n errorBlock: (\n \n )\n };\n}\n\nexport function getBuyboxProductPrice(props: IBuyboxProps, state: IBuyboxState): React.ReactElement | undefined {\n const {\n id,\n typeName,\n context,\n resources\n } = props;\n\n return state.productPrice && (\n \n );\n}\n\nexport function getBuyboxProductRating(props: IBuyboxProps): React.ReactElement | undefined {\n const {\n id,\n typeName,\n context,\n data: { ratingsSummary: { result: ratingsSummary } },\n resources\n } = props;\n\n const ratingComponent = ratingsSummary && ratingsSummary.averageRating && (\n \n ) || undefined;\n\n return ratingsSummary && ratingComponent && (\n ratingComponent\n );\n}\n\nexport interface IBuyboxAddToOrderTemplateViewProps {\n ContainerProps: INodeProps;\n errorBlock?: React.ReactNode;\n button?: React.ReactNode;\n}\n\nfunction generateAddToOrderTemplateDialogResources(resources: IBuyboxResources): IAddToOrderTemplateDialogResources {\n return {\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\n\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\n\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\n\n selectTemplatesText: resources.selectTemplatesText,\n addToTemplateButtonText: resources.addToTemplateButtonText,\n lineItemsText: resources.lineItemsText\n };\n}\n\nfunction generateOrderTemplateNameDialogResources(resources: IBuyboxResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n}\n\nfunction generateItemAddedToOrderTemplateDialogResources(resources: IBuyboxResources): IItemAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText\n };\n}\n\nfunction generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(resources: IBuyboxResources): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n return {\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\n updateQuantityButtonText: resources.updateQuantityButtonText,\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\n };\n}\n\nexport function getBuyboxProductAddToOrderTemplate(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToOrderTemplateViewProps | undefined {\n const {\n id,\n typeName,\n context,\n data: {\n product: { result: product },\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n resources\n } = props;\n\n const\n {\n errorState: {\n configureErrors,\n quantityError,\n customAmountError,\n otherError,\n errorHost\n },\n quantity\n } = state;\n\n // If custom amount is selected, add-to-orderTemplate is disabled\n if (state.isCustomPriceSelected) {\n return undefined;\n }\n\n const onAddToOrderTemplateFailed = (result: IOrderTemplateActionErrorResult) => {\n callbacks.updateErrorState({\n errorHost: 'ORDER_TEMPLATE',\n configureErrors: result.status === 'MISSING_DIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {},\n });\n };\n\n return {\n ContainerProps: {\n className: 'ms-buybox__add-to-order-template-container'\n },\n button: product && orderTemplates && (\n \n ),\n errorBlock: (\n \n )\n };\n}\n\nexport interface IBuyboxAddToWishlistViewProps {\n ContainerProps: INodeProps;\n errorBlock?: React.ReactNode;\n button?: React.ReactNode;\n}\nexport function getBuyboxProductAddToWishlist(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToWishlistViewProps | undefined {\n const {\n id,\n typeName,\n context,\n data: {\n product: { result: product },\n wishlists: { result: wishlists }\n },\n resources\n } = props;\n\n const\n {\n errorState: {\n configureErrors,\n quantityError,\n customAmountError,\n otherError,\n errorHost\n },\n selectedProduct\n } = state;\n\n // If custom amount is selected, add-to-wishlist is disabled\n if (state.isCustomPriceSelected) {\n return undefined;\n }\n\n const onAddToWishlistFailed = (result: IWishlistActionErrorResult) => {\n callbacks.updateErrorState({\n errorHost: 'WISHLIST',\n configureErrors: result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {},\n });\n };\n\n return {\n ContainerProps: {\n className: 'ms-buybox__add-to-wishlist-container'\n },\n button: product && (\n \n ),\n errorBlock: (\n \n )\n };\n}\n\nexport interface IBuyboxProductQuantityViewProps {\n ContainerProps: INodeProps;\n LabelContainerProps: INodeProps;\n\n heading: React.ReactNode;\n errors?: React.ReactNode;\n\n input: React.ReactNode;\n}\nexport function getBuyboxProductQuantity(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductQuantityViewProps {\n const {\n resources,\n } = props;\n\n const\n {\n quantity,\n max,\n errorState: {\n quantityError,\n }\n } = state;\n\n const onChange = (newValue: number) => {\n if (callbacks.updateQuantity) {\n callbacks.updateQuantity(newValue);\n }\n };\n\n return {\n ContainerProps: {\n className: 'ms-buybox__quantity'\n },\n LabelContainerProps: {\n tag: 'label',\n className: 'ms-buybox__product-quantity-label',\n htmlFor: 'ms-buybox__product-quantity-input'\n },\n heading: (\n
{resources.productQuantityHeading}
\n ),\n errors: quantityError && (\n \n \n ),\n input: (\n \n )\n };\n}\n\nexport interface IBuyboxShopSimilarLookViewProps {\n ContainerProps: INodeProps;\n errors?: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport function getBuyboxShopSimilarLook(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxShopSimilarLookViewProps {\n const {\n resources,\n context,\n data: {\n product: { result: product }\n },\n } = props;\n\n const\n {\n errorState: { }\n } = state;\n\n const navigationUrl = () => {\n const searchURL = getUrlSync('search', context && context.actionContext);\n const separator = searchURL!.includes('?') ? '&' : '?';\n document.location.href = `${searchURL}${separator}productId=${product && product.RecordId}`;\n };\n const payLoad = getPayloadObject('click', telemetryContent, TelemetryConstant.ShopSimliarLooks);\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\n\n return {\n ContainerProps: {\n className: 'ms-buybox__shopsimilarlooks'\n },\n input: (\n \n {resources.shopSimilarLooksText}\n \n )\n };\n}\n\nexport interface IBuyboxKeyInPriceViewProps {\n ContainerProps: INodeProps;\n LabelContainerProps: INodeProps;\n heading: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport function getBuyboxKeyInPrice(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxKeyInPriceViewProps {\n const {\n config,\n resources\n } = props;\n\n const\n {\n errorState: { }\n } = state;\n\n const onChange = (e: React.ChangeEvent) => {\n const value = e.currentTarget.value;\n callbacks.updateKeyInPrice(value.length ? Number(value) : parseFloat(value));\n };\n\n return {\n ContainerProps: {\n className: 'ms-buybox__key_in_price'\n },\n LabelContainerProps: {\n tag: 'label',\n className: 'ms-buybox__key_in_price-label',\n htmlFor: 'ms-buybox__key_in_price'\n },\n heading: (\n
{resources.buyboxKeyInPriceLabelHeading}
\n ),\n input: (\n \n )\n };\n\n}\n\nexport interface IBuyboxErrorBlockProps {\n configureErrors: { [configureId: string]: string | undefined };\n quantityError?: string;\n customAmountError?: string;\n otherError?: string;\n resources: IBuyboxResources;\n showError: boolean;\n}\nexport const BuyboxErrorBlock: React.FC = ({ showError, configureErrors, quantityError, customAmountError, otherError, resources }) => {\n let errorMessages: (string | undefined)[] = [];\n\n errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\n\n if (quantityError) {\n errorMessages.push(quantityError);\n }\n\n if (customAmountError) {\n errorMessages.push(customAmountError);\n }\n\n if (otherError) {\n errorMessages.push(otherError);\n }\n\n return (\n 0} color='danger' assertive={true} aria-label={resources.buyboxErrorMessageHeader} >\n \n {errorMessages.map((message, index) => {\n return (\n
{message}
\n );\n })}\n
\n );\n};\n\nexport function getQuantityLimitsMessages(props: IBuyboxProps, state: IBuyboxState): React.ReactElement | undefined {\n const {\n resources\n } = props;\n\n const\n {\n min,\n max,\n } = state;\n\n if (!_isOrderQuantityLimitsFeatureEnabled(props)) {\n return undefined;\n }\n\n return (\n \n {_renderMaxLabel(max, resources.maxQuantityText)}\n {_renderMinLabel(min, resources.minQuantityText)}\n \n );\n}\n\nexport const RetailDefaultOrderQuantityLimitsFeatureName: string = 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature';\n\nconst _renderMaxLabel = (max: number | undefined, maxQuantityText: string): React.ReactElement | undefined => {\n if(max && max !== 0 && max !== Number.MAX_VALUE) {\n return(\n

\n {maxQuantityText.replace('{max}', max.toString())}\n

\n );\n } else {\n return undefined;\n }\n};\n\nconst _renderMinLabel = (min: number | undefined, minQuantityText: string): JSX.Element | undefined => {\n if(min && min > 1) {\n return(\n

\n {minQuantityText.replace('{min}', min.toString())}\n

\n );\n } else {\n return undefined;\n }\n};\n\nconst _isOrderQuantityLimitsFeatureEnabled = (props: IBuyboxProps): boolean | undefined => {\n const isFeatureEnabledInHq = props.data.featureState.result\n ?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)?.IsEnabled;\n if (!isFeatureEnabledInHq) {\n return false;\n }\n const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n\n const customerInfo = props.data.customerInformation.result;\n return customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n};\n","import * as React from 'react';\n\nimport { Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\nimport { DeliveryOption, ProductDimension } from '@msdyn365-commerce/retail-proxy';\n\nimport { IAddToCartFailureResult, PriceComponent } from '@msdyn365-commerce/components';\nimport { IBuyboxCallbacks, IBuyboxData, IBuyboxProps, IBuyboxState } from '../../../index';\nimport { getConfigureErrors, getGenericError } from '../utilities/error-utilities';\nimport { BuyboxErrorBlock } from './index';\n\nexport interface IFindInStoreFailureResult {\n missingDimensions?: ProductDimension[];\n}\n\nexport interface IBuyboxFindInStoreViewProps {\n storeSelector?: React.ReactNode;\n heading?: React.ReactNode;\n description?: React.ReactNode;\n errors?: React.ReactNode;\n button?: React.ReactNode;\n productPickupOptionList?: React.ReactNode;\n\n modal?: React.ReactNode;\n\n ContainerProps: INodeProps;\n\n openFindInStoreDialog(): Promise;\n}\n\n// tslint:disable-next-line:max-func-body-length\nexport function getBuyboxFindInStore(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxFindInStoreViewProps | undefined {\n const {\n data,\n slots: {\n storeSelector\n },\n resources : {\n priceFree,\n originalPriceText,\n currentPriceText,\n findInStoreHeaderText,\n findInStoreDescriptionText,\n findInStoreLinkText,\n buyBoxGoToCartText,\n buyBoxContinueShoppingText,\n buyBoxSingleItemText,\n buyBoxMultiLineItemFormatText,\n buyBoxHeaderMessageText,\n descriptionTextToShowAllPickupOptions\n },\n context: {\n request: {\n channel: {\n PickupDeliveryModeCode\n } = { PickupDeliveryModeCode: undefined }\n }\n }\n } = props;\n\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const product = data?.product?.result;\n const price = data?.productPrice?.result;\n const storeSelectorStateManager = data?.storeSelectorStateManager?.result;\n const cart = data?.cart?.result;\n const deliveryOptions = data?.deliveryOptions?.result;\n const retailMulitplePickupMFeatureState = data?.featureState?.result?.\n find(featureState => featureState.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n\n const\n {\n errorState: {\n configureErrors,\n quantityError,\n otherError,\n errorHost\n },\n modalOpen,\n quantity\n } = state;\n\n const onClick = () => findInStoreOnClick(props, state, callbacks);\n\n if (!product || !storeSelectorStateManager || storeSelector.length === 0) {\n return undefined;\n }\n\n // If no delivery options present on the product, or none of the delivery options\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n if (!deliveryOptions ||\n !deliveryOptions.DeliveryOptions ||\n !PickupDeliveryModeCode ||\n !deliveryOptions.DeliveryOptions.find(option => option.Code === PickupDeliveryModeCode)) {\n return undefined;\n }\n\n const dialogStrings = {\n goToCartText: buyBoxGoToCartText,\n continueShoppingText: buyBoxContinueShoppingText,\n headerItemOneText: buyBoxSingleItemText,\n headerItemFormatText: buyBoxMultiLineItemFormatText,\n headerMessageText: buyBoxHeaderMessageText,\n freePriceText: priceFree,\n originalPriceText: originalPriceText,\n currentPriceText: currentPriceText\n };\n\n const priceComponent = price ? (\n ) : '';\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const popupProps: IPopupProps = {\n context: props.context,\n className: 'ms-buybox',\n id: props.id,\n typeName: props.typeName,\n data: {product: props.data.product?.result, price: props.data.productPrice?.result},\n dialogStrings: dialogStrings,\n imageSettings: defaultImageSettings,\n gridSettings: props.context.request.gridSettings,\n productQuantity: quantity,\n priceComponent: priceComponent,\n navigationUrl: getUrlSync('cart', props.context.actionContext),\n modalOpen: modalOpen,\n setModalOpen: callbacks.changeModalOpen\n };\n const renderModalPopup = ;\n\n return {\n ContainerProps: {\n className: 'ms-buybox__find-in-store'\n },\n\n storeSelector: storeSelector[0],\n\n openFindInStoreDialog: onClick,\n\n heading: (\n \n ),\n\n description: (\n

\n {findInStoreDescriptionText}\n

\n ),\n productPickupOptionList: retailMulitplePickupMFeatureState ? (\n \n

\n {descriptionTextToShowAllPickupOptions}\n

\n
    \n {deliveryOptions.DeliveryOptions.map((item:DeliveryOption) => {\n return
  • {item.Description}
  • ;\n })\n }\n
\n
\n ): null,\n errors: (\n \n ),\n\n button: (\n \n {findInStoreLinkText}\n \n ),\n\n modal: renderModalPopup\n };\n}\n\n// tslint:disable-next-line: max-func-body-length\nasync function findInStoreOnClick(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise {\n const {\n data: {\n storeSelectorStateManager: {result: storeSelectorStateManager },\n cart: {result: cart },\n productAvailableQuantity: { result: productAvailableQuantity}\n },\n resources,\n context,\n modules,\n } = props;\n\n const {\n selectedProduct,\n quantity\n } = state;\n\n let dataProduct = props.data.product.result;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.\n find(featureState => featureState.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n\n if (selectedProduct) {\n dataProduct = (await selectedProduct) || dataProduct;\n }\n\n if (!dataProduct || !storeSelectorStateManager) {\n return;\n }\n\n const product = dataProduct;\n\n const missingDimensions = product.Dimensions && product.Dimensions.filter(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value));\n\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n\n if (missingDimensions && missingDimensions.length > 0) {\n if (callbacks.updateErrorState) {\n callbacks.updateErrorState(\n {\n errorHost: 'FINDINSTORE',\n configureErrors: getConfigureErrors(missingDimensions, resources),\n }\n );\n }\n } else {\n storeSelectorStateManager.openDialog({\n product,\n id : storeSelectorId,\n deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result: undefined,\n onLocationSelected: (orgUnitLocation, deliveryMode) => {\n if (!cart) {\n return Promise.resolve();\n }\n\n const behavior = props.context?.app?.config?.addToCartBehavior;\n\n return cart.addProductToCart({product: product, count: quantity, location: orgUnitLocation, deliveryMode: deliveryMode})\n .then(result => {\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\n callbacks.changeModalOpen(false);\n\n const productAvailability = state.productAvailableQuantity ?\n state.productAvailableQuantity.ProductAvailableQuantity :\n productAvailableQuantity && productAvailableQuantity.length?\n productAvailableQuantity[0].ProductAvailableQuantity: undefined;\n\n const failureResult: IAddToCartFailureResult = {failureReason: 'CARTACTIONFAILED', cartActionResult: {status: result.status, substatus: result.substatus}};\n callbacks.updateErrorState({\n errorHost: 'ADDTOCART',\n configureErrors: {},\n otherError: getGenericError(failureResult, cart, resources, context, product, productAvailability, orgUnitLocation)\n });\n } else {\n if((behavior === undefined || behavior === 'goToCart')) {\n const navigationUrl = getUrlSync('cart', context.actionContext);\n\n if (result.status === 'SUCCESS' && navigationUrl) {\n window.location.assign(navigationUrl);\n }\n } else if (behavior === 'showModal') {\n callbacks.updateErrorState({\n configureErrors: {}\n });\n callbacks.changeModalOpen(true);\n }\n }\n }).catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.exception(error);\n props.telemetry.debug('Unable to add product to cart');\n }\n return;\n });\n }\n }).catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to find in store');\n }\n return;\n });\n }\n\n return;\n}","/**\n * Copyright (c) 2018 Microsoft Corporation\n */\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IDropdownProps } from './';\nimport { IDropdownItemProps } from './dropdown.props';\n\ntype IDropdownState = {\n /**\n * @friendlyName selectedIndex\n * @description selected index\n */\n selectedIndex: string;\n};\n\n/**\n *\n * DropDown component\n * @extends {React.PureComponent}\n */\nexport class Dropdown extends React.PureComponent {\n private selectMenu: React.RefObject = React.createRef();\n private payLoad: IPayLoad;\n\n constructor(props: IDropdownProps, state: IDropdownState) {\n super(props);\n this.state = {\n selectedIndex: ''\n };\n this.payLoad = getPayloadObject('click', props.telemetryContent!, this.props.dropdownName);\n }\n\n public componentDidMount(): void {\n if (this.selectMenu.current) {\n this.selectMenu.current.selectedIndex = 0;\n }\n }\n\n public render(): JSX.Element {\n const {dropdownId, dropdownList, dropdownName, dropdownToggleName} = this.props;\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n return (\n \n \n {dropdownList.map(\n (item: IDropdownItemProps) => item && \n )}\n \n );\n }\n\n private _onChanged = async (event: React.ChangeEvent) => {\n this.setState({selectedIndex: event.target.value});\n\n if (this.props.onChange) {\n await this.props.onChange({\n dropdownId: this.props.dropdownId,\n selectId: event.target.value,\n selectedValue: event.target.innerText\n });\n }\n };\n}","import * as React from 'react';\n\nimport { getTelemetryObject, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\n\nimport { IBuyboxCallbacks, IBuyboxData, IBuyboxProps, IBuyboxResources, IBuyboxState } from '../../../index';\nimport { Dropdown, IDropdownItemProps, IDropdownOnSelectionChangeNotification } from './dropdown';\n\nexport interface IBuyboxProductConfigureProps {\n product: SimpleProduct;\n productDimensions: ProductDimensionFull[];\n resources: IBuyboxResources;\n channelId: number;\n actionContext: IActionContext;\n errors: { [configureId: string]: string | undefined };\n\n dimensionChanged?(newValue: number): void;\n}\n\nexport interface IBuyboxProductConfigureDropdownViewProps {\n ContainerProps: INodeProps;\n LabelContainerProps: INodeProps;\n\n heading: React.ReactNode;\n errors?: React.ReactNode;\n\n select: React.ReactNode;\n}\n\nexport interface IBuyboxProductConfigureViewProps {\n ContainerProps: INodeProps;\n\n dropdowns: IBuyboxProductConfigureDropdownViewProps[];\n}\n\nlet telemetryContent: ITelemetryContent;\n\nexport function getBuyboxProductConfigure(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductConfigureViewProps | undefined {\n const {\n data: {\n product: {result: product },\n productDimensions: {result: productDimensions },\n },\n resources\n } = props;\n\n const\n {\n errorState: {\n configureErrors,\n }\n } = state;\n\n const\n {\n getDropdownName\n } = callbacks;\n\n if (!product || !productDimensions) {\n return undefined;\n }\n\n const onChanged = async (notification: IDropdownOnSelectionChangeNotification) =>\n _onChanged(notification, callbacks.dimensionSelectedAsync);\n\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n const dropdowns = productDimensions.map(productDimensionFull => _mapProductDimensionFullToDropdownViewProps(productDimensionFull, resources, configureErrors, getDropdownName, onChanged));\n\n if (!dropdowns || dropdowns.length === 0) {\n return undefined;\n }\n\n return {\n ContainerProps: {\n className: 'ms-buybox__configure'\n },\n dropdowns: dropdowns\n };\n}\n\nconst _onChanged = async (\n notification: IDropdownOnSelectionChangeNotification,\n dimensionChanged: (newValue: number, selectedDimensionValue: string) => Promise,\n ): Promise => {\n await dimensionChanged(+notification.dropdownId, notification.selectId);\n};\n\nconst _mapProductDimensionFullToDropdownViewProps =\n (\n productDimensionFull: ProductDimensionFull,\n resources: IBuyboxResources,\n configureErrors: {[configureId: string]: string | undefined},\n getDropdownName: (dimensionType: number, resources: IBuyboxResources) => string,\n dropdownCallback: (notification: IDropdownOnSelectionChangeNotification) => Promise\n ): IBuyboxProductConfigureDropdownViewProps => {\n const dropdownName = getDropdownName(productDimensionFull.DimensionTypeValue, resources);\n const dropdownId = productDimensionFull.DimensionTypeValue.toString();\n const dropdownToggleName = resources.selectDimensionFormatString.replace('{0}', dropdownName.toLocaleLowerCase());\n const dropdownList: IDropdownItemProps[] = productDimensionFull.DimensionValues\n ? productDimensionFull.DimensionValues.map(dimensionValue => {\n return {\n value: dimensionValue.Value || '',\n id: dimensionValue.RecordId.toString()\n };\n })\n : [];\n const errorMessage = configureErrors[dropdownId];\n\n return {\n ContainerProps: {\n className: 'ms-buybox__dropdown'\n },\n LabelContainerProps: {\n tag: 'label',\n className: 'ms-buybox__dropdown-quantity-label',\n htmlFor: `ms-buybox__dropown-quantity-input-${dropdownId}`\n },\n errors: errorMessage && (\n \n \n ),\n heading: (\n
{dropdownName}
\n ),\n select: (\n \n )\n };\n};","import {\n getDeliveryOptionsForSelectedVariant,\n GetDeliveryOptionsForSelectedVariantInput,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getSelectedVariant,\n IProductInventoryInformation,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n// tslint:disable-next-line:no-duplicate-imports\nimport {\n FinitePromiseQueue, FinitePromiseQueueError, IPromiseQueue\n} from '@msdyn365-commerce-modules/retail-actions';\n\nimport {\n getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent\n} from '@msdyn365-commerce-modules/utilities';\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport {\n ProductDeliveryOptions, ProductDimensionValue, ProductPrice, SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { IBuyboxData, IBuyboxProps } from '../..';\nimport { IBuyboxResources } from './buybox.props.autogenerated';\nimport {\n getBuyboxAddToCart,\n getBuyboxFindInStore,\n getBuyBoxInventoryLabel,\n getBuyboxKeyInPrice,\n getBuyboxProductAddToOrderTemplate,\n getBuyboxProductAddToWishlist,\n getBuyboxProductConfigure,\n getBuyboxProductDescription,\n getBuyboxProductPrice,\n getBuyboxProductQuantity,\n getBuyboxProductRating,\n getBuyboxProductTitle,\n getBuyboxShopSimilarLook,\n getQuantityLimitsMessages,\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps,\n RetailDefaultOrderQuantityLimitsFeatureName\n} from './components';\n\nexport declare type IBuyboxErrorHost = 'ADDTOCART' | 'FINDINSTORE' | 'WISHLIST' | 'SHOPSIMILARITEM' | 'ORDER_TEMPLATE';\n\nexport interface IErrorState {\n errorHost?: IBuyboxErrorHost;\n\n configureErrors: { [configureId: string]: string | undefined };\n quantityError?: string;\n customAmountError?: string;\n otherError?: string;\n}\n\nexport interface IBuyboxCallbacks {\n updateQuantity(newQuantity: number): boolean;\n updateKeyInPrice(keyInPrice: number): void;\n updateErrorState(newErrorState: IErrorState): void;\n updateSelectedProduct(\n selectedProduct: Promise,\n newInventory: IProductInventoryInformation | undefined,\n newPrice: ProductPrice | undefined,\n newDeliveryOptions: ProductDeliveryOptions | undefined): void;\n getDropdownName(dimensionType: number, resources: IBuyboxResources): string;\n dimensionSelectedAsync(selectedDimensionId: number, selectedDimensionValueId: string): Promise;\n changeModalOpen(isModalOpen: boolean): void;\n changeUpdatingDimension(isUpdatingDimension: boolean): void;\n changeUpdatingDeliveryOptions?(isUpdatingDeliveryOptions: boolean): void;\n}\n\nexport interface IBuyboxState {\n quantity: number;\n min: number | undefined;\n max: number | undefined;\n errorState: IErrorState;\n selectedProduct?: Promise;\n productAvailableQuantity?: IProductInventoryInformation;\n productPrice?: ProductPrice;\n productDeliveryOptions?: ProductDeliveryOptions;\n modalOpen?: boolean;\n isUpdatingDimension?: boolean;\n isUpdatingDeliveryOptions?: boolean;\n isServiceItem?: boolean;\n isPriceKeyedIn?: boolean;\n keyInPriceAmount?: number;\n isCustomPriceSelected?: boolean;\n}\n\nexport interface IBuyboxViewProps extends IBuyboxProps {\n state: IBuyboxState;\n\n ModuleProps: IModuleProps;\n ProductInfoContainerProps: INodeProps;\n MediaGalleryContainerProps: INodeProps;\n\n callbacks: IBuyboxCallbacks;\n\n mediaGallery?: React.ReactNode;\n\n title?: React.ReactNode;\n description?: React.ReactNode;\n rating?: React.ReactNode;\n price?: React.ReactNode;\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n addToWishlist?: IBuyboxAddToWishlistViewProps;\n max: number | undefined;\n\n addToCart: IBuyboxAddToCartViewProps;\n findInStore?: IBuyboxFindInStoreViewProps;\n quantity?: IBuyboxProductQuantityViewProps;\n configure?: IBuyboxProductConfigureViewProps;\n inventoryLabel?: React.ReactNode;\n shopSimilarLook?: IBuyboxShopSimilarLookViewProps;\n quantityLimitsMessages: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n keyInPrice?: IBuyboxKeyInPriceViewProps;\n}\n\n/**\n * Buybox Module\n */\nclass Buybox extends React.PureComponent, IBuyboxState> {\n /**\n * A queue of tasks of processing the changes in the dimensions.\n * Limit to two processes:\n * 1 - for the current process, which is under execution at the moment.\n * 2 - next process, which will process the latest version of data.\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n */\n private dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\n private dimensions: { [id: number]: string } = {};\n\n private buyboxCallbacks: IBuyboxCallbacks = {\n updateQuantity: (newQuantity: number): boolean => {\n const errorState = {...this.state.errorState};\n errorState.quantityError = undefined;\n errorState.otherError = undefined;\n\n this.setState({quantity: newQuantity, errorState: errorState});\n return true;\n },\n updateErrorState: (newErrorState: IErrorState): void => {\n this.setState({errorState: newErrorState});\n },\n updateSelectedProduct: (\n newSelectedProduct: Promise,\n newInventory: IProductInventoryInformation | undefined,\n newPrice: ProductPrice | undefined,\n newDeliveryOptions: ProductDeliveryOptions | undefined\n ): void => {\n this.setState({\n selectedProduct: newSelectedProduct,\n productAvailableQuantity: newInventory,\n productDeliveryOptions: newDeliveryOptions});\n this._updatePrice(newPrice);\n },\n dimensionSelectedAsync: (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this.dimensionUpdateQueue.enqueue(() => {\n return this._updateDimensions();\n }).catch((reason: any) => { // tslint:disable-line:no-any\n // Ignore discarded processes.\n if (reason !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw reason;\n }\n });\n },\n getDropdownName: (dimensionType: number, resources: IBuyboxResources): string => {\n return this._getDropdownName(dimensionType, resources);\n },\n changeModalOpen: (isModalOpen: boolean): void => {\n this.setState({modalOpen: isModalOpen});\n },\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n this.setState({isUpdatingDimension: isUpdatingDimension});\n },\n /**\n * Update isUpdatingDeliveryOptions state.\n *\n * @param isUpdatingDeliveryOptions - The status of updating delivery options.\n */\n changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\n this.setState({ isUpdatingDeliveryOptions });\n },\n updateKeyInPrice: (customPrice: number): void => {\n // Remove custom amount error when updating the custom price\n const errorState = {...this.state.errorState};\n errorState.customAmountError = undefined;\n\n this.setState({isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState: errorState});\n this._updatePrice(this.state.productPrice, customPrice);\n }\n };\n\n private telemetryContent: ITelemetryContent;\n\n constructor(props: IBuyboxProps, state: IBuyboxState) {\n super(props);\n this.state = {\n errorState: {\n configureErrors: {}\n },\n quantity: 1,\n min: undefined,\n max: undefined,\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n\n modalOpen: false,\n isUpdatingDimension: false,\n isUpdatingDeliveryOptions: false\n };\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n }\n\n public async componentDidMount(): Promise {\n const {\n data: {\n product: { result: product },\n productPrice\n },\n } = this.props;\n\n productPrice.then(async (result) => {\n this._updatePrice(result);\n });\n\n if(product) {\n // check if the product is service or not by product type\n const PRODUCTASSERVICE = 2 as ReleasedProductType.Service;\n\n if (product.ItemTypeValue === PRODUCTASSERVICE) {\n this.setState({isServiceItem: true});\n }\n await this._updateQuantitiesInState(product);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n slots: {\n mediaGallery,\n },\n data: {\n product: { result: product }\n },\n config: { className = '' }\n } = this.props;\n\n const\n {\n max\n } = this.state;\n\n if (!product) {\n this.props.context.telemetry.error('Product content is empty, module wont render');\n return null;\n }\n\n const defaultMinimumKeyInPrice = 10;\n const defaultMaximumKeyInPrice = 100;\n\n const viewProps: IBuyboxViewProps = {\n ...(this.props as IBuyboxProps),\n state: this.state,\n mediaGallery: mediaGallery && mediaGallery.length > 0 ? mediaGallery[0] : undefined,\n ModuleProps: {\n moduleProps: this.props,\n className: classnames('ms-buybox', className)\n },\n ProductInfoContainerProps: {\n className: 'ms-buybox__content'\n },\n MediaGalleryContainerProps: {\n className: 'ms-buybox__media-gallery'\n },\n telemetryContent: this.telemetryContent,\n callbacks: this.buyboxCallbacks,\n title: getBuyboxProductTitle(this.props),\n description: getBuyboxProductDescription(this.props),\n configure: getBuyboxProductConfigure(this.props, this.state, this.buyboxCallbacks),\n findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\n price: getBuyboxProductPrice(this.props, this.state),\n addToCart: getBuyboxAddToCart(this.props, this.state, this.buyboxCallbacks, defaultMinimumKeyInPrice, defaultMaximumKeyInPrice),\n addToOrderTemplate: getBuyboxProductAddToOrderTemplate(this.props, this.state, this.buyboxCallbacks),\n addToWishlist: getBuyboxProductAddToWishlist(this.props, this.state, this.buyboxCallbacks),\n rating: !this.props.context.app.config.hideRating && getBuyboxProductRating(this.props),\n quantity: product.IsGiftCard ? undefined : getBuyboxProductQuantity(this.props, this.state, this.buyboxCallbacks),\n inventoryLabel: getBuyBoxInventoryLabel(this.props),\n shopSimilarLook: this.props.config.enableShopSimilarLooks && !product.IsGiftCard ? getBuyboxShopSimilarLook(this.props, this.state, this.buyboxCallbacks) : undefined,\n keyInPrice: this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected?getBuyboxKeyInPrice(this.props, this.state, this.buyboxCallbacks):undefined,\n quantityLimitsMessages: getQuantityLimitsMessages(this.props, this.state),\n max: max\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _updatePrice(\n newPrice: ProductPrice | undefined,\n customPrice: number | undefined = this.state.keyInPriceAmount): void {\n\n if (this.state.isCustomPriceSelected && newPrice) {\n newPrice.CustomerContextualPrice = customPrice;\n }\n this.setState({productPrice: newPrice});\n }\n\n // tslint:disable-next-line:max-func-body-length\n private _updateDimensions = async (): Promise => {\n const {\n data: {\n product: {result: product },\n productDimensions: {result: productDimensions },\n },\n context: {\n actionContext,\n request: {\n apiSettings: {\n channelId\n }\n }\n }\n } = this.props;\n\n if (!product || !productDimensions) {\n return;\n }\n\n const dimensionsToUpdate: { [id: number]: string } = {...this.dimensions};\n this.setState({isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\n\n // Step 1: Update state to indicate which dimensions are selected\n if (this.state.errorState.otherError) {\n const clearOtherErrorState = {...this.state.errorState};\n clearOtherErrorState.otherError = undefined;\n this.setState({errorState: clearOtherErrorState});\n }\n\n // Step 2: Clear any errors indicating the dimension wasn't selected\n for (const key of Object.keys(dimensionsToUpdate)) {\n if (this.state.errorState.configureErrors[key]) {\n const errorState = {...this.state.errorState};\n errorState.configureErrors[key] = undefined;\n\n this.setState({errorState: errorState});\n }\n }\n\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\n // over the information in data\n const mappedDimensions = productDimensions.map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue: this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n }).filter(dimension => {\n return dimension && dimension.DimensionValue;\n });\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n // so that places like add to cart can await it\n const selectedProduct = new Promise(async (resolve, reject) => {\n const newProduct = (await getSelectedVariant(\n new SelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId,\n mappedDimensions\n ),\n actionContext\n ));\n if (newProduct) {\n await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\n channelId,\n mappedDimensions\n ),\n actionContext\n );\n }\n\n resolve(newProduct);\n });\n this.setState({selectedProduct: selectedProduct});\n const variantProduct = await selectedProduct;\n\n if(variantProduct) {\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n // so that places like add to cart can await it\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(\n variantProduct.RecordId,\n channelId\n ),\n actionContext\n );\n\n const isCustompriceSelected = variantProduct && variantProduct.Dimensions && variantProduct.Dimensions.find(dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value === 'Custom');\n if (isCustompriceSelected) {\n this.setState({isCustomPriceSelected: true});\n } else {\n // Remove custom amount error when unselect the custom amount\n const errorState = {...this.state.errorState};\n errorState.customAmountError = undefined;\n\n this.setState({isCustomPriceSelected: false, isPriceKeyedIn: false, errorState: errorState});\n }\n\n if(newAvailableQuantity && newAvailableQuantity.length) {\n this.setState({productAvailableQuantity: newAvailableQuantity[0]});\n } else {\n this.setState({productAvailableQuantity: undefined});\n }\n\n // Step 6. Use these dimensions hydrate the product price.\n const newPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(\n variantProduct.RecordId,\n channelId\n ),\n actionContext\n );\n\n if (newPrice) {\n this._updatePrice(newPrice);\n }\n\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\n // Step 7. Use these dimensions hydrate the product delivery options.\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n new GetDeliveryOptionsForSelectedVariantInput(\n variantProduct.RecordId,\n channelId,\n undefined,\n undefined,\n RetailMulitplePickupMFeatureState?.IsEnabled\n ),\n actionContext\n );\n\n if(newDeliveryOptions) {\n this.setState({productDeliveryOptions: newDeliveryOptions});\n }\n\n await this._updateQuantitiesInState(variantProduct);\n }\n }\n\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n if (isOrderQuantityLimitsFeatureEnabled && product) {\n this.setState({\n quantity: product.Behavior?.DefaultQuantity || 1,\n min: product.Behavior?.MinimumQuantity || 1,\n max: (product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0)\n ? product.Behavior?.MaximumQuantity\n : Number.MAX_VALUE,\n });\n } else {\n this.setState({\n min: 1,\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10,\n });\n }\n }\n\n private _updateDimensionValue = (productDimensionFull: ProductDimensionFull, newValueId: string | undefined): ProductDimensionValue | undefined => {\n if (newValueId && productDimensionFull.DimensionValues) {\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\n }\n\n return undefined;\n };\n\n private _getDropdownName = (dimensionType: number, resources: IBuyboxResources): string => {\n const isGiftCard = this.props.data.product.result?.IsGiftCard;\n\n switch (dimensionType) {\n case 1: // ProductDimensionType.Color\n return resources.productDimensionTypeColor;\n case 2: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // ProductDimensionType.Size\n return resources.productDimensionTypeSize;\n case 4: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n const featureStatuses = await this.props.data.featureState;\n const isFeatureEnabledInHq = featureStatuses?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)?.IsEnabled;\n if (!isFeatureEnabledInHq) {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n let customerInfo;\n try {\n customerInfo = await this.props.data.customerInformation;\n } catch(error) {\n this.props.telemetry.information(error);\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n return false;\n }\n\n return customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n }\n}\n\nexport default Buybox;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { SalesOrder, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport * as React from 'react';\nimport { IGetOrderSummaryInput, IHelp, IOrderSummary, IPaymentMethods, IPaymentMethodsInput } from '../../common';\nimport { getGroups, IGroups } from '../../common/get-groups';\nimport { getOrderInfomationInput, getOrderInformation, IOrderInformation } from '../../common/get-order-information';\nimport { ISalesLine } from '../../common/get-sales-line';\nimport { getSalesLines, getSalesLinesInput } from '../../common/get-sales-lines';\nimport LabelComponent from '../../common/label';\nimport { getTenderIdOperationIdMap, IPriceContext } from '../../common/utilities';\nimport { getOrderConfirmationHelp } from '../order-confirmation/components/get-help';\nimport { getOrderConfirmationOrderSummary } from '../order-confirmation/components/get-order-summary';\nimport { getOrderConfirmationPaymentMethods } from '../order-confirmation/components/get-payment-methods';\nimport { ICheckoutOrderConfirmationData } from './checkout-order-confirmation.data';\nimport { ICheckoutOrderConfirmationProps } from './checkout-order-confirmation.props.autogenerated';\n\nexport * from '../../common/get-groups';\nexport * from '../../common/get-order-information';\nexport * from '../../common/get-sales-line';\nexport * from '../../common/get-sales-lines';\nexport * from '../../common/utilities';\nexport * from '../order-confirmation/components/get-help';\nexport * from '../order-confirmation/components/get-order-summary';\nexport * from '../order-confirmation/components/get-payment-methods';\n\nexport interface ICheckoutOrderConfirmationViewProps extends ICheckoutOrderConfirmationProps {\n moduleProps: IModuleProps;\n salesOrder?: SalesOrder;\n footerProps?: INodeProps;\n alert?: React.ReactNode;\n loading?: React.ReactNode;\n heading: React.ReactNode;\n backToShoppingLink?: React.ReactNode;\n orderInfomation?: IOrderInformation;\n salesLines?: ISalesLine[];\n groups?: IGroups;\n orderSummary?: IOrderSummary;\n payment?: IPaymentMethods;\n help?: IHelp;\n}\n\n/**\n *\n * OrderConfirmation component\n * @extends {React.PureComponent>}\n */\nclass OrderConfirmation extends React.PureComponent> {\n private moduleName: string = 'ms-order-confirmation';\n private telemetryContent?: ITelemetryContent;\n private backToShoppingAttributes?: Msdyn365.IDictionary;\n\n constructor(props: ICheckoutOrderConfirmationProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n this.backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n @computed get isCurrentChannel(): boolean {\n if (!this.order) {\n return false;\n }\n return this.order.ChannelId === get(this.props, 'context.request.apiSettings.channelId');\n }\n\n @computed get isDataReady(): boolean {\n return get(this.props, 'data.checkout.status') === 'SUCCESS';\n }\n\n @computed get hasError(): boolean {\n return get(this.props, 'data.checkout.status') === 'FAILED';\n }\n\n @computed get order(): SalesOrder | undefined {\n return get(this.props, 'data.checkout.result.salesOrder');\n }\n\n @computed get products(): SimpleProduct[] {\n return get(this.props, 'data.checkout.result.orderedProducts') || [];\n }\n\n @computed get priceContext(): IPriceContext {\n const {\n id,\n typeName,\n context,\n telemetry,\n resources: { freePriceText }\n } = this.props;\n return {\n id,\n typeName,\n context,\n telemetry,\n freePriceText\n };\n }\n\n @computed get earnedPoints(): number {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n if (loyaltyCard && loyaltyCard.RewardPoints && this.order) {\n const pointPrograms = loyaltyCard.RewardPoints.map(point => point.RewardPointId);\n const rewardLines = this.order.LoyaltyRewardPointLines || [];\n let total = 0;\n rewardLines.forEach(line => {\n if ((line.RewardPointAmountQuantity || 0) > 0 && pointPrograms.indexOf(line.RewardPointId) > -1) {\n total += line.RewardPointAmountQuantity!;\n }\n });\n return total;\n }\n return 0;\n }\n\n @computed get orderSummaryProps(): IGetOrderSummaryInput | undefined {\n if (!this.order) {\n return;\n }\n\n const {\n resources: { orderSummaryHeading, orderSummaryItemsTotalLabel, orderSummaryShippingFeeLabel, orderSummaryTaxLabel, orderSummaryGrandTotalLabel, pointsEarnedLabel }\n } = this.props;\n return {\n order: this.order,\n earnedPoints: this.earnedPoints,\n priceContext: this.priceContext,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n pointsEarnedLabel,\n orderSummaryGrandTotalLabel\n }\n };\n }\n\n @computed get paymentMethodsProps(): IPaymentMethodsInput | undefined {\n const tenderTypes = this.props.data.tenderTypes.result;\n if (!this.order || !this.order.TenderLines || !tenderTypes) {\n return;\n }\n\n const locale = get(this.props, 'context.request.locale') || 'en-US';\n\n const {\n resources: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n } = this.props;\n\n return {\n priceContext: this.priceContext,\n tenderLines: this.order.TenderLines,\n tenderIdOperationIdMap: getTenderIdOperationIdMap(tenderTypes),\n locale,\n resource: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n };\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n noSalesOrderText,\n genericErrorMessage,\n needHelpLabel,\n helpLineNumberLabel,\n loadingLabel,\n backToShopping,\n orderItemLabel,\n orderItemsLabel,\n helpLineContactAriaLabel,\n },\n config: { heading, contactNumber, showTimeslot }\n } = this.props;\n\n const moduleProps = { moduleProps: this.props, className: classname('ms-order-confirmation', this.props.config.className) };\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n\n let viewProps: ICheckoutOrderConfirmationViewProps = {\n ...this.props,\n moduleProps,\n heading: heading && heading.text && (\n \n ),\n backToShoppingLink: backToShoppingUrl && (\n \n ),\n footerProps: { className: 'ms-order-confirmation__footer' }\n };\n\n if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!this.isDataReady) {\n viewProps = {\n ...viewProps,\n loading: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!this.order) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n const salesLinesInput = getSalesLinesInput(this.props, this.moduleName, this.order, this.products, this.priceContext, false, showTimeslot, undefined, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig?.result);\n const salesLines = salesLinesInput && getSalesLines(salesLinesInput);\n\n const orderInfomationInput = this.order && getOrderInfomationInput(this.props, this.moduleName, this.order, this.priceContext);\n const orderInfomation = orderInfomationInput && getOrderInformation(orderInfomationInput);\n\n viewProps = {\n ...viewProps,\n salesOrder: this.order,\n orderInfomation,\n salesLines,\n groups: salesLines\n ? getGroups({\n moduleName: this.moduleName,\n salesLines,\n resources: { orderItemLabel, orderItemsLabel },\n showTimeslot: showTimeslot,\n retailMultiplePickUpOptionEnabled\n })\n : undefined,\n orderSummary: this.orderSummaryProps ? getOrderConfirmationOrderSummary(this.orderSummaryProps) : undefined,\n payment: this.paymentMethodsProps ? getOrderConfirmationPaymentMethods(this.paymentMethodsProps) : undefined,\n help: contactNumber ? getOrderConfirmationHelp({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel, telemetryContent: this.telemetryContent }) : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleCheckoutOrderConfirmationHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n}\n\nexport default OrderConfirmation;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { TenderLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport * as React from 'react';\nimport { IPaymentMethods, IPaymentMethodsInput } from '../../../common';\n\nexport const getOrderConfirmationPaymentMethods = ({\n priceContext,\n tenderLines,\n tenderIdOperationIdMap,\n resource: { paymentMethodsTitle, creditCardEndingLabel, giftCardEndingLabel, amountCoveredLabel, loyaltyCardUsedLabel, cashUsedLabel }\n}: IPaymentMethodsInput): IPaymentMethods => {\n const getLastFourDigit = (digits = '') => digits.substr(-4);\n\n const getCard = (tenderLine: TenderLine, showAmount: boolean = false) => {\n const cardLastFourDigit = getLastFourDigit(tenderLine.MaskedCardNumber);\n // @ts-ignore\n const isValidCardNumber = cardLastFourDigit && !isNaN(cardLastFourDigit);\n const amount = (tenderLine.AuthorizedAmount || 0) > 0 ? tenderLine.AuthorizedAmount : tenderLine.Amount;\n const showAmountCovered = showAmount && amount && amount > 0 ? true : false;\n\n return (\n
\n

\n {`${tenderLine.CardTypeId} ${isValidCardNumber ? `${creditCardEndingLabel} ${cardLastFourDigit}` : ``}`}\n

\n {showAmountCovered &&

\n {amountCoveredLabel}\n \n

}\n
\n );\n };\n\n const getGiftCertificate = (tenderLine: TenderLine) => (\n
\n

\n {giftCardEndingLabel} {getLastFourDigit(tenderLine.GiftCardId)}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getLoyalty = (tenderLine: TenderLine) => (\n
\n

\n {loyaltyCardUsedLabel} {tenderLine.LoyaltyCardId}\n

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n const getCash = (tenderLine: TenderLine) => (\n
\n

{cashUsedLabel}

\n

\n {amountCoveredLabel}\n \n

\n
\n );\n\n return {\n paymentMethodsProps: { className: 'ms-order-confirmation__payment-methods' },\n title:
{paymentMethodsTitle}
,\n methods: tenderLines.reduce((lines: React.ReactNode[], tenderLine) => {\n if (!tenderLine.TenderTypeId) {\n return lines;\n }\n switch (tenderIdOperationIdMap[tenderLine.TenderTypeId]) {\n case 201:\n lines.push(getCard(tenderLine, tenderLines.length > 1));\n break;\n case 214:\n lines.push(getGiftCertificate(tenderLine));\n break;\n case 207:\n lines.push(getLoyalty(tenderLine));\n break;\n case 200:\n lines.push(getCash(tenderLine));\n break;\n default:\n // do nothing\n }\n return lines;\n }, [])\n };\n};\n","import OrderHistory from './order-history';\nimport OrderHistoryView from './order-history.view';\n\nexport * from './order-history';\nexport * from './order-history.view';\nexport * from './order-history.data';\nexport { IOrderHistoryConfig, IOrderHistoryResources, IOrderHistoryProps } from './order-history.props.autogenerated';\nexport * from './actions/get-order-shipment-history';\nexport * from './components/get-sales-order';\n\nexport {\n OrderHistory,\n OrderHistoryView\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ChannelDeliveryOptionConfiguration, FeatureState, LoyaltyRewardPoint, ProductDeliveryOptions,SalesLine, SalesOrder,SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport * as React from 'react';\nimport { IGetOrderSummaryInput, IHelp, IOrderSummary, IPaymentMethods, IPaymentMethodsInput } from '../../common';\nimport { getGroups, IGroups } from '../../common/get-groups';\nimport { getOrderInfomationInput, getOrderInformation, IOrderInformation } from '../../common/get-order-information';\nimport { ISalesLine } from '../../common/get-sales-line';\nimport { getSalesLines, getSalesLinesInput } from '../../common/get-sales-lines';\nimport LabelComponent from '../../common/label';\nimport { getTenderIdOperationIdMap, IPriceContext } from '../../common/utilities';\nimport { IOrderDetailsData, IOrderDetailsProps } from './../..';\nimport { getOrderDetailsHelp } from './components/get-help';\nimport { getOrderDetailsOrderSummary } from './components/get-order-summary';\nimport { getOrderDetailsPaymentMethods } from './components/get-payment-methods';\nimport { addressOptions } from './order-details.props.autogenerated';\n\nexport * from '../../common/get-groups';\nexport * from '../../common/get-order-information';\nexport * from '../../common/get-sales-line';\nexport * from '../../common/get-sales-lines';\nexport * from '../../common/utilities';\nexport * from './components/get-help';\nexport * from './components/get-order-summary';\nexport * from './components/get-payment-methods';\n\nexport interface IOrderDetailsViewProps extends IOrderDetailsProps {\n moduleProps: IModuleProps;\n salesOrder?: SalesOrder;\n footerProps?: INodeProps;\n alert?: React.ReactNode;\n loading?: React.ReactNode;\n heading: React.ReactNode;\n backToShoppingLink?: React.ReactNode;\n orderInfomation?: IOrderInformation;\n salesLines?: ISalesLine[];\n groups?: IGroups;\n orderSummary?: IOrderSummary;\n payment?: IPaymentMethods;\n help?: IHelp;\n}\n\n/**\n *\n * OrderDetails component\n * @extends {React.PureComponent>}\n */\nclass OrderDetails extends React.PureComponent> {\n private moduleName: string = 'ms-order-details';\n private telemetryContent: ITelemetryContent;\n\n @computed get isCurrentChannel(): boolean {\n if (!this.order) {\n return false;\n }\n return this.order.ChannelId === get(this.props, 'context.request.apiSettings.channelId');\n }\n\n @computed get isDataReady(): boolean {\n return get(this.props, 'data.orderHydration.status') === 'SUCCESS';\n }\n\n @computed get hasError(): boolean {\n return get(this.props, 'data.orderHydration.status') === 'FAILED';\n }\n\n @computed get order(): SalesOrder | undefined {\n return get(this.props, 'data.orderHydration.result.salesOrder');\n }\n\n @computed get products(): SimpleProduct[] {\n return get(this.props, 'data.orderHydration.result.products') || [];\n }\n\n @computed get deliveryOptions(): ProductDeliveryOptions[] {\n return get(this.props, 'data.orderHydration.result.deliveryOptions') || [];\n }\n\n @computed get priceContext(): IPriceContext {\n const {\n id,\n typeName,\n context,\n telemetry,\n resources: { freePriceText }\n } = this.props;\n return {\n id,\n typeName,\n context,\n telemetry,\n freePriceText\n };\n }\n\n @computed get earnedPoints(): number {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n if (loyaltyCard && loyaltyCard.RewardPoints && this.order) {\n const pointPrograms = loyaltyCard.RewardPoints.map((point:LoyaltyRewardPoint) => point.RewardPointId);\n const rewardLines = this.order.LoyaltyRewardPointLines || [];\n let total = 0;\n rewardLines.forEach(line => {\n if ((line.RewardPointAmountQuantity || 0) > 0 && pointPrograms.indexOf(line.RewardPointId) > -1) {\n total += line.RewardPointAmountQuantity!;\n }\n });\n return total;\n }\n return 0;\n }\n\n @computed get orderSummaryProps(): IGetOrderSummaryInput | undefined {\n if (!this.order) {\n return;\n }\n const { request } = this.props.context;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find((item:FeatureState) => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n const orderDetailsLines = this.order?.SalesLines;\n const canShip = orderDetailsLines?.some(orderDetailsLine => (orderDetailsLine.DeliveryMode && orderDetailsLine.DeliveryMode !== '')\n ? (orderDetailsLine.DeliveryMode !== this.getDeliveryMode(orderDetailsLine, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig?.result, pickupDeliveryModeCode) && orderDetailsLine.DeliveryMode !== emailDeliveryModeCode)\n : orderDetailsLine);\n\n const {\n resources: { orderSummaryHeading, orderSummaryItemsTotalLabel, orderSummaryShippingFeeLabel, orderSummaryTaxLabel, orderSummaryGrandTotalLabel, pointsEarnedLabel }\n } = this.props;\n return {\n order: this.order,\n earnedPoints: this.earnedPoints,\n priceContext: this.priceContext,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n pointsEarnedLabel,\n orderSummaryGrandTotalLabel\n },\n canShip: canShip\n };\n }\n\n @computed get paymentMethodsProps(): IPaymentMethodsInput | undefined {\n const tenderTypes = this.props.data.tenderTypes.result;\n if (!this.order || !this.order.TenderLines || !tenderTypes) {\n return;\n }\n\n const locale = get(this.props, 'context.request.locale') || 'en-US';\n\n const {\n resources: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n } = this.props;\n\n return {\n priceContext: this.priceContext,\n tenderLines: this.order.TenderLines,\n tenderIdOperationIdMap: getTenderIdOperationIdMap(tenderTypes),\n locale,\n resource: {\n paymentMethodsTitle,\n creditCardEndingLabel,\n giftCardEndingLabel,\n amountCoveredLabel,\n cashUsedLabel,\n loyaltyCardUsedLabel,\n customerAccountUsedLabel\n }\n };\n }\n\n constructor(props: IOrderDetailsProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public render(): JSX.Element {\n const {\n resources: {\n noSalesOrderDetailsText,\n genericErrorMessage,\n needHelpLabel,\n helpLineNumberLabel,\n loadingLabel,\n backToShopping,\n orderItemLabel,\n orderItemsLabel,\n helpLineContactAriaLabel,\n },\n config: { heading, contactNumber, showChannelInfo, showTimeslot }\n } = this.props;\n\n const showAddress = this.props.config.addressOptions !== undefined && this.props.config.addressOptions === addressOptions.showAddressWithSingleLine || this.props.config.addressOptions === addressOptions.showAddressWithMultiplelines;\n const showFullAddress = this.props.config.addressOptions !== undefined && this.props.config.addressOptions === addressOptions.showAddressWithMultiplelines;\n const moduleProps = { moduleProps: this.props, className: classname('ms-order-details', this.props.config.className) };\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const channelIdentities = this.props.data.channels.result && this.props.data.channels.result.channelIdentities;\n const orgUnitLocations = this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.result.orgUnitLocations;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\n\n let viewProps: IOrderDetailsViewProps = {\n ...this.props,\n moduleProps,\n heading: heading && (\n \n ),\n backToShoppingLink: backToShoppingUrl && (\n \n ),\n footerProps: { className: 'ms-order-details__footer' }\n };\n\n if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!this.isDataReady) {\n viewProps = {\n ...viewProps,\n loading: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!this.order) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n const salesLInput = getSalesLinesInput(this.props, this.moduleName, this.order, this.products,\n this.priceContext, showFullAddress, showTimeslot, this.telemetryContent, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig?.result, this.deliveryOptions);\n const salesLines = salesLInput && getSalesLines(salesLInput);\n\n const orderInfomationInput = this.order && getOrderInfomationInput(this.props, this.moduleName, this.order, this.priceContext, channelIdentities, orgUnitLocations, showChannelInfo);\n const orderInfomation = orderInfomationInput && getOrderInformation(orderInfomationInput);\n\n viewProps = {\n ...viewProps,\n salesOrder: this.order,\n orderInfomation,\n salesLines,\n groups: salesLines\n ? getGroups({\n moduleName: this.moduleName,\n salesLines,\n resources: { orderItemLabel, orderItemsLabel },\n showAddress: showAddress,\n showTimeslot: showTimeslot,\n retailMultiplePickUpOptionEnabled: retailMultiplePickUpOptionEnabled\n })\n : undefined,\n orderSummary: this.orderSummaryProps ? getOrderDetailsOrderSummary(this.orderSummaryProps) : undefined,\n payment: this.paymentMethodsProps ? getOrderDetailsPaymentMethods(this.paymentMethodsProps) : undefined,\n help: contactNumber ? getOrderDetailsHelp({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel, telemetryContent: this.telemetryContent }) : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleOrderDetailsHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n private getDeliveryMode = (salesLine: SalesLine, featureSate: boolean = false, channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration, pickupDeliveryMode?: string) => {\n if(!featureSate) {\n return pickupDeliveryMode;\n } else {\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === salesLine.DeliveryMode);\n }\n };\n}\n\nexport default OrderDetails;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getCustomer, GetCustomerInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IComponentNodeProps, IModuleProps, INodeProps, ISingleSlideCarouselProps, ITelemetryContent, NodeTag, SingleSlideCarousel } from '@msdyn365-commerce-modules/utilities';\nimport { ProductComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\nimport {\n getActivePricesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport { AffiliationLoyaltyTier, CustomerAffiliation } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\nexport interface IProductCollectionViewProps extends IProductCollectionProps<{}> {\n heading?: React.ReactNode;\n ProductCollectionContainer: IModuleProps;\n SingleSlideCarouselComponentProps: INodeProps;\n GridComponentProps: INodeProps;\n products: IProductComponentViewProps[];\n isCarousel: boolean;\n productPrices?: ProductPrice[];\n}\n\nexport interface IProductComponentViewProps {\n ProductContainer: INodeProps;\n productComponent: React.ReactNode;\n}\nexport interface IProductComponentState {\n products: ProductSearchResult[];\n}\n/**\n * ProductCollection component\n */\nclass ProductCollection extends React.PureComponent,IProductComponentState> {\n private telemetryContent: ITelemetryContent;\n private productPrices: ProductPrice[];\n constructor(props: IProductCollectionProps<{}>) {\n super(props);\n this.productPrices=[];\n this.state = {\n products: this.props.config.productCollection && this.props.config.productCollection.products,\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n }\n public componentDidMount(): void {\n if (this.props.config.enableAffiliationBasedPricing &&\n this.props.context.actionContext.requestContext?.user?.isAuthenticated) {\n // tslint:disable-next-line:no-floating-promises\n this._getActivePrice();\n }\n }\n public render(): JSX.Element | null {\n const { heading, className } = this.props.config;\n const { resources } = this.props;\n const products = this.state.products;\n const isCarousel = this.props.config.layout === layout.carousel;\n const headingComponent = heading && (\n \n );\n\n const productCollectionViewProps = {\n ...this.props,\n heading: headingComponent,\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: '',\n flipperPrevLabel: resources.flipperPrevious,\n flipperNextLabel: resources.flipperNext,\n parentId: this.props.id,\n telemetryContent: this.telemetryContent\n } as IComponentNodeProps,\n ProductCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-product-collection', className)\n },\n GridComponentProps: {\n tag: 'ul' as NodeTag,\n className: 'ms-product-collection__items',\n },\n isCarousel: isCarousel,\n products: products && products.length > 0 && products.map((item: ProductSearchResult, index: number) => this._getProduct(item, index)),\n productPrices: this.productPrices,\n };\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\n }\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n private _getProduct = (product:ProductSearchResult, index: number): IProductComponentViewProps | null => {\n if(!product || !product.Name) {\n this.props.telemetry.trace('[product-collection] Product or product name is null');\n return null;\n }\n const telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n const { imageSettings, allowBackNavigation } = this.props.config;\n const resources = this.props.resources;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n return {\n ProductContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-product-collection__item',\n role: 'listitem',\n key: index,\n },\n productComponent: (\n \n )\n };\n }\n private _getActivePrice = async (): Promise => {\n let products = (this.state.products) || [];\n const productRecIds = (products && products.length > 0) ? products.map(prod => prod.RecordId) : [];\n const projectDomain: ProjectionDomain = { ChannelId: this.props.context.request.apiSettings.channelId, CatalogId: this.props.context.request.apiSettings.catalogId };\n const affliations: AffiliationLoyaltyTier[] = [];\n const customerInput = new GetCustomerInput(this.props.context.actionContext.requestContext.apiSettings);\n const customer = await getCustomer(customerInput, this.props.context.actionContext);\n\n if (customer && customer.CustomerAffiliations) {\n customer.CustomerAffiliations.forEach((affliation: CustomerAffiliation) => {\n const aff: AffiliationLoyaltyTier = { AffiliationId: affliation.RetailAffiliationId, CustomerId: customer.AccountNumber };\n affliations.push(aff);\n });\n }\n\n await getActivePricesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n projectDomain,\n productRecIds,\n new Date(),\n null,\n affliations,\n true\n ).then((activePricesResponse:ProductPrice[]) => {\n this.productPrices = activePricesResponse;\n products = products.map(prod => {\n const activePrice = activePricesResponse.find(price => price.ProductId === prod.RecordId);\n if (activePrice) {\n prod.Price = activePrice.CustomerContextualPrice ?? prod.Price;\n prod.BasePrice = Math.max(activePrice.BasePrice || 0, activePrice.TradeAgreementPrice || 0, activePrice.AdjustedPrice || 0);\n }\n return prod;\n });\n this.setState({\n products:products\n });\n })\n .catch((error: Error) => {\n this.props.context.actionContext.trace(error.message);\n this.props.context.actionContext.telemetry.exception(error);\n this.props.context.actionContext.telemetry.debug(`[get Affiliation based price on Product Collection]Error executing action`);\n throw new Error('[get Affiliation based price on Product Collection]Error executing action');\n });\n }\n}\n\nexport default ProductCollection;\n","import { buildCacheKey, getOrganizationWideOrderHistory, GetOrganizationWideOrderHistoryInput, getSimpleProducts, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n ICommerceApiSettings\n} from '@msdyn365-commerce/core';\nimport { IQueryResultSettings } from '@msdyn365-commerce/retail-proxy';\nimport { getOrderShipmentsHistoryAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CustomersDataActions.g';\nimport { OrderShipments, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { OrderHistoryFilterState } from '../components/order-history-filter';\n\nexport interface IPaging {\n top: number;\n skip: number;\n}\n\nexport interface IOrderHistory {\n salesOrders: OrderShipments[];\n products: SimpleProduct[];\n}\n\n/**\n * Calls the Retail API and returns the products\n */\nconst getOrderShipmentHistory = (paging: IPaging) => async (ctx: IActionContext): Promise => {\n return getOrderShipmentsHistoryAsync(\n {\n callerContext: ctx,\n queryResultSettings: {\n Paging: {\n Top: paging.top,\n Skip: paging.skip\n }\n }\n },\n ''\n );\n};\n\n/**\n * Calls the Retail API and returns the products\n */\nconst getOrganizationWideOrderShipmentHistory = (paging: IPaging) => async (context: IActionContext): Promise => {\n const queryResultSetting: IQueryResultSettings = {\n Paging: {\n Top: paging.top,\n Skip: paging.skip\n }\n };\n\n return getOrganizationWideOrderHistory(new GetOrganizationWideOrderHistoryInput(queryResultSetting), context);\n};\n\n/**\n * Calls the Retail API and returns the products\n */\nconst getProducts = (productIds: number[] = [], channelId?: number) => (ctx: IActionContext): Promise => {\n const productInputs = productIds.map(productId => new ProductInput(productId, ctx.requestContext.apiSettings, channelId));\n return getSimpleProducts(productInputs, ctx);\n};\n\n/**\n * Action input\n */\nexport class GetSalesOrderHistoryWithHydrationsInput implements IActionInput {\n public paging: IPaging;\n public filterState: OrderHistoryFilterState;\n private apiSettings: ICommerceApiSettings;\n\n constructor(paging: IPaging, apiSettings: ICommerceApiSettings, filterState?: OrderHistoryFilterState) {\n this.apiSettings = apiSettings;\n this.paging = paging;\n this.filterState = filterState || OrderHistoryFilterState.CurrentUser;\n }\n\n public getCacheKey = () => buildCacheKey(`OrderHistory`, this.apiSettings);\n public getCacheObjectType = () => `OrderHistory`;\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Splits product ids from the given orders into lists by their channel id.\n * @param {OrderShipments[]} salesOrders Orders with the products.\n * @param {number} currentChannelId Channel id to use by default if no channel id is provided for a product.\n * @returns {{ [x: number]: number[] }} A dictionary where the key is a channel id,\n * and the value is a list of product ids in which all items correspond to the key channel id.\n * @remark The list of product ids is always non-empty.\n */\nconst splitProductsByChannelId = (\n salesOrders: OrderShipments[],\n currentChannelId: number): { [x: number]: number[] } => {\n\n const productIdsByChannel: { [x: number]: number[] } = {};\n\n salesOrders.forEach(salesOrder => salesOrder?.SalesLines?.forEach(line => {\n const orderProductId = line.ProductId || 0;\n const orderChannelId = salesOrder.ChannelId || currentChannelId;\n if (!productIdsByChannel[orderChannelId]) {\n productIdsByChannel[orderChannelId] = [];\n }\n productIdsByChannel[orderChannelId].push(orderProductId);\n }));\n\n return productIdsByChannel;\n};\n\n/**\n * Get sales order with hydrations action\n */\nexport async function getSalesOrderHistoryWithHydrationsAction(\n input: GetSalesOrderHistoryWithHydrationsInput,\n context: IActionContext\n): Promise {\n if (!context) {\n throw new Error('getSalesOrderWithHydrationsAction - Action context cannot be null/undefined');\n }\n const channelId = context.requestContext.apiSettings.channelId;\n let salesOrders: OrderShipments[] = [];\n\n switch (input.filterState) {\n case OrderHistoryFilterState.CurrentUser:\n salesOrders = await getOrderShipmentHistory(input.paging)(context);\n break;\n case OrderHistoryFilterState.OrganizationWide:\n salesOrders = await getOrganizationWideOrderShipmentHistory(input.paging)(context);\n break;\n default:\n throw new Error('getSalesOrderWithHydrationsAction - Invalid OrderHistoryFilterState passed');\n }\n\n if (!salesOrders || !salesOrders.length) {\n return {\n salesOrders: [],\n products: []\n };\n }\n\n // Splits the data by channel ids so that the products from different channels can be processed separately.\n const productIdsByChannelId = splitProductsByChannelId(salesOrders, channelId);\n\n // Promise that retrieves information about the products for each channel id.\n // Note, the list of product ids should not be empty\n // as it will generate an empty request which will force the promise to fail.\n const getProductsPromise = Object.entries(productIdsByChannelId).map(\n ([entryChannelId, entryProductIdsList]) => {\n const getProductsCall = getProducts(entryProductIdsList, Number(entryChannelId));\n return getProductsCall(context);\n });\n\n return Promise.all(getProductsPromise).then(\n (productList): IOrderHistory => {\n const products = productList.reduce((memo, list) => {\n return [...memo, ...list];\n }, []); // tslint:disable-line:align\n\n return {\n salesOrders,\n products\n };\n }).catch(error => {\n context.telemetry.exception(error);\n context.telemetry.debug('Failed to get products');\n throw error;\n });\n}\n\nexport default createObservableDataAction({\n id: '@msdyn365-commerce-modules/order-management/order-history/get-order-shipment-history',\n action: >getSalesOrderHistoryWithHydrationsAction\n});","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { IOrderSummaryLines } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICartViewProps, IOrderSummaryErrors } from './cart';\nimport { ICartlinesViewProps } from './components/cart-line-items';\nimport { ICartLineItemViewProps } from './components/cart-line-items-promotion';\n\nconst _renderCartlines = (cartLines: ICartlinesViewProps[] | undefined, cartEmptyText: string, CartlinesWrapper: INodeProps, storeSelector: React.ReactNode | undefined,\n backToShoppingButton: React.ReactNode, waitingComponent: React.ReactNode, cartLoadingStatus: string, cartDataResult: boolean): JSX.Element[] | JSX.Element => {\n\n if (cartLoadingStatus) {\n return <>{cartLoadingStatus};\n }\n if (cartLines) {\n return cartLines.map((cartLine, index) => {\n return (\n
\n {cartLine.cartline}\n {\n storeSelector && cartLine.pickUpInStore ?\n \n {cartLine.pickUpInStore.defaultComponent}\n :\n null\n }\n {\n cartLine.addToOrderTemplate ? (\n \n {cartLine.remove}\n {cartLine.addToWishlist}\n {cartLine.addToOrderTemplate}\n \n ) : (\n <>\n {cartLine.remove}\n {cartLine.addToWishlist}\n \n )\n }\n
\n );\n });\n } else {\n return (cartDataResult ?\n (\n
\n

{cartEmptyText}

\n {backToShoppingButton}\n
\n ) : <>{waitingComponent}\n );\n }\n};\n\nconst _renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\n if (!errorData || errorData.errors.length === 0) {\n return null;\n }\n return (\n \n {errorData.header}\n {errorData.errors}\n \n );\n};\n\nconst _renderOrderSummarylines = (orderSummaryLines: IOrderSummaryLines | undefined, OrderSummaryItems: INodeProps, props: ICartViewProps): JSX.Element | null => {\n if (!orderSummaryLines) {\n props.context.telemetry.error('OrderSummary content is empty, module wont render');\n return null;\n }\n return (\n \n {props.promoCode}\n {orderSummaryLines.subtotal}\n {orderSummaryLines.shipping}\n {orderSummaryLines.otherCharge}\n {orderSummaryLines.tax}\n {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null}\n {orderSummaryLines.orderTotal}\n \n );\n};\n\nconst _renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\n return (\n \n \n {promotions.promotionMessage}\n {promotions.promotionSeeAllLink}\n {promotions.promotionDialog}\n \n\n \n );\n\n};\n\nconst CartView: React.FC = (props: ICartViewProps) => (\n
\n {props.title}\n {props.promotionOptions && _renderPromotions(props.promotionOptions)}\n \n {_renderCartlines(props.cartlines, props.resources.emptyCartText, props.CartlinesWrapper, props.storeSelector, props.backToShoppingButton, props.waitingComponent, props.cartLoadingStatus, props.cartDataResult)}\n \n {props.orderSummaryHeading &&\n < Node {...props.OrderSummaryWrapper}>\n {props.orderSummaryHeading}\n {_renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\n {_renderErrorBlock(props.OrderSummaryErrors)}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.backToShoppingButton}\n {props.createTemplateFromCartButton}\n \n }\n {props.storeSelector}\n
\n);\n\nexport default CartView;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { IBuyboxViewProps } from '../..';\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps\n } from './components';\n\nconst BuyboxView: React.FC = props => {\n const { ModuleProps, MediaGalleryContainerProps, ProductInfoContainerProps, addToCart, addToOrderTemplate, addToWishlist, configure, description, findInStore, quantity, price, title, rating, inventoryLabel, shopSimilarLook, keyInPrice } = props;\n\n return (\n \n \n {props.mediaGallery}\n \n \n {title}\n {price}\n {description}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity)}\n {inventoryLabel}\n {addToCart && _renderAddToCart(addToCart)}\n {findInStore && _renderFindInStore(findInStore)}\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n { _renderSocialShare(props.slots && props.slots.socialShare)}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n \n \n );\n};\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return (\n \n {dropdowns.map(_renderConfigureDropdown)}\n \n );\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return (\n <>\n {socialShare[0]}\n \n );\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const {ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return(\n \n \n {heading}\n \n {input}\n \n );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\nexport default BuyboxView;\n","import { INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { SalesOrder } from '@msdyn365-commerce/retail-proxy';\nimport { TenderLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IPriceContext } from './utilities';\n\nexport * from './address';\nexport * from './get-groups';\nexport * from './get-order-information';\nexport * from './get-sales-line';\nexport * from './get-sales-lines';\nexport * from './label';\nexport * from './utilities';\n\nexport interface IGetHelpInput {\n needHelpLabel: string;\n helpLineNumberLabel: string;\n contactNumber: string;\n helpLineContactAriaLabel: string;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface IHelp {\n helpProps: INodeProps;\n needHelpLabel: React.ReactNode;\n helpLineNumberLabel: React.ReactNode;\n contactNumber: React.ReactNode;\n}\n\nexport interface IGetOrderSummaryInput {\n order: SalesOrder;\n earnedPoints: number;\n priceContext: IPriceContext;\n resource: {\n orderSummaryItemsTotalLabel: string;\n orderSummaryShippingFeeLabel: string;\n orderSummaryTaxLabel: string;\n orderSummaryGrandTotalLabel: string;\n orderSummaryHeading: string;\n pointsEarnedLabel: string;\n };\n canShip?: boolean;\n}\n\nexport interface IOrderSummary {\n orderSummaryProps: INodeProps;\n heading: React.ReactNode;\n subtotal: React.ReactNode;\n shipping: React.ReactNode;\n tax: React.ReactNode;\n totalAmount: React.ReactNode;\n earnedPoints?: React.ReactNode;\n}\n\nexport interface IPaymentMethodsInput {\n priceContext: IPriceContext;\n tenderLines: TenderLine[];\n tenderIdOperationIdMap: object;\n locale: string;\n resource: {\n paymentMethodsTitle: string;\n creditCardEndingLabel: string;\n giftCardEndingLabel: string;\n amountCoveredLabel: string;\n loyaltyCardUsedLabel: string;\n cashUsedLabel: string;\n customerAccountUsedLabel: string;\n };\n}\n\nexport interface IPaymentMethods {\n paymentMethodsProps: INodeProps;\n title: React.ReactNode;\n methods: React.ReactNode[];\n}","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\nimport { IVideoPlayerViewProps } from './video-player';\n\nconst VideoPlayerView: React.FC = props => (\n \n {props.player}\n
\n);\n\nexport default VideoPlayerView;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { IActionContext, IGridSettings, IImageSettings } from '@msdyn365-commerce/core';\nimport { ChannelDeliveryOptionConfiguration , OrderShipments, ProductDeliveryOptions, SalesLine, SalesOrder, Shipment, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getSalesLine, ISalesLine, ISalesLineResources } from './get-sales-line';\nimport { IModuleComponentProps, IPriceContext } from './utilities';\n\nexport interface IGetSalesLinesInput {\n moduleName: string;\n moduleComponentProps: IModuleComponentProps;\n isCurrentChannel: boolean;\n\n salesLines: SalesLine[];\n products: SimpleProduct[];\n shipments?: Shipment[];\n priceContext: IPriceContext;\n resources: ISalesLineResources;\n actionContext: IActionContext;\n gridSettings: IGridSettings;\n imageSettings?: IImageSettings;\n imageOnly?: boolean;\n showCompleteAddress?: boolean;\n showTimeslot: boolean;\n telemetryContent?: ITelemetryContent;\n retailMultiplePickUpOptionEnabled?: boolean;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n productDeliveryOptions?: ProductDeliveryOptions[];\n}\n\nexport const getSalesLines = ({\n moduleName,\n moduleComponentProps,\n salesLines,\n products,\n shipments,\n resources,\n isCurrentChannel,\n imageOnly,\n showCompleteAddress,\n showTimeslot,\n telemetryContent,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig,\n productDeliveryOptions\n}: IGetSalesLinesInput): ISalesLine[] => {\n return salesLines.map(salesLine => {\n const product = products.find(_product => _product.RecordId === salesLine.ProductId) || ({} as SimpleProduct);\n const shipment = shipments && shipments.find(_shipment => _shipment.ShipmentLines?.find(_shipmentLine => _shipmentLine.ItemId === product.ItemId));\n return getSalesLine({\n moduleName,\n moduleComponentProps,\n product,\n shipment,\n salesLine,\n isCurrentChannel,\n resources,\n imageOnly,\n showCompleteAddress,\n showTimeslot,\n telemetryContent,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig,\n productDeliveryOptions\n });\n });\n};\n\ninterface IProps extends IModuleComponentProps {\n resources: ISalesLineResources;\n}\n\nexport const getSalesLinesInput = (\n props: IProps,\n moduleName: string,\n order: SalesOrder | OrderShipments,\n products: SimpleProduct[],\n priceContext: IPriceContext,\n showCompleteAddress?: boolean,\n showTimeslot?: boolean,\n telemetryContent?: ITelemetryContent,\n retailMultiplePickUpOptionEnabled?: boolean,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n productDeliveryOptions?: ProductDeliveryOptions[] | undefined\n): IGetSalesLinesInput | undefined => {\n if (!order || !order.SalesLines || !order.SalesLines.length) {\n return;\n }\n\n const {\n resources,\n config: { imageSettings },\n context: {\n actionContext,\n request: {\n gridSettings,\n apiSettings: { channelId }\n }\n }\n } = props;\n\n const isCurrentChannel = !order.ChannelId || order.ChannelId === channelId;\n\n return {\n moduleName,\n moduleComponentProps: props,\n isCurrentChannel,\n salesLines: order.SalesLines,\n products,\n shipments: order.Shipments,\n priceContext: priceContext,\n resources,\n actionContext: actionContext,\n gridSettings: gridSettings!,\n imageSettings: imageSettings,\n showCompleteAddress: showCompleteAddress,\n showTimeslot: showTimeslot || false,\n telemetryContent: telemetryContent,\n retailMultiplePickUpOptionEnabled: retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig: channelDeliveryOptionConfig,\n productDeliveryOptions: productDeliveryOptions\n };\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Button, getPayloadObject, getTelemetryAttributes, INodeProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { ChannelDeliveryOptionConfiguration, ChannelIdentity, OrderShipments, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\nimport { getGroups, IGroups } from '../../../common/get-groups';\nimport { getOrderInfomationInput, getOrderInformation, IOrderInformation } from '../../../common/get-order-information';\nimport { getSalesLines, getSalesLinesInput } from '../../../common/get-sales-lines';\nimport { IOrderHistoryData } from '../order-history.data';\nimport { IOrderHistoryProps } from '../order-history.props.autogenerated';\n\nexport interface ISalesOrderProps extends IOrderHistoryProps {\n salesOrder: OrderShipments;\n products: SimpleProduct[];\n channelIdentities?: ChannelIdentity[];\n orgUnitLocations?: OrgUnitLocation[];\n showChannelInfo?: boolean;\n telemetryContent?: ITelemetryContent;\n retailMultiplePickUpOptionEnabled?: boolean;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n}\n\nexport interface ISalesOrder {\n salesOrderProps: INodeProps;\n orderInfomation: IOrderInformation;\n groups?: IGroups;\n orderDetailsLink: React.ReactNode;\n}\n\nexport const getSalesOrder = (input: ISalesOrderProps): ISalesOrder => {\n const {\n id,\n typeName,\n context,\n telemetry,\n products,\n salesOrder,\n showChannelInfo,\n channelIdentities,\n orgUnitLocations,\n telemetryContent,\n resources: { freePriceText, detailsAriaLabel, detailsLabel, orderItemLabel, orderItemsLabel },\n context: { actionContext },\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig\n } = input;\n\n const moduleName = 'ms-order-history';\n\n const priceContext = {\n id,\n typeName,\n context,\n telemetry,\n freePriceText\n };\n\n const _getorderDetailsPageUrl = (): string => {\n const url = getUrlSync('orderDetails', actionContext) || '';\n const separator = url.includes('?') ? '&' : '?';\n if (salesOrder.SalesId) {\n // Redirect with sales order sales id\n return `${url}${separator}salesId=${salesOrder.SalesId}`;\n } else {\n // Redirect with sales order transaction id\n return `${url}${separator}transactionId=${salesOrder.TransactionId}`;\n }\n };\n\n const salesOrderProps = { className: 'ms-order-history__sales-order', key: salesOrder.SalesId || salesOrder.TransactionId };\n\n const orderInfomationInput = getOrderInfomationInput(input, moduleName, salesOrder, priceContext, channelIdentities, orgUnitLocations, showChannelInfo);\n const orderInfomation = getOrderInformation(orderInfomationInput);\n\n const salesLinesInput = products && getSalesLinesInput(input, moduleName, salesOrder, products, priceContext, undefined, undefined, undefined, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig);\n const salesLines = salesLinesInput && getSalesLines({ ...salesLinesInput, imageOnly: true });\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.OrderDetails);\n const orderDetailsAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n const groups =\n salesLines &&\n getGroups({\n moduleName,\n salesLines,\n resources: { orderItemLabel, orderItemsLabel },\n retailMultiplePickUpOptionEnabled: retailMultiplePickUpOptionEnabled\n });\n\n const orderDetailsLink = (\n \n {detailsLabel}\n \n );\n\n return {\n salesOrderProps,\n orderInfomation,\n groups,\n orderDetailsLink\n };\n};\n","import searchStateDataAction from './search-state-data-action';\n\nexport * from './search-state-data-action';\nexport * from './search-state';\n\nexport { searchStateDataAction };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IHelp,\n IOrderDetailsViewProps,\n IOrderInformation,\n IOrderSummary,\n IPaymentMethods,\n ISalesLine\n} from './../..';\n\nexport const OrderDetailsOrderInfomation: React.FC = ({\n orderInformationProps,\n salesId,\n receiptId,\n createdDate,\n count,\n amount,\n channelReferenceId,\n channelName,\n channelAddress\n}) => (\n \n {channelName}\n {channelAddress}\n {channelReferenceId}\n {salesId}\n {receiptId}\n {createdDate}\n {count}\n {amount}\n \n );\n\nexport const OrderDetailsSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n {buyAgainButton}\n \n);\n\nexport const OrderDetailsGroupDelivery: React.FC = ({ deliveryProps, heading, count, trackingInfo, shippedStatusCheck }) => (\n \n {heading}\n {count}\n {shippedStatusCheck === 'shipped' ? null : trackingInfo}\n \n);\n\nexport const OrderDetailsGroup: React.FC = ({ groupProps, delivery, address, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n {salesLine.data.deliveryType === 'ship' && salesLine.data.shipment ? salesLine.trackingInfo : null}\n \n {salesLine.salesStatus}\n \n ))}\n \n )}\n {!delivery.showTimeslot && address}\n {delivery.showTimeslot && (\n \n {address}\n {delivery.pickupDateTimeslot}\n \n )}\n \n);\n\nexport const OrderDetailsGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderDetailsOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const OrderDetailsPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const OrderDetailsHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderDetailsView: React.FC = ({\n moduleProps,\n heading,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {groups && }\n {orderSummary && }\n {payment && }\n {help && }\n \n );\n};\n\nexport default OrderDetailsView;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from './components';\nimport { ISearchViewProps } from './search';\n\nconst SearchView: React.FC = props => {\n const {\n Search,\n AutoSuggestAriaLabel,\n AutoSuggestAriaLabelText,\n searchText,\n AutoSuggest,\n KeywordSuggest,\n ProductSuggest,\n CategorySuggest,\n UlKeyword,\n UlProduct,\n UlCategory,\n form,\n autosuggestCategory,\n autosuggestKeyword,\n autosuggestProduct,\n SearchForm,\n FormWrapper,\n label\n } = props;\n\n return (\n \n {label}\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\n \n {searchText && searchText.length > 0 ?\n {AutoSuggestAriaLabelText} : ''\n }\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\n \n \n );\n};\n\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\n return (\n \n \n {form.submitBtn}\n {form.input}\n {form.cancelBtn}\n \n \n );\n};\n\nconst _renderKeywordSuggestions = (\n KeywordSuggest: INodeProps,\n UlKeyword: INodeProps,\n keywordSuggestions?: ISearchKeywordViewProps\n) => {\n return (\n keywordSuggestions && (\n \n \n {keywordSuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nconst _renderProductSuggestions = (\n ProductSuggest: INodeProps,\n UlProduct: INodeProps,\n productSuggestions?: ISearchProductViewProps\n) => {\n return (\n productSuggestions && (\n \n \n {productSuggestions.title}\n {productSuggestions.items.map((item, index) => {\n return (\n \n \n {item.thumbnail}\n {item.text}\n {item.price}\n \n \n );\n })}\n \n \n )\n );\n};\n\nconst _renderCategorySuggestions = (\n CategorySuggest: INodeProps,\n UlCategory: INodeProps,\n categorySuggestions?: ISearchCategoryViewProps\n) => {\n return (\n categorySuggestions && (\n \n \n {categorySuggestions.title}\n {categorySuggestions.text.map(text => {\n return text;\n })}\n \n \n )\n );\n};\n\nexport default SearchView;","import React from 'react';\n\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IOrderHistoryFilterResources {\n orderHistoryFilterYourOrderHistory: string;\n orderHistoryFilterOrganizationWide: string;\n}\n\nexport interface IOrderHistoryFilterData {\n customerInformation: Customer;\n}\n\nexport interface IOrderHistoryFilterProps extends IComponentProps {\n className: string;\n\n resources: IOrderHistoryFilterResources;\n\n currentState: OrderHistoryFilterState;\n onFilterStateChanged(state: OrderHistoryFilterState): void;\n}\n\nexport enum OrderHistoryFilterState {\n CurrentUser,\n OrganizationWide\n}\n\nconst getOrderHistoryFilterStateResources = (filterState: OrderHistoryFilterState, resources: IOrderHistoryFilterResources): string => {\n switch (filterState) {\n case OrderHistoryFilterState.CurrentUser:\n return resources.orderHistoryFilterYourOrderHistory;\n case OrderHistoryFilterState.OrganizationWide:\n return resources.orderHistoryFilterOrganizationWide;\n default:\n throw new Error('Failed to retrieve resource description for unknown order history filter state.');\n }\n};\n\nconst renderFilterStateItem = (\n filterState: OrderHistoryFilterState,\n resources: IOrderHistoryFilterResources,\n className: string,\n onStateClick: (filterState: OrderHistoryFilterState) => void): React.ReactNode => {\n\n const stateStringRepresentation = OrderHistoryFilterState[filterState];\n\n const onClick = () => {\n return onStateClick(filterState);\n };\n\n return (\n \n {getOrderHistoryFilterStateResources(filterState, resources)}\n \n );\n};\n\nconst OrderHistoryFilter: React.FC = (props: IOrderHistoryFilterProps) => {\n // Current version of filter doesn't include functionality for non b2b admins.\n if (!props.data.customerInformation.IsB2bAdmin) {\n return null;\n }\n\n const popoverRef = React.createRef();\n const [popoverState, setPopoverState] = React.useState(false);\n const togglePopover = () => {\n setPopoverState(!popoverState);\n };\n\n const [filterState, setFilterState] = React.useState(props.currentState);\n\n const onFilterStateClick = (clickedState: OrderHistoryFilterState) => {\n setFilterState(clickedState);\n setPopoverState(false);\n props.onFilterStateChanged(clickedState);\n };\n\n return (\n
\n \n {getOrderHistoryFilterStateResources(filterState, props.resources)}\n \n \n {\n EnumExtensions.getEnumValues(OrderHistoryFilterState).map(state => {\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\n })\n }\n \n
\n );\n};\n\n// @ts-ignore\nexport const OrderHistoryFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'OrderHistoryFilterComponent',\n { component: OrderHistoryFilter }\n);","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { ArrayExtensions, getFallbackImageUrl, getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, INodeProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\nimport { Image } from '@msdyn365-commerce/core';\nimport { ChannelDeliveryOptionConfiguration, ProductDeliveryOptions, SalesLine, Shipment, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\nimport Address from './address';\nimport LabelComponent from './label';\nimport { defaultImageSettings, getDateTimeslot, getSalesStatusCode, IDeliveryType, IModuleComponentProps, ISalesStatusCode } from './utilities';\n\nexport type ISalesStatusStringMap = {\n [x in ISalesStatusCode]: string | undefined;\n};\n\nexport type IDeliveryTypeStringMap = {\n [x in IDeliveryType]: string | undefined;\n};\n\nexport interface ISalesLineResources {\n productDimensionTypeSize: string;\n productDimensionTypeColor: string;\n productDimensionTypeStyle: string;\n salesLineQuantityText: string;\n configString: string;\n shipToLabel: string;\n storeLabel: string;\n phoneLabel: string;\n phoneAriaLabel: string;\n buyItAgainAriaLabel: string;\n buyItAgainLabel: string;\n orderStatusReadyForPickup: string;\n orderStatusPickedUp: string;\n orderStatusShipped: string;\n orderStatusCanceled: string;\n orderStatusProcessing: string;\n pickedUpSalesLines: string;\n deliveredSalesLines: string;\n carryOutSalesLines: string;\n trackingLabel: string;\n trackingAriaLabel: string;\n trackingComingSoonLabel: string;\n discountStringText: string;\n orderStatusEmailed: string;\n emailSalesLines: string;\n pickupDateTimeslotText: string;\n pickupTimeslotPlaceHolder: string;\n shippingCharges?: string;\n}\n\nexport interface IGetSalesLineInput {\n moduleName: string;\n moduleComponentProps: IModuleComponentProps;\n product: SimpleProduct;\n shipment?: Shipment;\n salesLine: SalesLine;\n isCurrentChannel: boolean;\n resources: ISalesLineResources;\n imageOnly?: boolean;\n showCompleteAddress?: boolean;\n showTimeslot: boolean;\n telemetryContent?: ITelemetryContent;\n retailMultiplePickUpOptionEnabled?: boolean;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n productDeliveryOptions?: ProductDeliveryOptions[];\n}\n\nexport interface ISalesLine {\n salesLineProps: INodeProps;\n salesLine: React.ReactNode;\n address?: React.ReactNode;\n buyAgainButton?: React.ReactNode;\n salesStatus: React.ReactNode;\n deliveryType: React.ReactNode;\n trackingInfo: React.ReactNode;\n pickupDateTimeslot: React.ReactNode;\n\n // row data\n data: {\n salesLine: SalesLine;\n product: SimpleProduct;\n shipment?: Shipment;\n deliveryType: string;\n productUrl: string;\n salesStatus: ISalesStatusCode;\n };\n}\n\n// tslint:disable:max-func-body-length\n// tslint:disable-next-line:cyclomatic-complexity\nexport const getSalesLine = ({\n moduleName,\n moduleComponentProps: {\n id,\n typeName,\n context,\n telemetry,\n config: { imageSettings, showShippingChargesForLineItems }\n },\n showCompleteAddress,\n product,\n shipment,\n salesLine,\n isCurrentChannel,\n imageOnly,\n showTimeslot,\n resources: {\n productDimensionTypeSize: sizeString,\n productDimensionTypeColor: colorString,\n productDimensionTypeStyle: styleString,\n salesLineQuantityText: quantityDisplayString,\n configString,\n shipToLabel,\n storeLabel,\n phoneLabel,\n phoneAriaLabel,\n buyItAgainLabel,\n buyItAgainAriaLabel,\n orderStatusReadyForPickup,\n orderStatusProcessing,\n orderStatusShipped,\n orderStatusPickedUp,\n orderStatusCanceled,\n orderStatusEmailed,\n pickedUpSalesLines,\n deliveredSalesLines,\n carryOutSalesLines,\n emailSalesLines,\n trackingLabel,\n trackingAriaLabel,\n trackingComingSoonLabel,\n discountStringText,\n pickupDateTimeslotText,\n pickupTimeslotPlaceHolder,\n shippingCharges\n },\n telemetryContent,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig,\n productDeliveryOptions\n}: IGetSalesLineInput): ISalesLine => {\n const salesStatusStringMap: ISalesStatusStringMap = {\n canceled: orderStatusCanceled,\n readyForPickup: orderStatusReadyForPickup,\n pickedUp: orderStatusPickedUp,\n processing: orderStatusProcessing,\n shipped: orderStatusShipped,\n unknown: undefined,\n emailed: orderStatusEmailed\n };\n\n const deliveryTypeStringMap: IDeliveryTypeStringMap = {\n pickUp: pickedUpSalesLines,\n ship: deliveredSalesLines,\n carryOut: carryOutSalesLines,\n email: emailSalesLines\n };\n\n const gridSettings = context.request.gridSettings;\n const pickupDeliveryModeCode = context.request.channel && context.request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = context.request.channel && context.request.channel.EmailDeliveryModeCode;\n const productUrl = getProductUrlSync(product, context.actionContext, undefined);\n const pickupMode = getPickupModeDesc(product, salesLine.DeliveryMode, productDeliveryOptions, retailMultiplePickUpOptionEnabled);\n const deliveryType =\n getPickupDeliveryMode(salesLine.DeliveryMode, pickupDeliveryModeCode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig)\n ? pickupMode\n : !!emailDeliveryModeCode && emailDeliveryModeCode !== '' && emailDeliveryModeCode === salesLine.DeliveryMode\n ? 'email'\n : !!salesLine.DeliveryMode\n ? 'ship'\n : 'carryOut';\n const salesStatus = getSalesStatusCode(deliveryType, salesLine.SalesStatusValue, pickupMode);\n const salesStatusString = salesStatusStringMap[salesStatus];\n const salesStatusComp = salesStatusString && ;\n const deliveryTypeString = getdeliveryTypeString(deliveryType, deliveryTypeStringMap, retailMultiplePickUpOptionEnabled);\n const deliveryTypeClass = getdeliveryTypeClassName(deliveryType, deliveryTypeStringMap);\n const storePickUp = retailMultiplePickUpOptionEnabled ? getStoreName(salesLine, deliveryType) : null;\n const deliveryTypeComp = retailMultiplePickUpOptionEnabled ? deliveryTypeString && \n : deliveryTypeString && ;\n const trackingInfo = isCurrentChannel && deliveryType === 'ship' && (\n \n {trackingLabel}\n {shipment ? (\n \n {shipment.TrackingNumber}\n \n ) : (\n <>{trackingComingSoonLabel}\n )}\n \n );\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.BuyItAgain);\n const buyItAgainAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const fallbackImageUrl = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n\n const canShowTimeslot: boolean = showTimeslot\n && deliveryType === pickupMode\n && salesLine.PickupTimeslotStartDateTime !== undefined\n && salesLine.PickupTimeslotEndDateTime !== undefined;\n\n const pickupDateTimeslot = canShowTimeslot ? getDateTimeslot(pickupTimeslotPlaceHolder, salesLine.PickupTimeslotStartDateTime, salesLine.PickupTimeslotEndDateTime, context.request.locale) : '';\n const pickupDateTimeslotInfo = canShowTimeslot && (\n
\n
{pickupDateTimeslotText}
\n
{pickupDateTimeslot}
\n
\n );\n if(imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n return {\n data: {\n salesLine,\n productUrl,\n deliveryType,\n salesStatus,\n product,\n shipment\n },\n salesLineProps: { className: `${moduleName}__sales-line` },\n salesLine: imageOnly ? (\n
\n \n
\n ) : (\n \n ),\n address: salesLine.ShippingAddress && (\n \n ),\n deliveryType: deliveryTypeComp,\n salesStatus: salesStatusComp,\n trackingInfo,\n buyAgainButton: retailMultiplePickUpOptionEnabled ? isCurrentChannel && (\n \n {buyItAgainLabel}\n \n ) :\n isCurrentChannel && (\n \n {buyItAgainLabel}\n \n ),\n pickupDateTimeslot: pickupDateTimeslotInfo\n };\n};\n\nexport const getPickupDeliveryMode = (salesLineDeliveryMode?: string, pickupDeliveryModeCode?: string, retailMultiplePickupOption?: boolean,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration, productDeliveryOptions?: ProductDeliveryOptions[]): boolean => {\n if (retailMultiplePickupOption) {\n return salesLineDeliveryMode === channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === salesLineDeliveryMode);\n } else {\n return !!pickupDeliveryModeCode && pickupDeliveryModeCode !== '' && pickupDeliveryModeCode === salesLineDeliveryMode;\n }\n};\n\nexport const getdeliveryTypeString = (deliveryType: string, deliveryTypeStringMap: IDeliveryTypeStringMap , retailMultiplePickupOption?: boolean): string | undefined=> {\n if(retailMultiplePickupOption) {\n switch (deliveryType) {\n case 'ship':\n case 'carryout':\n case 'email':\n return deliveryTypeStringMap[deliveryType];\n default:\n return deliveryType;\n }\n } else {\n return deliveryTypeStringMap[deliveryType];\n }\n};\n\nexport const getdeliveryTypeClassName = (deliveryType: string, deliveryTypeStringMap: IDeliveryTypeStringMap , retailMultiplePickupOption?: boolean): string | undefined=> {\n switch (deliveryType) {\n case 'ship':\n case 'carryout':\n case 'email':\n return deliveryType;\n default:\n return 'pickUp';\n }\n};\n\nexport const getPickupModeDesc = (product: SimpleProduct, salesLineDeliveryMode?: string, productDeliveryOptions?: ProductDeliveryOptions[], retailMultiplePickupOption?: boolean): string => {\n let deliveryOption: string = 'pickup';\n if (ArrayExtensions.hasElements(productDeliveryOptions) && product !== undefined) {\n let foundProductDeliveryOption;\n foundProductDeliveryOption = productDeliveryOptions?.find((deliveryO) => {\n return deliveryO && deliveryO.ProductId === product.RecordId;\n });\n const deliveryDesc = foundProductDeliveryOption?.DeliveryOptions ? foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === salesLineDeliveryMode)?.Description: deliveryOption;\n if (deliveryDesc !== undefined) {\n deliveryOption = deliveryDesc;\n }\n }\n return deliveryOption;\n};\n\nexport const getStoreName = (salesLine: SalesLine, deliveryType?: string): string | undefined => {\n switch (deliveryType) {\n case 'ship':\n case 'email':\n case 'carryout':\n return '';\n default:\n return `, ${salesLine.ShippingAddress?.Name}`;\n }\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\ninterface ILabelProps {\n className: string;\n label: string;\n}\n\nconst Label: React.FC = ({ className, label }) => {label};\n\nexport default Label;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport { IOrderTemplateNameDialogResources, OrderTemplateNameDialog } from '@msdyn365-commerce/components';\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport React, { useState } from 'react';\n\nexport interface ICreateOrderTemplateButtonProps extends IComponentProps {\n createOrderTemplateText: string;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n onOrderTemplateCreated(): Promise;\n}\n\nconst CreateOrderTemplateButton: React.FC = (props) => {\n const onCancel = () => {\n return;\n };\n const [createOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = useState(false);\n const onCreateButtonClick = () => {\n setOrderTemplateNameDialogOpen(true);\n };\n\n return (\n <>\n \n {props.createOrderTemplateText}\n \n \n \n );\n};\n\nexport default CreateOrderTemplateButton;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { OrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { IOrderTemplateNameDialogResources } from '@msdyn365-commerce/components';\nimport { deleteAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductListsDataActions.g';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { ISingleOrderTemplateProps, ISingleOrderTemplateViewProps, OrderTemplateListStatusMessage, OrderTemplateRender } from './components/';\nimport CreateNewTemplateButtonComponent from './components/create-order-template';\nimport { IOrderTemplateListData } from './order-template-list.data';\nimport { IOrderTemplateListProps, IOrderTemplateListResources } from './order-template-list.props.autogenerated';\n\nexport interface IOrderTemplateActionMessageState {\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n headerStatusMessage: string;\n}\n\nexport type orderTemplateListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\n\nexport interface IOrderTemplateListViewProps extends IOrderTemplateListProps {\n OrderTemplateList: IModuleProps;\n status?: orderTemplateListStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n OrderTemplates?: INodeProps;\n OrderTemplate?: INodeProps;\n orderTemplates?: ISingleOrderTemplateViewProps[];\n createOrderTemplateButton?: React.ReactNode;\n templateHeaderStatusMessage?: React.ReactNode;\n}\n\n/**\n *\n * OrderTemplateList component\n * @extends {React.PureComponent, IOrderTemplateListActionMessageState>}\n */\n@observer\nclass OrderTemplateList extends React.Component, IOrderTemplateActionMessageState> {\n\n constructor(props: IOrderTemplateListProps) {\n super(props);\n this.state = {\n itemKey: '',\n userMessage: '',\n headerStatusMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false,\n };\n }\n\n public async componentDidMount(): Promise {\n this.setState({});\n }\n\n public render(): JSX.Element | null {\n const { className } = this.props.config;\n const { emptyOrderTemplateText, createNewTemplateButtonText } = this.props.resources;\n const { orderTemplates } = this.props.data;\n const orderTemplatesData = orderTemplates && (orderTemplates).result;\n\n if (orderTemplates.status === 'LOADING') {\n const errorProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className),\n },\n status: 'LOADING',\n statusMessage: ,\n heading: (\n \n ),\n };\n return this.props.renderView(errorProps);\n }\n\n if (!!orderTemplatesData && orderTemplatesData.length === 0) {\n // when no order templates are found for customer\n const emptyViewProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className),\n },\n status: 'EMPTY',\n statusMessage: ,\n heading: (\n \n ),\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className),\n },\n status: 'SUCCESS',\n heading: (\n \n ),\n createOrderTemplateButton: (\n \n ),\n templateHeaderStatusMessage: this.state.isOpen && this.state.headerStatusMessage && (\n
\n \n {this.state.headerStatusMessage}\n \n
\n ),\n OrderTemplates: {\n className: 'ms-order-template__list-item',\n tag: 'ul',\n },\n OrderTemplate: {\n className: 'ms-order-template__tile',\n tag: 'li',\n },\n orderTemplates: orderTemplatesData && this._renderOrderTemplateList(orderTemplatesData)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _generateOrderTemplateNameDialogResources(resources: IOrderTemplateListResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n }\n\n private _renderOrderTemplateList(orderTemplates: OrderTemplate[]): ISingleOrderTemplateViewProps[] {\n const { context, telemetry } = this.props;\n const { imageSettings, enableImageProductLink } = this.props.config;\n return orderTemplates.map((orderTemplate: OrderTemplate, index) => {\n const currentTemplateProps: ISingleOrderTemplateProps = {\n orderTemplateState: this.state,\n Id: orderTemplate.productList.Id,\n name: orderTemplate.productList.Name,\n orderTemplate: orderTemplate,\n context: context,\n imageSettings: imageSettings,\n enableImageProductLink: enableImageProductLink,\n removeFromOrderTemplateListText: 'remove',\n addToBagText: this.props.resources.addToBagButtonText,\n index: index,\n itemKey: orderTemplate.productList.Id,\n telemetry: telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n handlers: {\n onRemoveOrderTemplate: this._onRemoveFromOrderTemplateList,\n onDismiss: this._onDismiss,\n },\n resources: {\n closeWindowButtonText: this.props.resources.closeWindowButtonText,\n addToCartFailureMessage: this.props.resources.addToCartFailureMessage,\n addToCartSuccessMessage: this.props.resources.addToCartSuccessMessage,\n addToCartProcessMessage: this.props.resources.addToCartProcessMessage,\n linesAddedToCartDialogResources: {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n linesAddedToCartHeaderItemsOneText: this.props.resources.linesAddedToCartHeaderItemsOneText,\n linesAddedToCartHeaderLinesOneText: this.props.resources.linesAddedToCartHeaderLinesOneText,\n linesAddedToCartHeaderLinesFormatText: this.props.resources.linesAddedToCartHeaderLinesFormatText,\n linesAddedToCartHeaderMessageText: this.props.resources.linesAddedToCartHeaderMessageText\n }\n }\n };\n\n return (\n OrderTemplateRender(currentTemplateProps)!\n );\n });\n }\n\n private _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n }\n\n private _reloadPage = async () => {\n window.location.reload();\n }\n\n private _onRemoveFromOrderTemplateList = (productListId: string): void | undefined => {\n const { context, data, telemetry, resources } = this.props;\n const { orderTemplates } = data;\n\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplates.result && orderTemplates.result[0] && productListId) {\n const orderTemplate = orderTemplates.result.find(p => p.productList.Id === productListId);\n if (orderTemplate) {\n deleteAsync({ callerContext: context.actionContext }, orderTemplate.productList)\n .then()\n .catch((error: string) => {\n telemetry.warning('[order-template-list] Unable to delete order template.');\n telemetry.error(error);\n this.setState({\n itemKey: productListId,\n headerStatusMessage: resources.deleteOrderTemplateFailedText,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n }).then(this._reloadPage);\n } else {\n telemetry.warning('[order-template-list] Failed to delete order template. Order template was not found');\n }\n } else {\n telemetry.warning('[order-template-list] Failed to delete order template.');\n }\n }\n }\n\n}\n\nexport default OrderTemplateList;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { PriceComponent } from '@msdyn365-commerce/components';\n\nimport * as React from 'react';\nimport { IGetOrderSummaryInput, IOrderSummary, IPriceContext } from '../../../common/';\n\ninterface ISummaryLineProps {\n priceContext?: IPriceContext;\n name: string;\n label: string;\n value?: number;\n}\n\nconst OrderSummaryLine: React.SFC = ({ name, label, value = 0, priceContext }) => (\n

\n {label}\n {priceContext ? (\n \n ) : (\n {value}\n )}\n

\n);\n\nexport const getOrderConfirmationOrderSummary = ({\n order,\n priceContext,\n earnedPoints,\n resource: {\n orderSummaryHeading,\n orderSummaryItemsTotalLabel,\n orderSummaryShippingFeeLabel,\n orderSummaryTaxLabel,\n orderSummaryGrandTotalLabel,\n pointsEarnedLabel\n },\n canShip\n}: IGetOrderSummaryInput): IOrderSummary => {\n return {\n orderSummaryProps: { className: 'ms-order-confirmation__order-summary' },\n heading:

{orderSummaryHeading}

,\n subtotal: (\n \n ),\n shipping: canShip ? (\n \n ): '',\n tax: ,\n totalAmount: (\n \n ),\n earnedPoints: earnedPoints ? : undefined\n };\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\nimport { ISocialShareItemViewProps } from './social-share-item';\n\nexport const SocialShareItemView: React.FC = props => {\n const { SocialShareItem, SocialShareItemElement } = props;\n\n if (!SocialShareItemElement) {\n props.context.telemetry.error('Social media is not valid, module wont render');\n return null;\n }\n return (\n \n {SocialShareItemElement}\n \n );\n};\n\nexport default SocialShareItemView;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\nimport {getPayloadObject, getTelemetryAttributes, INodeProps, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { IWishlistItemViewProps } from '../..';\nimport { IWishlistItemsViewProps } from './wishlist-items';\n\nconst WishlistItemsView: React.FC = props => {\n const { WishlistItems, status, statusMessage, heading, Products, products, Product, ProductDetails, ProductDimensions, telemetryContent } = props;\n\n return (\n \n {heading}\n {status !== 'SUCCESS' && statusMessage}\n { Products && products && products.length > 0 &&\n \n {products && products.map((product) => {\n return _renderItem(product, Product, ProductDimensions, ProductDetails, telemetryContent);\n })}\n \n }\n \n );\n};\n\nconst _renderItem = (product: IWishlistItemViewProps, Product?: INodeProps, ProductDimensions?: INodeProps, ProductDetails?: INodeProps, telemetryContent?: ITelemetryContent): JSX.Element | null => {\n\n const { key, productImage, productLink, productPrice, productDimensions, addToCartButton, removeButton, productStatusMessage, entireProductLink, productName, productAriaLabel, inventoryInformation } = product;\n const payLoad = getPayloadObject('click', telemetryContent!, '', key);\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n if (entireProductLink) {\n return (\n \n \n {productImage}\n {productName}\n {productDimensions && ProductDimensions &&\n \n {\n productDimensions.map((dimension) => {\n return dimension;\n })\n }\n \n }\n {productPrice}\n \n {inventoryInformation}\n {addToCartButton}\n {removeButton}\n {productStatusMessage}\n \n );\n } else {\n return (\n \n { productImage }\n { productLink }\n { productDimensions && ProductDimensions &&\n \n {\n productDimensions.map((dimension) => {\n return dimension;\n })\n }\n \n }\n { productPrice }\n { addToCartButton }\n { removeButton }\n { productStatusMessage }\n \n );\n }\n};\n\nexport default WishlistItemsView;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IOrderConfirmationViewProps,\n IOrderInformation,\n ISalesLine\n} from './order-confirmation';\n\nimport {\n IHelp,\n IOrderSummary,\n IPaymentMethods,\n\n} from '../../common';\n\nexport const OrderConfirmationOrderInfomation: React.FC = ({\n orderInformationProps,\n receiptEmail,\n createdDate,\n channelReferenceId\n}) => (\n \n {createdDate}\n {channelReferenceId}\n {receiptEmail}\n \n );\n\nexport const OrderConfirmationSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n \n);\n\nexport const OrderConfirmationGroupDelivery: React.FC = ({ deliveryProps, heading, count, processing, address, trackingInfo, pickupDateTimeslot }) => (\n \n {heading}\n {address}\n {pickupDateTimeslot}\n \n);\n\nexport const OrderConfirmationGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {delivery && delivery.shippingItemsToYou}\n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n ))}\n \n )}\n \n);\n\nexport const OrderConfirmationGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderConfirmationOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const OrderConfirmationPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const OrderConfirmationHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderConfirmationView: React.FC = ({\n moduleProps,\n heading,\n backToShoppingLink,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {backToShoppingLink}\n {groups && }\n {payment && }\n {orderSummary && }\n {help && }\n \n );\n};\n\nexport default OrderConfirmationView;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IGroup, IGroupDelivery, IGroups, IHeader, IList, IOrderHistoryViewProps, IOrderInformation, ISalesOrder } from './order-history';\n\nexport const OrderHistoryOrderInfomation: React.FC = ({\n orderInformationProps,\n salesId,\n receiptId,\n channelName,\n createdDate,\n count,\n amount,\n channelReferenceId\n}) => (\n \n {channelName}\n {salesId}\n {receiptId}\n {createdDate}\n {count}\n {amount}\n {channelReferenceId}\n \n );\n\nexport const OrderHistoryGroupDelivery: React.FC = ({ deliveryProps, heading, count, processing, address, trackingInfo }) => (\n \n {heading}\n {count}\n {processing}\n {address}\n {trackingInfo}\n \n);\n\nexport const OrderHistoryGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {salesLines && (\n \n {salesLines.map(salesLine => (\n {salesLine.salesLine}\n ))}\n \n )}\n \n);\n\nexport const OrderHistoryGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderHistoryHeader: React.FC = ({ headerProps, heading, orderCountLabel, extraActions }) => (\n \n {heading}\n {orderCountLabel}\n {extraActions}\n \n);\n\nexport const OrderHistorySalesOder: React.FC = ({ salesOrderProps, orderInfomation, groups, orderDetailsLink }) => (\n \n {orderInfomation && }\n {groups && }\n {orderDetailsLink}\n \n);\n\nexport const OrderHistoryList: React.FC = ({ listProps, salesOrders }) => (\n {salesOrders && salesOrders.map((salesOrder, index) => )}\n);\n\nconst OrderHistoryView: React.FC = ({\n orderHistoryProps,\n header,\n alert,\n loading,\n emptyMessage,\n backToShoppingLink,\n list,\n moreButton\n}) => (\n \n {header && }\n {loading}\n {alert && (\n <>\n {alert}\n {backToShoppingLink}\n \n )}\n {emptyMessage && (\n <>\n {emptyMessage}\n {backToShoppingLink}\n \n )}\n {list && }\n {moreButton && moreButton}\n \n );\n\nexport default OrderHistoryView;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IHistogramItemViewProps } from './component/components';\nimport { IRatingsHistogramViewProps } from './ratings-histogram';\n\nconst RatingsHistogramView: React.FC = props => {\n const {heading, histogramItems, histogramProps, moduleProps} = props;\n // tslint:disable\n return (\n \n {heading}\n \n {histogramItems.map(item => {\n return histogramItem(item);\n })}\n \n \n );\n};\n\nconst histogramItem = (props: IHistogramItemViewProps) => {\n return (\n \n {props.starLabel}\n {props.bar}\n {props.percentage}\n \n );\n};\n\nexport default RatingsHistogramView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IGetHelpInput, IHelp } from '@msdyn365-commerce-modules/order-management';\r\nimport * as React from 'react';\r\n\r\nexport const getOrderDetailsHelp = ({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel }: IGetHelpInput): IHelp => ({\r\n helpProps: { className: 'ms-order-details__help' },\r\n needHelpLabel:

{needHelpLabel}

,\r\n helpLineNumberLabel: {helpLineNumberLabel},\r\n contactNumber: (\r\n \r\n {contactNumber}\r\n \r\n )\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\n\r\nimport { IGetOrderSummaryInput, IOrderSummary, IPriceContext } from '@msdyn365-commerce-modules/order-management';\r\nimport * as React from 'react';\r\n\r\ninterface ISummaryLineProps {\r\n priceContext?: IPriceContext;\r\n name: string;\r\n label: string;\r\n value?: number;\r\n}\r\n\r\nconst OrderSummaryLine: React.SFC = ({ name, label, value = 0, priceContext }) => (\r\n

\r\n {label}\r\n {priceContext ? (\r\n \r\n ) : (\r\n {value}\r\n )}\r\n

\r\n);\r\n\r\nexport const getOrderDetailsOrderSummary = ({\r\n order,\r\n priceContext,\r\n earnedPoints,\r\n resource: {\r\n orderSummaryHeading,\r\n orderSummaryItemsTotalLabel,\r\n orderSummaryShippingFeeLabel,\r\n orderSummaryTaxLabel,\r\n orderSummaryGrandTotalLabel,\r\n pointsEarnedLabel\r\n }\r\n}: IGetOrderSummaryInput): IOrderSummary => {\r\n return {\r\n orderSummaryProps: { className: 'ms-order-details__order-summary' },\r\n heading:

{orderSummaryHeading}

,\r\n subtotal: (\r\n \r\n ),\r\n shipping: (\r\n \r\n ),\r\n tax: ,\r\n totalAmount: (\r\n \r\n ),\r\n earnedPoints: earnedPoints ? : undefined\r\n };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IPaymentMethods, IPaymentMethodsInput } from '@msdyn365-commerce-modules/order-management';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { TenderLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport * as React from 'react';\r\n\r\nconst getLastFourDigit = (digits = '') => digits.substr(-4);\r\n\r\nexport const getOrderDetailsPaymentMethods = ({\r\n priceContext,\r\n tenderLines,\r\n tenderIdOperationIdMap,\r\n resource: { paymentMethodsTitle, creditCardEndingLabel, giftCardEndingLabel, amountCoveredLabel, loyaltyCardUsedLabel, cashUsedLabel }\r\n}: IPaymentMethodsInput): IPaymentMethods => {\r\n const getCard = (tenderLine: TenderLine) => (\r\n
\r\n

\r\n {`${tenderLine.CardTypeId} ${creditCardEndingLabel} ${getLastFourDigit(tenderLine.MaskedCardNumber)}`}\r\n

\r\n
\r\n );\r\n\r\n const getGiftCertificate = (tenderLine: TenderLine) => (\r\n
\r\n

\r\n {giftCardEndingLabel} {getLastFourDigit(tenderLine.GiftCardId)}\r\n

\r\n

\r\n {amountCoveredLabel}\r\n \r\n

\r\n
\r\n );\r\n\r\n const getLoyalty = (tenderLine: TenderLine) => (\r\n
\r\n

\r\n {loyaltyCardUsedLabel} {tenderLine.LoyaltyCardId}\r\n

\r\n

\r\n {amountCoveredLabel}\r\n \r\n

\r\n
\r\n );\r\n\r\n const getCash = (tenderLine: TenderLine) => (\r\n
\r\n

{cashUsedLabel}

\r\n

\r\n {amountCoveredLabel}\r\n \r\n

\r\n
\r\n );\r\n\r\n return {\r\n paymentMethodsProps: { className: 'ms-order-details__payment-methods' },\r\n title:
{paymentMethodsTitle}
,\r\n methods: tenderLines.reduce((lines: React.ReactNode[], tenderLine) => {\r\n if (!tenderLine.TenderTypeId) {\r\n return lines;\r\n }\r\n switch (tenderIdOperationIdMap[tenderLine.TenderTypeId]) {\r\n case 201:\r\n lines.push(getCard(tenderLine));\r\n break;\r\n case 214:\r\n lines.push(getGiftCertificate(tenderLine));\r\n break;\r\n case 207:\r\n lines.push(getLoyalty(tenderLine));\r\n break;\r\n case 200:\r\n lines.push(getCash(tenderLine));\r\n break;\r\n default:\r\n // do nothing\r\n }\r\n return lines;\r\n }, [])\r\n };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Address as IAddress } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\n\r\nexport type addressType = 'store' | 'ship';\r\n\r\nexport interface IShippingAddressProps {\r\n moduleName: string;\r\n address: IAddress;\r\n deliveryType: string;\r\n showCompleteAddress?: boolean;\r\n resource: {\r\n shipToLabel: string;\r\n storeLabel: string;\r\n phoneLabel: string;\r\n phoneAriaLabel: string;\r\n };\r\n}\r\n\r\nconst Address: React.SFC = ({\r\n moduleName,\r\n address,\r\n deliveryType,\r\n showCompleteAddress,\r\n resource: { shipToLabel, storeLabel, phoneLabel }\r\n}) => (\r\n
\r\n
{deliveryType !== 'ship' ? storeLabel : shipToLabel}
\r\n {address.Name && {address.Name}}\r\n {showCompleteAddress ?\r\n (<>\r\n {address.Street && {address.Street} }\r\n {address.City && {address.City}}\r\n {address.State && {`, ${address.State}`}}\r\n {address.County && {`, ${address.County}`}}\r\n {address.ZipCode && {` ${address.ZipCode}`}}\r\n {address.ThreeLetterISORegionName && {` ${address.ThreeLetterISORegionName}`}}\r\n {address.Phone && (\r\n \r\n {phoneLabel}\r\n \r\n )}\r\n ) : address.FullAddress && {address.FullAddress}}\r\n
\r\n );\r\n\r\nexport default React.memo(Address);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as React from 'react';\r\n\r\ninterface ILabelProps {\r\n className: string;\r\n label: string;\r\n}\r\n\r\nconst Label: React.FC = ({ className, label }) => {label};\r\n\r\nexport default Label;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { IAny, ICoreContext, IGeneric, IImageSettings, IModule, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { SalesLine, TenderType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport groupBy from 'lodash/groupBy';\r\nimport { ISalesLine } from './get-sales-line';\r\n\r\nexport interface IModuleComponentProps extends IModule {\r\n config: {\r\n imageSettings?: IImageSettings;\r\n showShippingChargesForLineItems?: boolean;\r\n };\r\n}\r\n\r\nexport interface IPriceContext {\r\n id: string;\r\n typeName: string;\r\n context: ICoreContext>;\r\n telemetry: ITelemetry;\r\n freePriceText: string;\r\n}\r\n\r\nexport const getTenderIdOperationIdMap = (tenderTypes: TenderType[]): object => {\r\n return tenderTypes.reduce((map, tenderType) => {\r\n if (tenderType.TenderTypeId) {\r\n map[tenderType.TenderTypeId] = tenderType.OperationId;\r\n }\r\n return map;\r\n }, {});\r\n};\r\n\r\nexport const countItems = (salesLines: SalesLine[]) => {\r\n return salesLines.reduce((count, salesLine) => {\r\n return count + (salesLine.Quantity || 0);\r\n }, 0);\r\n};\r\n\r\nexport const getSalesLinesByDelivery = (salesLines?: SalesLine[], pickupDeliveryModeCode?: string): SalesLine[] => {\r\n if (!salesLines || !salesLines.length) {\r\n return [];\r\n }\r\n return salesLines.filter(salesLine =>\r\n // isPickUp ? getPickUp : getOthers\r\n (pickupDeliveryModeCode && pickupDeliveryModeCode !== '') ? salesLine.DeliveryMode === pickupDeliveryModeCode : salesLine.DeliveryMode !== pickupDeliveryModeCode\r\n );\r\n};\r\n\r\nexport const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=80&h=80&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=147&h=147&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n};\r\n\r\nexport type IDeliveryType = 'pickUp' | 'ship' | 'carryOut' | 'email';\r\n\r\nexport type ISalesStatusCode = 'canceled' | 'readyForPickup' | 'pickedUp' | 'processing' | 'shipped' | 'unknown' | 'emailed';\r\n\r\nexport const getSalesStatusCode = (deliveryType: string, statusValue?: number, pickupMode?: string): ISalesStatusCode => {\r\n if (statusValue === 7) {\r\n return 'canceled';\r\n }\r\n\r\n if (pickupMode !== undefined) {\r\n switch (statusValue) {\r\n case 3:\r\n return 'readyForPickup';\r\n case 4:\r\n return 'pickedUp';\r\n default:\r\n return 'processing';\r\n }\r\n }\r\n if (deliveryType === 'pickUp') {\r\n switch (statusValue) {\r\n case 3:\r\n return 'readyForPickup';\r\n case 4:\r\n return 'pickedUp';\r\n default:\r\n return 'processing';\r\n }\r\n } else if (deliveryType === 'ship') {\r\n switch (statusValue) {\r\n case 3:\r\n return 'processing';\r\n case 4:\r\n return 'shipped';\r\n default:\r\n return 'processing';\r\n }\r\n } else if (deliveryType === 'email') {\r\n switch (statusValue) {\r\n case 3:\r\n return 'processing';\r\n case 4:\r\n return 'emailed';\r\n default:\r\n return 'processing';\r\n }\r\n } else if (deliveryType === 'carryOut') {\r\n return 'processing';\r\n } else {\r\n return 'unknown';\r\n }\r\n};\r\n\r\nexport type ITrackingId = string | 'unknown';\r\nexport type IAddressId = string | 'unknown';\r\n\r\nexport interface IGroupData {\r\n deliveryType: IDeliveryType;\r\n salesStatus: ISalesStatusCode;\r\n addressId: IAddressId | 'unknown';\r\n trackingId: ITrackingId | 'unknown';\r\n count: number;\r\n salesLines: ISalesLine[];\r\n}\r\n\r\nexport const groupSalesLines = (salesLines: ISalesLine[]): IGroupData[] => {\r\n const getGroupByDeliveryType = (items: ISalesLine[]) => groupBy(items, item => item.data.deliveryType);\r\n const getGroupBySalesStatusCode = (items: ISalesLine[]) => groupBy(items, item => item.data.salesStatus);\r\n const getGroupByTrackingId = (items: ISalesLine[]) => groupBy(items, item => item.data.salesLine.TrackingId || 'unknown');\r\n const getGroupByAddressId = (items: ISalesLine[]) =>\r\n groupBy(items, item => (item.data.salesLine.ShippingAddress && item.data.salesLine.ShippingAddress.RecordId) || 'unknown');\r\n\r\n const flatGroup: IGroupData[] = [];\r\n\r\n // 1) Group by delivery type\r\n // @ts-ignore\r\n const group = getGroupByDeliveryType(salesLines);\r\n\r\n // 2) Group by sales status code\r\n Object.entries(group).forEach(([deliveryType, groupByDeliveryType]) => {\r\n // @ts-ignore\r\n group[deliveryType] = getGroupBySalesStatusCode(groupByDeliveryType);\r\n\r\n Object.entries(group[deliveryType]).forEach(([salesStatus, groupBySalesStatusCode]) => {\r\n // @ts-ignore 3) Group by address id\r\n groupBySalesStatusCode[salesStatus] = getGroupByAddressId(groupBySalesStatusCode);\r\n\r\n // @ts-ignore\r\n Object.entries(groupBySalesStatusCode[salesStatus]).forEach(([addressId, groupByAddressId]) => {\r\n // @ts-ignore 4) Group by address id\r\n groupByAddressId[addressId] = getGroupByTrackingId(groupByAddressId);\r\n\r\n // @ts-ignore\r\n Object.entries(groupByAddressId[addressId]).forEach(([trackingId, groupByTrackingId]) => {\r\n flatGroup.push({\r\n // @ts-ignore\r\n deliveryType,\r\n // @ts-ignore\r\n salesStatus,\r\n addressId,\r\n trackingId,\r\n // @ts-ignore\r\n count: countItems(groupByTrackingId.map(item => item.data.salesLine)),\r\n // @ts-ignore\r\n salesLines: groupByTrackingId\r\n });\r\n });\r\n });\r\n });\r\n });\r\n\r\n return flatGroup;\r\n};\r\n\r\nexport const getDateTimeslot = (placeHolder: string, startDate: Date | undefined, endDate: Date | undefined, locale: string): string => {\r\n if (!startDate || !endDate) {\r\n return '';\r\n }\r\n\r\n const dateOptions: Intl.DateTimeFormatOptions = {\r\n timeZone: 'UTC'\r\n };\r\n const dateformatter = new Intl.DateTimeFormat(locale, dateOptions);\r\n const date = dateformatter.format(new Date(startDate));\r\n\r\n const timeslotOptions: Intl.DateTimeFormatOptions = {\r\n hour: 'numeric',\r\n minute: 'numeric',\r\n hour12: true,\r\n timeZone: 'UTC'\r\n };\r\n const timeslotformatter = new Intl.DateTimeFormat(locale, timeslotOptions);\r\n const timeslot = format(placeHolder, timeslotformatter.format(new Date(startDate)), timeslotformatter.format(new Date(endDate)));\r\n return `${date} ${timeslot}`;\r\n};","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { ArrayExtensions, getFallbackImageUrl, getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, INodeProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport { CartLineItemComponent } from '../../../components/cartlineitem-variant.component';\r\nimport { Image } from '@msdyn365-commerce/core';\r\nimport { ChannelDeliveryOptionConfiguration, ProductDeliveryOptions, SalesLine, Shipment, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\nimport Address from './address';\r\nimport LabelComponent from './label';\r\nimport { defaultImageSettings, getDateTimeslot, getSalesStatusCode, IDeliveryType, IModuleComponentProps, ISalesStatusCode } from './utilities';\r\n\r\nexport type ISalesStatusStringMap = {\r\n [x in ISalesStatusCode]: string | undefined;\r\n};\r\n\r\nexport type IDeliveryTypeStringMap = {\r\n [x in IDeliveryType]: string | undefined;\r\n};\r\n\r\nexport interface ISalesLineResources {\r\n productDimensionTypeSize: string;\r\n productDimensionTypeColor: string;\r\n productDimensionTypeStyle: string;\r\n salesLineQuantityText: string;\r\n configString: string;\r\n shipToLabel: string;\r\n storeLabel: string;\r\n phoneLabel: string;\r\n phoneAriaLabel: string;\r\n buyItAgainAriaLabel: string;\r\n buyItAgainLabel: string;\r\n orderStatusReadyForPickup: string;\r\n orderStatusPickedUp: string;\r\n orderStatusShipped: string;\r\n orderStatusCanceled: string;\r\n orderStatusProcessing: string;\r\n pickedUpSalesLines: string;\r\n deliveredSalesLines: string;\r\n carryOutSalesLines: string;\r\n trackingLabel: string;\r\n trackingAriaLabel: string;\r\n trackingComingSoonLabel: string;\r\n discountStringText: string;\r\n orderStatusEmailed: string;\r\n emailSalesLines: string;\r\n pickupDateTimeslotText: string;\r\n pickupTimeslotPlaceHolder: string;\r\n shippingCharges?: string;\r\n}\r\n\r\nexport interface IGetSalesLineInput {\r\n moduleName: string;\r\n moduleComponentProps: IModuleComponentProps;\r\n product: SimpleProduct;\r\n shipment?: Shipment;\r\n salesLine: SalesLine;\r\n isCurrentChannel: boolean;\r\n resources: ISalesLineResources;\r\n imageOnly?: boolean;\r\n showCompleteAddress?: boolean;\r\n showTimeslot: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n retailMultiplePickUpOptionEnabled?: boolean;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n productDeliveryOptions?: ProductDeliveryOptions[];\r\n}\r\n\r\nexport interface ISalesLine {\r\n salesLineProps: INodeProps;\r\n salesLine: React.ReactNode;\r\n address?: React.ReactNode;\r\n buyAgainButton?: React.ReactNode;\r\n salesStatus: React.ReactNode;\r\n deliveryType: React.ReactNode;\r\n trackingInfo: React.ReactNode;\r\n pickupDateTimeslot: React.ReactNode;\r\n\r\n // row data\r\n data: {\r\n salesLine: SalesLine;\r\n product: SimpleProduct;\r\n shipment?: Shipment;\r\n deliveryType: string;\r\n productUrl: string;\r\n salesStatus: ISalesStatusCode;\r\n };\r\n}\r\n\r\n// tslint:disable:max-func-body-length\r\n// tslint:disable-next-line:cyclomatic-complexity\r\nexport const getSalesLine = ({\r\n moduleName,\r\n moduleComponentProps: {\r\n id,\r\n typeName,\r\n context,\r\n telemetry,\r\n config: { imageSettings, showShippingChargesForLineItems }\r\n },\r\n showCompleteAddress,\r\n product,\r\n shipment,\r\n salesLine,\r\n isCurrentChannel,\r\n imageOnly,\r\n showTimeslot,\r\n resources: {\r\n productDimensionTypeSize: sizeString,\r\n productDimensionTypeColor: colorString,\r\n productDimensionTypeStyle: styleString,\r\n salesLineQuantityText: quantityDisplayString,\r\n configString,\r\n shipToLabel,\r\n storeLabel,\r\n phoneLabel,\r\n phoneAriaLabel,\r\n buyItAgainLabel,\r\n buyItAgainAriaLabel,\r\n orderStatusReadyForPickup,\r\n orderStatusProcessing,\r\n orderStatusShipped,\r\n orderStatusPickedUp,\r\n orderStatusCanceled,\r\n orderStatusEmailed,\r\n pickedUpSalesLines,\r\n deliveredSalesLines,\r\n carryOutSalesLines,\r\n emailSalesLines,\r\n trackingLabel,\r\n trackingAriaLabel,\r\n trackingComingSoonLabel,\r\n discountStringText,\r\n pickupDateTimeslotText,\r\n pickupTimeslotPlaceHolder,\r\n shippingCharges\r\n },\r\n telemetryContent,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig,\r\n productDeliveryOptions\r\n}: IGetSalesLineInput): ISalesLine => {\r\n const salesStatusStringMap: ISalesStatusStringMap = {\r\n canceled: orderStatusCanceled,\r\n readyForPickup: orderStatusReadyForPickup,\r\n pickedUp: orderStatusPickedUp,\r\n processing: orderStatusProcessing,\r\n shipped: orderStatusShipped,\r\n unknown: undefined,\r\n emailed: orderStatusEmailed\r\n };\r\n\r\n const deliveryTypeStringMap: IDeliveryTypeStringMap = {\r\n pickUp: pickedUpSalesLines,\r\n ship: deliveredSalesLines,\r\n carryOut: carryOutSalesLines,\r\n email: emailSalesLines\r\n };\r\n\r\n const gridSettings = context.request.gridSettings;\r\n const pickupDeliveryModeCode = context.request.channel && context.request.channel.PickupDeliveryModeCode;\r\n const emailDeliveryModeCode = context.request.channel && context.request.channel.EmailDeliveryModeCode;\r\n const productUrl = getProductUrlSync(product, context.actionContext, undefined);\r\n const pickupMode = getPickupModeDesc(product, salesLine.DeliveryMode, productDeliveryOptions, retailMultiplePickUpOptionEnabled);\r\n const deliveryType =\r\n getPickupDeliveryMode(salesLine.DeliveryMode, pickupDeliveryModeCode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig)\r\n ? pickupMode\r\n : !!emailDeliveryModeCode && emailDeliveryModeCode !== '' && emailDeliveryModeCode === salesLine.DeliveryMode\r\n ? 'email'\r\n : !!salesLine.DeliveryMode\r\n ? 'ship'\r\n : 'carryOut';\r\n const salesStatus = getSalesStatusCode(deliveryType, salesLine.SalesStatusValue, pickupMode);\r\n const salesStatusString = salesStatusStringMap[salesStatus];\r\n const salesStatusComp = salesStatusString && ;\r\n const deliveryTypeString = getdeliveryTypeString(deliveryType, deliveryTypeStringMap, retailMultiplePickUpOptionEnabled);\r\n const deliveryTypeClass = getdeliveryTypeClassName(deliveryType, deliveryTypeStringMap);\r\n const storePickUp = retailMultiplePickUpOptionEnabled ? getStoreName(salesLine, deliveryType) : null;\r\n const deliveryTypeComp = retailMultiplePickUpOptionEnabled ? deliveryTypeString && \r\n : deliveryTypeString && ;\r\n const trackingInfo = isCurrentChannel && deliveryType === 'ship' && (\r\n \r\n {trackingLabel}\r\n {shipment ? (\r\n \r\n {shipment.TrackingNumber}\r\n \r\n ) : (\r\n {trackingComingSoonLabel}\r\n )}\r\n \r\n );\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.BuyItAgain);\r\n const buyItAgainAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const fallbackImageUrl = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\r\n\r\n const canShowTimeslot: boolean = showTimeslot\r\n && deliveryType === pickupMode\r\n && salesLine.PickupTimeslotStartDateTime !== undefined\r\n && salesLine.PickupTimeslotEndDateTime !== undefined;\r\n\r\n const pickupDateTimeslot = canShowTimeslot ? getDateTimeslot(pickupTimeslotPlaceHolder, salesLine.PickupTimeslotStartDateTime, salesLine.PickupTimeslotEndDateTime, context.request.locale) : '';\r\n const pickupDateTimeslotInfo = canShowTimeslot && (\r\n
\r\n
{pickupDateTimeslotText}
\r\n
{pickupDateTimeslot}
\r\n
\r\n );\r\n if(imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n return {\r\n data: {\r\n salesLine,\r\n productUrl,\r\n deliveryType,\r\n salesStatus,\r\n product,\r\n shipment\r\n },\r\n salesLineProps: { className: `${moduleName}__sales-line` },\r\n salesLine: imageOnly ? (\r\n
\r\n \r\n
\r\n ) : (\r\n \r\n ),\r\n address: salesLine.ShippingAddress && (\r\n \r\n ),\r\n deliveryType: deliveryTypeComp,\r\n salesStatus: salesStatusComp,\r\n trackingInfo,\r\n buyAgainButton: retailMultiplePickUpOptionEnabled ? isCurrentChannel && (\r\n \r\n {buyItAgainLabel}\r\n \r\n ) :\r\n isCurrentChannel && (\r\n \r\n {buyItAgainLabel}\r\n \r\n ),\r\n pickupDateTimeslot: pickupDateTimeslotInfo\r\n };\r\n};\r\n\r\nexport const getPickupDeliveryMode = (salesLineDeliveryMode?: string, pickupDeliveryModeCode?: string, retailMultiplePickupOption?: boolean,\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration, productDeliveryOptions?: ProductDeliveryOptions[]): boolean => {\r\n if (retailMultiplePickupOption) {\r\n return salesLineDeliveryMode === channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === salesLineDeliveryMode);\r\n } else {\r\n return !!pickupDeliveryModeCode && pickupDeliveryModeCode !== '' && pickupDeliveryModeCode === salesLineDeliveryMode;\r\n }\r\n};\r\n\r\nexport const getdeliveryTypeString = (deliveryType: string, deliveryTypeStringMap: IDeliveryTypeStringMap , retailMultiplePickupOption?: boolean): string | undefined=> {\r\n if(retailMultiplePickupOption) {\r\n switch (deliveryType) {\r\n case 'ship':\r\n case 'carryout':\r\n case 'email':\r\n return deliveryTypeStringMap[deliveryType];\r\n default:\r\n return deliveryType;\r\n }\r\n } else {\r\n return deliveryTypeStringMap[deliveryType];\r\n }\r\n};\r\n\r\nexport const getdeliveryTypeClassName = (deliveryType: string, deliveryTypeStringMap: IDeliveryTypeStringMap , retailMultiplePickupOption?: boolean): string | undefined=> {\r\n switch (deliveryType) {\r\n case 'ship':\r\n case 'carryout':\r\n case 'email':\r\n return deliveryType;\r\n default:\r\n return 'pickUp';\r\n }\r\n};\r\n\r\nexport const getPickupModeDesc = (product: SimpleProduct, salesLineDeliveryMode?: string, productDeliveryOptions?: ProductDeliveryOptions[], retailMultiplePickupOption?: boolean): string => {\r\n let deliveryOption: string = 'pickup';\r\n if (ArrayExtensions.hasElements(productDeliveryOptions) && product !== undefined) {\r\n const foundProductDeliveryOption = productDeliveryOptions?.find((deliveryO) => {\r\n return deliveryO && deliveryO.ProductId === product.RecordId;\r\n });\r\n const deliveryDesc = foundProductDeliveryOption?.DeliveryOptions ? foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === salesLineDeliveryMode)?.Description: deliveryOption;\r\n if (deliveryDesc !== undefined) {\r\n deliveryOption = deliveryDesc;\r\n }\r\n }\r\n return deliveryOption;\r\n};\r\n\r\nexport const getStoreName = (salesLine: SalesLine, deliveryType?: string): string | undefined => {\r\n switch (deliveryType) {\r\n case 'ship':\r\n case 'email':\r\n case 'carryout':\r\n return '';\r\n default:\r\n return `, ${salesLine.ShippingAddress?.Name}`;\r\n }\r\n};","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport classname from 'classnames';\r\nimport get from 'lodash/get';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n getGroups,\r\n getOrderInfomationInput,\r\n getOrderInformation,\r\n getTenderIdOperationIdMap,\r\n IGetOrderSummaryInput,\r\n IGroups,\r\n IHelp,\r\n IOrderInformation,\r\n IOrderSummary,\r\n IPaymentMethods,\r\n IPaymentMethodsInput,\r\n IPriceContext,\r\n ISalesLine,\r\n} from '@msdyn365-commerce-modules/order-management';\r\nimport { Button, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { CartLine, SalesOrder, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nimport { publish } from '../../Utilities/analytics/analytics-dispatcher';\r\nimport { getAttributesForCart, IAttributeBank } from '../../Utilities/get-product-attributes';\r\n\r\nimport { wineClubSetup } from '../../settings/app.settings';\r\nimport { WineClubDataRef, WineClubDataStore } from '../wine-club-signup/wine-club-data';\r\nimport { getOrderDetailsHelp } from './components/get-help';\r\nimport { getOrderDetailsOrderSummary } from './components/get-order-summary';\r\nimport { getOrderDetailsPaymentMethods } from './components/get-payment-methods';\r\nimport { getSalesLines, getSalesLinesInput } from './components/get-sales-lines';\r\nimport { ISmweOrderDetailsData } from './smwe-order-details.data';\r\nimport { ISmweOrderDetailsProps } from './smwe-order-details.props.autogenerated';\r\n\r\nexport * from './components/get-help';\r\nexport * from './components/get-order-summary';\r\nexport * from './components/get-payment-methods';\r\n\r\nexport interface IOrderDetailsViewProps extends ISmweOrderDetailsProps {\r\n moduleProps: IModuleProps;\r\n salesOrder?: SalesOrder;\r\n footerProps?: INodeProps;\r\n alert?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n heading: React.ReactNode;\r\n backToShoppingLink?: React.ReactNode;\r\n orderInfomation?: IOrderInformation;\r\n salesLines?: ISalesLine[];\r\n groups?: IGroups;\r\n orderSummary?: IOrderSummary;\r\n payment?: IPaymentMethods;\r\n help?: IHelp;\r\n isWineClubOrder?: boolean;\r\n isWineClubPickup?: boolean;\r\n wineClubData?: WineClubDataRef;\r\n}\r\n\r\n/**\r\n *\r\n * OrderDetails component\r\n * @extends {React.Component>}\r\n */\r\nclass OrderDetails extends React.Component> {\r\n private moduleName: string = 'ms-order-details';\r\n private parsedProductAttributes: IAttributeBank = {};\r\n private wineClubData: WineClubDataRef;\r\n\r\n @computed get isCurrentChannel(): boolean {\r\n if (!this.order) {\r\n return false;\r\n }\r\n return this.order.ChannelId === get(this.props, 'context.request.apiSettings.channelId');\r\n }\r\n\r\n @computed get isDataReady(): boolean {\r\n return get(this.props, 'data.orderHydration.status') === 'SUCCESS';\r\n }\r\n\r\n @computed get hasError(): boolean {\r\n return get(this.props, 'data.orderHydration.status') === 'FAILED';\r\n }\r\n\r\n @computed get order(): SalesOrder | undefined {\r\n return get(this.props, 'data.orderHydration.result.salesOrder');\r\n }\r\n\r\n @computed get products(): SimpleProduct[] {\r\n return get(this.props, 'data.orderHydration.result.products') || [];\r\n }\r\n\r\n @computed get priceContext(): IPriceContext {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n telemetry,\r\n resources: { freePriceText }\r\n } = this.props;\r\n return {\r\n id,\r\n typeName,\r\n context,\r\n telemetry,\r\n freePriceText\r\n };\r\n }\r\n\r\n @computed get earnedPoints(): number {\r\n const loyaltyCard = this.props.data.loyaltyCard.result;\r\n if (loyaltyCard && loyaltyCard.RewardPoints && this.order) {\r\n const pointPrograms = loyaltyCard.RewardPoints.map(point => point.RewardPointId);\r\n const rewardLines = this.order.LoyaltyRewardPointLines || [];\r\n let total = 0;\r\n rewardLines.forEach(line => {\r\n if ((line.RewardPointAmountQuantity || 0) > 0 && pointPrograms.indexOf(line.RewardPointId) > -1) {\r\n total += line.RewardPointAmountQuantity!;\r\n }\r\n });\r\n return total;\r\n }\r\n return 0;\r\n }\r\n\r\n @computed get orderSummaryProps(): IGetOrderSummaryInput | undefined {\r\n if (!this.order) {\r\n return;\r\n }\r\n\r\n const {\r\n resources: { orderSummaryHeading, orderSummaryItemsTotalLabel, orderSummaryShippingFeeLabel, orderSummaryTaxLabel, orderSummaryGrandTotalLabel, pointsEarnedLabel }\r\n } = this.props;\r\n return {\r\n order: this.order,\r\n earnedPoints: this.earnedPoints,\r\n priceContext: this.priceContext,\r\n resource: {\r\n orderSummaryHeading,\r\n orderSummaryItemsTotalLabel,\r\n orderSummaryShippingFeeLabel,\r\n orderSummaryTaxLabel,\r\n pointsEarnedLabel,\r\n orderSummaryGrandTotalLabel\r\n }\r\n };\r\n }\r\n\r\n @computed get paymentMethodsProps(): IPaymentMethodsInput | undefined {\r\n const tenderTypes = this.props.data.tenderTypes.result;\r\n if (!this.order || !this.order.TenderLines || !tenderTypes) {\r\n return;\r\n }\r\n\r\n const locale = get(this.props, 'context.request.locale') || 'en-US';\r\n\r\n const {\r\n resources: {\r\n paymentMethodsTitle,\r\n creditCardEndingLabel,\r\n giftCardEndingLabel,\r\n amountCoveredLabel,\r\n cashUsedLabel,\r\n loyaltyCardUsedLabel,\r\n customerAccountUsedLabel\r\n }\r\n } = this.props;\r\n\r\n return {\r\n priceContext: this.priceContext,\r\n tenderLines: this.order.TenderLines,\r\n tenderIdOperationIdMap: getTenderIdOperationIdMap(tenderTypes),\r\n locale,\r\n resource: {\r\n paymentMethodsTitle,\r\n creditCardEndingLabel,\r\n giftCardEndingLabel,\r\n amountCoveredLabel,\r\n cashUsedLabel,\r\n loyaltyCardUsedLabel,\r\n\r\n customerAccountUsedLabel,\r\n }\r\n };\r\n }\r\n\r\n // this should be moved to a utility (WineClubUtils) or something\r\n @computed get wineClubIds(): string[] {\r\n const wineClub = this.props.app.config.wineClubSetup as wineClubSetup | undefined;\r\n const ids: string[] = [];\r\n wineClub && wineClub.forEach(club => club.variants.forEach(variant => ids.push(variant.itemId)));\r\n return ids;\r\n }\r\n\r\n @computed get isWineClubOrder(): boolean {\r\n if (!this.order) { return false; }\r\n\r\n const lines = this.order.SalesLines || [];\r\n\r\n // clubs have only one item\r\n if (lines.length > 1) { return false; }\r\n\r\n for (const line of lines) {\r\n const isClubOrder = this.wineClubIds.find(clubId => +clubId === line.ProductId);\r\n if (isClubOrder) { return true; }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n @computed get isWineClubPickup(): boolean {\r\n return this.wineClubData.deliveryType === 'PICKUP';\r\n }\r\n\r\n public constructor(props: ISmweOrderDetailsProps) {\r\n super(props);\r\n\r\n this.wineClubData = WineClubDataStore.getInstance().get();\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n public componentDidMount(): void {\r\n // Don't do anything unless emitAnalyticsEvent is enabled\r\n if (!this.props.config.emitAnalyticsEvent) {\r\n return;\r\n }\r\n\r\n // Wait for sales order and product data to load\r\n this.props.data.orderHydration.then(data => {\r\n\r\n // Ensure it loaded successfully\r\n if (this.isDataReady) {\r\n\r\n // Fetch attributes, then generate the checkout event\r\n this._setProductAttributes()\r\n .then(() => this._generatePurchaseAnalyticsEvent())\r\n .catch(e => this.props.telemetry.exception(e));\r\n }\r\n }).catch(e => this.props.telemetry.exception(e));\r\n WineClubDataStore.getInstance().reset();\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n public render(): JSX.Element {\r\n const {\r\n resources: {\r\n noSalesOrderText,\r\n genericErrorMessage,\r\n needHelpLabel,\r\n helpLineNumberLabel,\r\n loadingLabel,\r\n backToShopping,\r\n orderItemLabel,\r\n orderItemsLabel,\r\n helpLineContactAriaLabel,\r\n },\r\n config: { heading, contactNumber, showChannelInfo }\r\n } = this.props;\r\n\r\n const moduleProps = { moduleProps: this.props, className: classname('ms-order-details', this.props.config.className) };\r\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\r\n const channelIdentities = this.props.data.channels.result && this.props.data.channels.result.channelIdentities;\r\n const orgUnitLocations = this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.result.orgUnitLocations;\r\n\r\n let viewProps: IOrderDetailsViewProps = {\r\n ...this.props,\r\n moduleProps,\r\n heading: heading && ,\r\n backToShoppingLink: backToShoppingUrl && (\r\n \r\n ),\r\n footerProps: { className: 'ms-order-details__footer' }\r\n };\r\n\r\n if (this.hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: {genericErrorMessage}\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n if (!this.isDataReady) {\r\n viewProps = {\r\n ...viewProps,\r\n loading: {loadingLabel}\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n if (!this.order) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: {noSalesOrderText}\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n const salesLinesInput = getSalesLinesInput(this.props, this.moduleName, this.order, this.products, this.priceContext);\r\n const salesLines = salesLinesInput && getSalesLines(salesLinesInput);\r\n\r\n const orderInfomationInput = this.order && getOrderInfomationInput(this.props, this.moduleName, this.order, this.priceContext, channelIdentities, orgUnitLocations, showChannelInfo);\r\n const orderInfomation = orderInfomationInput && getOrderInformation(orderInfomationInput);\r\n\r\n viewProps = {\r\n ...viewProps,\r\n salesOrder: this.order,\r\n orderInfomation,\r\n salesLines,\r\n groups: salesLines\r\n ? getGroups({\r\n moduleName: this.moduleName,\r\n salesLines,\r\n resources: { orderItemLabel, orderItemsLabel }\r\n })\r\n : undefined,\r\n orderSummary: this.orderSummaryProps ? getOrderDetailsOrderSummary(this.orderSummaryProps) : undefined,\r\n payment: this.paymentMethodsProps ? getOrderDetailsPaymentMethods(this.paymentMethodsProps) : undefined,\r\n help: contactNumber ? getOrderDetailsHelp({ needHelpLabel, helpLineNumberLabel, contactNumber, helpLineContactAriaLabel }) : undefined,\r\n isWineClubOrder: this.isWineClubOrder,\r\n isWineClubPickup: this.isWineClubPickup,\r\n wineClubData: this.wineClubData\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n private _generatePurchaseAnalyticsEvent(): void {\r\n if (this.order?.SalesLines) {\r\n\r\n // Format product data for Purchase event\r\n const products = this.order.SalesLines.map(line => {\r\n const product = this.products.find(entry => entry.RecordId === line.ProductId);\r\n\r\n // For some reason, if we properly use the external constant for IsSubsciption (or better yet, the isLineSubscriptionLine\r\n // helper) React explodes with a cryptic error about an undefined component.\r\n const isSubscription = !!line?.ExtensionProperties?.find(ext => ext.Key === 'IsSubscription');\r\n\r\n return {\r\n product,\r\n quantity: line.Quantity,\r\n subscription: isSubscription,\r\n discounts: line.DiscountLines,\r\n attributes: this.parsedProductAttributes[line.ProductId!],\r\n price: line.NetAmount ? (line.NetAmount / (line.Quantity || 1)).toFixed(2) : line.Price,\r\n\r\n context: this.props.context,\r\n };\r\n });\r\n\r\n // Generate a GA event\r\n publish('purchase', {\r\n id: this.order.ChannelReferenceId, // Id = transaction ID, ChannelReferenceId = Confirmation #\r\n revenue: this.order.TotalAmount,\r\n tax: this.order.TaxAmount,\r\n shipping: this.order.ChargeAmount,\r\n coupon: this.order.Coupons?.map(coupon => coupon.Code).join(','),\r\n affiliation: this.order.ChannelId,\r\n products\r\n });\r\n }\r\n }\r\n\r\n //----------------------------------------------------------\r\n // Fetch product attributes for all products on a sales order\r\n //----------------------------------------------------------\r\n private async _setProductAttributes(): Promise {\r\n if (this.order) {\r\n const salesLines = this.order.SalesLines;\r\n\r\n if (salesLines) {\r\n const fakeCartLines: CartLine[] = salesLines.map(line => ({ ProductId: line.ProductId }));\r\n this.parsedProductAttributes = await getAttributesForCart(fakeCartLines, this.props.context.actionContext);\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\nexport default OrderDetails;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IModuleComponentProps, IPriceContext } from '@msdyn365-commerce-modules/order-management/src/common/utilities';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { IActionContext, IGridSettings, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { ChannelDeliveryOptionConfiguration , OrderShipments, ProductDeliveryOptions, SalesLine, SalesOrder, Shipment, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { getSalesLine, ISalesLine, ISalesLineResources } from './get-sales-line';\r\n\r\nexport interface IGetSalesLinesInput {\r\n moduleName: string;\r\n moduleComponentProps: IModuleComponentProps;\r\n isCurrentChannel: boolean;\r\n\r\n salesLines: SalesLine[];\r\n products: SimpleProduct[];\r\n shipments?: Shipment[];\r\n priceContext: IPriceContext;\r\n resources: ISalesLineResources;\r\n actionContext: IActionContext;\r\n gridSettings: IGridSettings;\r\n imageSettings?: IImageSettings;\r\n imageOnly?: boolean;\r\n showCompleteAddress?: boolean;\r\n showTimeslot: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n retailMultiplePickUpOptionEnabled?: boolean;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n productDeliveryOptions?: ProductDeliveryOptions[];\r\n}\r\n\r\nexport const getSalesLines = ({\r\n moduleName,\r\n moduleComponentProps,\r\n salesLines,\r\n products,\r\n shipments,\r\n resources,\r\n isCurrentChannel,\r\n imageOnly,\r\n showCompleteAddress,\r\n showTimeslot,\r\n telemetryContent,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig,\r\n productDeliveryOptions\r\n}: IGetSalesLinesInput): ISalesLine[] => {\r\n return salesLines.map(salesLine => {\r\n const product = products.find(_product => _product.RecordId === salesLine.ProductId) || ({} as SimpleProduct);\r\n const shipment = shipments && shipments.find(_shipment => _shipment.ShipmentLines?.find(_shipmentLine => _shipmentLine.ItemId === product.ItemId));\r\n return getSalesLine({\r\n moduleName,\r\n moduleComponentProps,\r\n product,\r\n shipment,\r\n salesLine,\r\n isCurrentChannel,\r\n resources,\r\n imageOnly,\r\n showCompleteAddress,\r\n showTimeslot,\r\n telemetryContent,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig,\r\n productDeliveryOptions\r\n });\r\n });\r\n};\r\n\r\ninterface IProps extends IModuleComponentProps {\r\n resources: ISalesLineResources;\r\n}\r\n\r\nexport const getSalesLinesInput = (\r\n props: IProps,\r\n moduleName: string,\r\n order: SalesOrder | OrderShipments,\r\n products: SimpleProduct[],\r\n priceContext: IPriceContext,\r\n showCompleteAddress?: boolean,\r\n showTimeslot?: boolean,\r\n telemetryContent?: ITelemetryContent,\r\n retailMultiplePickUpOptionEnabled?: boolean,\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\r\n productDeliveryOptions?: ProductDeliveryOptions[] | undefined\r\n): IGetSalesLinesInput | undefined => {\r\n if (!order || !order.SalesLines || !order.SalesLines.length) {\r\n return;\r\n }\r\n\r\n const {\r\n resources,\r\n config: { imageSettings },\r\n context: {\r\n actionContext,\r\n request: {\r\n gridSettings,\r\n apiSettings: { channelId }\r\n }\r\n }\r\n } = props;\r\n\r\n const isCurrentChannel = !order.ChannelId || order.ChannelId === channelId;\r\n\r\n return {\r\n moduleName,\r\n moduleComponentProps: props,\r\n isCurrentChannel,\r\n salesLines: order.SalesLines,\r\n products,\r\n shipments: order.Shipments,\r\n priceContext: priceContext,\r\n resources,\r\n actionContext: actionContext,\r\n gridSettings: gridSettings!,\r\n imageSettings: imageSettings,\r\n showCompleteAddress: showCompleteAddress,\r\n showTimeslot: showTimeslot || false,\r\n telemetryContent: telemetryContent,\r\n retailMultiplePickUpOptionEnabled: retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig,\r\n productDeliveryOptions: productDeliveryOptions\r\n };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {\n ICheckoutOrderConfirmationViewProps,\n IGroup,\n IGroupDelivery,\n IGroups,\n IOrderInformation,\n ISalesLine\n} from './checkout-order-confirmation';\n\nimport {\n IHelp,\n IOrderSummary,\n IPaymentMethods,\n\n} from '../../common';\n\nexport const OrderConfirmationOrderInfomation: React.FC = ({\n orderInformationProps,\n receiptEmail,\n createdDate,\n channelReferenceId\n}) => (\n \n {channelReferenceId}\n {receiptEmail}\n \n );\n\nexport const OrderConfirmationSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n \n);\n\nexport const OrderConfirmationGroupDelivery: React.FC = ({ deliveryProps, heading, count, processing, address, pickupDateTimeslot, trackingInfo }) => (\n \n {heading}\n {count}\n {address}\n {pickupDateTimeslot}\n \n);\n\nexport const OrderConfirmationGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n ))}\n \n )}\n \n);\n\nexport const OrderConfirmationGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderConfirmationOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const OrderConfirmationPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const OrderConfirmationHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderConfirmationView: React.FC = ({\n moduleProps,\n heading,\n backToShoppingLink,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {backToShoppingLink}\n {groups && }\n {orderSummary && }\n {payment && }\n {help && }\n \n );\n};\n\nexport default OrderConfirmationView;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { format } from '@msdyn365-commerce-modules/utilities';\nimport { IAny, ICoreContext, IGeneric, IImageSettings, IModule, ITelemetry } from '@msdyn365-commerce/core';\nimport { SalesLine, TenderType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport groupBy from 'lodash/groupBy';\nimport { ISalesLine } from './get-sales-line';\n\nexport interface IModuleComponentProps extends IModule {\n config: {\n imageSettings?: IImageSettings;\n showShippingChargesForLineItems?: boolean;\n };\n}\n\nexport interface IPriceContext {\n id: string;\n typeName: string;\n context: ICoreContext>;\n telemetry: ITelemetry;\n freePriceText: string;\n}\n\nexport const getTenderIdOperationIdMap = (tenderTypes: TenderType[]): object => {\n return tenderTypes.reduce((map, tenderType) => {\n if (tenderType.TenderTypeId) {\n map[tenderType.TenderTypeId] = tenderType.OperationId;\n }\n return map;\n }, {});\n};\n\nexport const countItems = (salesLines: SalesLine[]) => {\n return salesLines.reduce((count, salesLine) => {\n return count + (salesLine.Quantity || 0);\n }, 0);\n};\n\nexport const getSalesLinesByDelivery = (salesLines?: SalesLine[], pickupDeliveryModeCode?: string): SalesLine[] => {\n if (!salesLines || !salesLines.length) {\n return [];\n }\n return salesLines.filter(salesLine =>\n // isPickUp ? getPickUp : getOthers\n (pickupDeliveryModeCode && pickupDeliveryModeCode !== '') ? salesLine.DeliveryMode === pickupDeliveryModeCode : salesLine.DeliveryMode !== pickupDeliveryModeCode\n );\n};\n\nexport const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: `w=80&h=80&m=6`, w: 0, h: 0 },\n lg: { q: `w=147&h=147&m=6`, w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n};\n\nexport type IDeliveryType = 'pickUp' | 'ship' | 'carryOut' | 'email';\n\nexport type ISalesStatusCode = 'canceled' | 'readyForPickup' | 'pickedUp' | 'processing' | 'shipped' | 'unknown' | 'emailed';\n\nexport const getSalesStatusCode = (deliveryType: string, statusValue?: number, pickupMode?: string): ISalesStatusCode => {\n if (statusValue === 7) {\n return 'canceled';\n }\n\n if (pickupMode !== undefined) {\n switch (statusValue) {\n case 3:\n return 'readyForPickup';\n case 4:\n return 'pickedUp';\n default:\n return 'processing';\n }\n }\n if (deliveryType === 'pickUp') {\n switch (statusValue) {\n case 3:\n return 'readyForPickup';\n case 4:\n return 'pickedUp';\n default:\n return 'processing';\n }\n } else if (deliveryType === 'ship') {\n switch (statusValue) {\n case 3:\n return 'processing';\n case 4:\n return 'shipped';\n default:\n return 'processing';\n }\n } else if (deliveryType === 'email') {\n switch (statusValue) {\n case 3:\n return 'processing';\n case 4:\n return 'emailed';\n default:\n return 'processing';\n }\n } else if (deliveryType === 'carryOut') {\n return 'processing';\n } else {\n return 'unknown';\n }\n};\n\nexport type ITrackingId = string | 'unknown';\nexport type IAddressId = string | 'unknown';\n\nexport interface IGroupData {\n deliveryType: IDeliveryType;\n salesStatus: ISalesStatusCode;\n addressId: IAddressId | 'unknown';\n trackingId: ITrackingId | 'unknown';\n count: number;\n salesLines: ISalesLine[];\n}\n\nexport const groupSalesLines = (salesLines: ISalesLine[]): IGroupData[] => {\n const getGroupByDeliveryType = (items: ISalesLine[]) => groupBy(items, item => item.data.deliveryType);\n const getGroupBySalesStatusCode = (items: ISalesLine[]) => groupBy(items, item => item.data.salesStatus);\n const getGroupByTrackingId = (items: ISalesLine[]) => groupBy(items, item => item.data.salesLine.TrackingId || 'unknown');\n const getGroupByAddressId = (items: ISalesLine[]) =>\n groupBy(items, item => (item.data.salesLine.ShippingAddress && item.data.salesLine.ShippingAddress.RecordId) || 'unknown');\n\n const flatGroup: IGroupData[] = [];\n\n // 1) Group by delivery type\n // @ts-ignore\n const group = getGroupByDeliveryType(salesLines);\n\n // 2) Group by sales status code\n Object.entries(group).forEach(([deliveryType, groupByDeliveryType]) => {\n // @ts-ignore\n group[deliveryType] = getGroupBySalesStatusCode(groupByDeliveryType);\n\n Object.entries(group[deliveryType]).forEach(([salesStatus, groupBySalesStatusCode]) => {\n // @ts-ignore 3) Group by address id\n groupBySalesStatusCode[salesStatus] = getGroupByAddressId(groupBySalesStatusCode);\n\n // @ts-ignore\n Object.entries(groupBySalesStatusCode[salesStatus]).forEach(([addressId, groupByAddressId]) => {\n // @ts-ignore 4) Group by address id\n groupByAddressId[addressId] = getGroupByTrackingId(groupByAddressId);\n\n // @ts-ignore\n Object.entries(groupByAddressId[addressId]).forEach(([trackingId, groupByTrackingId]) => {\n flatGroup.push({\n // @ts-ignore\n deliveryType,\n // @ts-ignore\n salesStatus,\n addressId,\n trackingId,\n // @ts-ignore\n count: countItems(groupByTrackingId.map(item => item.data.salesLine)),\n // @ts-ignore\n salesLines: groupByTrackingId\n });\n });\n });\n });\n });\n\n return flatGroup;\n};\n\nexport const getDateTimeslot = (placeHolder: string, startDate: Date | undefined, endDate: Date | undefined, locale: string): string => {\n if (!startDate || !endDate) {\n return '';\n }\n\n const dateOptions: Intl.DateTimeFormatOptions = {\n timeZone: 'UTC'\n };\n const dateformatter = new Intl.DateTimeFormat(locale, dateOptions);\n const date = dateformatter.format(new Date(startDate));\n\n const timeslotOptions: Intl.DateTimeFormatOptions = {\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n timeZone: 'UTC'\n };\n const timeslotformatter = new Intl.DateTimeFormat(locale, timeslotOptions);\n const timeslot = format(placeHolder, timeslotformatter.format(new Date(startDate)), timeslotformatter.format(new Date(endDate)));\n return `${date} ${timeslot}`;\n};","import { observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a autosuggest\n */\nexport class SearchState {\n @observable public searchText?: string;\n @observable public defaultBasicSearchUrl?: string;\n @observable public searchQueryStringParameter?: string;\n}\n","import { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport {\n CacheType, createObservableDataAction, IAction, IActionContext, IActionInput,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { SearchSuggestion, SearchSuggestionCriteria } from '@msdyn365-commerce/retail-proxy';\nimport {\n getSearchSuggestionsAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\n\n// @ts-ignore\nexport const enum SuggestionType {\n Category = 'ScopedCategory',\n Keyword = 'Keyword',\n Product = 'Product',\n None = 'None'\n}\n\n/**\n * Input class for auto suggest search input\n */\nexport class AutoSuggestInput implements IActionInput {\n public searchQuery?: string;\n public topResultsCount?: number;\n public suggestionType?: string;\n public hitPrefix?: string;\n public hitSuffix?: string;\n\n constructor(searchText?: string, top?: number, suggestionType?: string, hitPrefix?: string, hitSuffix?: string) {\n this.searchQuery = searchText;\n this.topResultsCount = top;\n this.suggestionType = suggestionType;\n this.hitPrefix = hitPrefix;\n this.hitSuffix = hitSuffix;\n }\n\n public getCacheKey = () => `AutoSuggestSearchSuggestions`;\n public getCacheObjectType = () => 'AutoSuggestSearchSuggestions';\n public dataCacheType = (): CacheType => 'none';\n}\n\nconst createInput = (inputData: ICreateActionContext) => {\n return new AutoSuggestInput();\n};\n\n/**\n * Calls the Retail API and returns a auto-suggest suggestions\n */\nexport async function getSearchSuggestionsAction(input: AutoSuggestInput, ctx: IActionContext): Promise {\n // If no input is provided fail out\n if (!input || !input.searchQuery) {\n throw new Error('[getSearchSuggestionsAction]No valid Input was provided, failing');\n }\n\n const autosuggest: Autosuggestions = {};\n\n const autoSuggestPromises = [\n _getAutoSuggest(input, autosuggest, ctx),\n ];\n return Promise.all(autoSuggestPromises).then(() => {\n return autosuggest;\n });\n}\n\nasync function _getAutoSuggest(\n input: AutoSuggestInput,\n autosuggest: Autosuggestions,\n ctx: IActionContext\n): Promise {\n const searchCriteria: SearchSuggestionCriteria = {\n ProductSearchCriteria: {\n SearchCondition: input.searchQuery && input.searchQuery.length > 0 ? input.searchQuery : '',\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: +ctx.requestContext.apiSettings.catalogId\n }\n },\n HitPrefix: input.hitPrefix,\n HitSuffix: input.hitSuffix,\n SuggestionType: input.suggestionType\n };\n\n const searchSuggestions = await getSearchSuggestionsAsync(\n { callerContext: ctx, queryResultSettings: { Paging: { Top: input.topResultsCount } } },\n searchCriteria\n );\n\n if (searchSuggestions && searchSuggestions.length > 0) {\n // Generate image url\n searchSuggestions.map(\n (item: SearchSuggestion) =>\n (item.ImageUrl = item.ImageUrl ? generateImageUrl(item.ImageUrl, ctx.requestContext.apiSettings) : '')\n );\n\n autosuggest.AllSearchResults = searchSuggestions;\n } else {\n ctx.telemetry.error(`[getSearchSuggestionsAction] unable to get availabilites for search with suggestion type ${searchCriteria.SuggestionType}`);\n }\n}\n\nexport default createObservableDataAction({\n id: '@msdyn365-commerce-modules/search/get-auto-suggest-suggestions',\n action: >getSearchSuggestionsAction,\n input: createInput\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\n\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchKeywordSuggestProps {\n searchKeywordSuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n suggestions: SearchSuggestion[] | undefined;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface ISearchKeywordViewProps {\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n *\n * KeywordSuggestionsComponent\n */\nexport const KeywordSuggestionsComponent = (props: ISearchKeywordSuggestProps): ISearchKeywordViewProps | undefined => {\n const {\n suggestions,\n hitPrefix,\n hitSuffix\n } = props;\n\n if (!suggestions) {\n return undefined;\n }\n\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n const reactNodes: React.ReactNode[] = [];\n\n suggestions.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, props));\n });\n\n return { text: reactNodes };\n};\n\nconst _assembleNode = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps) => {\n const ariaLabel = item.Value &&\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = ariaLabel;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n
  • \n \n {_generateLink(item, hitPrefix, hitSuffix, props) &&\n _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\n \n
  • \n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps): string => {\n const { searchPageURL, searchQsp } = props;\n\n const formattedLink = (suggestion.Value as string)\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n const route = searchPageURL || '';\n return formattedLink && formattedLink.length > 0\n ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${searchQsp}=${formattedLink}`\n : route;\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n // tslint:disable:react-no-dangerous-html\n return ;\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { getRichTextHtml, IActionContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\n\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, INodeProps, IPayLoad, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchProductSuggestProps {\n searchProductSuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n suggestions: SearchSuggestion[] | undefined;\n telemetry: ITelemetry;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface ISearchProductViewProps {\n title: React.ReactNode;\n items: ISearchProductItemViewProps[];\n}\n\nexport interface ISearchProductItemViewProps {\n text: React.ReactNode;\n thumbnail: React.ReactNode;\n price: React.ReactNode;\n LiProduct: INodeProps;\n AProduct: INodeProps;\n id: string | undefined;\n}\n\nlet payLoad: IPayLoad;\nlet telemetryContent: ITelemetryContent | undefined;\n\n/**\n *\n * ProductSuggestionsComponent\n */\nexport const ProductSuggestionsComponent = (props: ISearchProductSuggestProps): ISearchProductViewProps | undefined => {\n const {\n suggestions,\n hitSuffix,\n hitPrefix,\n autoSuggestProps: {\n context: { actionContext },\n resources: { productSuggestionHeading }\n },\n moduleType,\n moduleId\n } = props;\n const reactNodes: ISearchProductItemViewProps[] = [];\n telemetryContent = props.telemetryContent;\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n if (!suggestions) {\n return undefined;\n }\n\n suggestions.map(item => {\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, actionContext, props, moduleType, moduleId));\n });\n\n const titleNode = _renderTitle(productSuggestionHeading);\n\n return { title: titleNode, items: reactNodes };\n};\n\nconst _renderTitle = (productSuggestionHeading: string) => {\n const productAutoSuggestionHeading = productSuggestionHeading ? productSuggestionHeading : 'Go to products';\n\n return
  • {productAutoSuggestionHeading}
  • ;\n};\n\nconst _assembleNode = (\n item: SearchSuggestion,\n hitPrefix: string,\n hitSuffix: string,\n actionContext: IActionContext,\n props: ISearchProductSuggestProps,\n moduleType: string,\n moduleId: string\n): ISearchProductItemViewProps => {\n const altText =\n item.Value &&\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n return {\n text: _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix),\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\n price:\n item.Id &&\n item.Value3 &&\n item.Value3.Value &&\n item.Value3.Value.DecimalValue &&\n _renderPrice(item.Value3.Value.DecimalValue, item.Value3.Value.DecimalValue, moduleId, moduleType, props),\n LiProduct: _getLiWrapper(),\n AProduct: _getAWrapper(item, hitPrefix, hitSuffix, actionContext),\n id: item.Id\n };\n};\n\nconst _getLiWrapper = () => {\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'li' as NodeTag\n };\n};\n\nconst _getAWrapper = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\n const ariaLabel = item.Value &&\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n payLoad.contentAction.recid = item.Id;\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return {\n className: 'msc-autoSuggest__productResults-item',\n tag: 'a' as NodeTag,\n 'aria-label': ariaLabel,\n href: _generateLink(item, hitPrefix, hitSuffix, actionContext),\n ...attribute\n };\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\n const formattedLink = (suggestion.Value as string).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n return suggestion.Value && suggestion.Id ?\n getProductPageUrlSync(formattedLink,suggestion.Id as unknown as number, actionContext, undefined) : '';\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n const formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n\n // tslint:disable:react-no-dangerous-html\n return ;\n};\n\nconst _renderPrice = (adjustedPrice: number, basePrice: number, moduleId: string, moduleType: string, props: ISearchProductSuggestProps): JSX.Element | null => {\n const {\n autoSuggestProps: { context }\n } = props;\n\n return (\n \n );\n};\n\nconst _renderThumbnail = (suggestion: SearchSuggestion, altText: string, props: ISearchProductSuggestProps): JSX.Element | null => {\n const {\n autoSuggestProps: {\n context: {\n request: { gridSettings }\n },\n config: { imageSettings }\n }\n } = props;\n if(imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (!suggestion || !suggestion.ImageUrl) {\n props.telemetry.error('Search suggestion content is empty, module wont render.');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: `w=40&h=40&m=6`, w: 0, h: 0 },\n lg: { q: `w=40&h=40&m=6`, w: 0, h: 0 },\n xl: { q: `w=40&h=40&m=6`, w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n return (\n \n );\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\nimport { ProductRefiner, ProductRefinerValue, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\n\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { ISearchData } from '../search.data';\nimport { ISearchProps } from '../search.props.autogenerated';\n\nexport interface ISearchCategorySuggestProps {\n searchCategorySuggestClass: string;\n searchPageURL: string;\n searchQsp: string | undefined;\n hitPrefix: string;\n hitSuffix: string;\n autoSuggestProps: ISearchProps;\n searchText: string;\n searchRefiners: ProductRefiner[] | undefined;\n suggestions: SearchSuggestion[] | undefined;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface ISearchCategoryViewProps {\n title: React.ReactNode;\n text: React.ReactNode[];\n}\n\nlet payLoad: IPayLoad;\n\n/**\n *\n * CategorySuggestionsComponent\n */\nexport const CategorySuggestionsComponent = (props: ISearchCategorySuggestProps): ISearchCategoryViewProps | undefined => {\n const {\n suggestions,\n searchText,\n autoSuggestProps: {\n resources: { categorySuggestionHeading }\n }\n } = props;\n\n if (!suggestions) {\n return undefined;\n }\n\n const reactNodes: React.ReactNode[] = [];\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n suggestions.map(item => {\n reactNodes.push(_assembleNode(item, props));\n });\n\n const titleNode = _renderTitle(categorySuggestionHeading, searchText);\n\n return { title: titleNode, text: reactNodes };\n};\n\nconst _renderTitle = (categorySuggestionHeading: string, searchText: string) => {\n const categoryAutoSuggestionHeading = categorySuggestionHeading\n ? format(categorySuggestionHeading, searchText)\n : `Search \"${searchText}\" in categories`;\n\n return
  • {categoryAutoSuggestionHeading}
  • ;\n};\n\nconst _assembleNode = (item: SearchSuggestion, props: ISearchCategorySuggestProps) => {\n const { searchText, hitPrefix, hitSuffix } = props;\n\n const splitValue = item.Value && item.Value.split('|').pop();\n const ariaLabel = splitValue\n ? splitValue.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '')\n : item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n payLoad.contentAction.etext = item.Value;\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return (\n
  • \n \n {_generateLink(item, searchText, props) && _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\n \n
  • \n );\n};\n\nconst _generateLink = (suggestion: SearchSuggestion, searchText: string, props: ISearchCategorySuggestProps): string => {\n return suggestion && suggestion.Id ? _getCategoryLink(suggestion.Id, searchText, props) : '';\n};\n\nconst _getCategoryLink = (id: string, searchText: string, props: ISearchCategorySuggestProps): string => {\n const { searchPageURL, searchQsp, searchRefiners } = props;\n\n const route = searchPageURL || '';\n const urlPath = `${route}${route.indexOf('?') === -1 ? '?' : '&'}${searchQsp}=${searchText}`;\n const categoryRefiners =\n searchRefiners &&\n searchRefiners.find(refiners => {\n return refiners.KeyName === 'Category';\n });\n const refiner =\n categoryRefiners &&\n categoryRefiners.Values &&\n categoryRefiners.Values.find(item => {\n return item.RefinerRecordId === parseInt(id, 10);\n });\n\n const encodedRefiner = refiner && encodeURIComponent(JSON.stringify(compressRefiners([refiner])));\n\n return encodedRefiner ? `${urlPath}&refiners=${encodedRefiner}` : urlPath;\n};\n\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\n let formattedText = suggestion\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\n formattedText = formattedText.split('|').pop() || '';\n\n // tslint:disable:react-no-dangerous-html\n return ;\n};\n\n// TODO: This code is currently duplicated in categoryautosuggest need to either remove one of these files\n// or move this code to a common place\nconst compressedRefinerKeys = ['DataTypeValue', 'LeftValueBoundString', 'RefinerRecordId', 'RefinerSourceValue', 'RightValueBoundString', 'UnitText'];\n\n/**\n * Compressed a list of refiners for use in URLs\n * @param refiners The uncompressed refiners\n */\nconst compressRefiners = (refiners: ProductRefinerValue[]) => {\n const compressedRefiners: (string | number)[][] = [];\n\n refiners.forEach((refiner) => {\n const compressedRefiner: (string | number)[] = [];\n compressedRefinerKeys.forEach((refinerKey) => {\n // @ts-ignore: This line is intentionally not typesafe\n compressedRefiner.push(refiner[refinerKey]);\n });\n compressedRefiners.push(compressedRefiner);\n });\n\n return compressedRefiners;\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISearchFormProps {\n hideSearchLabel: boolean | undefined;\n isSearchFormExpanded: boolean | undefined;\n disableSubmitSearch: boolean | undefined;\n searchTextInput: React.RefObject;\n maxChars: number;\n searchQsp: string;\n searchPlaceholder: string;\n query: string;\n ariaLabelCancel: string;\n ariaLabelSearch: string;\n ariaLabelSubmit: string;\n handleCancelSearchChange(): void;\n handleInputChange(query: string): void;\n}\n\nexport interface ISearchFormViewProps {\n input: React.ReactNode;\n submitBtn: React.ReactNode;\n cancelBtn: React.ReactNode;\n\n}\n\nexport const FormComponent = (props: ISearchFormProps): ISearchFormViewProps => {\n const {\n searchQsp,\n searchPlaceholder,\n hideSearchLabel,\n isSearchFormExpanded,\n searchTextInput,\n handleInputChange,\n maxChars,\n disableSubmitSearch,\n handleCancelSearchChange,\n query,\n ariaLabelCancel,\n ariaLabelSearch,\n ariaLabelSubmit\n } = props;\n\n const onInputChange = (e: React.ChangeEvent): void => {\n handleInputChange(e.target.value || '');\n };\n\n const inputNode = !hideSearchLabel ? (\n \n ) : (\n \n );\n\n const submitBtnNode = !disableSubmitSearch && (\n \n
    \n );\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { createSearchStateInput } from '@msdyn365-commerce-modules/search-utilities';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes } from '@msdyn365-commerce-modules/utilities';\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { ProductRefiner } from '@msdyn365-commerce/retail-proxy';\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport classnames from 'classnames';\nimport { debounce } from 'lodash';\nimport * as React from 'react';\n\nimport getSearchSuggestionsAction, { AutoSuggestInput, SuggestionType } from './actions/get-auto-suggest-suggestions';\nimport {\n CategorySuggestionsComponent,\n FormComponent,\n ISearchCategoryViewProps,\n ISearchKeywordViewProps,\n ISearchProductViewProps,\n KeywordSuggestionsComponent,\n LabelComponent,\n ProductSuggestionsComponent\n} from './components';\nimport { ISearchData } from './search.data';\nimport { ISearchProps, ISuggestionTypeCriterionData } from './search.props.autogenerated';\n\nexport interface ISearchState {\n isSearchFormExpanded: boolean;\n searchText: string;\n searchKeywordSuggestClass: string;\n searchProductSuggestClass: string;\n searchCategorySuggestClass: string;\n suggestions: Autosuggestions | undefined;\n searchRefiners?: ProductRefiner[] | undefined;\n autoSuggestAriaLabel: string;\n isInitialState: boolean;\n}\n\nexport interface ISearchViewProps extends ISearchProps {\n Search: IModuleProps;\n AutoSuggestAriaLabel: INodeProps;\n AutoSuggestAriaLabelText: string;\n searchText: string;\n AutoSuggest: INodeProps;\n KeywordSuggest: INodeProps;\n ProductSuggest: INodeProps;\n CategorySuggest: INodeProps;\n SearchForm: INodeProps;\n FormWrapper: INodeProps;\n UlKeyword: INodeProps;\n UlProduct: INodeProps;\n UlCategory: INodeProps;\n label: React.ReactNode;\n form: React.ReactNode;\n autosuggestKeyword?: ISearchKeywordViewProps;\n autosuggestProduct?: ISearchProductViewProps;\n autosuggestCategory?: ISearchCategoryViewProps;\n callbacks: {\n handleCancelSearchChange(): void;\n };\n isSearchFormExpanded: boolean;\n}\n\n/**\n *\n * Search module\n * @extends {React.Component, ISearchState>}\n */\nclass Search extends React.Component, ISearchState> {\n private searchTextInput: React.RefObject;\n private searchCollapsedLabel: React.RefObject;\n private formReference: React.RefObject;\n private maxChars: number;\n private inputSuggestionType?: ISuggestionTypeCriterionData[];\n private topResultsCount?: number;\n private hitPrefix: string = '{';\n private hitSuffix: string = '}';\n private waitTime: number = 500;\n private autoSuggestResultScreenReaderDiv: React.RefObject;\n private autoSuggestResultDiv: React.RefObject;\n private searchFormClass: string;\n private searchLabelClass: string;\n private telemetryContent: ITelemetryContent;\n // @ts-ignore\n private cancellabelDebounce: debounce;\n\n constructor(props: ISearchProps) {\n super(props);\n this.searchTextInput = React.createRef();\n this.searchCollapsedLabel = React.createRef();\n this.autoSuggestResultScreenReaderDiv = React.createRef();\n this.autoSuggestResultDiv = React.createRef();\n this.formReference = React.createRef();\n this.state = {\n isSearchFormExpanded: false,\n searchText: '',\n searchKeywordSuggestClass: 'ms-search__autoSuggest__keyword',\n searchProductSuggestClass: 'ms-search__autoSuggest__product',\n searchCategorySuggestClass: 'ms-search__autoSuggest__category',\n suggestions: undefined,\n searchRefiners: undefined,\n autoSuggestAriaLabel: '',\n isInitialState: true\n };\n this.maxChars =\n (this.props.context &&\n this.props.context.app &&\n this.props.context.app.config &&\n this.props.context.app.config.searchInputMaxLength) ||\n 50;\n this.inputSuggestionType = this.props.config && this.props.config.suggestionTypeCriterion;\n this.topResultsCount = this.props.config && this.props.config.topResultsCount ? this.props.config.topResultsCount : 5;\n this.searchFormClass = 'ms-search__form';\n this.searchLabelClass = 'ms-search__label';\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public async componentDidMount(): Promise {\n document.body && document.body.addEventListener('mousedown', this._focusOutTarget);\n window && window.addEventListener('keyup', this._keyup);\n }\n\n public componentWillUnmount(): void {\n document.body && document.body.removeEventListener('mousedown', this._focusOutTarget, false);\n window && window.removeEventListener('keyup', this._keyup, false);\n }\n\n public componentDidUpdate(): void {\n const {\n config: { hideSearchLabel }\n } = this.props;\n const { isSearchFormExpanded, isInitialState } = this.state;\n\n if (!this.props.context.request.params.isEditor) {\n if (!hideSearchLabel && isSearchFormExpanded) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else if (!isInitialState) {\n this.searchCollapsedLabel && this.searchCollapsedLabel.current && this.searchCollapsedLabel.current.focus();\n }\n }\n }\n\n // tslint:disable-next-line: cyclomatic-complexity max-func-body-length\n public render(): JSX.Element {\n const {\n context,\n resources: { searchtext, searchLabelArialLabel, cancelBtnAriaLabel, searchBtnAriaLabel, submitBtnAriaLabel},\n config: { hideSearchLabel, disableSubmitSearch, searchplaceholderText, className = '' }\n } = this.props;\n\n const {\n isSearchFormExpanded,\n searchText,\n searchKeywordSuggestClass,\n searchProductSuggestClass,\n searchCategorySuggestClass,\n suggestions,\n searchRefiners\n } = this.state;\n\n const searchQsp = (context && context.app && context.app.config && context.app.config.searchQueryStringParameter) || 'q';\n const searchPageURL = getUrlSync('search', context && context.actionContext) || '';\n const searchURL = this._appendQueryParams(searchPageURL, searchText, searchQsp);\n const searchPlaceholder = searchplaceholderText && searchplaceholderText.length > 0 ? searchplaceholderText : 'Search in Fabrikam';\n\n const keywordSuggestions =\n suggestions &&\n suggestions.AllSearchResults &&\n suggestions.AllSearchResults.filter(\n i => i.SuggestionType === SuggestionType.Keyword || i.SuggestionType === SuggestionType.None\n );\n const productSuggestions =\n suggestions &&\n suggestions.AllSearchResults &&\n suggestions.AllSearchResults.filter(i => i.SuggestionType === SuggestionType.Product);\n const categorySuggestions =\n suggestions &&\n suggestions.AllSearchResults &&\n suggestions.AllSearchResults.filter(i => i.SuggestionType === SuggestionType.Category);\n\n const viewProps: ISearchViewProps = {\n ...(this.props as ISearchProps),\n\n Search: {\n moduleProps: this.props,\n className: `${classnames('ms-search', className)} ${disableSubmitSearch ? 'no-submit' : 'with-submit'}`,\n },\n AutoSuggestAriaLabel: {\n tag: 'div',\n className: 'msc-autoSuggest__screen-reader',\n 'aria-live': 'assertive',\n ref: this.autoSuggestResultScreenReaderDiv\n },\n AutoSuggestAriaLabelText: this.state.autoSuggestAriaLabel,\n searchText: this.state.searchText,\n AutoSuggest: {\n ref: this.autoSuggestResultDiv,\n className: 'ms-search__autoSuggest'\n },\n KeywordSuggest: {\n className: searchKeywordSuggestClass\n },\n ProductSuggest: {\n className: searchProductSuggestClass\n },\n CategorySuggest: {\n className: searchCategorySuggestClass\n },\n SearchForm: {\n className: `${this.searchFormClass} ${isSearchFormExpanded ? 'bx-show' : 'bx-hide'}`\n },\n FormWrapper: {\n tag: 'form',\n ref: this.formReference,\n className: 'ms-search__searchForm',\n 'aria-label': 'Search',\n name: 'searchForm',\n role: 'Search',\n action: searchURL,\n autoComplete: 'off',\n onSubmit: this._handleSubmit\n },\n UlKeyword: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__keywordResults-items', className)\n },\n UlProduct: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__productResults-items', className)\n },\n UlCategory: {\n tag: 'ul',\n className: classnames('msc-autoSuggest__categoryResults-items', className)\n },\n label:LabelComponent({\n isSearchFormExpanded: isSearchFormExpanded,\n searchLabelClass: `${this.searchLabelClass} ${isSearchFormExpanded ? 'bx-hide' : 'bx-show'}`,\n searchtext: searchtext,\n searchLabelArialLabel: searchLabelArialLabel,\n searchCollapsedLabel: this.searchCollapsedLabel,\n hideSearchLabel: hideSearchLabel,\n handleCancelSearchChange: this._handleCancelSearchChange,\n telemetryContent: this.telemetryContent\n }),\n form: FormComponent({\n ariaLabelCancel: cancelBtnAriaLabel,\n ariaLabelSearch: searchBtnAriaLabel,\n ariaLabelSubmit: submitBtnAriaLabel,\n hideSearchLabel: hideSearchLabel,\n searchTextInput: this.searchTextInput,\n isSearchFormExpanded: isSearchFormExpanded,\n disableSubmitSearch: disableSubmitSearch,\n handleInputChange: this._handleInputChange,\n handleCancelSearchChange: this._handleCancelSearchChange,\n maxChars: this.maxChars,\n searchQsp: searchQsp,\n searchPlaceholder: searchPlaceholder,\n query: searchText\n }),\n autosuggestKeyword:\n searchText && searchText.length > 0 && keywordSuggestions && keywordSuggestions.length > 0\n ? KeywordSuggestionsComponent({\n searchKeywordSuggestClass: searchKeywordSuggestClass,\n searchPageURL: searchPageURL,\n searchQsp: searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText: searchText,\n suggestions: keywordSuggestions,\n telemetryContent: this.telemetryContent\n })\n : undefined,\n autosuggestProduct:\n searchText && searchText.length > 0 && productSuggestions && productSuggestions.length > 0\n ? ProductSuggestionsComponent({\n searchProductSuggestClass: searchProductSuggestClass,\n searchPageURL: searchPageURL,\n searchQsp: searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText: searchText,\n suggestions: productSuggestions,\n telemetry: this.props.telemetry,\n moduleType: this.props.typeName,\n moduleId: this.props.id,\n telemetryContent: this.telemetryContent\n })\n : undefined,\n autosuggestCategory:\n searchText && searchText.length > 0 && categorySuggestions && categorySuggestions.length > 0\n ? CategorySuggestionsComponent({\n searchCategorySuggestClass: searchCategorySuggestClass,\n searchPageURL: searchPageURL,\n searchQsp: searchQsp,\n hitPrefix: this.hitPrefix,\n hitSuffix: this.hitSuffix,\n autoSuggestProps: this.props,\n searchText: searchText,\n suggestions: categorySuggestions,\n searchRefiners: searchRefiners,\n telemetryContent: this.telemetryContent\n })\n : undefined,\n callbacks: {\n handleCancelSearchChange: this._handleCancelSearchChange\n },\n isSearchFormExpanded: this.state.isSearchFormExpanded\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n // tslint:disable-next-line:no-any\n private _focusOutTarget = (e: any): void => {\n const { suggestions } = this.state;\n\n if (\n suggestions &&\n suggestions.AllSearchResults &&\n e.target.closest('.ms-search') === null\n ) {\n this._clearAutoSuggestState();\n }\n };\n\n private _keyup = (e: KeyboardEvent): void => {\n const { suggestions } = this.state;\n\n if (suggestions && suggestions.AllSearchResults && e.keyCode === KeyCodes.Escape) {\n this._clearAutoSuggestState();\n } else if(this.state.isSearchFormExpanded && e.keyCode === KeyCodes.Escape) {\n if(this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n\n if (!((this.formReference.current && this.formReference.current.contains(e.target as unknown as Node)) ||\n (this.autoSuggestResultDiv.current && this.autoSuggestResultDiv.current.contains(e.target as unknown as Node)))) {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n\n if(this.state.isSearchFormExpanded) {\n this.setState({ isSearchFormExpanded: false });\n }\n }\n };\n\n private _clearAutoSuggestState = (): void => {\n const {\n context: { actionContext },\n data: { searchState }\n } = this.props;\n\n if (this.searchTextInput.current && this.searchTextInput.current.value.length > 0) {\n searchState.searchText = '';\n searchState.defaultBasicSearchUrl = '';\n searchState.searchQueryStringParameter = '';\n actionContext ? actionContext.update(createSearchStateInput(searchState), searchState) : null;\n this.searchTextInput.current.value = '';\n }\n\n this.setState({ searchText: '', suggestions: undefined, searchRefiners: undefined });\n };\n\n private _handleInputChange = (query: string): void => {\n if (!query || query.length < this.maxChars) {\n this.setState({ searchText: query });\n }\n\n if (this.cancellabelDebounce) {\n this.cancellabelDebounce.cancel();\n }\n\n const {\n telemetry,\n context,\n data: { searchState }\n } = this.props;\n\n if (context) {\n if (query && query.length > 0) {\n if (query.length > this.maxChars) {\n return;\n }\n\n this.cancellabelDebounce = debounce(() => {\n getSearchSuggestionsAction(\n new AutoSuggestInput(\n query,\n this.topResultsCount,\n this._getSuggestionType(this.inputSuggestionType),\n this.hitPrefix,\n this.hitSuffix\n ),\n context.actionContext\n )\n .then(results => {\n this._getSearchRefiners(query)\n .then(refiners => {\n this.setState({ suggestions: results, searchRefiners: refiners,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results) });\n })\n .catch(error => {\n this.setState({ suggestions: results, searchRefiners: undefined,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results) });\n telemetry.exception(error);\n telemetry.debug('Unable to get refiners results');\n });\n })\n .catch(error => {\n this.setState({ suggestions: undefined, searchRefiners: undefined,\n autoSuggestAriaLabel: this._setAutoSuggestResultCount() });\n telemetry.exception(error);\n telemetry.debug('Unable to get auto suggest results');\n });\n }, this.waitTime);\n\n setTimeout(() => {\n this.cancellabelDebounce();\n }, 0);\n\n searchState.searchText = query;\n } else {\n this.setState({ suggestions: undefined, searchRefiners: undefined });\n searchState.searchText = '';\n }\n context.actionContext.update(createSearchStateInput(searchState), searchState);\n }\n };\n\n private _getSuggestionType = (suggestionTypes?: ISuggestionTypeCriterionData[]): string => {\n if (suggestionTypes && suggestionTypes.length > 0) {\n const distinctSuggestionTypes: string[] = [];\n suggestionTypes && suggestionTypes.forEach((suggestionTypeItem, index) => {\n suggestionTypeItem.SuggestionType && distinctSuggestionTypes.push(suggestionTypeItem.SuggestionType.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType.slice(1));\n });\n return distinctSuggestionTypes.join(',');\n }\n return 'Keyword, Product, ScopedCategory';\n };\n\n private async _getSearchRefiners(searchText: string): Promise {\n const { actionContext: ctx } = this.props.context;\n return getProductSearchRefinersAsync(\n { callerContext: ctx },\n {\n SearchCondition: searchText,\n Context: {\n ChannelId: +ctx.requestContext.apiSettings.channelId,\n CatalogId: +ctx.requestContext.apiSettings.catalogId\n }\n }\n );\n }\n\n private _handleSubmit = (\n e: React.MouseEvent | React.KeyboardEvent | React.FormEvent\n ): void => {\n const {\n config: { disableSubmitSearch },\n context: {\n actionContext,\n app: {\n config: { searchQueryStringParameter }\n }\n }\n } = this.props;\n\n const query = this.searchTextInput.current && this.searchTextInput.current.value;\n e.preventDefault();\n\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\n } else {\n const searchQsp = searchQueryStringParameter || 'q';\n const searchURL = this._appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\n document.location.href = searchURL;\n }\n };\n\n private _handleCancelSearchChange = (): void => {\n const { isSearchFormExpanded, suggestions } = this.state;\n\n if (!isSearchFormExpanded) {\n this.setState({\n isSearchFormExpanded: true,\n searchText: '',\n isInitialState: false\n });\n } else {\n if (suggestions && suggestions.AllSearchResults) {\n this._clearAutoSuggestState();\n }\n\n this.setState({ isSearchFormExpanded: false });\n }\n };\n\n private _appendQueryParams = (route: string, query: string, qsp: string): string => {\n if (route && route.length > 0) {\n return query && query.length > 0 ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${qsp}=${query}` : route;\n }\n return '';\n };\n\n private _setAutoSuggestResultCount = (result?: Autosuggestions) => {\n if (this.autoSuggestResultScreenReaderDiv.current !== null) {\n const ariaLiveRegion = this.autoSuggestResultScreenReaderDiv.current;\n const suggestResultString = this.props.resources.autoSuggestFoundMessage;\n const emptyResultString = this.props.resources.noAutoSuggestionMessage;\n ariaLiveRegion.innerText = result && (result.AllSearchResults && result.AllSearchResults.length > 0) ? suggestResultString : emptyResultString;\n ariaLiveRegion.setAttribute('aria-live','assertive');\n return ariaLiveRegion.innerText;\n } else {\n return '';\n }\n };\n}\n\nexport default Search;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nimport {INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { ISingleOrderTemplateViewProps } from './components';\nimport { IOrderTemplateListViewProps } from './order-template-list';\n\nexport const OrderTemplateListView: React.FC = props => {\n const { OrderTemplateList, status, statusMessage, heading, OrderTemplates, orderTemplates, OrderTemplate, createOrderTemplateButton, templateHeaderStatusMessage } = props;\n\n return (\n \n {heading}\n {status !== 'SUCCESS' && statusMessage}\n \n {createOrderTemplateButton}\n {templateHeaderStatusMessage}\n \n { OrderTemplates && orderTemplates && orderTemplates.length > 0 &&\n \n {orderTemplates && orderTemplates.map((orderTemplate) => {\n return _renderOrderTemplate(orderTemplate, OrderTemplate);\n })}\n \n }\n \n );\n};\n\nconst _renderOrderTemplate = (orderTemplate: ISingleOrderTemplateViewProps, OrderTemplate?: INodeProps): JSX.Element | null => {\n\n const { key, addToCartButton, orderTemplateImage, orderTemplateStatusMessage, removeButton, orderTemplateName } = orderTemplate;\n return (\n \n {orderTemplateName}\n {orderTemplateImage}\n {addToCartButton}\n {removeButton}\n {orderTemplateStatusMessage}\n \n );\n};\n\nexport default OrderTemplateListView;","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport classname from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\n\nimport LabelComponent from '../../common/label';\nimport {\n getSalesOrderHistoryWithHydrationsAction, GetSalesOrderHistoryWithHydrationsInput,\n IOrderHistory, IPaging\n} from './actions/get-order-shipment-history';\nimport { getSalesOrder, ISalesOrder } from './components/get-sales-order';\nimport { OrderHistoryFilterComponent, OrderHistoryFilterState } from './components/order-history-filter';\nimport { IOrderHistoryData } from './order-history.data';\nimport { IOrderHistoryProps } from './order-history.props.autogenerated';\n\nexport * from '../../common/get-groups';\nexport * from '../../common/get-order-information';\nexport * from '../../common/get-sales-line';\nexport * from '../../common/get-sales-lines';\nexport * from '../../common/utilities';\nexport * from './components/get-sales-order';\n\nexport * from '../../common/get-order-information';\nexport * from './components/get-sales-order';\n\nexport interface IHeader {\n headerProps: INodeProps;\n heading: React.ReactNode;\n orderCountLabel?: React.ReactNode;\n extraActions?: React.ReactNode;\n}\n\nexport interface IList {\n listProps: INodeProps;\n salesOrders: ISalesOrder[];\n}\n\nexport interface IOrderHistoryViewState {\n isDataReady: boolean;\n hasError: boolean;\n isLoading: boolean;\n isShowMoreButton: boolean;\n}\n\nexport interface IOrderHistoryViewProps extends IOrderHistoryProps {\n orderHistory: IOrderHistory;\n orderHistoryProps: IModuleProps;\n alert?: React.ReactNode;\n loading?: React.ReactNode;\n emptyMessage?: React.ReactNode;\n header: IHeader;\n backToShoppingLink?: React.ReactNode;\n list?: IList;\n moreButton?: React.ReactNode;\n viewState: IOrderHistoryViewState;\n}\n\n/**\n *\n * OrderHistory component\n * @extends {React.Component>}\n */\n@observer\nclass OrderHistory extends React.Component> {\n @observable private orderHistory!: IOrderHistory;\n @observable private viewState!: IOrderHistoryViewState;\n private filterState: OrderHistoryFilterState;\n private pageSize!: number;\n private paging!: IPaging;\n private telemetryContent?: ITelemetryContent;\n private payLoad: IPayLoad;\n\n constructor(props: IOrderHistoryProps) {\n super(props);\n this.initState();\n this.filterState = OrderHistoryFilterState.CurrentUser;\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n }\n\n public componentDidMount(): void {\n if(this.props.context.actionContext.requestContext.user.isAuthenticated) {\n this.getOrderHistory()\n .then(() => {\n this.viewState.isDataReady = true;\n })\n .catch(ex => {\n this.viewState.hasError = true;\n });\n } else {\n this.viewState.isDataReady = true;\n }\n }\n\n public render(): JSX.Element {\n const {\n config: { heading, className, showChannelInfo },\n resources: { genericErrorMessage, noOrderHistoryLable, moreButtonText, backToShopping, orderCountLabel, ordersCountLabel, loadingLabel }\n } = this.props;\n const { salesOrders, products } = this.orderHistory;\n const { isDataReady, hasError, isShowMoreButton, isLoading } = this.viewState;\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const channelIdentities = this.props.data.channels.result && this.props.data.channels.result.channelIdentities;\n const orgUnitLocations = this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.result.orgUnitLocations;\n\n let viewProps: IOrderHistoryViewProps = {\n ...this.props,\n orderHistory: this.orderHistory,\n viewState: this.viewState,\n orderHistoryProps: {\n moduleProps: this.props,\n className: classname('ms-order-history', className)\n },\n header: {\n headerProps: { className: 'ms-order-history__header' },\n heading: heading && heading.text && (\n \n )\n },\n backToShoppingLink: backToShoppingUrl && (\n \n )\n };\n\n if (hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!isDataReady) {\n viewProps = {\n ...viewProps,\n loading: \n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n if (!salesOrders || salesOrders.length === 0) {\n viewProps = {\n ...viewProps,\n emptyMessage:

    {noOrderHistoryLable}

    \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n const _orderCountLabel = salesOrders.length === 1 ? orderCountLabel : ordersCountLabel;\n this.payLoad.contentAction.etext = TelemetryConstant.ViewMore;\n const viewMoreAttributes = getTelemetryAttributes(this.telemetryContent!,this.payLoad);\n\n viewProps = {\n ...viewProps,\n header: {\n ...viewProps.header,\n orderCountLabel: {`(${salesOrders.length} ${_orderCountLabel})`},\n extraActions: this.renderExtraActions()\n },\n list: {\n listProps: { className: 'ms-order-history__sales-order-list' },\n salesOrders: salesOrders.map(salesOrder =>\n getSalesOrder({\n ...this.props,\n products,\n salesOrder,\n channelIdentities,\n orgUnitLocations,\n showChannelInfo,\n telemetryContent: this.telemetryContent\n })\n )\n },\n moreButton: isShowMoreButton && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleOrderHistoryHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n private onMoreButtonClick = () => {\n // tslint:disable-next-line:no-floating-promises\n this.getOrderHistory();\n }\n\n private renderExtraActions = () => {\n return this.props.data.customerInformation && this.props.data.customerInformation.result && (\n \n );\n }\n\n private initState = () => {\n this.orderHistory = {\n salesOrders: [],\n products: []\n };\n this.viewState = {\n isDataReady: false,\n hasError: false,\n isShowMoreButton: (this.props.config.pageSize || 0) > 0,\n isLoading: false\n };\n this.pageSize = this.props.config.pageSize || 10;\n this.paging = {\n top: this.pageSize,\n skip: 0\n };\n }\n\n private onFilterStateChanged = (state: OrderHistoryFilterState) => {\n this.initState();\n this.filterState = state;\n this.getOrderHistory()\n .then(() => {\n this.viewState.isDataReady = true;\n })\n .catch(ex => {\n this.viewState.hasError = true;\n });\n }\n\n private getOrderHistory = async (): Promise => {\n const actionContext = this.props.context.actionContext;\n const input = new GetSalesOrderHistoryWithHydrationsInput(this.paging, this.props.context.request.apiSettings, this.filterState);\n\n try {\n this.viewState.isLoading = true;\n const response = await getSalesOrderHistoryWithHydrationsAction(input, actionContext);\n if (response) {\n const { products, salesOrders } = response;\n this.orderHistory.products.push(...products);\n this.orderHistory.salesOrders.push(...salesOrders);\n this.viewState.isShowMoreButton = this.viewState.isShowMoreButton && response.salesOrders.length > 0 && response.salesOrders.length === this.pageSize;\n this.paging.skip += this.pageSize;\n }\n this.viewState.isLoading = false;\n return Promise.resolve();\n } catch (error) {\n return Promise.reject();\n }\n }\n}\n\nexport default OrderHistory;\n"],"sourceRoot":""}