{"version":3,"sources":["webpack:///src/modules/product-specification/components/product-specification-table-stucture.tsx?4b07","webpack:///src/modules/password-reset/password-reset.tsx?2fc7","webpack:///src/modules/fabrikam/views/reviews-list.view.tsx?39a2","webpack:///src/modules/password-reset/components/password-reset-error.tsx?5bd3","webpack:///src/modules/order-lookup/order-lookup.view.tsx?d1dd","webpack:///src/modules/product-specification/product-specification.tsx?f393","webpack:///./src/modules/advanced-notes/advanced-notes.tsx?0cd5","webpack:///src/modules/content-block/components/additional-content.tsx?1a32","webpack:///src/modules/content-block/components/links.tsx?5056","webpack:///src/modules/content-block/content-block.tsx?8675","webpack:///src/modules/password-reset/password-reset.view.tsx?f872","webpack:///./src/themes/gardner-theme-b2c/views/components/carticon.component.tsx?0bc6","webpack:///./src/themes/gardner-theme-b2c/views/cart.view.tsx?c8a4","webpack:///src/modules/adventureworks/views/checkout-customer-account-payment.view.tsx?fdf3","webpack:///./src/themes/gardner-theme/views/components/carticon.component.tsx?6233","webpack:///src/modules/product-specification/product-specification.view.tsx?bfbe","webpack:///src/modules/order-lookup/utilities/order-lookup-utility.tsx?9369","webpack:///src/modules/order-lookup/components/order-lookup-additional-fields.tsx?7c69","webpack:///src/modules/order-lookup/components/order-lookup-fields.tsx?c99c","webpack:///src/modules/order-lookup/order-lookup.tsx?a81e","webpack:///src/modules/password-reset/components/password-reset-loading-message.tsx?a735","webpack:///./src/modules/advanced-notes/advanced-notes.view.tsx?f5d4","webpack:///./src/themes/gardner-theme/views/cart.view.tsx?3fe6","webpack:///src/index.ts?c6ae","webpack:///./src/themes/gardner-theme-b2c/views/checkout-shipping-address.view.tsx?909d","webpack:///src/modules/adventureworks/views/b2b-requests-status.view.tsx?b8db","webpack:///src/modules/fabrikam/views/order-history.view.tsx?46de","webpack:///./src/themes/gardner-theme/views/components/line-pagination.tsx?b2dd","webpack:///src/modules/check-in-for-pickup/check-in-confirmation.tsx?9d47","webpack:///src/modules/check-in-for-pickup/check-in-error.tsx?9f7f","webpack:///src/modules/check-in-for-pickup/check-in-for-pickup.tsx?404b","webpack:///src/modules/password-reset/components/password-reset-input.tsx?7f32","webpack:///src/modules/password-reset/components/password-reset-button.tsx?7c39","webpack:///src/modules/check-in-for-pickup/check-in-for-pickup.view.tsx?26b3","webpack:///./src/themes/gardner-theme/views/checkout-shipping-address.view.tsx?2ec0","webpack:///src/modules/password-reset/components/password-reset-label.tsx?2eed","webpack:///src/modules/password-reset/components/password-reset-loading-icon.tsx?29cc","webpack:///src/modules/content-block/content-block.view.tsx?a86e","webpack:///src/modules/adventureworks/views/media-gallery.view.tsx?e2f6"],"names":["ProductSpecificationTableRow","_ref","productName","cellData","className","React","scope","dangerouslySetInnerHTML","getRichTextHtml","PasswordReset","constructor","props","super","moduleClassName","handleHeadingChange","event","this","config","heading","text","target","value","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","window","isInitialized","map","obj","ID","toLowerCase","newPasswordRegex","PAT","reenterPasswordRegex","resources","message","verifying_blurb","loadingMessage","Object","assign","PasswordRegex","defaultRegex","source","telemetryContent","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","componentDidMount","componentDidUpdate","shouldComponentUpdate","nextProps","nextState","state","data","render","viewProps","_objectSpread","viewState","isShowLoading","passwordReset","moduleProps","classnames","loading","modal","tag","Modal","isOpen","modalBody","ModalBody","icon","PasswordResetLoadingIconComponent","PasswordResetLoadingMessageComponent","defaultAADConainer","id","style","display","aadConainer","Msdyn365","editProps","onEdit","requestContext","passwordResetLocalAccount","_renderLocalAccount","renderView","localAccount","items","_renderInput","newPasswordLabelText","confirmPasswordLabelText","errorMessage","PasswordResetErrorComponent","key","passwordEntryMismatchError","requiredFieldMissingError","fieldIncorrectError","buttonsWrapper","buttons","PasswordResetButtonComponent","ariaLabel","saveButtonAriaLabel","saveButtonText","cancelButtonText","verificationSuccessModal","verificationSuccessModalMessage","type","labelText","pattern","wrapper","label","PasswordResetLabelComponent","forId","input","PasswordResetInputComponent","__decorate","observable","observer","buildReviewCard","Node","cardProps","headerProps","rating","name","date","cardBodyProps","reviewProps","reviewTitle","reviewText","responseProps","responseName","responseDate","responseText","controlsProps","ratingHelpfulLabel","like","dislike","edit","report","createReviewModal","Module","modalHeader","form","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","error","modalFooter","submitButton","cancelButton","createReportModal","reported","headerSubmitted","header","reportSubmittedMessage","reportMessage","radioButtons","succesfulButton","ReviewsListview","averageRating","filterByDropdown","noReviewsMessage","noReviewsWithFilterMessage","pageControls","refineReviewsProps","reportReviewModal","reviewsListProps","reviewCards","reviewCount","reviewModal","sortByDropdown","userReview","length","isFilterApplied","review","PasswordResetError","errorClassName","role","OrderLookupViewComponent","_orderLookupForm$clas","_submitButton$classNa","orderLookup","orderLookupContainer","orderLookupAdditionalFieldContainer","paragraph","orderLookupForm","renderOrderLookupInputField","orderNumberInput","additionalProperties","registeredUserMessage","fieldErrorMessage","ArrayExtensions","hasElements","item","submitButtonLabelText","ProductSpecification","_toggle","drawerListId","setState","isDrawerOpen","undefined","isAdditionalMediaDrawerOpen","catalogId","validateCatalogId","reaction","product","result","RecordId","actionInput","AttributesForSelectedVariantInput","actionContext","apiSettings","channelId","getAttributesForSelectedVariant","catch","debug","_heading$tag","productSpecificationData","isAccrodion","displayStyle","handleText","ProductSpecificationTableProps","ProductSpecificationTableBodyProps","title","productSpecificationResult","_createDrawerBody","_createTableBody","content","_this$props$context$r","_this$props$data$addi","tableRows","index","_renderProductCell","Name","app","OmniChannelMedia","additionalMediaLocations","push","_createAdditionalMediaDrawer","_this$props$context$r2","_this$props$data$addi2","accordionItemContainer","drawers","_product$Name","Drawer","collapseProps","timeout","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","additionalDownloadsText","prevState","mediaLocation","Uri","href","download","AltText","DataTypeValue","_renderCurrencyCell","_renderDateTimeCell","_renderDecimalCell","_renderIntegerCell","_renderTextCell","_renderTrueFalseCell","warning","CurrencyValue","CurrencyCode","_product$DateTimeOffs","DateTimeOffsetValue","toUTCString","IntegerValue","FloatValue","TextValue","BooleanValue","trueValueText","falseValueText","AdvancedNotes","_className","_renderNote","_renderNotes","notes","note","ItemId","_renderStaticNotesDisplay","isNoteAreaActive","staticDisplay","children","advancedNotesModuleProps","assembleNode","itemIndex","_item$links","renderHeading","additionalContentHeading","handleAdditionalTextChange","subtext","renderParagraph","additionalContentParagraphText","links","ctaLink","renderLinks","linkIndex","editableLink","linkText","linkUrl","destinationUrl","openInNewTab","link","onTextChange","handleAdditionalLinkTextChange","additionalContentItemContainer","additionalContentItemLinks","contentBlockAdditionalContent","additionalContent","reactNodes","additionalContentNode","additionalContentItems","ContentCardLinks","_mapEditableLinks","linkdata","editableLinks","forEach","payLoad","getPayloadObject","contentAction","etext","attributes","getTelemetryAttributes","btnClass","onClick","onTelemetryClick","ContentBlock","handleTextChange","handleParagraphChange","handleLinkTextChange","Number","_this$props$config$im","image","imageAriaLabel","contentBlockTitle","imageProps","gridSettings","imageSettings","contentBlockLinks","LinksComponent","msdyn365__moduleLayout","contentBlockText","contentBlockImage","preserveImageSpace","moduleType","typeName","imagePropertyName","moduleId","layout","shouldSkipToMainImage","contentBlockviewProps","moduleClass","contentBlockContainer","imageContainer","detailsContainer","contentBlockAnchorTag","imageLink","_getImageLink","handleAdditionalParagraphChange","handleAdditionalText","handleAdditionalParagraph","additionalContentObject","actionableRegion","PasswordResetItem","PasswordResetLoading","_ref3","PasswordResetView","_ref2","button","LocalAccount","CartIcon","cartLabel","cartQtyLabel","cart","cartItem","hasInvoiceLine","totalItemsInCart","qtyLabel","format","visibility","CartIconComponent","msdyn365Commerce","createComponentOverride","component","toggleBopisHandler","cartLine","isBopisSelected","_cartLine$pickUpInSto","pickUpInStore","callbacks","toggleBopis","onChangeStoreHandler","_cartLine$pickUpInSto2","renderCartLineComment","cartLineComment","comment","cartLineId","cartProductTitle","renderCartLine","storeSelector","isMultiplePickUp","emailDeliveryModeCode","_cartLine$data3","_cartLine$data4","cartline","Comment","cartLineProductTitle","outOfStockErrorMessage","cartlineId","addToWishlist","remove","renderGroupBopisBlock","_cartLine$data2","DeliveryMode","changeStoreDisplayText","shipInsteadDisplayText","pickItUpDisplayText","TelemetryConstant","PickupInStore","puckUpinStoreAttribute","Button","addToOrderTemplate","renderCartlinesInternal","isPrintView","cartLines","renderBopisBlock","_cartLine$data","shipToAddressDisplayText","pickUpAtStoreWithLocationText","ContainerProps","orgUnitName","renderCartlines","waitingComponent","cartLoadingStatus","isCartDataResult","slots","orderLevelComment","multiplePickUpEnabled","CartlinesWrapper","renderOrderLevelComment","emptyCart","renderCartLinesGroupHeader","count","_cartLine$pickUpInSto6","pickUpText","shippingText","emailshippingText","groupTitle","replace","renderCartLinesGroupTitle","_cartLine$pickUpInSto3","_cartLine$pickUpInSto4","_cartLine$pickUpInSto5","itemLabel","itemsLabel","countTitle","deliveryOption","CartView","_props$cart2","_props$cart3","_props$orderSummaryLi","_props$cart4","_props$cart5","setIsPrintView","printViewToggle","_renderPrintView","handlePrintViewChange","printViewLabel","updatedTitle","cartTitle","renderModuleAttributes","orderSummaryLineitems","orderTotal","checkoutAsGuestButton","renderOrderSummaryCheckoutButton","promotionOptions","promotions","promotionMessageWrapper","promotionMessage","promotionSeeAllLink","promotionDialog","renderCartLinesGroup","cartLinesGroup","cartlines","_props$context$action","_props$context$action2","countItem","reduce","_item$data$cartline$Q","_item$data","Quantity","countItems","channel","EmailDeliveryModeCode","cartDataResult","orderSummaryHeading","OrderSummaryWrapper","renderInvoiceSummarylines","invoiceSummaryLines","orderSummaryItems","invoices","giftCard","loyalty","invoiceSummaryLineitems","OrderSummaryItems","renderOrderSummarylines","orderSummaryLines","subtotal","shipping","otherCharge","tax","errorData","OrderSummaryErrors","errors","Wrapper","_props$cart","promoCode","createTemplateFromCartButton","renderOrderSummaryCheckout","SummaryForm","formProps","addPaymentButton","appliedLine","bottomBorder","paymentAmountInput","EditForm","inputLabel","inputAmount","customerName","customerAccountNumber","customerSince","accountCredit","alert","accountDetails","CheckoutCustomerAccountView","checkoutCustomerAccount","checkoutErrorRef","summaryView","editView","moduleState","ref","isReady","ProductSpecificationView","rowdata","filter","row","ObjectExtensions","isNullOrUndefined","labelGroup","renderErrorLabel","responseErrorMessage","errorMessageClassName","renderRegisteredUserMessage","signInUrl","signInLinkClassName","registeredUserClassName","orderLookupRegisteredUserText","orderLookupViewAccountText","orderLookupSignInLinkText","infoMessage","signInText","renderFieldErrors","orderLookupFieldValidationErrorMessage","RenderOrderLookupAdditionalFieldInput","_getOrderLookupAdditionalFields","additionalFieldLabel","additionalFieldError","additionalFieldInput","additionalFieldLabelClassName","inputType","onChange","isValidAdditionalFieldName","additionalFieldValidationMessage","RenderOrderLookupFormFields","_getOrderLookupFields","orderLookupLabelClassName","orderLookupLabel","inputReference","fieldErrorClassName","isInputTypeError","renderAlert","isValidInputField","OrderLookupSearchValues","OrderLookup","isEmailValue","isOrderNumberValue","orderLookupExtensibleEnum","handleSubmit","orderNumber","email","orderLookupValue","orderStatusLookUpParametersType","orderLookupName","_validateOrderLookupForm","_Msdyn365$getUrlSync","actionContextValue","orderDetailsPath","baseUrl","URL","location","origin","redirectUrl","searchParameters","searchParams","set","fieldName","StringExtensions","isNullOrWhitespace","toLocaleLowerCase","fieldValue","toString","_this$orderNumberInpu","_this$emailInputRef$c","orderNumberInputRef","current","emailInputRef","additionalPropertyStates","isAdditionalFieldError","isKeyExistInAdditionalFieldArray","labelName","isValidFieldName","additionalfieldErrorMessage","ordernumber","isOrdNumberError","isReqError","isEmailError","isValidEmailError","isValidLookupField","isValidAdditionalLookupField","isDisabled","_renderAlert","orderLookupEmailValidationErrorMessage","orderLookupRequiredTextErrorMessage","requiredErrorMessage","isNullOrEmpty","emailValidationErrorMessage","isRequireError","isEmailValidError","isValidEmailInput","_renderOrderNumberAlert","orderLookupOrderNumberValidationErrorMessage","_renderOrderLookupInput","orderLookupEmailLabel","orderLookupEmailAriaLabel","_additionalFieldValidation","isFieldValid","RegExp","test","isValid","isDisable","trim","EmailRegex","isEmailValid","orderLookupSearchAdditionalFields","_item$labelName","_item$ariaLabel","_item$validationMessa","validationMessage","_context$request$user","orderLookupDefaultHeadingText","orderLookupButtonLabel","orderLookupFormAriaLabel","orderLookupOrderNumberLabel","orderLookupOrderNumberAriaLabel","orderLookupSubmitAriaLabel","headingText","headingTag","orderLookupHeading","_createParagraph","autoComplete","onSubmit","disabled","user","submit","_renderAdditionalFields","_getExtensibleEnumera","_getExtensibleEnumera2","isOrderLookupAdditionalFieldValid","isOrderLookupFieldValid","getExtensibleEnumerations","StoreOperationsDataActions","getExtensibleEnumerationsAsync","callerContext","find","TypeName","ExtensibleEnumerations","orderLookupAdditionalParameter","validateOrderLookupField","orderStatusLookUpParameter","isValidField","validateOrderLookupAdditionalField","orderStatusLookUpAdditionalParameters","isValidAdditionalField","_item$fieldKey","fieldKey","validateAdditionalFieldWithProxy","some","setLookupFieldState","additionalFieldsInput","PasswordResetLoadingMessage","advancedNotes","_cartLine$data5","itemId","renderAdvancedNotes","n","pagination","paginatedView","_props$cart6","setAdvancedNotes","pageLength","setPaginatedView","slice","paginationPage","setPaginationPage","clearCartModalActive","setClearCartModalActive","changePage","page","skip","_props$cartlines","async","itemIds","CartLines","cl","getAdvancedNotesAsync","then","getAdvancedNotes","renderClearCart","_renderClearCart","clearCartButtonText","LinePagination","nextPage","prevPage","currentPage","numPages","Math","ceil","prev","paginationPrev","next","paginationNext","checkoutAsSignInUserButton","_renderClearCartModal","handleClearCart","toggle","ModalHeader","clearCartHeader","clearConfirmBody","ModalFooter","clearCancelButtonText","ids","cartLineIds","Array","c","LineId","removeCartLines","refreshCart","AddressShow","AddressDetail","description","AddressSelect","SelectAddress","addButton","isShowSaveButton","saveButton","isShowCancelButton","SelectItem","showItems","AddressAddUpdate","AddressForm","hasError","shipUsaOnlyMessageText","renderDeliveryLimitationMessage","AddressItem","AddressError","CheckoutShippingAddressView","CheckoutShippingAddress","showAddress","showAddressSelect","showAddOrUpdateAddress","cartLineImages","isShowAddress","isShowAddresList","isShowAddOrUpdateAddress","B2bRequestsStatusView","_props$data$operation","b2bRequestsStatus","table","continueShoppingButtonTitle","operationRequests","createElement","headingForEmptyRequestStatus","textForEmptyRequestStatus","getUrlSync","OrderHistoryOrderInfomation","orderInformationProps","salesId","receiptId","channelName","createdDate","amount","channelReferenceId","OrderHistoryGroupDelivery","deliveryProps","processing","address","trackingInfo","OrderHistoryGroup","groupProps","delivery","salesLinesProps","salesLines","salesLine","OrderHistoryGroups","_ref4","groupsProps","groups","group","OrderHistoryHeader","_ref5","orderCountLabel","extraActions","OrderHistorySalesOder","_ref6","salesOrderProps","orderInfomation","orderDetailsLink","expandProductsButton","OrderHistoryList","_ref7","listProps","salesOrders","salesOrder","OrderHistoryView","_ref8","orderHistoryProps","emptyMessage","backToShoppingLink","list","moreButton","Fragment","CheckInConfirmationComponent","confirmationText","shouldShowQrCode","channelReferenceIdLabel","QRCode","size","CheckInErrorComponent","CheckInForPickup","checkInForOrderPickup","parseInt","query","packingSlipId","additionalInformationToSubmit","additionalInformationList","additionalInformationKeyValuePair","_additionalInformatio","formKey","resourceId","extensionPropertyList","additionalInformation","Key","Value","StringValue","SalesOrdersDataActions","checkInForOrderPickupAsync","queryResultSettings","headerErrorMessage","genericErrorMessage","isCheckedIn","Promise","resolve","_this$props$context$r3","_this$props$context$r4","isNaN","params","isEditor","isPreview","requiredParameterMissingErrorMessage","additionalInformationKeys","_this$props$context$r5","isHeaderError","headerError","confirmationComponent","defaultConfirmationText","confirmationIdLabel","additionalInformationValues","additionalInformationHeading","GetMaxLength","maxLength","parsedMaxLength","PasswordResetInput","PasswordResetButton","CheckInViewComponent","_props$config$additio","FormBuilder","additionalInformationDefaultHeading","submitButtonText","additionalInformationSubmitButtonText","keys","requiredValueMissingErrorMessage","_props$data$checkout$","checkout","shippingAddress","nonEligibleItems","setnonEligibleItems","checkEligibilityForShippingAddress","setHasError","_props$data$checkout$2","notEligibleList","checkoutCart","_cart$CartLines","addressCountry","ThreeLetterISORegionName","addressState","State","addressRegion","County","GetProductEligibilityInput","Id","eligibilityData","GetProductEligibilityAction","i","_getExtensionPropertyValueByKey","properties","valueType","_properties$find","property","p","ExtensionProperties","CommercePropertyValueEnum","string","IsEligible","removeIneligibleItems","cartState","checkoutState","badCartLines","includes","reload","getCartLineFromItemId","_props$data$checkout$3","Description","PasswordResetLabel","htmlFor","PasswordResetLoadingIcon","renderAdditionalContent","_additionalContent$ad","ContentBlockView","renderThumbnailItem","thumbnail","ThumbnailItemContainerProps","Picture","GetEmptyThumbnailItemComponent","_props$context$app$co2","_props$config$thumbna2","fallbackImage","emptyPlaceHolderImage","placeholderImageName","_props$context$reques2","getFallbackImageUrl","tabIndex","Image","src","thumbnailImageSettings","loadFailureBehavior","imageFallbackOptimize","skipImageValidation","fallBackSrc","defaultThumbnailImageSettings","viewports","xs","q","w","h","xl","lazyload","cropFocalRegion","renderThumbnails","thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","Thumbnails","mediaGalleryItems","altText","getMediaGalleryItems","lastUpdate","GetThumbnailItemComponent","imageId","modifiedActiveIndex","_props$context$app$co","_props$config$thumbna","_props$context$reques","_props$callbackToggle","_props$callbackThumbn","callbackToggle","call","callbackThumbnailClick","activeIndex","handleKeyDown","keyCode","KeyCodes","Enter","preventDefault","onKeyDown","shouldUseOptimizedImage","bypassHideOnFailure","fullScreenTitleText","mediaGalleryView","CarouselProps","MediaGallery"],"mappings":";8FAAA,8DAyBO,MAAMA,EAAwEC,IAAA,IAAC,YAAEC,EAAW,SAAEC,EAAQ,UAAEC,GAAWH,EAAA,OACtHI,gBAAA,MAAID,UAAWA,GACXC,gBAAA,MAAIC,MAAM,OAEND,gBAAA,QAAME,wBAAyBC,YAAgBN,MAEnDG,gBAAA,UAAKF,M,20BCoCb,IAAMM,EAAN,cAA4BJ,YAcxBK,YAAYC,GACRC,MAAMD,GAdO,KAAAE,gBAA0B,oBA0FpC,KAAAC,oBAAuBC,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AAAiyB,cAACzqB,OAAI,CAACzH,UAAU,kCACZC,IAAAiyB,cAAClX,SAAM,CACHukB,UAAWL,EACX7wB,MAAO9N,EAAM4B,UAAUu9B,oBACvBn0B,KAAK,SACLvL,UAAU,+CACVgV,QAASA,QAiGfspB,CAA0B/xB,EAAM6wB,EAA+Bv4B,EAAIrB,EAAMy7B,YAAa1+B,IAGpG,OACIN,IAAAiyB,cAACzqB,OAAIlF,OAAAC,OAAA,GAAKu7B,GACN99B,IAAAiyB,cAACzqB,OAAIlF,OAAAC,OAAA,GAAKw7B,GAAoCv4B,aAAK,EAALA,EAAO7D,IAAIo6B,MAsBtD2D,UAZ4Cp/B,IAEvD,MAAM,cAAEq/B,EAAa,WAAE3B,EAAU,aAAE4B,EAAY,MAAEx7B,GAAU9D,EAC3D,OACIN,IAAAiyB,cAACppB,SAAMvG,OAAAC,OAAA,GAAKq9B,GACR5/B,IAAAiyB,cAACzqB,OAAIlF,OAAAC,OAAA,GAAKo9B,IACTv7B,EACAw5B,EAAiBI,EAAY19B","file":"static/js/13.524fb011d4fbf0a36213.chunk.js","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\n/**\n * Product specification table row.\n */\nexport interface IProductSpecificationTableRow {\n productName?: string;\n cellData?: React.ReactNode;\n className?: string;\n}\n\n/**\n * Product specification table row component.\n * @param props - For product specification table row.\n * @param props.productName - Product name.\n * @param props.cellData - Cell data.\n * @param props.className - Class name.\n * @returns - Returns JSX element.\n */\nexport const ProductSpecificationTableRow: React.FC = ({ productName, cellData, className }) => (\n \n \n {/* eslint-disable-next-line react/no-danger */}\n \n \n {cellData}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { PasswordRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport PasswordResetButtonComponent from './components/password-reset-button';\nimport PasswordResetErrorComponent from './components/password-reset-error';\nimport PasswordResetInputComponent from './components/password-reset-input';\nimport PasswordResetLabelComponent from './components/password-reset-label';\nimport PasswordResetLoadingIconComponent from './components/password-reset-loading-icon';\nimport PasswordResetLoadingMessageComponent from './components/password-reset-loading-message';\nimport { IPasswordResetConfig, IPasswordResetProps } from './password-reset.props.autogenerated';\n\nexport interface IPasswordResetViewState {\n isShowLoading: boolean;\n}\n\nexport interface IPasswordResetItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IPasswordResetLocalAccount {\n localAccount: INodeProps;\n items: IPasswordResetItem[];\n errorMessage: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IPasswordResetLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IPasswordResetViewProps {\n className: string;\n viewState: IPasswordResetViewState;\n loading: IPasswordResetLoading;\n passwordReset: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n passwordResetLocalAccount: IPasswordResetLocalAccount;\n}\n\n/**\n *\n * PasswordReset component.\n * @extends {React.Component>}\n */\n@observer\nclass PasswordReset extends React.Component> {\n private readonly moduleClassName: string = 'ms-password-reset';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable private newPasswordRegex: string;\n\n @observable private reenterPasswordRegex: string;\n\n @observable private isInitialized: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: IPasswordResetProps) {\n super(props);\n\n this.newPasswordRegex = PasswordRegex.defaultRegex.source;\n this.reenterPasswordRegex = PasswordRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(nextProps: IPasswordResetProps, nextState: IPasswordResetViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config, resources } = this.props;\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n passwordReset: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n heading: config.heading && (\n \n ),\n passwordResetLocalAccount: this._renderLocalAccount()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['SA_FIELDS']['AttributeFields'].map((obj: { ID: string; PAT: string }) => {\n switch (obj.ID.toLowerCase()) {\n case 'newpassword': {\n this.newPasswordRegex = obj.PAT;\n break;\n }\n case 'reenterpassword': {\n this.reenterPasswordRegex = obj.PAT;\n break;\n }\n default:\n }\n });\n }\n };\n\n private readonly _updateErrorMessage = () => {\n const { resources } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const message = {\n verifying_blurb: resources.loadingMessage\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], message);\n }\n };\n\n private _renderLocalAccount(): IPasswordResetLocalAccount {\n const { resources } = this.props;\n return {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n items: [\n this._renderInput('newPassword', 'password', resources.newPasswordLabelText, this.newPasswordRegex),\n this._renderInput('reenterPassword', 'password', resources.confirmPasswordLabelText, this.reenterPasswordRegex)\n ],\n errorMessage: [\n ,\n ,\n ,\n \n ],\n buttonsWrapper: {\n className: `${this.moduleClassName}__buttons`\n },\n buttons: [\n ,\n \n ],\n verificationSuccessModal: {\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\n },\n verificationSuccessModalMessage: {\n id: 'verifying_blurb',\n className: `${this.moduleClassName}__verifying-modal-message`\n }\n };\n }\n\n private _renderInput(id: string, type: string, labelText: string, pattern?: string): IPasswordResetItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n };\n }\n}\n\nexport default PasswordReset;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IReviewModalViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport {\n IReportReviewModalViewProps,\n IReviewCardViewProps,\n IReviewsListState,\n IReviewsListViewProps\n} from '@msdyn365-commerce-modules/ratings-reviews/src/modules/reviews-list';\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst ReviewsListview: React.FC = props => {\n const {\n averageRating,\n filterByDropdown,\n moduleProps,\n noReviewsMessage,\n noReviewsWithFilterMessage,\n pageControls,\n refineReviewsProps,\n reportReviewModal,\n reviewsListProps,\n reviewCards,\n reviewCount,\n reviewModal,\n sortByDropdown,\n state,\n userReview\n } = props;\n\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\n return {noReviewsMessage};\n }\n\n return (\n \n {averageRating}\n {reviewCount}\n \n {sortByDropdown}\n {filterByDropdown}\n \n \n {userReview && buildReviewCard(userReview)}\n {reviewCards.map(review => {\n return buildReviewCard(review);\n })}\n \n {reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\n {pageControls}\n {createReviewModal(reviewModal, moduleProps)}\n {createReportModal(reportReviewModal, state)}\n \n );\n};\n\nconst buildReviewCard = (props: IReviewCardViewProps) => {\n return (\n \n \n {props.rating}\n {props.name}\n {props.date}\n \n \n \n {props.reviewTitle}\n {props.reviewText}\n \n \n {props.responseName}\n {props.responseDate}\n {props.responseText}\n \n \n {props.ratingHelpfulLabel}\n {props.like}\n {props.dislike}\n {props.edit}\n {props.report}\n \n \n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\n return (\n \n {state.reported ? props.headerSubmitted : props.header}\n \n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\n \n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\n \n );\n};\n\nexport default ReviewsListview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IPasswordResetErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default PasswordResetError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderLookupViewProps } from './order-lookup';\n\n/**\n * View component.\n * @param props - The view properties.\n * @returns - Returns JSX Element.\n */\nexport const OrderLookupViewComponent: React.FC = props => {\n const {\n orderLookup,\n orderLookupContainer,\n orderLookupAdditionalFieldContainer,\n heading,\n paragraph,\n orderLookupForm,\n renderOrderLookupInputField,\n orderNumberInput,\n errorMessage,\n submitButton,\n additionalProperties,\n registeredUserMessage,\n fieldErrorMessage\n } = props;\n return (\n \n \n {heading}\n {paragraph}\n \n {orderNumberInput}\n {renderOrderLookupInputField}\n {ArrayExtensions.hasElements(additionalProperties) && (\n \n {additionalProperties.map((item: JSX.Element) => (\n {item}\n ))}\n \n )}\n {fieldErrorMessage}\n \n {props.submitButtonLabelText}\n \n {errorMessage}\n \n {registeredUserMessage}\n \n \n );\n};\n\nexport default OrderLookupViewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Drawer, IModuleProps, INodeProps, Module } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { AttributesForSelectedVariantInput, getAttributesForSelectedVariant } from '../..';\nimport { ProductSpecificationTableRow } from './components/product-specification-table-stucture';\nimport { IProductSpecificationData } from './product-specification.data';\nimport { displayStyle, IProductSpecificationProps } from './product-specification.props.autogenerated';\n\n/**\n * Maintain Drawer State.\n */\nexport interface IProductSpecificationState {\n isDrawerOpen: boolean;\n isAdditionalMediaDrawerOpen: boolean;\n drawerListId: number | undefined;\n}\n\n/**\n * Product specification view props.\n */\nexport interface IProductSpecificationViewProps extends IProductSpecificationProps<{}> {\n ProductSpecification: IModuleProps;\n ProductSpecificationTableProps: INodeProps;\n ProductSpecificationTableBodyProps: INodeProps;\n productSpecificationResult?: (JSX.Element | null)[];\n\n title?: React.ReactNode;\n isAccrodion?: boolean;\n handleText?(event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * Check for display style either accordion or table.\n */\nexport interface IProductSpecificationExtentedProps extends IProductSpecificationProps {\n displayStyle?: displayStyle;\n}\n\n/**\n *\n * ProductSpecification component.\n * @extends {React.Component>}\n */\n@observer\nclass ProductSpecification extends React.Component {\n public constructor(props: IProductSpecificationExtentedProps) {\n super(props);\n this.state = {\n isDrawerOpen: false,\n isAdditionalMediaDrawerOpen: false,\n drawerListId: undefined\n };\n }\n\n public async componentDidMount(): Promise {\n const { context, data, telemetry } = this.props;\n const catalogId = Msdyn365.getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n reaction(\n () => (data.product.result ? data.product.result.RecordId : null),\n () => {\n if (context && data.product.result) {\n const actionInput = new AttributesForSelectedVariantInput(\n data.product.result.RecordId,\n\n +context.actionContext.requestContext.apiSettings.channelId,\n data.product.result,\n catalogId\n );\n\n getAttributesForSelectedVariant(actionInput, this.props.context.actionContext).catch((error: Error) => {\n telemetry.error(error.message);\n telemetry.debug('Unable to update attributes for Product');\n telemetry.error(error.message);\n });\n }\n }\n );\n }\n\n public shouldComponentUpdate(nextProps: IProductSpecificationExtentedProps, nextState: IProductSpecificationState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n let data: IProductSpecificationData;\n try {\n data = this.props.data;\n } catch (error) {\n this.props.telemetry.error(`Something went wrong ------${error}`);\n return
{error}
;\n }\n\n if (!data.productSpecificationData.result || data.productSpecificationData.result.length <= 0) {\n this.props.telemetry.error('Product specification content is empty, module wont render.');\n return null;\n }\n\n const { heading, className } = this.props.config;\n const { productSpecificationData } = this.props.data;\n const isAccrodion = this.props.config.displayStyle === displayStyle.accordion;\n const viewProps = {\n ...this.props,\n handleText: this.handleHeadingChange,\n ProductSpecification: {\n moduleProps: this.props,\n className: classnames('ms-product-specification', className)\n },\n ProductSpecificationTableProps: isAccrodion\n ? {\n moduleProps: this.props,\n className: classnames('ms-product-specification__accordion', className)\n }\n : {\n className: classnames('ms-product-specification__table table-striped table-bordered'),\n tag: 'table'\n },\n isAccrodion,\n ProductSpecificationTableBodyProps: isAccrodion\n ? {}\n : {\n className: '',\n tag: 'tbody'\n },\n title: heading?.text && (\n \n ),\n productSpecificationResult:\n productSpecificationData.result && (isAccrodion ? this._createDrawerBody(data) : this._createTableBody(data))\n } as IProductSpecificationViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle Heading Text Change.\n * @param event - Current event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n private _createTableBody(content: IProductSpecificationData): (JSX.Element | null)[] {\n const tableRows = content.productSpecificationData.result!.map((product, index) => {\n const cellData: JSX.Element | null = this._renderProductCell(product);\n\n if (!cellData) {\n return null;\n }\n\n return (\n <>\n \n \n );\n });\n\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\n tableRows.push(this._createAdditionalMediaDrawer());\n }\n\n return tableRows;\n }\n\n private _createDrawerBody(content: IProductSpecificationData): (JSX.Element | null)[] {\n const accordionItemContainer: IModuleProps = {\n moduleProps: this.props,\n className: 'ms-product-specification-title'\n };\n\n const drawers = content.productSpecificationData.result!.map(product => {\n const cellData: JSX.Element | null = this._renderProductCell(product);\n if (!cellData) {\n return null;\n }\n return (\n \n \n
{cellData}
\n \n
\n );\n });\n\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\n drawers.push(this._createAdditionalMediaDrawer());\n }\n\n return drawers;\n }\n private _createAdditionalMediaDrawer(): JSX.Element {\n const accordionItemContainer: IModuleProps = {\n moduleProps: this.props,\n className: 'ms-product-specification-title'\n };\n\n return (\n \n {\n this.setState(prevState => ({\n ...prevState,\n isAdditionalMediaDrawerOpen: !prevState.isAdditionalMediaDrawerOpen\n }));\n }}\n >\n
\n \n
\n \n
\n );\n }\n\n private readonly _toggle = (drawerListId: number | undefined) => (): void => {\n if (this.state.drawerListId !== drawerListId) {\n this.setState({ drawerListId, isDrawerOpen: true });\n } else {\n this.setState({ drawerListId: undefined, isDrawerOpen: false });\n }\n };\n\n private _renderProductCell(product: AttributeValue): JSX.Element | null {\n switch (product.DataTypeValue) {\n case 0: // None\n // Return span here instead of null so the row still shows\n return ;\n case 1: // Currency\n return this._renderCurrencyCell(product);\n case 2: // DateTime\n return this._renderDateTimeCell(product);\n case 3: // Decimal\n return this._renderDecimalCell(product);\n case 4: // Integer\n return this._renderIntegerCell(product);\n case 5: // Text\n return this._renderTextCell(product);\n case 6: // TrueFalse\n return this._renderTrueFalseCell(product);\n case 40: // Video\n this.props.telemetry.warning('Got video specification type, not supported yet so skipping line');\n return null;\n case 41: // Image\n this.props.telemetry.warning('Got image specification type, not supported yet so skipping line');\n return null;\n default:\n this.props.telemetry.warning(`Got unknown specification type ${product.DataTypeValue} so skipping line`);\n return null;\n }\n }\n\n private _renderCurrencyCell(product: AttributeValue): JSX.Element | null {\n if (product.CurrencyValue !== null && product.CurrencyValue !== undefined) {\n return (\n \n {product.CurrencyCode}\n {product.CurrencyValue}\n \n );\n }\n\n return null;\n }\n\n private _renderDateTimeCell(product: AttributeValue): JSX.Element | null {\n if (product.DateTimeOffsetValue?.toUTCString) {\n return {product.DateTimeOffsetValue.toUTCString()};\n }\n\n return null;\n }\n\n private _renderIntegerCell(product: AttributeValue): JSX.Element | null {\n if (product.IntegerValue !== null && product.IntegerValue !== undefined) {\n return {product.IntegerValue};\n }\n\n return null;\n }\n\n private _renderDecimalCell(product: AttributeValue): JSX.Element | null {\n if (product.FloatValue !== null && product.FloatValue !== undefined) {\n return {product.FloatValue};\n }\n\n return null;\n }\n\n private _renderTextCell(product: AttributeValue): JSX.Element | null {\n if (product.TextValue !== null && product.TextValue !== undefined) {\n // eslint-disable-next-line react/no-danger\n return ;\n }\n\n return null;\n }\n\n private _renderTrueFalseCell(product: AttributeValue): JSX.Element | null {\n // TODO 20369885 setting to default value is needed to work around a platform bug where\n // config string value does not get its default value.\n if (product.BooleanValue) {\n return {this.props.resources.trueValueText ? this.props.resources.trueValueText : 'Yes'};\n }\n return {this.props.resources.falseValueText ? this.props.resources.falseValueText : 'No'};\n }\n}\n\nexport default ProductSpecification;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IAdvancedNotesData } from './advanced-notes.data';\r\nimport { IAdvancedNotesProps } from './advanced-notes.props.autogenerated';\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { IAdvancedNoteEntity } from '../../actions/DataServiceEntities.g';\r\n\r\nexport interface IAdvancedNotesViewProps extends IAdvancedNotesProps {\r\n staticDisplay: INodeProps;\r\n advancedNotesModuleProps: IModuleProps;\r\n}\r\n\r\ninterface IAdvancedNotesExtendedProps extends IAdvancedNotesProps {\r\n notes: IAdvancedNoteEntity[];\r\n}\r\n\r\ninterface IAdvancedNotesState {\r\n notes: IAdvancedNoteEntity[];\r\n isNoteAreaActive: boolean;\r\n}\r\n/**\r\n *\r\n * AdvancedNotes component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass AdvancedNotes extends React.PureComponent {\r\n private _className = 'advanced-notes';\r\n constructor(props: IAdvancedNotesExtendedProps) {\r\n super(props);\r\n this.state = {\r\n notes: props.notes,\r\n isNoteAreaActive: false\r\n };\r\n }\r\n private _renderNote = (key: string, message: string): React.ReactNode => {\r\n return (\r\n
\r\n

{message}

\r\n
\r\n );\r\n };\r\n\r\n private _renderNotes = (): React.ReactNode => {\r\n return (\r\n
\r\n {this.props.notes.map((note, index) => {\r\n return this._renderNote(`${index}${note.ItemId}`, note.TextValue || '');\r\n })}\r\n
\r\n );\r\n };\r\n\r\n /**\r\n * Renders the static comment display for when the isCommentAreaActive state param is false\r\n * @return React.ReactNode\r\n */\r\n private _renderStaticNotesDisplay = () => {\r\n const notes = this._renderNotes();\r\n return
{notes}
;\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps: IAdvancedNotesViewProps = {\r\n ...this.props,\r\n staticDisplay: {\r\n tag: 'div',\r\n className: `${this._className}__static-display`,\r\n children: this._renderStaticNotesDisplay()\r\n },\r\n advancedNotesModuleProps: {\r\n tag: 'div',\r\n className: `${this._className}`,\r\n moduleProps: { ...this.props }\r\n }\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default AdvancedNotes;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAdditionalContentData, ILinksData } from '../content-block.props.autogenerated';\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content Component props.\n */\nexport interface IContentBlockAdditionalContentProps {\n requestContext: Msdyn365.IRequestContext;\n additionalContent: IAdditionalContentData[] | undefined;\n handleAdditionalTextChange(index: number, event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalParagraphChange(index: number, event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalLinkTextChange(linkIndex: number, index: number, event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content view props.\n */\nexport interface IContentBlockAdditionalContentViewProps {\n additionalContentNode: INodeProps;\n additionalContentItems?: IContentBlockAdditionalContentItemViewProps[];\n}\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content Item view props.\n */\nexport interface IContentBlockAdditionalContentItemViewProps {\n heading: React.ReactNode;\n text: React.ReactNode;\n links: React.ReactNode;\n additionalContentItemContainer: INodeProps;\n additionalContentItemLinks: INodeProps;\n}\n\n/**\n * Renders additional content heading.\n * @param additionalContentHeading - Additional content heading.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns Heading Node.\n */\nconst renderHeading = (additionalContentHeading: string, props: IContentBlockAdditionalContentProps, itemIndex: number) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param additionalContentParagraphText - Additional content paragraph text.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns Paragraph Node.\n */\nconst renderParagraph = (additionalContentParagraphText: string, props: IContentBlockAdditionalContentProps, itemIndex: number) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param ctaLink - Additional content link.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @param linkIndex - Additional content link index.\n * @returns Link Node.\n */\nconst renderLinks = (ctaLink: ILinksData, props: IContentBlockAdditionalContentProps, itemIndex: number, linkIndex: number) => {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: ctaLink.ariaLabel,\n className: 'ms-content-block__details__additional-content-cta-links',\n linkText: ctaLink.linkText,\n linkUrl: ctaLink.linkUrl.destinationUrl,\n openInNewTab: ctaLink.openInNewTab,\n role: 'link'\n };\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalLinkTextChange(linkIndex, itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Create node for each additonal content item.\n * @param item - Content block additonal content item props.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns IContentBlockAdditionalContentItemViewProps.\n */\nconst assembleNode = (\n item: IAdditionalContentData,\n props: IContentBlockAdditionalContentProps,\n itemIndex: number\n): IContentBlockAdditionalContentItemViewProps => {\n const headingNode = item.heading && renderHeading(item.heading, props, itemIndex);\n const paragraphNode = item.subtext && renderParagraph(item.subtext, props, itemIndex);\n const linksNode = item.links?.map((ctaLink: ILinksData, index: number) => {\n return renderLinks(ctaLink, props, itemIndex, index);\n });\n\n return {\n heading: headingNode,\n text: paragraphNode,\n links: linksNode,\n additionalContentItemContainer: { className: 'ms-content-block__details__additional-content__container' },\n additionalContentItemLinks: { className: 'ms-content-block__details__additional-content-cta' }\n };\n};\n\n/**\n * ContentBlockAdditionalContent component.\n * @param props - Content Block Additional content component props.\n * @returns Content Block Additional content view props.\n */\nexport const contentBlockAdditionalContent = (\n props: IContentBlockAdditionalContentProps\n): IContentBlockAdditionalContentViewProps | undefined => {\n const { additionalContent } = props;\n if (!additionalContent) {\n return undefined;\n }\n\n const reactNodes: IContentBlockAdditionalContentItemViewProps[] = [];\n additionalContent.map((item, index: number) => {\n return reactNodes.push(assembleNode(item, props, index));\n });\n\n return {\n additionalContentNode: { className: 'ms-content-block__details__additional-content' },\n additionalContentItems: reactNodes\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../content-block.props.autogenerated';\n\nexport interface IContentCardLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n role?: string;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ContentCardLinks component.\n * @extends {React.PureComponent}\n */\nexport class ContentCardLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n }\n\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n linkdata.forEach((link, index) => {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\n const btnClass = index === 0 ? 'msc-cta__primary' : 'msc-cta__secondary';\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: btnClass,\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: this.props.role,\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n };\n}\nexport default ContentCardLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { contentBlockAdditionalContent, IContentBlockAdditionalContentViewProps } from './components/additional-content';\nimport LinksComponent from './components/links';\nimport { actionableRegion as region, IContentBlockConfig, IContentBlockProps } from './content-block.props.autogenerated';\n\nexport interface IContentBlockViewProps extends IContentBlockProps<{}> {\n title?: React.ReactNode;\n text?: React.ReactNode;\n image?: React.ReactNode;\n links?: React.ReactNode;\n className?: string;\n contentBlockContainer: IModuleProps;\n imageContainer: INodeProps;\n detailsContainer: INodeProps;\n contentBlockAnchorTag?: INodeProps;\n imageLink?: string;\n imageAriaLabel?: string;\n additionalContent?: IContentBlockAdditionalContentViewProps;\n handleAdditionalText?(): void;\n handleAdditionalParagraph?(): void;\n handleAdditionalLinkTextChange?(): void;\n}\n\n/**\n * Site-builder configuration for the module.\n */\nexport interface IContentBlockFullConfig extends IContentBlockConfig {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- This field comes from SDK.\n msdyn365__moduleLayout?: string;\n}\n\n/**\n * ContentCard component.\n * @extends {React.PureComponent}\n */\nexport class ContentBlock extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public render(): JSX.Element | null {\n const { heading, paragraph, image, links, className, imageAriaLabel } = this.props.config;\n const contentBlockTitle = heading && (\n \n );\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings ?? {},\n imageSettings: image?.imageSettings\n };\n const contentBlockLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n const contentBlockText = paragraph && (\n \n );\n const contentBlockImage = (\n \n );\n\n if (!contentBlockTitle && !contentBlockText && !contentBlockLinks) {\n this.props.context.telemetry.error('Content block content is empty, module wont render.');\n return null;\n }\n const contentBlockviewProps = {\n ...this.props,\n title: contentBlockTitle,\n text: contentBlockText,\n image: contentBlockImage,\n links: contentBlockLinks,\n moduleClass: this.props.config.className,\n contentBlockContainer: {\n moduleProps: this.props,\n className: classnames('ms-content-block', className)\n },\n imageContainer: { className: 'ms-content-block__image' },\n detailsContainer: { className: 'ms-content-block__details' },\n contentBlockAnchorTag: {\n tag: 'a',\n className: 'ms-content-block__link',\n role: 'link'\n },\n imageLink: this._getImageLink(),\n imageAriaLabel,\n additionalContent: contentBlockAdditionalContent({\n requestContext: this.props.context.request,\n additionalContent: this.props.config.additionalContent,\n handleAdditionalTextChange: this.handleAdditionalTextChange,\n handleAdditionalParagraphChange: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n }),\n handleAdditionalText: this.handleAdditionalTextChange,\n handleAdditionalParagraph: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n };\n\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\n }\n\n /**\n * To handle text change.\n * @param event - To handle text change event.\n * @name - HandleTextChange\n * @public\n * @returns - The Text value.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * To handle paragraph change.\n * @param event - To handle text change event.\n * @name - HandleParagraphChange\n * @public\n * @returns - The Paragraph value.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\n\n /**\n * Handle link text change.\n * @param linkIndex - The link index.\n * @returns - Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n };\n\n public handleAdditionalTextChange(index: number, event: Msdyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent[Number(index)].heading = event.target.value;\n }\n }\n\n public handleAdditionalLinkTextChange(linkIndex: number, index: number, event: Msdyn365.ContentEditableEvent): void {\n const additionalContentObject =\n (this.props.config.additionalContent &&\n ArrayExtensions.hasElements(this.props.config.additionalContent) &&\n this.props.config.additionalContent[Number(index)]) ||\n {};\n if (additionalContentObject.links) {\n additionalContentObject.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n public handleAdditionalParagraphChange(index: number, event: Msdyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent[Number(index)].subtext = event.target.value;\n }\n }\n\n private _getImageLink(): string | null {\n const { imageLink, links, actionableRegion } = this.props.config;\n if (actionableRegion === region.imageAndLinks) {\n if (imageLink?.destinationUrl) {\n return imageLink.destinationUrl;\n } else if (links && ArrayExtensions.hasElements(links) && links[0].linkUrl) {\n return links[0].linkUrl.destinationUrl;\n }\n return null;\n }\n return null;\n }\n}\n\nexport default ContentBlock;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IPasswordResetItem, IPasswordResetLoading, IPasswordResetLocalAccount, IPasswordResetViewProps } from './password-reset';\n\nconst PasswordResetItem: React.FC = ({ wrapper, label, errorMessage, input }) => {\n return (\n \n {label}\n {errorMessage}\n {input}\n \n );\n};\n\nconst LocalAccount: React.FC = ({\n localAccount,\n items,\n errorMessage,\n buttonsWrapper,\n buttons,\n verificationSuccessModal,\n verificationSuccessModalMessage\n}) => {\n return (\n \n {items &&\n items.map((item: IPasswordResetItem) => {\n // eslint-disable-next-line react/jsx-key\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n \n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n \n\n \n \n \n \n );\n};\n\nconst PasswordResetLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst PasswordResetView: React.FC = props => {\n const { passwordReset, viewState, loading, defaultAADConainer, aadConainer, heading, passwordResetLocalAccount } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(passwordResetLocalAccount)}\n \n \n );\n};\n\nexport default PasswordResetView;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { format, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\n/**\r\n * ICartIconData: Interface for Cart Icon Data.\r\n */\r\nexport interface ICartIconData {\r\n cart?: ICartState;\r\n}\r\n\r\n/**\r\n * ICartIconComponentProps: Interface for Cart Icon component props.\r\n */\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n cartQtyLabel: string;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\n/**\r\n * ICartIconComponent: Interface for Cart Icon component.\r\n */\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\nconst CartIconComponentActions = {};\r\n\r\n/**\r\n *\r\n * CartIcon component.\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, cartQtyLabel, data: { cart } } = props;\r\n const defaultCartItemCount: number = 0;\r\n\r\n // If there are invoice lines, don't update mini cart item quantity\r\n let cartItem = defaultCartItemCount;\r\n\r\n if (cart) {\r\n cartItem = cart.hasInvoiceLine ? defaultCartItemCount : cart.totalItemsInCart;\r\n }\r\n\r\n let qtyLabel: string = '';\r\n const cartMaxQuantity: number = 99;\r\n const maxQuantityLabel: string = '99+';\r\n if (cartItem > cartMaxQuantity) {\r\n qtyLabel = maxQuantityLabel;\r\n } else {\r\n qtyLabel = format(cartQtyLabel, cartItem);\r\n }\r\n const label = format(cartLabel, cartItem);\r\n\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, 'cart-icon', '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const style: React.CSSProperties = {\r\n visibility: cart ? 'visible' : 'hidden'\r\n };\r\n return (\r\n \r\n
\r\n {qtyLabel}\r\n
\r\n \r\n );\r\n});\r\n\r\n// @ts-expect-error -- Compatible issue with the component override.\r\nexport const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'CartIcon',\r\n { component: CartIcon, ...CartIconComponentActions }\r\n);\r\n\r\nexport default CartIconComponent;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n// @ts-ignore\r\nimport {ICartLineItemViewProps, ICartlinesViewProps, ICartResources, ICartViewProps, IOrderSummaryErrors} from \"@msdyn365-commerce-modules/cart\";\r\nimport { IInvoiceSummaryLines } from \"@msdyn365-commerce-modules/invoice-payment-summary\";\r\nimport { IOrderSummaryLines } from \"@msdyn365-commerce-modules/order-summary-utilities\";\r\nimport { ArrayExtensions } from \"@msdyn365-commerce-modules/retail-actions\";\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n Node,\r\n TelemetryConstant\r\n} from \"@msdyn365-commerce-modules/utilities\";\r\nimport * as React from \"react\";\r\n\r\nimport { ICartProps as ICartExtensionProps } from \"../definition-extensions/cart.ext.props.autogenerated\";\r\n\r\n/**\r\n * Toggle Bopis Function.\r\n * @param cartLine -CartLine.\r\n * @param isBopisSelected -Boolean.\r\n * @returns Toggle Bopis.\r\n */\r\nconst toggleBopisHandler = (cartLine: ICartlinesViewProps, isBopisSelected: boolean) => () => {\r\n cartLine.pickUpInStore?.callbacks.toggleBopis(!isBopisSelected);\r\n};\r\n\r\n/**\r\n * Change Store Function.\r\n * @param cartLine -CartLine.\r\n * @returns Toggle Bopis.\r\n */\r\nconst onChangeStoreHandler = (cartLine: ICartlinesViewProps) => () => {\r\n cartLine.pickUpInStore?.callbacks.toggleBopis(true);\r\n};\r\n\r\n/**\r\n * Render Bopis block.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderBopisBlock = (cartLine: ICartlinesViewProps, resources: ICartResources, storeSelector: React.ReactNode | undefined,\r\n telemetryContent?: ITelemetryContent, emailDeliveryModeCode?: string): JSX.Element | null => {\r\n // If it is electronic item cart line, then return null for BOPISBlock.\r\n if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\r\n return null;\r\n }\r\n\r\n const {\r\n shipInsteadDisplayText,\r\n shipToAddressDisplayText,\r\n pickItUpDisplayText,\r\n pickUpAtStoreWithLocationText,\r\n changeStoreDisplayText\r\n } = resources;\r\n\r\n const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\r\n\r\n const payLoad = getPayloadObject(\"click\", telemetryContent!, TelemetryConstant.PickupInStore);\r\n const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n \r\n
\r\n {isBopisSelected ? \r\n {pickUpAtStoreWithLocationText}\r\n : \r\n {shipToAddressDisplayText}\r\n }\r\n
\r\n {\r\n isBopisSelected &&\r\n
\r\n \r\n {cartLine.pickUpInStore.orgUnitName}\r\n \r\n \r\n {changeStoreDisplayText}\r\n \r\n
\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render Bopis block.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderGroupBopisBlock = (cartLine: ICartlinesViewProps, resources: ICartResources, storeSelector: React.ReactNode | undefined,\r\n telemetryContent?: ITelemetryContent, emailDeliveryModeCode?: string): JSX.Element | null => {\r\n // If it is electronic item cart line, then return null for GroupBOPISBlock.\r\n if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\r\n return null;\r\n }\r\n\r\n const { changeStoreDisplayText, shipInsteadDisplayText, pickItUpDisplayText } = resources;\r\n\r\n const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\r\n\r\n const payLoad = getPayloadObject(\"click\", telemetryContent!, TelemetryConstant.PickupInStore);\r\n const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n <>\r\n {isBopisSelected ?\r\n : null}\r\n \r\n {isBopisSelected ? shipInsteadDisplayText : pickItUpDisplayText}\r\n \r\n \r\n );\r\n};\r\n\r\nconst renderCartLineComment = (cartLineComment: React.ReactNode, comment: string, cartLineId: string, cartProductTitle?: string) => {\r\n if (!cartLineComment) {\r\n return null;\r\n }\r\n return React.cloneElement(cartLineComment[0] as React.ReactElement, { comment, cartLineId, cartProductTitle})\r\n}\r\n\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param cartLineComment - Cart line comment element\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - FLag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLine = (cartLine: ICartlinesViewProps, resources: ICartResources, storeSelector: React.ReactNode | undefined,\r\n cartLineComment: React.ReactNode | undefined, telemetryContent?: ITelemetryContent,\r\n isMultiplePickUp?: boolean, emailDeliveryModeCode?: string): JSX.Element => {\r\n const comment = cartLine.data?.cartline.Comment || '';\r\n const cartLineProductTitle = cartLine.data?.product?.Name;\r\n if (cartLine.error === resources.outOfStockErrorMessage) {\r\n return (\r\n \r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n }\r\n\r\n if (isMultiplePickUp) {\r\n return (\r\n \r\n {renderGroupBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToOrderTemplate}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n }\r\n\r\n if (cartLine.addToOrderTemplate) {\r\n return (\r\n \r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToOrderTemplate}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param cartLines - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - Flag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlinesInternal = (isPrintView: boolean, cartLines: ICartlinesViewProps[], resources: ICartResources,\r\n storeSelector: React.ReactNode | undefined, cartLineComment: React.ReactNode | undefined, telemetryContent?: ITelemetryContent, isMultiplePickUp?: boolean,\r\n emailDeliveryModeCode?: string): JSX.Element[] | JSX.Element => {\r\n return (\r\n cartLines.map((cartLine, index) => {\r\n const itemIndex = index;\r\n return (\r\n
\r\n {cartLine.cartline}\r\n \r\n {isMultiplePickUp ? null : renderBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\r\n {\r\n renderCartLine(cartLine, resources, storeSelector, cartLineComment, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)\r\n }\r\n \r\n
\r\n );\r\n }));\r\n};\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param props - The cart line props.\r\n * @param cartLines - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param waitingComponent - Waiting component element.\r\n * @param cartLoadingStatus - Cart loading status string.\r\n * @param isCartDataResult - Flag to check if there is cart data.\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - Flag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlines = (isPrintView: boolean, props: ICartViewProps & ICartExtensionProps<{}>, cartLines: ICartlinesViewProps[] | undefined, resources: ICartResources,\r\n storeSelector: React.ReactNode | undefined, waitingComponent: React.ReactNode,\r\n cartLoadingStatus: string, isCartDataResult: boolean, telemetryContent?: ITelemetryContent, isMultiplePickUp?: boolean,\r\n emailDeliveryModeCode?: string): JSX.Element[] | JSX.Element => {\r\n const { slots: { cartLineComment, orderLevelComment } } = props;\r\n if (cartLoadingStatus) {\r\n return (<>\r\n {cartLoadingStatus}\r\n );\r\n }\r\n\r\n // Props.CartlinesWrapper is only required on cart lines and when multiple pickup mode is disabled. This is also required to handle the empty cart styling.\r\n // Else, empty cart multiple pickup mode is disabled falls under the other cart line wrapper which is creating issue with Empty cart scenario.\r\n if (cartLines) {\r\n return props.multiplePickUpEnabled ? (\r\n renderCartlinesInternal(isPrintView, cartLines, resources, storeSelector, cartLineComment, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)\r\n ) : (\r\n \r\n {renderCartlinesInternal(isPrintView, cartLines, resources, storeSelector, cartLineComment, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}\r\n {renderOrderLevelComment(isPrintView, orderLevelComment)}\r\n \r\n );\r\n }\r\n\r\n return (isCartDataResult ? (\r\n
\r\n
\r\n {props.slots.emptyCart}\r\n
\r\n
\r\n ) : <>\r\n {waitingComponent}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines group title.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param count - Count of products.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroupTitle = (cartLine: ICartlinesViewProps, resources: ICartResources, count: number) => {\r\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\r\n const { itemLabel, itemsLabel } = resources;\r\n const itemCountOne: number = 1;\r\n const suffix = count > itemCountOne ? itemsLabel : itemLabel;\r\n const countTitle = `(${count} ${suffix})`;\r\n return (\r\n <>\r\n \r\n {isBopisSelected ?

\r\n {cartLine.pickUpInStore?.deliveryOption}\r\n {\", \"}\r\n {cartLine.pickUpInStore?.orgUnitName}\r\n

: null}\r\n

\r\n {countTitle}\r\n

\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines group title.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param count - Count of products.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroupHeader = (cartLine: ICartlinesViewProps, resources: ICartResources, count: number, emailDeliveryModeCode?: string) => {\r\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\r\n const { pickUpText, shippingText, emailshippingText } = resources;\r\n let groupTitle: string;\r\n\r\n groupTitle = isBopisSelected ? pickUpText : shippingText;\r\n groupTitle = cartLine.data && cartLine.data.cartline.DeliveryMode === emailDeliveryModeCode ? emailshippingText : groupTitle;\r\n\r\n return (\r\n <>\r\n
\r\n \r\n

\r\n {groupTitle}\r\n

\r\n {renderCartLinesGroupTitle(cartLine, resources, count)}\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Returns count of products.\r\n * @param cartLine - The cart line view props.\r\n * @returns Number of products.\r\n */\r\nconst countItems = (cartLine: ICartlinesViewProps[]): number => {\r\n let countItem = 0;\r\n const defaultItemCount = 0;\r\n countItem = cartLine.reduce((count, item) => {\r\n return count + (item.data?.cartline.Quantity ?? defaultItemCount);\r\n\r\n }, defaultItemCount);\r\n return countItem;\r\n};\r\n\r\n/**\r\n * Render Cart Lines group.\r\n * @param props - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroup = (isPrintView: boolean, props: ICartViewProps & ICartExtensionProps<{}>, resources: ICartResources): JSX.Element | undefined => {\r\n if (props.cartLinesGroup && ArrayExtensions.hasElements(props.cartLinesGroup)) {\r\n return (\r\n
\r\n {props.cartLinesGroup.map(cartlines => {\r\n return (
\r\n {renderCartLinesGroupHeader(cartlines[0], resources, countItems(cartlines),\r\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode)}\r\n {renderCartlines(isPrintView, props, cartlines, props.resources, props.storeSelector,\r\n props.waitingComponent, props.cartLoadingStatus, props.cartDataResult,\r\n props.telemetryContent, props.multiplePickUpEnabled, props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode)}\r\n
);\r\n })}\r\n
\r\n );\r\n }\r\n return (props.cartDataResult ? (\r\n
\r\n
\r\n {props.slots.emptyCart}\r\n
\r\n
\r\n ) : <>\r\n {props.waitingComponent}\r\n \r\n );\r\n\r\n};\r\n\r\n/**\r\n * Render error block.\r\n * @param errorData - Error component.\r\n * @returns JSX Element.\r\n */\r\nconst renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\r\n if (!errorData || !ArrayExtensions.hasElements(errorData.errors)) {\r\n return null;\r\n }\r\n return (\r\n \r\n {errorData.header}\r\n {errorData.errors}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render invoice summary.\r\n * @param invoiceSummaryLines - Invoice summary component.\r\n * @param orderSummaryItems - Order summary component.\r\n * @param props - The module props.\r\n * @returns JSX Element.\r\n */\r\nconst renderInvoiceSummarylines = (invoiceSummaryLines: IInvoiceSummaryLines | undefined, orderSummaryItems: INodeProps,\r\n props: ICartViewProps): JSX.Element | null => {\r\n if (!invoiceSummaryLines) {\r\n props.context.telemetry.error(\"InvoiceSummary content is empty, module wont render\");\r\n return null;\r\n }\r\n return (\r\n \r\n {invoiceSummaryLines.invoices}\r\n {invoiceSummaryLines.giftCard}\r\n {invoiceSummaryLines.loyalty}\r\n {invoiceSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary.\r\n * @param orderSummaryLines - Order summary component.\r\n * @param orderSummaryItems - Order summary items component.\r\n * @param props - The module props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummarylines = (orderSummaryLines: IOrderSummaryLines | undefined, orderSummaryItems: INodeProps,\r\n props: ICartViewProps): JSX.Element | null => {\r\n if (!orderSummaryLines) {\r\n props.context.telemetry.error(\"OrderSummary content is empty, module wont render\");\r\n return null;\r\n }\r\n return (\r\n \r\n {orderSummaryLines.subtotal}\r\n {/* {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null} */}\r\n {orderSummaryLines.shipping}\r\n {orderSummaryLines.otherCharge}\r\n {orderSummaryLines.tax}\r\n {orderSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render error block.\r\n * @param promotions - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\r\n return (\r\n <>\r\n \r\n {promotions.promotionMessage}\r\n \r\n {promotions.promotionSeeAllLink}\r\n \r\n {promotions.promotionDialog}\r\n \r\n\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary checkout.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummaryCheckout = (props: ICartViewProps): JSX.Element | undefined => {\r\n return (\r\n \r\n {props.cart?.hasInvoiceLine ? null : props.promoCode}\r\n \r\n {/* {props.checkoutAsSignInUserButton} */}\r\n {props.checkoutAsGuestButton}\r\n \r\n {props.createTemplateFromCartButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary checkout button.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummaryCheckoutButton = (props: ICartViewProps): JSX.Element | undefined => {\r\n return (\r\n \r\n {/* {props.checkoutAsSignInUserButton} */}\r\n {props.checkoutAsGuestButton}\r\n \r\n );\r\n};\r\n\r\nconst _renderPrintView = (isPrintView: boolean,\r\n handlePrintViewChange: (e: React.MouseEventHandler) => void,\r\n printViewLabel: string\r\n): React.ReactNode => (\r\n
\r\n \r\n\r\n\r\n
\r\n);\r\n\r\n/**\r\n * Renders the order-level-comment that displays a comment at the bottom of the cart.\r\n */\r\n\r\nconst renderOrderLevelComment = (isPrintView: boolean, orderLevelComment: React.ReactNode | undefined): React.ReactNode => {\r\n if (!orderLevelComment) {\r\n return null;\r\n }\r\n return(\r\n
\r\n {orderLevelComment}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render cart view.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst CartView: React.FC> = (props: ICartViewProps & ICartExtensionProps<{}>) => {\r\n\r\n const handlePrintViewChange = () => setIsPrintView(!isPrintView);\r\n const [isPrintView, setIsPrintView] = React.useState(false);\r\n const printViewToggle = _renderPrintView(isPrintView, handlePrintViewChange, \"Print View\");\r\n const totalItemCountOne: number = 1;\r\n const updatedTitle = (\r\n

\r\n {props.resources.cartTitle}\r\n \r\n {` (${Number(props.cart?.totalItemsInCart)} ${props.cart?.totalItemsInCart !== totalItemCountOne ? \"items\" : \"item\"})`}\r\n \r\n

\r\n );\r\n return (\r\n
\r\n {updatedTitle}\r\n
\r\n {props.orderSummaryLineitems?.orderTotal}\r\n
\r\n {renderOrderSummaryCheckoutButton(props)}\r\n {!props.cart?.hasInvoiceLine && props.promotionOptions && renderPromotions(props.promotionOptions)}\r\n {props.multiplePickUpEnabled ? renderCartLinesGroup(isPrintView, props, props.resources) : renderCartlines(isPrintView, props, props.cartlines,\r\n props.resources, props.storeSelector, props.waitingComponent, props.cartLoadingStatus, props.cartDataResult)}\r\n {props.orderSummaryHeading &&\r\n \r\n {printViewToggle}\r\n \r\n {props.orderSummaryHeading}\r\n {props.cart?.hasInvoiceLine ? renderInvoiceSummarylines(\r\n props.invoiceSummaryLineitems, props.OrderSummaryItems, props) : renderOrderSummarylines(\r\n props.orderSummaryLineitems, props.OrderSummaryItems, props)}\r\n {renderErrorBlock(props.OrderSummaryErrors)}\r\n \r\n {renderOrderSummaryCheckout(props)}\r\n }\r\n {props.storeSelector}\r\n
\r\n );\r\n};\r\n\r\nexport default CartView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-customer-account-payment/checkout-customer-account-payment';\nimport { IAccountPaymentEditViewForm } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-customer-account-payment/components/get-account-payment-form-edit-mode';\nimport { IAccountPaymentSummaryViewForm } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-customer-account-payment/components/get-account-payment-form-summary-mode';\n\nexport const SummaryForm: React.FC = ({\n formProps,\n label,\n addPaymentButton,\n appliedLine,\n bottomBorder,\n paymentAmountInput\n}) => (\n \n <>\n {label}\n {paymentAmountInput}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nexport const EditForm: React.FC = ({\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\n}) => (\n \n <>\n {customerName}\n {customerAccountNumber}\n {customerSince}\n {accountCredit}\n {accountDetails}\n {inputLabel}\n {alert}\n {inputAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nconst CheckoutCustomerAccountView: React.FC = props => {\n const { checkoutCustomerAccount, checkoutErrorRef, summaryView, editView, moduleState, alert } = props;\n return (\n \n {alert}\n {moduleState.isReady && summaryView && }\n {!moduleState.isReady && editView && }\n \n );\n};\n\nexport default CheckoutCustomerAccountView;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { format, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\n/**\r\n * ICartIconData: Interface for Cart Icon Data.\r\n */\r\nexport interface ICartIconData {\r\n cart?: ICartState;\r\n}\r\n\r\n/**\r\n * ICartIconComponentProps: Interface for Cart Icon component props.\r\n */\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n cartQtyLabel: string;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\n/**\r\n * ICartIconComponent: Interface for Cart Icon component.\r\n */\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\nconst CartIconComponentActions = {};\r\n\r\n/**\r\n *\r\n * CartIcon component.\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, cartQtyLabel, data: { cart } } = props;\r\n const defaultCartItemCount: number = 0;\r\n const invoiceItemCount: number = 1;\r\n\r\n // If there are invoice lines, don't update mini cart item quantity\r\n let cartItem = defaultCartItemCount;\r\n\r\n if (cart) {\r\n cartItem = cart.hasInvoiceLine ? invoiceItemCount : cart.totalItemsInCart;\r\n }\r\n\r\n let qtyLabel: string = '';\r\n const cartMaxQuantity: number = 99;\r\n const maxQuantityLabel: string = '99+';\r\n if (cartItem > cartMaxQuantity) {\r\n qtyLabel = maxQuantityLabel;\r\n } else {\r\n qtyLabel = format(cartQtyLabel, cartItem);\r\n }\r\n const label = format(cartLabel, cartItem);\r\n\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, 'cart-icon', '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const style: React.CSSProperties = {\r\n visibility: cart ? 'visible' : 'hidden'\r\n };\r\n return (\r\n \r\n
\r\n {qtyLabel}\r\n
\r\n \r\n );\r\n});\r\n\r\n// @ts-expect-error -- Compatible issue with the component override.\r\nexport const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'CartIcon',\r\n { component: CartIcon, ...CartIconComponentActions }\r\n);\r\n\r\nexport default CartIconComponent;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductSpecificationViewProps } from './product-specification';\n\nconst ProductSpecificationView: React.FC = props => {\n const { ProductSpecification, ProductSpecificationTableProps, ProductSpecificationTableBodyProps, productSpecificationResult } = props;\n const rowdata =\n productSpecificationResult &&\n ArrayExtensions.hasElements(productSpecificationResult) &&\n productSpecificationResult.filter(row => !ObjectExtensions.isNullOrUndefined(row));\n\n return rowdata && ArrayExtensions.hasElements(rowdata) ? (\n \n {props.title}\n \n {rowdata}\n \n \n ) : null;\n};\n\nexport default ProductSpecificationView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ExtensibleEnumeration } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { IOrderLookupResources, IOrderLookupSearchAdditionalFieldsData } from '../order-lookup.props.autogenerated';\n\n/**\n * Render label.\n * @param className - Classname for label.\n * @param value - Text for label.\n * @returns -The JSX Element.\n */\nexport const labelGroup = (className: string, value: string): JSX.Element => {\n return
{value}
;\n};\n\n/**\n * Error label.\n * @param responseErrorMessage - Error message for label.\n * @param errorMessageClassName - Error message for class name.\n * @returns - Error ReactNode.\n */\nexport const renderErrorLabel = (responseErrorMessage: string, errorMessageClassName: string): React.ReactNode => {\n return responseErrorMessage &&
{responseErrorMessage}
;\n};\n\n/**\n * Registered user message.\n * @param resources - Resource values.\n * @param signInUrl - Signin url.\n * @param signInLinkClassName - Signin link classname.\n * @param registeredUserClassName - Registered user message classname.\n * @returns - ReactNode.\n */\nexport const renderRegisteredUserMessage = (\n resources: IOrderLookupResources,\n signInUrl: string,\n signInLinkClassName: string,\n registeredUserClassName: string\n): React.ReactNode => {\n const { orderLookupRegisteredUserText, orderLookupViewAccountText, orderLookupSignInLinkText } = resources;\n const message: string = orderLookupRegisteredUserText;\n const infoMessage: string = orderLookupViewAccountText;\n const signInText: string = orderLookupSignInLinkText;\n return (\n
\n {message}\n \n {signInText}\n \n {infoMessage}\n
\n );\n};\n\n/**\n * EmailValid submit.\n * @param email - Onsubmit of form and button click.\n * @returns - Boolean.\n */\nexport const isEmailValid = (email: string): boolean => {\n return EmailRegex.defaultRegex.test(email);\n};\n\n/**\n * Additional field validation for on submit.\n * @param name - Onsubmit of form and button click.\n * @returns - Boolean.\n */\nexport const isAdditionalFieldValid = (name: string): boolean => {\n const regEx = new RegExp('^(?!\\\\s)[A-Za-z0-9\\\\s]+$', 'u');\n return regEx.test(name);\n};\n\n/**\n * Validate order lookup field against extensible enum.\n * @param orderStatusLookUpParameter - Order lookup parameter.\n * @param orderLookupExtensibleEnum - Order lookup extensible enum.\n * @returns - Boolean.\n */\nexport const validateOrderLookupField = (\n orderStatusLookUpParameter: string,\n orderLookupExtensibleEnum: ExtensibleEnumeration[]\n): boolean => {\n let isValidField: boolean = false;\n for (const item of orderLookupExtensibleEnum) {\n if (item.Name.toLocaleLowerCase() === orderStatusLookUpParameter.toLocaleLowerCase()) {\n isValidField = true;\n return isValidField;\n }\n }\n return isValidField;\n};\n\n/**\n * Validate order lookup additional fields with proxy values.\n * @param value - Value to be validated.\n * @param orderLookupExtensibleEnum - Order lookup extensible enum.\n * @returns - Boolean.\n */\nexport const validateAdditionalFieldWithProxy = (value: string, orderLookupExtensibleEnum: ExtensibleEnumeration[]): boolean => {\n return !orderLookupExtensibleEnum.some(item => item.Name.toLocaleLowerCase() === value.toLocaleLowerCase());\n};\n\n/**\n * Validate order lookup additional fields against extensible enum.\n * @param orderStatusLookUpAdditionalParameters - Order lookup parameter.\n * @param orderLookupExtensibleEnum - Order lookup extensible enum.\n * @returns - Boolean.\n */\nexport const validateOrderLookupAdditionalField = (\n orderStatusLookUpAdditionalParameters: IOrderLookupSearchAdditionalFieldsData[],\n orderLookupExtensibleEnum: ExtensibleEnumeration[]\n): boolean => {\n let isValidAdditionalField: boolean = false;\n if (ArrayExtensions.hasElements(orderStatusLookUpAdditionalParameters)) {\n orderStatusLookUpAdditionalParameters.map(item => {\n const fieldKey: string = item.fieldKey ?? '';\n if (!isValidAdditionalField) {\n isValidAdditionalField = validateAdditionalFieldWithProxy(fieldKey, orderLookupExtensibleEnum);\n }\n return isValidAdditionalField;\n });\n } else {\n isValidAdditionalField = false;\n }\n return isValidAdditionalField;\n};\n\n/**\n * Render validation message if field does not matches with extensible enum.\n * @param orderLookupFieldValidationErrorMessage - Order lookup validation message.\n * @returns - ReactNode.\n */\nexport const renderFieldErrors = (orderLookupFieldValidationErrorMessage: string): React.ReactNode => {\n return
{orderLookupFieldValidationErrorMessage}
;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { labelGroup } from '../utilities/order-lookup-utility';\n\n/**\n * Additional input field props.\n */\nexport interface IOrderLookupAdditionalFieldInfoInput {\n className: string;\n ariaLabel: string;\n inputType: string;\n value: string;\n name: string;\n additionalFieldLabel: string;\n additionalFieldLabelClassName: string;\n isValidAdditionalFieldName: boolean;\n additionalFieldValidationMessage: string;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Order lookup additional field props.\n */\nexport interface IOrderLookupAdditionalFieldInfo {\n additionalFieldLabel: React.ReactNode;\n additionalFieldInput: React.ReactNode;\n additionalFieldError: React.ReactNode;\n}\n\n/**\n * RenderOrderLookupAdditionalFieldInput component.\n */\n@observer\nexport default class RenderOrderLookupAdditionalFieldInput extends React.Component {\n public constructor(props: IOrderLookupAdditionalFieldInfoInput) {\n super(props);\n }\n\n public shouldComponentUpdate(nextProps: IOrderLookupAdditionalFieldInfoInput): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n return (\n
\n {this._getOrderLookupAdditionalFields().additionalFieldLabel}\n {this._getOrderLookupAdditionalFields().additionalFieldError}\n {this._getOrderLookupAdditionalFields().additionalFieldInput}\n
\n );\n }\n\n /**\n * Function to create the order lookup additional fields.\n * @returns IOrderLookupFieldInfo.\n */\n private _getOrderLookupAdditionalFields(): IOrderLookupAdditionalFieldInfo {\n return {\n additionalFieldLabel: labelGroup(this.props.additionalFieldLabelClassName, this.props.additionalFieldLabel),\n additionalFieldInput: (\n
\n \n
\n ),\n additionalFieldError: (\n
\n {!this.props.isValidAdditionalFieldName ? this.props.additionalFieldValidationMessage : ''}\n
\n )\n };\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { labelGroup } from '../utilities/order-lookup-utility';\n\n/**\n * Input field props.\n */\nexport interface IOrderLookupFieldInfoInput {\n inputReference?: React.RefObject;\n className: string;\n ariaLabel: string;\n inputType: string;\n value: string;\n name: string;\n orderLookupLabel: string;\n orderLookupLabelClassName: string;\n fieldErrorClassName: string;\n isInputTypeError: boolean;\n isValidInputField: boolean;\n renderAlert(className: string): JSX.Element;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Order lookup field props.\n */\nexport interface IOrderLookupFieldInfo {\n label: React.ReactNode;\n input: React.ReactNode;\n error: React.ReactNode;\n}\n\n/**\n * RenderOrderLookupInputs component.\n */\n@observer\nexport default class RenderOrderLookupFormFields extends React.Component {\n public constructor(props: IOrderLookupFieldInfoInput) {\n super(props);\n }\n\n public shouldComponentUpdate(nextProps: IOrderLookupFieldInfoInput): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n return (\n
\n {this._getOrderLookupFields().label}\n {this._getOrderLookupFields().error}\n {this._getOrderLookupFields().input}\n
\n );\n }\n\n /**\n * Function to create the order lookup fields.\n * @returns IOrderLookupFieldInfo.\n */\n private _getOrderLookupFields(): IOrderLookupFieldInfo {\n return {\n label: labelGroup(this.props.orderLookupLabelClassName, this.props.orderLookupLabel),\n input: (\n
\n \n
\n ),\n error: (\n
\n {this.props.isInputTypeError ? this.props.renderAlert(this.props.name) : ''}\n {this.props.isValidInputField ? this.props.renderAlert(this.props.name) : ''}\n
\n )\n };\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IActionContext } from '@msdyn365-commerce/core-internal';\nimport { ExtensibleEnumeration, StoreOperationsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport RenderOrderLookupAdditionalFieldInput from './components/order-lookup-additional-fields';\nimport RenderOrderLookupFormFields from './components/order-lookup-fields';\nimport {\n IOrderLookupProps,\n IOrderLookupSearchAdditionalFieldsData,\n orderStatusLookUpParametersType as orderStatusLookUpParametersTypes\n} from './order-lookup.props.autogenerated';\nimport {\n isAdditionalFieldValid,\n isEmailValid,\n renderErrorLabel,\n renderFieldErrors,\n renderRegisteredUserMessage,\n validateOrderLookupAdditionalField,\n validateOrderLookupField\n} from './utilities/order-lookup-utility';\n\n/**\n * OrderLookup view props.\n */\nexport interface IOrderLookupViewProps extends IOrderLookupProps<{}> {\n additionalProperties: JSX.Element[] | undefined;\n orderLookup: IModuleProps;\n orderLookupContainer: INodeProps;\n orderLookupAdditionalFieldContainer: INodeProps;\n paragraph?: React.ReactNode;\n heading?: React.ReactNode;\n submitButton?: INodeProps;\n submitButtonLabelText?: string;\n orderLookupForm?: INodeProps;\n renderOrderLookupInputField: JSX.Element | undefined;\n orderNumberInput?: JSX.Element | undefined;\n errorMessage?: React.ReactNode;\n fieldErrorMessage?: React.ReactNode;\n registeredUserMessage?: React.ReactNode;\n onChange?(event: React.ChangeEvent): void;\n submit?(): void;\n}\n\n/**\n * OrderLookupSearchValues -- supported values.\n */\nenum OrderLookupSearchValues {\n email = 'email',\n ordernumber = 'ordernumber'\n}\n\n/**\n * To render and handle state for additional order lookup fields.\n */\nexport interface IOrderLookupAdditionalFields {\n labelName: string;\n isValidFieldName: boolean;\n fieldValue: string;\n ariaLabel: string;\n additionalfieldErrorMessage: string;\n}\n\n/**\n * OrderLookup view props.\n */\nexport interface IOrderLookupFormState {\n orderNumber: string;\n email: string;\n isOrdNumberError: boolean;\n isEmailError: boolean;\n isValidEmailError: boolean;\n isReqError: boolean;\n isDisabled: boolean;\n isValidLookupField: boolean;\n isValidAdditionalLookupField: boolean;\n responseErrorMessage: string;\n additionalProperties: IOrderLookupAdditionalFields[];\n}\n\n/**\n *\n * OrderLookup component.\n * @extends {React.PureComponent>}\n */\nclass OrderLookup extends React.PureComponent, IOrderLookupFormState> {\n public orderNumberInputRef: React.RefObject;\n\n public emailInputRef: React.RefObject;\n\n public isEmailValue: boolean = false;\n\n private requiredErrorMessage: string | undefined;\n\n private emailValidationErrorMessage: string | undefined;\n\n private isOrderNumberValue: boolean = false;\n\n private orderLookupExtensibleEnum: ExtensibleEnumeration[] = [];\n\n public constructor(props: IOrderLookupProps<{}>) {\n super(props);\n this.orderNumberInputRef = React.createRef();\n this.emailInputRef = React.createRef();\n const { config } = this.props;\n const { orderLookupSearchAdditionalFields } = config;\n const additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n\n if (orderLookupSearchAdditionalFields) {\n for (const item of orderLookupSearchAdditionalFields) {\n additionalPropertyStates.push({\n labelName: item.labelName ?? '',\n isValidFieldName: true,\n fieldValue: '',\n ariaLabel: item.ariaLabel ?? '',\n additionalfieldErrorMessage: item.validationMessage ?? ''\n });\n }\n }\n\n this.state = {\n orderNumber: '',\n email: '',\n isOrdNumberError: false,\n isEmailError: false,\n isValidEmailError: false,\n isReqError: false,\n isDisabled: true,\n isValidLookupField: true,\n isValidAdditionalLookupField: false,\n responseErrorMessage: '',\n additionalProperties: additionalPropertyStates\n };\n }\n\n public render(): JSX.Element | null {\n const {\n config: { paragraph, heading },\n resources,\n context\n } = this.props;\n\n const {\n orderLookupDefaultHeadingText,\n orderLookupButtonLabel,\n orderLookupFormAriaLabel,\n orderLookupOrderNumberLabel,\n orderLookupOrderNumberAriaLabel,\n orderLookupSubmitAriaLabel,\n orderLookupFieldValidationErrorMessage\n } = resources;\n\n const { responseErrorMessage, isDisabled, orderNumber, isOrdNumberError } = this.state;\n\n const headingText = StringExtensions.isNullOrEmpty(heading?.text) ? orderLookupDefaultHeadingText : heading?.text;\n const headingTag = heading?.tag ?? 'h1';\n\n const moduleClassName = 'ms-order-lookup';\n const orderLookupContainerClassName = `${moduleClassName}__details`;\n const orderLookupHeadingClassName = `${orderLookupContainerClassName}__heading`;\n const orderLookupFormClassName = `${orderLookupContainerClassName}__form`;\n const orderLookupAdditionalFiledContainerClassName = `${orderLookupFormClassName}__additional-fields-container`;\n const orderLookupFormFieldsClassName = `${orderLookupFormClassName}__fields`;\n const orderNumberLabelClassName = `${orderLookupFormFieldsClassName}__order-number-label`;\n const orderNumberInputErrorClassName = `${orderLookupFormFieldsClassName}__order-number-input-error`;\n const submitButtonClassName = `${orderLookupFormClassName}__submit`;\n const labelErrorMessageClassName = `${moduleClassName}__error-message`;\n const registeredUserClassName = `${moduleClassName}__registered-user`;\n const signinLinkClassName = `${registeredUserClassName}__sign-in-link msc-btn`;\n\n const orderLookupHeading = (\n \n );\n\n const viewProps: IOrderLookupViewProps = {\n ...this.props,\n orderLookup: {\n moduleProps: this.props,\n className: moduleClassName\n },\n\n orderLookupContainer: {\n className: orderLookupContainerClassName\n },\n orderLookupAdditionalFieldContainer: {\n className: orderLookupAdditionalFiledContainerClassName\n },\n paragraph: paragraph && this._createParagraph(paragraph),\n heading: orderLookupHeading,\n\n renderOrderLookupInputField: this._renderOrderLookupInput(),\n orderLookupForm: {\n className: orderLookupFormClassName,\n tag: 'form',\n 'aria-label': orderLookupFormAriaLabel,\n name: 'orderLookupForm',\n role: 'form',\n autoComplete: 'off',\n onSubmit: this.handleSubmit\n },\n orderNumberInput: (\n \n ),\n\n submitButton: {\n className: submitButtonClassName,\n tag: Button,\n 'aria-label': orderLookupSubmitAriaLabel,\n type: 'submit',\n role: 'button',\n title: orderLookupButtonLabel,\n onClick: this.handleSubmit,\n disabled: isDisabled\n },\n\n submitButtonLabelText: orderLookupButtonLabel,\n errorMessage: renderErrorLabel(responseErrorMessage, labelErrorMessageClassName),\n fieldErrorMessage:\n (!this.state.isValidLookupField || this.state.isValidAdditionalLookupField) &&\n renderFieldErrors(orderLookupFieldValidationErrorMessage),\n registeredUserMessage: renderRegisteredUserMessage(\n resources,\n context.request.user.signInUrl ?? '',\n signinLinkClassName,\n registeredUserClassName\n ),\n onChange: this.onChange,\n submit: this.handleSubmit,\n additionalProperties: this._renderAdditionalFields()\n };\n return this.props.renderView(viewProps);\n }\n\n public async componentDidMount(): Promise {\n const { config, context } = this.props;\n const { actionContext } = context;\n const { orderStatusLookUpParametersType, orderLookupSearchAdditionalFields } = config;\n let isOrderLookupAdditionalFieldValid: boolean = false;\n let isOrderLookupFieldValid: boolean = false;\n\n const getExtensibleEnumerations = await StoreOperationsDataActions.getExtensibleEnumerationsAsync({ callerContext: actionContext });\n this.orderLookupExtensibleEnum =\n getExtensibleEnumerations.find(item => item.TypeName === 'OrderLookupAdditionalCriteriaType')?.ExtensibleEnumerations ?? [];\n\n const orderLookupParameter: string = orderStatusLookUpParametersType ?? '';\n const orderLookupAdditionalParameter: IOrderLookupSearchAdditionalFieldsData[] = orderLookupSearchAdditionalFields ?? [];\n\n isOrderLookupFieldValid = validateOrderLookupField(orderLookupParameter, this.orderLookupExtensibleEnum);\n isOrderLookupAdditionalFieldValid = validateOrderLookupAdditionalField(\n orderLookupAdditionalParameter,\n this.orderLookupExtensibleEnum\n );\n this.setLookupFieldState(isOrderLookupFieldValid, isOrderLookupAdditionalFieldValid);\n }\n\n /**\n * Handle text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handle paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\n const { config } = this.props;\n config.paragraph = event.target.value;\n };\n\n /**\n * Sets isValidLookupField after validating with extensible emun.\n * @param isValidField - Sets the property.\n * @param isValidAdditionalField - Sets the additional field property.\n */\n public setLookupFieldState(isValidField: boolean, isValidAdditionalField: boolean): void {\n this.setState({ isValidLookupField: isValidField, isValidAdditionalLookupField: isValidAdditionalField });\n }\n\n /**\n * HandleSubmit submit.\n */\n public readonly handleSubmit = (): void => {\n const { config, context } = this.props;\n const { actionContext } = context;\n const { additionalProperties, orderNumber, email } = this.state;\n const orderLookupValue = email;\n const { orderStatusLookUpParametersType } = config;\n const orderLookupName = orderStatusLookUpParametersType !== undefined ? orderStatusLookUpParametersType : '';\n const isValid: boolean = this._validateOrderLookupForm();\n if (isValid) {\n const actionContextValue: IActionContext = actionContext;\n const orderDetailsPath = Msdyn365.getUrlSync('orderDetails', actionContextValue) ?? '';\n if (orderDetailsPath) {\n const baseUrl = new URL(window.location.origin);\n const redirectUrl = new URL(orderDetailsPath, baseUrl);\n const searchParameters = redirectUrl.searchParams;\n\n searchParameters.set('confirmationId', orderNumber);\n searchParameters.set('propertyName', orderLookupName);\n searchParameters.set('propertyValue', orderLookupValue);\n\n if (ArrayExtensions.hasElements(additionalProperties)) {\n additionalProperties.map((item, index) => {\n const fieldName = !StringExtensions.isNullOrWhitespace(item.ariaLabel)\n ? item.ariaLabel.replace(' ', '').toLocaleLowerCase()\n : '';\n const fieldValue = !StringExtensions.isNullOrWhitespace(item.fieldValue) ? item.fieldValue : '';\n searchParameters.set(`field${index + 1}Name`, fieldName);\n searchParameters.set(`field${index + 1}Value`, fieldValue);\n return item;\n });\n }\n\n window.location.assign(redirectUrl.toString());\n }\n }\n };\n\n /**\n * OnChange event.\n * @param event - Value of input field.\n */\n public readonly onChange = (event: React.ChangeEvent): void => {\n const { additionalProperties } = this.state;\n const { config } = this.props;\n const { orderStatusLookUpParametersType } = config;\n const name = event.target.name || '';\n const value = event.target.value || '';\n this.isOrderNumberValue = !StringExtensions.isNullOrWhitespace(this.orderNumberInputRef.current?.value);\n this.isEmailValue = !StringExtensions.isNullOrWhitespace(this.emailInputRef.current?.value);\n\n if (orderStatusLookUpParametersType?.toLocaleLowerCase() === 'none') {\n this.isEmailValue = true;\n }\n\n this.setState({ responseErrorMessage: '' });\n const additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n let isAdditionalFieldError: boolean = true as boolean;\n let isKeyExistInAdditionalFieldArray: boolean = false as boolean;\n\n for (const item of additionalProperties) {\n const fieldName: string = item.ariaLabel.replace(' ', '');\n if (fieldName.toLocaleLowerCase() === name.toLocaleLowerCase()) {\n additionalPropertyStates.push({\n labelName: item.labelName,\n isValidFieldName: true,\n fieldValue: value,\n ariaLabel: item.ariaLabel,\n additionalfieldErrorMessage: item.additionalfieldErrorMessage\n });\n } else {\n additionalPropertyStates.push({\n labelName: item.labelName,\n isValidFieldName: item.isValidFieldName,\n fieldValue: item.fieldValue,\n ariaLabel: item.ariaLabel,\n additionalfieldErrorMessage: item.additionalfieldErrorMessage\n });\n }\n if (fieldName.toLocaleLowerCase() === orderStatusLookUpParametersType?.toLocaleLowerCase()) {\n isKeyExistInAdditionalFieldArray = true;\n }\n }\n\n for (const items of additionalPropertyStates) {\n if (StringExtensions.isNullOrWhitespace(items.fieldValue)) {\n isAdditionalFieldError = false;\n }\n }\n\n this.setState({ additionalProperties: additionalPropertyStates });\n\n if (!isKeyExistInAdditionalFieldArray) {\n switch (name.toLocaleLowerCase()) {\n case OrderLookupSearchValues.ordernumber: {\n this.setState({\n orderNumber: value,\n isOrdNumberError: false,\n isReqError: false\n });\n break;\n }\n case OrderLookupSearchValues.email: {\n this.setState({\n email: value,\n isEmailError: false,\n isValidEmailError: false,\n isReqError: false\n });\n break;\n }\n default: {\n this.setState({ isReqError: false });\n }\n }\n }\n\n if (\n this.isOrderNumberValue &&\n this.isEmailValue &&\n isAdditionalFieldError &&\n this.state.isValidLookupField &&\n !this.state.isValidAdditionalLookupField\n ) {\n this.setState({ isDisabled: false });\n } else {\n this.setState({ isDisabled: true });\n }\n };\n\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\n const { context } = this.props;\n const { request } = context;\n if (!text) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Render order lookup validation message.\n * @param className - Class name for error field.\n * @returns - JSX.Element.\n */\n private readonly _renderAlert = (className: string): JSX.Element => {\n const {\n resources: { orderLookupEmailValidationErrorMessage, orderLookupRequiredTextErrorMessage }\n } = this.props;\n\n const { isEmailError, email, isValidEmailError, isReqError } = this.state;\n if (isEmailError) {\n this.requiredErrorMessage = orderLookupRequiredTextErrorMessage;\n }\n\n if (!StringExtensions.isNullOrEmpty(email) && isValidEmailError) {\n this.emailValidationErrorMessage = orderLookupEmailValidationErrorMessage;\n }\n\n const isRequireError = isReqError;\n const isEmailValidError = isValidEmailError;\n const isValidEmailInput = className.toLocaleLowerCase() === OrderLookupSearchValues.email;\n return (\n <>\n {isRequireError && (\n \n {this.requiredErrorMessage}\n \n )}\n {isEmailValidError && isValidEmailInput && (\n \n {this.emailValidationErrorMessage}\n \n )}\n \n );\n };\n\n /**\n * Render order number validation message.\n * @param className - Class name for error field.\n * @returns - JSX.Element.\n */\n private readonly _renderOrderNumberAlert = (className: string): JSX.Element => {\n const {\n resources: { orderLookupOrderNumberValidationErrorMessage, orderLookupRequiredTextErrorMessage }\n } = this.props;\n\n const { isOrdNumberError, isReqError } = this.state;\n return (\n <>\n {isReqError && (\n \n {orderLookupRequiredTextErrorMessage}\n \n )}\n {isOrdNumberError && (\n \n {orderLookupOrderNumberValidationErrorMessage}\n \n )}\n \n );\n };\n\n private _renderAdditionalFields(): JSX.Element[] | undefined {\n const { additionalProperties } = this.state;\n const additionalFieldsInput: JSX.Element[] = [];\n for (const item of additionalProperties) {\n const name: string = item.ariaLabel.replace(' ', '');\n additionalFieldsInput.push(\n \n );\n }\n return additionalFieldsInput;\n }\n\n /**\n * Render Input field for order lookup.\n * @returns - IOrderLookupFieldInfo.\n */\n private readonly _renderOrderLookupInput = (): JSX.Element | undefined => {\n const { email, isEmailError, isValidEmailError } = this.state;\n const {\n config: { orderStatusLookUpParametersType },\n resources: { orderLookupEmailLabel, orderLookupEmailAriaLabel }\n } = this.props;\n\n switch (orderStatusLookUpParametersType) {\n case orderStatusLookUpParametersTypes.none:\n return undefined;\n case orderStatusLookUpParametersTypes.email:\n default:\n return (\n \n );\n }\n };\n\n /**\n * _validation for additional fields.\n * @returns - Returns IOrderLookupAdditionalFields[].\n */\n private readonly _additionalFieldValidation = (): IOrderLookupAdditionalFields[] => {\n const additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n for (const item of this.state.additionalProperties) {\n const isFieldValid: boolean = !StringExtensions.isNullOrWhitespace(item.fieldValue) && isAdditionalFieldValid(item.fieldValue);\n additionalPropertyStates.push({\n labelName: item.labelName,\n isValidFieldName: isFieldValid,\n fieldValue: item.fieldValue,\n ariaLabel: item.ariaLabel,\n additionalfieldErrorMessage: item.additionalfieldErrorMessage\n });\n }\n return additionalPropertyStates;\n };\n\n /**\n * _validateOrderLookupForm submit.\n * @returns - Returns boolean.\n */\n private readonly _validateOrderLookupForm = (): boolean => {\n const { config } = this.props;\n const { orderNumber, email } = this.state;\n const { orderStatusLookUpParametersType } = config;\n let additionalPropertyStates: IOrderLookupAdditionalFields[] = [];\n let isValid = false;\n let isDisable = false;\n\n if (ArrayExtensions.hasElements(this.state.additionalProperties)) {\n additionalPropertyStates = this._additionalFieldValidation();\n for (const item of additionalPropertyStates) {\n if (!item.isValidFieldName) {\n isDisable = true;\n }\n }\n\n if (isDisable) {\n this.setState({\n additionalProperties: additionalPropertyStates,\n isDisabled: true\n });\n }\n }\n\n if (StringExtensions.isNullOrWhitespace(orderNumber)) {\n this.setState({\n isOrdNumberError: true,\n isReqError: true,\n isDisabled: true\n });\n } else if (orderNumber.trim() !== orderNumber) {\n this.setState({\n isOrdNumberError: true,\n isReqError: false,\n isDisabled: true\n });\n } else if (\n orderStatusLookUpParametersType === orderStatusLookUpParametersTypes.email &&\n StringExtensions.isNullOrWhitespace(email)\n ) {\n this.setState({\n isEmailError: true,\n isReqError: true,\n isDisabled: true\n });\n } else if (orderStatusLookUpParametersType === orderStatusLookUpParametersTypes.email && !isEmailValid(email)) {\n this.setState({\n isValidEmailError: true,\n isDisabled: true\n });\n } else if (isDisable || !this.state.isValidLookupField || this.state.isValidAdditionalLookupField) {\n this.setState({\n isDisabled: true\n });\n } else {\n this.setState({\n isDisabled: false\n });\n isValid = true;\n }\n return isValid;\n };\n}\n\nexport default OrderLookup;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IPasswordResetLoadingMessage {\n className: string;\n message: string;\n}\n\nconst PasswordResetLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default PasswordResetLoadingMessage;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IAdvancedNotesViewProps } from './advanced-notes';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport default (props: IAdvancedNotesViewProps) => {\r\n const { staticDisplay, advancedNotesModuleProps } = props;\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n// @ts-ignore\r\nimport {ICartLineItemViewProps, ICartlinesViewProps, ICartViewProps, IOrderSummaryErrors} from \"@msdyn365-commerce-modules/cart\";\r\nimport { IInvoiceSummaryLines } from \"@msdyn365-commerce-modules/invoice-payment-summary\";\r\nimport { IOrderSummaryLines } from \"@msdyn365-commerce-modules/order-summary-utilities\";\r\nimport { ArrayExtensions } from \"@msdyn365-commerce-modules/retail-actions\";\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n Node,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n TelemetryConstant\r\n} from \"@msdyn365-commerce-modules/utilities\";\r\nimport * as React from \"react\";\r\n\r\nimport { ICartProps as ICartExtensionProps, ICartResources } from \"../definition-extensions/cart.ext.props.autogenerated\";\r\nimport { getAdvancedNotesAsync } from \"../../../actions/DataActionExtension.g\";\r\nimport { IAdvancedNoteEntity } from \"../../../actions/DataServiceEntities.g\";\r\nimport { LinePagination } from './components/line-pagination';\r\n\r\n/**\r\n * Toggle Bopis Function.\r\n * @param cartLine -CartLine.\r\n * @param isBopisSelected -Boolean.\r\n * @returns Toggle Bopis.\r\n */\r\nconst toggleBopisHandler = (cartLine: ICartlinesViewProps, isBopisSelected: boolean) => () => {\r\n cartLine.pickUpInStore?.callbacks.toggleBopis(!isBopisSelected);\r\n};\r\n\r\n/**\r\n * Change Store Function.\r\n * @param cartLine -CartLine.\r\n * @returns Toggle Bopis.\r\n */\r\nconst onChangeStoreHandler = (cartLine: ICartlinesViewProps) => () => {\r\n cartLine.pickUpInStore?.callbacks.toggleBopis(true);\r\n};\r\n\r\n/**\r\n * Render Bopis block.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderBopisBlock = (cartLine: ICartlinesViewProps, resources: ICartResources, storeSelector: React.ReactNode | undefined,\r\n telemetryContent?: ITelemetryContent, emailDeliveryModeCode?: string): JSX.Element | null => {\r\n // If it is electronic item cart line, then return null for BOPISBlock.\r\n if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\r\n return null;\r\n }\r\n\r\n const {\r\n shipInsteadDisplayText,\r\n shipToAddressDisplayText,\r\n pickItUpDisplayText,\r\n pickUpAtStoreWithLocationText,\r\n changeStoreDisplayText\r\n } = resources;\r\n\r\n const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\r\n\r\n const payLoad = getPayloadObject(\"click\", telemetryContent!, TelemetryConstant.PickupInStore);\r\n const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n \r\n
\r\n {isBopisSelected ? \r\n {pickUpAtStoreWithLocationText}\r\n : \r\n {shipToAddressDisplayText}\r\n }\r\n
\r\n {\r\n isBopisSelected &&\r\n
\r\n \r\n {cartLine.pickUpInStore.orgUnitName}\r\n \r\n \r\n {changeStoreDisplayText}\r\n \r\n
\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render Bopis block.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderGroupBopisBlock = (cartLine: ICartlinesViewProps, resources: ICartResources, storeSelector: React.ReactNode | undefined,\r\n telemetryContent?: ITelemetryContent, emailDeliveryModeCode?: string): JSX.Element | null => {\r\n // If it is electronic item cart line, then return null for GroupBOPISBlock.\r\n if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\r\n return null;\r\n }\r\n\r\n const { changeStoreDisplayText, shipInsteadDisplayText, pickItUpDisplayText } = resources;\r\n\r\n const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\r\n\r\n const payLoad = getPayloadObject(\"click\", telemetryContent!, TelemetryConstant.PickupInStore);\r\n const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n <>\r\n {isBopisSelected ?\r\n : null}\r\n \r\n {isBopisSelected ? shipInsteadDisplayText : pickItUpDisplayText}\r\n \r\n \r\n );\r\n};\r\n\r\nconst renderCartLineComment = (cartLineComment: React.ReactNode, comment: string, cartLineId: string, cartProductTitle?: string) => {\r\n if (!cartLineComment) {\r\n return null;\r\n }\r\n return React.cloneElement(cartLineComment[0] as React.ReactElement, { comment, cartLineId, cartProductTitle})\r\n}\r\n\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param cartLineComment - Cart line comment element\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - FLag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLine = (cartLine: ICartlinesViewProps, resources: ICartResources, storeSelector: React.ReactNode | undefined,\r\n cartLineComment: React.ReactNode | undefined, advancedNotes: React.ReactNode | undefined, telemetryContent?: ITelemetryContent,\r\n isMultiplePickUp?: boolean, emailDeliveryModeCode?: string): JSX.Element => {\r\n const comment = cartLine.data?.cartline.Comment || '';\r\n const cartLineProductTitle = cartLine.data?.product?.Name;\r\n if (cartLine.error === resources.outOfStockErrorMessage) {\r\n return (\r\n \r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n }\r\n\r\n if (isMultiplePickUp) {\r\n return (\r\n \r\n {renderGroupBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToOrderTemplate}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n }\r\n\r\n if (cartLine.addToOrderTemplate) {\r\n return (\r\n \r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToOrderTemplate}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {renderCartLineComment(cartLineComment, comment, cartLine.cartlineId!, cartLineProductTitle)}\r\n {cartLine.addToWishlist}\r\n {cartLine.remove}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param cartLines - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - Flag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlinesInternal = (notes: IAdvancedNoteEntity[], isPrintView: boolean, cartLines: ICartlinesViewProps[], resources: ICartResources,\r\n storeSelector: React.ReactNode | undefined, cartLineComment: React.ReactNode | undefined, advancedNotes: React.ReactNode | undefined, telemetryContent?: ITelemetryContent, isMultiplePickUp?: boolean,\r\n emailDeliveryModeCode?: string): JSX.Element[] | JSX.Element => {\r\n return (\r\n cartLines.map((cartLine, index) => {\r\n const itemIndex = index;\r\n const itemId = cartLine.data?.product?.ItemId || '';\r\n return (\r\n
\r\n {cartLine.cartline}\r\n \r\n {isMultiplePickUp ? null : renderBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\r\n {\r\n renderCartLine(cartLine, resources, storeSelector, cartLineComment, advancedNotes, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)\r\n }\r\n \r\n {renderAdvancedNotes(isPrintView, advancedNotes, notes.filter(n => n.ItemId === itemId))}\r\n
\r\n );\r\n }));\r\n};\r\n\r\n/**\r\n * Render Cart Lines.\r\n * @param props - The cart line props.\r\n * @param cartLines - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param storeSelector - Store selector element.\r\n * @param waitingComponent - Waiting component element.\r\n * @param cartLoadingStatus - Cart loading status string.\r\n * @param isCartDataResult - Flag to check if there is cart data.\r\n * @param telemetryContent - The telemetry object.\r\n * @param isMultiplePickUp - Flag to check if there multiple pickups.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartlines = (notes: IAdvancedNoteEntity[], isPrintView: boolean, props: ICartViewProps & ICartExtensionProps<{}>, cartLines: ICartlinesViewProps[] | undefined, resources: ICartResources,\r\n storeSelector: React.ReactNode | undefined, waitingComponent: React.ReactNode,\r\n cartLoadingStatus: string, isCartDataResult: boolean, pagination: React.ReactNode,\r\n paginatedView: ICartlinesViewProps[] | undefined,telemetryContent?: ITelemetryContent, isMultiplePickUp?: boolean,\r\n emailDeliveryModeCode?: string): JSX.Element[] | JSX.Element => {\r\n const { slots: { cartLineComment, orderLevelComment, advancedNotes } } = props;\r\n if (cartLoadingStatus) {\r\n return (<>\r\n {cartLoadingStatus}\r\n );\r\n }\r\n\r\n // Props.CartlinesWrapper is only required on cart lines and when multiple pickup mode is disabled. This is also required to handle the empty cart styling.\r\n // Else, empty cart multiple pickup mode is disabled falls under the other cart line wrapper which is creating issue with Empty cart scenario.\r\n // if (cartLines) {\r\n if (paginatedView) {\r\n return props.multiplePickUpEnabled ? (\r\n <>\r\n {pagination}\r\n {renderCartlinesInternal(notes, isPrintView, /*cartLines*/ paginatedView, resources, storeSelector, cartLineComment, advancedNotes, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}\r\n {pagination}\r\n {renderOrderLevelComment(isPrintView, orderLevelComment)}\r\n \r\n ) : (\r\n <>\r\n \r\n {/*
*/}\r\n {/* {renderCartlinesInternal(notes, isPrintView, cartLines, resources, storeSelector, cartLineComment, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}*/}\r\n {/*
*/}\r\n {pagination}\r\n {renderCartlinesInternal(notes, isPrintView, /*cartLines*/ paginatedView, resources, storeSelector, cartLineComment, advancedNotes, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}\r\n {pagination}\r\n {renderOrderLevelComment(isPrintView, orderLevelComment)}\r\n
\r\n \r\n );\r\n }\r\n\r\n return (isCartDataResult ? (\r\n
\r\n
\r\n {props.slots.emptyCart}\r\n
\r\n
\r\n ) : <>\r\n {waitingComponent}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines group title.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param count - Count of products.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroupTitle = (cartLine: ICartlinesViewProps, resources: ICartResources, count: number) => {\r\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\r\n const { itemLabel, itemsLabel } = resources;\r\n const itemCountOne: number = 1;\r\n const suffix = count > itemCountOne ? itemsLabel : itemLabel;\r\n const countTitle = `(${count} ${suffix})`;\r\n return (\r\n <>\r\n \r\n {isBopisSelected ?

\r\n {cartLine.pickUpInStore?.deliveryOption}\r\n {\", \"}\r\n {cartLine.pickUpInStore?.orgUnitName}\r\n

: null}\r\n

\r\n {countTitle}\r\n

\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Cart Lines group title.\r\n * @param cartLine - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @param count - Count of products.\r\n * @param emailDeliveryModeCode - The email delivery mode code.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroupHeader = (cartLine: ICartlinesViewProps, resources: ICartResources, count: number, emailDeliveryModeCode?: string) => {\r\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\r\n const { pickUpText, shippingText, emailshippingText } = resources;\r\n let groupTitle: string;\r\n\r\n groupTitle = isBopisSelected ? pickUpText : shippingText;\r\n groupTitle = cartLine.data && cartLine.data.cartline.DeliveryMode === emailDeliveryModeCode ? emailshippingText : groupTitle;\r\n\r\n return (\r\n <>\r\n
\r\n \r\n

\r\n {groupTitle}\r\n

\r\n {renderCartLinesGroupTitle(cartLine, resources, count)}\r\n
\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Returns count of products.\r\n * @param cartLine - The cart line view props.\r\n * @returns Number of products.\r\n */\r\nconst countItems = (cartLine: ICartlinesViewProps[]): number => {\r\n let countItem = 0;\r\n const defaultItemCount = 0;\r\n countItem = cartLine.reduce((count, item) => {\r\n return count + (item.data?.cartline.Quantity ?? defaultItemCount);\r\n\r\n }, defaultItemCount);\r\n return countItem;\r\n};\r\n\r\n/**\r\n * Render Cart Lines group.\r\n * @param props - The cart line view props.\r\n * @param resources - Module resource strings.\r\n * @returns JSX Element.\r\n */\r\nconst renderCartLinesGroup = (advancedNotes: IAdvancedNoteEntity[], isPrintView: boolean, props: ICartViewProps & ICartExtensionProps<{}>, resources: ICartResources,\r\n pagination: React.ReactNode,\r\n paginatedView: ICartlinesViewProps[] | undefined): JSX.Element | undefined => {\r\n if (props.cartLinesGroup && ArrayExtensions.hasElements(props.cartLinesGroup)) {\r\n return (\r\n
\r\n {props.cartLinesGroup.map(cartlines => {\r\n return (
\r\n {renderCartLinesGroupHeader(cartlines[0], resources, countItems(cartlines),\r\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode)}\r\n {renderCartlines(advancedNotes, isPrintView, props, cartlines, props.resources, props.storeSelector,\r\n props.waitingComponent, props.cartLoadingStatus, props.cartDataResult,\r\n pagination,\r\n paginatedView,props.telemetryContent, props.multiplePickUpEnabled, props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode)}\r\n
);\r\n })}\r\n
\r\n );\r\n }\r\n return (props.cartDataResult ? (\r\n
\r\n
\r\n {props.slots.emptyCart}\r\n
\r\n
\r\n ) : <>\r\n {props.waitingComponent}\r\n \r\n );\r\n\r\n};\r\n\r\n/**\r\n * Render error block.\r\n * @param errorData - Error component.\r\n * @returns JSX Element.\r\n */\r\nconst renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\r\n if (!errorData || !ArrayExtensions.hasElements(errorData.errors)) {\r\n return null;\r\n }\r\n return (\r\n \r\n {errorData.header}\r\n {errorData.errors}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render invoice summary.\r\n * @param invoiceSummaryLines - Invoice summary component.\r\n * @param orderSummaryItems - Order summary component.\r\n * @param props - The module props.\r\n * @returns JSX Element.\r\n */\r\nconst renderInvoiceSummarylines = (invoiceSummaryLines: IInvoiceSummaryLines | undefined, orderSummaryItems: INodeProps,\r\n props: ICartViewProps): JSX.Element | null => {\r\n if (!invoiceSummaryLines) {\r\n props.context.telemetry.error(\"InvoiceSummary content is empty, module wont render\");\r\n return null;\r\n }\r\n return (\r\n \r\n {invoiceSummaryLines.invoices}\r\n {invoiceSummaryLines.giftCard}\r\n {invoiceSummaryLines.loyalty}\r\n {invoiceSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary.\r\n * @param orderSummaryLines - Order summary component.\r\n * @param orderSummaryItems - Order summary items component.\r\n * @param props - The module props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummarylines = (orderSummaryLines: IOrderSummaryLines | undefined, orderSummaryItems: INodeProps,\r\n props: ICartViewProps): JSX.Element | null => {\r\n if (!orderSummaryLines) {\r\n props.context.telemetry.error(\"OrderSummary content is empty, module wont render\");\r\n return null;\r\n }\r\n return (\r\n \r\n {orderSummaryLines.subtotal}\r\n {/* {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null} */}\r\n {orderSummaryLines.shipping}\r\n {orderSummaryLines.otherCharge}\r\n {orderSummaryLines.tax}\r\n {orderSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render error block.\r\n * @param promotions - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\r\n return (\r\n <>\r\n \r\n {promotions.promotionMessage}\r\n \r\n {promotions.promotionSeeAllLink}\r\n \r\n {promotions.promotionDialog}\r\n \r\n\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary checkout.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummaryCheckout = (props: ICartViewProps, renderClearCart: React.ReactNode): JSX.Element | undefined => {\r\n return (\r\n \r\n {props.cart?.hasInvoiceLine ? null : props.promoCode}\r\n \r\n {props.checkoutAsSignInUserButton}\r\n {props.checkoutAsGuestButton}\r\n \r\n {props.createTemplateFromCartButton}\r\n {renderClearCart}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Renders the clear cart button on the page. Clicking the button triggers the modal to confirm the action.\r\n *\r\n * @param {(e: React.SetStateAction) => void} setClearCartModalActive\r\n * @param {ICartResources} resources\r\n * @return {*} {React.ReactNode}\r\n */\r\nconst _renderClearCart = (\r\n setClearCartModalActive: (e: React.SetStateAction) => void,\r\n resources: ICartResources\r\n): React.ReactNode => (\r\n
\r\n setClearCartModalActive(true)}\r\n >\r\n {resources.clearCartButtonText}\r\n \r\n
\r\n);\r\n\r\n/**\r\n* Modal which is responsible for verifying the clear cart intention. Can either be dismissed or confirmed. If confirmed, will clear the cart.\r\n*\r\n* @param {(e: React.MouseEvent) => void} handleClearCart\r\n* @param {(e: React.SetStateAction) => void} setClearCartModalActive\r\n* @param {() => void} toggle\r\n* @param {boolean} clearCartModalActive\r\n* @param {ICartResources} resources\r\n* @return {*}\r\n*/\r\nconst _renderClearCartModal = (\r\n handleClearCart: (e: React.MouseEvent) => void,\r\n setClearCartModalActive: (e: React.SetStateAction) => void,\r\n toggle: () => void,\r\n clearCartModalActive: boolean,\r\n resources: ICartResources\r\n) => {\r\n const clearCartClassName = 'clearcart';\r\n\r\n /**\r\n * Renders the button area\r\n */\r\n const _renderButtonArea = (): React.ReactNode => (\r\n
\r\n \r\n \r\n
\r\n );\r\n\r\n return (\r\n \r\n {resources.clearCartHeader}\r\n {resources.clearConfirmBody}\r\n {_renderButtonArea()}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render order summary checkout button.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst renderOrderSummaryCheckoutButton = (props: ICartViewProps): JSX.Element | undefined => {\r\n return (\r\n \r\n {props.checkoutAsSignInUserButton}\r\n {props.checkoutAsGuestButton}\r\n \r\n );\r\n};\r\n\r\nconst _renderPrintView = (isPrintView: boolean,\r\n handlePrintViewChange: (e: React.MouseEventHandler) => void,\r\n printViewLabel: string\r\n): React.ReactNode => (\r\n
\r\n \r\n\r\n\r\n
\r\n);\r\n\r\n/**\r\n * Renders the advanced-notes that display all of the associated notes for each cart line item at the bottom of the item in the cart.\r\n */\r\n\r\nconst renderAdvancedNotes = (isPrintView: boolean, advancedNotes: React.ReactNode, notes: IAdvancedNoteEntity[]): React.ReactNode => {\r\n\r\n if (!advancedNotes) {\r\n return null;\r\n }\r\n\r\n return(\r\n
\r\n {React.cloneElement(advancedNotes[0] as React.ReactElement, { notes })}\r\n
\r\n )\r\n}\r\n\r\n/**\r\n * Renders the order-level-comment that displays a comment at the bottom of the cart.\r\n */\r\n\r\nconst renderOrderLevelComment = (isPrintView: boolean, orderLevelComment: React.ReactNode | undefined): React.ReactNode => {\r\n if (!orderLevelComment) {\r\n return null;\r\n }\r\n\r\n return(\r\n
\r\n {orderLevelComment}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render cart view.\r\n * @param props - The module view props.\r\n * @returns JSX Element.\r\n */\r\nconst CartView: React.FC> = (props: ICartViewProps & ICartExtensionProps<{}>) => {\r\n\r\n const handlePrintViewChange = () => setIsPrintView(!isPrintView);\r\n const [isPrintView, setIsPrintView] = React.useState(false);\r\n const [advancedNotes, setAdvancedNotes] = React.useState(undefined);\r\n const printViewToggle = _renderPrintView(isPrintView, handlePrintViewChange, \"Print View\");\r\n const totalItemCountOne: number = 1;\r\n const defaultPageLength: number = 5;\r\n const updatedTitle = (\r\n

\r\n {props.resources.cartTitle}\r\n \r\n {` (${Number(props.cart?.totalItemsInCart)} ${props.cart?.totalItemsInCart !== totalItemCountOne ? \"items\" : \"item\"})`}\r\n \r\n

\r\n );\r\n const getAdvancedNotes = async (): Promise => {\r\n const itemIds = props.cart?.cart.CartLines?.map(cl => cl.ItemId!) || [];\r\n if (!itemIds.length) {\r\n return;\r\n }\r\n getAdvancedNotesAsync({ callerContext: props.context.actionContext }, itemIds)\r\n .then(notes => {\r\n setAdvancedNotes(notes || []);\r\n })\r\n }\r\n\r\n const pageLength = props.config.pageLength || defaultPageLength;\r\n\r\n const [paginatedView, setPaginatedView] = React.useState(\r\n props.cartlines && props.cartlines.length >= pageLength ? props.cartlines.slice(0, pageLength) : props.cartlines\r\n );\r\n const [paginationPage, setPaginationPage] = React.useState(0);\r\n const [clearCartModalActive, setClearCartModalActive] = React.useState(false);\r\n\r\n const handleClearCart = () => {\r\n const cart = props.cart;\r\n const cartlines = cart?.cart.CartLines;\r\n\r\n if (cart && cartlines) {\r\n let ids = { cartLineIds: Array() };\r\n cartlines.map(c => (c.LineId ? ids.cartLineIds.push(c.LineId) : null));\r\n cart.removeCartLines(ids);\r\n setClearCartModalActive(false);\r\n cart.refreshCart({});\r\n }\r\n };\r\n\r\n /**\r\n * Utility class to easily go up one page\r\n */\r\n const nextPage = () => {\r\n changePage(paginationPage + 1);\r\n};\r\n\r\n/**\r\n * Utility class to easily go down one page\r\n */\r\nconst prevPage = () => {\r\n changePage(paginationPage - 1);\r\n};\r\n\r\n/**\r\n * Update the state of @const paginationPage and @const paginatedView to the given page, folliowing some logic\r\n * to prevent the page from going into the negatives or beyond the maximum page length.\r\n *\r\n * @param {number} page\r\n * @return {*}\r\n */\r\nconst changePage = (page: number) => {\r\n if (page < 0) {\r\n return;\r\n }\r\n\r\n if (props.cartlines && page >= props.cartlines.length / pageLength) {\r\n page = props.cartlines.length / pageLength - 1;\r\n }\r\n\r\n let skip = page * pageLength;\r\n if (props.cartlines && props.cartlines.length >= skip) {\r\n setPaginationPage(page);\r\n let slice = props.cartlines?.slice(skip);\r\n setPaginatedView(slice.length >= pageLength ? slice.slice(0, pageLength) : slice);\r\n }\r\n};\r\n\r\n React.useEffect(() => {\r\n if (!advancedNotes)\r\n void getAdvancedNotes();\r\n }, [props.data])\r\n\r\n React.useEffect(() => {\r\n changePage(paginationPage);\r\n }, props.cartlines);\r\n\r\n const toggle = () => setClearCartModalActive(!clearCartModalActive);\r\n const renderClearCart = _renderClearCart(setClearCartModalActive, props.resources);\r\n\r\n let pagination = (\r\n \r\n );\r\n\r\n return (\r\n
\r\n {updatedTitle}\r\n
\r\n {props.orderSummaryLineitems?.orderTotal}\r\n
\r\n {renderOrderSummaryCheckoutButton(props)}\r\n {!props.cart?.hasInvoiceLine && props.promotionOptions && renderPromotions(props.promotionOptions)}\r\n {props.multiplePickUpEnabled ? renderCartLinesGroup(advancedNotes || [], isPrintView, props, props.resources, pagination, paginatedView) : renderCartlines(advancedNotes || [], isPrintView, props, props.cartlines,\r\n props.resources, props.storeSelector, props.waitingComponent, props.cartLoadingStatus, props.cartDataResult, pagination, paginatedView)}\r\n {props.orderSummaryHeading &&\r\n \r\n {printViewToggle}\r\n \r\n {props.orderSummaryHeading}\r\n {props.cart?.hasInvoiceLine ? renderInvoiceSummarylines(\r\n props.invoiceSummaryLineitems, props.OrderSummaryItems, props) : renderOrderSummarylines(\r\n props.orderSummaryLineitems, props.OrderSummaryItems, props)}\r\n {renderErrorBlock(props.OrderSummaryErrors)}\r\n \r\n {renderOrderSummaryCheckout(props, renderClearCart)}\r\n }\r\n {props.storeSelector}\r\n {_renderClearCartModal(handleClearCart, setClearCartModalActive, toggle, clearCartModalActive, props.resources)}\r\n
\r\n );\r\n};\r\n\r\nexport default CartView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport getAttributesForSelectedVariant, { AttributesForSelectedVariantInput } from './dataActions/get-attributes-for-selected-variant';\nimport ProductSpecification from './modules/product-specification/product-specification';\nimport ProductSpecificationView from './modules/product-specification/product-specification.view';\n\nexport * from './modules/product-specification/components/product-specification-table-stucture';\nexport * from './modules/product-specification/product-specification';\nexport * from './modules/product-specification/product-specification.data';\nexport * from './modules/product-specification/product-specification.props.autogenerated';\nexport * from './modules/product-specification/product-specification.view';\nexport { AttributesForSelectedVariantInput, getAttributesForSelectedVariant, ProductSpecification, ProductSpecificationView };\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address';\r\nimport { ICheckoutShippingAddressViewProps } from '@msdyn365-commerce-modules/address';\r\nimport { ICheckoutShippingAddressConfig, ICheckoutShippingAddressProps } from '../definition-extensions/checkout-shipping-address.ext.props.autogenerated';\r\n\r\ninterface IAddressAddUpdateExtProps extends IAddressAddUpdateProps {\r\n shipUsaOnlyMessageText: string;\r\n}\r\n\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return <>{item.description};\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Select Component.\r\n * @param param0 - Root param.\r\n * @param param0.SelectAddress - Select address.\r\n * @param param0.addButton - Add button.\r\n * @param param0.items - IAddressSelectItem[].\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns - SelectAddress Node.\r\n */\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n return (\r\n \r\n {addButton}\r\n {items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n \r\n {item.input}\r\n \r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Add Update Component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressForm - Address form.\r\n * @param param0.heading - Address heading.\r\n * @param param0.items - IAddressAddItem[].\r\n * @param param0.hasError - Boolean.\r\n * @param param0.error - Error message.\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns Address add update component node.\r\n */\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton,\r\n shipUsaOnlyMessageText\r\n}) => {\r\n return (\r\n \r\n {heading}\r\n {renderDeliveryLimitationMessage(shipUsaOnlyMessageText)}\r\n {items.map((item: IAddressAddItem) => {\r\n const { AddressItem, key, label, alert, input } = item;\r\n return (\r\n \r\n {label}\r\n {alert}\r\n {input}\r\n \r\n );\r\n })}\r\n {hasError && (\r\n \r\n {error.title}\r\n {error.message}\r\n \r\n )}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nconst renderDeliveryLimitationMessage = (shipUsaOnlyMessageText: string) => (\r\n
\r\n
\r\n \r\n {shipUsaOnlyMessageText}\r\n
\r\n
\r\n);\r\n\r\n/**\r\n * Checkout Shipping Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutShippingAddress Module.\r\n */\r\nconst CheckoutShippingAddressView: React.FC> = props => {\r\n const {\r\n CheckoutShippingAddress,\r\n checkoutErrorRef,\r\n alert,\r\n viewState,\r\n showAddress,\r\n showAddressSelect,\r\n showAddOrUpdateAddress,\r\n cartLineImages,\r\n resources\r\n } = props;\r\n\r\n return (\r\n \r\n {alert}\r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {viewState.isShowAddOrUpdateAddress && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { IB2bRequestsStatusViewProps } from '@msdyn365-commerce-modules/account-management';\nimport { Button, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { IB2bRequestsStatusProps, IB2bRequestsStatusResources } from '../definition-extensions/b2b-requests-status.ext.props.autogenerated';\n\n/**\n * B2b Request status View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from module file.\nconst B2bRequestsStatusView: React.FC> = props => {\n const { b2bRequestsStatus, heading, table } = props;\n const { continueShoppingButtonTitle } = props.resources;\n const initialCount = 0;\n\n if (props.data.operationRequests.result?.length === initialCount) {\n return (\n \n {heading}\n \n
\n

{props.resources.headingForEmptyRequestStatus}

\n

{props.resources.textForEmptyRequestStatus}

\n \n \n {continueShoppingButtonTitle}\n \n \n
\n
\n
\n );\n }\n return (\n \n {heading}\n {table}\n \n );\n};\n\nexport default B2bRequestsStatusView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IHeader,\n IList,\n IOrderHistoryViewProps,\n IOrderInformation,\n ISalesOrder\n} from '@msdyn365-commerce-modules/order-management';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\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 = ({\n deliveryProps,\n heading,\n count,\n processing,\n address,\n trackingInfo\n}) => (\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 {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 = ({\n salesOrderProps,\n orderInfomation,\n groups,\n orderDetailsLink,\n expandProductsButton\n}) => (\n \n {orderInfomation && }\n {groups && }\n {expandProductsButton}\n {orderDetailsLink}\n \n);\n\nexport const OrderHistoryList: React.FC = ({ listProps, salesOrders }) => (\n \n {salesOrders && salesOrders.map((salesOrder, index) => )}\n \n);\n\nconst OrderHistoryView: React.FC = ({\n orderHistoryProps,\n header,\n alert,\n loading,\n emptyMessage,\n backToShoppingLink,\n list,\n table,\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 {table}\n {moreButton && moreButton}\n \n);\n\nexport default OrderHistoryView;\n","import React from 'react';\r\n// import { ICartResources } from '../../definition-extensions/cart.ext.props.autogenerated';\r\n// import { ICheckoutResources } from '../../definition-extensions/checkout.ext.props.autogenerated';\r\n\r\n\r\ninterface ILinePaginationProps {\r\n nextPage: (e: React.MouseEvent) => void,\r\n prevPage: (e: React.MouseEvent) => void,\r\n changePage: (page: number) => void,\r\n currentPage: number,\r\n numPages: number,\r\n prev: string,\r\n next: string\r\n}\r\n\r\n/**\r\n * Renders pagination navigation on the page, which displays 4 buttons that allow\r\n * user to navigate to the first, last, next or previous pages. Also displays \r\n * the current page out of the total number of pages. ( ie. 5/7 )\r\n *\r\n * @param {(e: React.MouseEvent) => void} nextPage\r\n * @param {(e: React.MouseEvent) => void} prevPage\r\n * @param {(page: number) => void} changePage\r\n * @param {number} currentPage\r\n * @param {number} numPages\r\n * @param {ICartResources} resources\r\n * @return {*} {React.ReactNode}\r\n */\r\nexport const LinePagination : React.FC = ({\r\n nextPage,\r\n prevPage,\r\n changePage,\r\n currentPage,\r\n numPages,\r\n prev,\r\n next}) => {\r\n const firstPage: number = 1;\r\n \r\n return (\r\n \r\n
\r\n {numPages > 0 &&\r\n <>\r\n {/* {currentPage !== 0 && */}\r\n <>\r\n \r\n \r\n \r\n {/* } */}\r\n
\r\n \r\n {currentPage + 1} / {numPages}\r\n \r\n
\r\n {/* {currentPage !== numPages && */}\r\n <>\r\n \r\n \r\n \r\n {/* } */}\r\n \r\n }\r\n
\r\n )};\r\n \r\n ","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport QRCode from 'qrcode.react';\nimport * as React from 'react';\n\n/**\n * CheckInConfirmation component Properties.\n */\nexport interface ICheckInConfirmationProps {\n /**\n * The confirmation text to show.\n */\n confirmationText: string;\n\n /**\n * Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n */\n shouldShowQrCode: boolean;\n\n /**\n * The label shows for channel reference ID.\n */\n channelReferenceIdLabel: string;\n\n /**\n * The channel reference ID to show. When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n */\n channelReferenceId?: string;\n}\n\n/**\n * CheckInConfirmation component for showing confirmation information after check-in succeed.\n * @param confirmationProps - The confirmation properties.\n * @param confirmationProps.confirmationText - The confirmation text.\n * @param confirmationProps.shouldShowQrCode - Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n * @param confirmationProps.channelReferenceIdLabel - The label shows for channel reference ID.\n * @param confirmationProps.channelReferenceId - The channel reference ID to show.\n * When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n * @returns The check-in confirmation component.\n */\nexport const CheckInConfirmationComponent: React.FC = ({\n confirmationText,\n shouldShowQrCode,\n channelReferenceIdLabel,\n channelReferenceId\n}) => {\n return (\n
\n

{confirmationText}

\n {channelReferenceId && (\n

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

\n )}\n {channelReferenceId && shouldShowQrCode && (\n \n \n \n )}\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * Check-in error properties.\n */\nexport interface ICheckInErrorProps {\n errorMessage?: string;\n}\n\n/**\n * Check-in error.\n * @param errorProps - The error properties.\n * @param errorProps.errorMessage - The error message to show.\n * @returns The alert element showing check-in errors.\n */\nexport const CheckInErrorComponent: React.FC = ({ errorMessage }) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IDictionary } from '@msdyn365-commerce/core';\nimport { CommerceProperty, SalesOrdersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { CheckInConfirmationComponent } from './check-in-confirmation';\nimport { CheckInErrorComponent } from './check-in-error';\nimport { IAdditionalInformationKeysData, ICheckInForPickupConfig, ICheckInForPickupProps } from './check-in-for-pickup.props.autogenerated';\n\n/**\n * The interface representing a piece of additional information data.\n */\ninterface IAdditionalInformation {\n formKey: IAdditionalInformationKeysData;\n value: string;\n}\n\n/**\n * The state for check-in view.\n */\nexport interface ICheckInViewState {\n /**\n * If the module has header error to show.\n */\n isHeaderError: boolean;\n\n /**\n * If the customer has checked in.\n */\n isCheckedIn: boolean;\n\n /**\n * Additional information to capture.\n */\n additionalInformation: IDictionary[];\n}\n\n/**\n * The properties for check-in view.\n */\nexport interface ICheckInViewProps extends ICheckInForPickupProps {\n headerError: React.ReactNode;\n confirmationComponent: React.ReactNode;\n viewState: ICheckInViewState;\n additionalInformationValues: string[];\n checkInForOrderPickup(additionalInformation?: IAdditionalInformation[]): Promise;\n}\n\n/**\n * The state of the CheckInForPickup module.\n */\nexport interface ICheckInForPickupState {\n /**\n * The header error message.\n */\n headerErrorMessage: string;\n\n /**\n * If the customer has checked in successfully.\n */\n isCheckedIn: boolean;\n}\n\n/**\n *\n * CheckIn component.\n * @extends {React.Component, ICheckInForPickupState>}\n */\nclass CheckInForPickup extends React.Component, ICheckInForPickupState> {\n public constructor(props: ICheckInForPickupProps) {\n super(props);\n this.state = {\n headerErrorMessage: '',\n isCheckedIn: false\n };\n }\n\n public render(): JSX.Element | null {\n const isHeaderError: boolean = this.state.headerErrorMessage !== '';\n\n const viewProps = {\n ...this.props,\n headerError: ,\n confirmationComponent: (\n \n ),\n checkInForOrderPickup: this.checkInForOrderPickup,\n additionalInformationValues: this.props.config.additionalInformationKeys\n ? this.props.config.additionalInformationKeys.map(() => {\n return {};\n })\n : undefined,\n viewState: {\n isHeaderError,\n isCheckedIn: this.state.isCheckedIn\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public shouldComponentUpdate(nextProps: ICheckInForPickupProps, nextState: ICheckInForPickupState): boolean {\n if (\n this.props.config.additionalInformationHeading !== nextProps.config.additionalInformationHeading ||\n this.props.config.confirmationText !== nextProps.config.confirmationText\n ) {\n return true;\n }\n if (this.state.headerErrorMessage !== nextState.headerErrorMessage || this.state.isCheckedIn !== nextState.isCheckedIn) {\n return true;\n }\n return false;\n }\n\n public async componentDidMount(): Promise {\n await this._onInit();\n }\n\n /**\n * The async callback for submitting check-in.\n * @param additionalInformationList - The optional additional information captured.\n * @returns The async result.\n */\n public checkInForOrderPickup = async (additionalInformationList?: IAdditionalInformation[]): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query!.channelId, 10);\n const channelReferenceId: string = this.props.context.request.query!.channelReferenceId;\n const packingSlipId: string = this.props.context.request.query!.packingSlipId;\n\n const additionalInformationToSubmit: { formKey: string; value: string }[] | undefined = additionalInformationList?.map(\n additionalInformationKeyValuePair => {\n return {\n formKey: additionalInformationKeyValuePair.formKey.resourceId ?? '',\n value: additionalInformationKeyValuePair.value\n };\n }\n );\n const extensionPropertyList: CommerceProperty[] = [];\n if (!ObjectExtensions.isNullOrUndefined(additionalInformationToSubmit)) {\n for (const additionalInformation of additionalInformationToSubmit) {\n extensionPropertyList.push({\n Key: additionalInformation.formKey,\n Value: {\n StringValue: additionalInformation.value\n }\n });\n }\n }\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId,\n extensionPropertyList\n );\n } catch (error) {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false });\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n return Promise.resolve();\n };\n\n /**\n * The action performed on module initialization.\n * @returns The async result.\n */\n private readonly _onInit = async (): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query?.channelId ?? '', 10);\n const channelReferenceId: string | undefined = this.props.context.request.query?.channelReferenceId;\n const packingSlipId: string | undefined = this.props.context.request.query?.packingSlipId;\n if (Number.isNaN(channelId) || !channelReferenceId || !packingSlipId) {\n // No error message shown in editor mode.\n if (this.props.context.request.params.isEditor) {\n return Promise.resolve();\n } else if (this.props.context.request.params.isPreview) {\n this.setState({ headerErrorMessage: this.props.resources.requiredParameterMissingErrorMessage });\n } else {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage });\n }\n this.props.context.telemetry.error(\n 'One or more required URL parameters are missing. ' +\n 'Please make sure you have pass in channelId, channelReferenceId and packingSlipId through URL parameter.'\n );\n return Promise.resolve();\n }\n\n const { additionalInformationKeys } = this.props.config;\n\n const hasAdditionalInformation: boolean = ArrayExtensions.hasElements(additionalInformationKeys);\n\n // Call check-in-for-pickup directly if no additional information to capture.\n if (!hasAdditionalInformation) {\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId\n );\n } catch (error) {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false });\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n }\n return Promise.resolve();\n };\n}\n\nexport default CheckInForPickup;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IPasswordResetInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst PasswordResetInput: React.FC = ({ id, type, value, pattern, className, maxLength, onChange }) => (\n \n);\n\nexport default PasswordResetInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst PasswordResetButton: React.FC = ({ id, className, text, ariaLabel, disabled, telemetryContent, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default PasswordResetButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { FormBuilder } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckInViewProps } from './check-in-for-pickup';\n\n/**\n * The check-in view for submitting check-in, capturing additional information, and showing check-in confirmation.\n * @param props - The check-in view properties.\n * @returns The check-in view as a react component.\n */\nconst CheckInViewComponent: React.FC = (props: ICheckInViewProps) => {\n const { headerError, checkInForOrderPickup, confirmationComponent, viewState } = props;\n return (\n <>\n {viewState.isHeaderError && headerError}\n {!viewState.isHeaderError && ArrayExtensions.hasElements(props.config.additionalInformationKeys) && (\n \n )}\n {!viewState.isHeaderError &&\n !ArrayExtensions.hasElements(props.config.additionalInformationKeys) &&\n viewState.isCheckedIn &&\n confirmationComponent}\n \n );\n};\n\nexport default CheckInViewComponent;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-add';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-select';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-show';\r\nimport { ICheckoutShippingAddressViewProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/./checkout-shipping-address';\r\nimport GetProductEligibilityAction, {\r\n GetProductEligibilityInput\r\n} from \"../../../actions/get-product-eligibility.action\";\r\nimport { CommercePropertyValueEnum } from \"../../../modules/allowable-freight/utils/CommercePropertyValueEnum\";\r\nimport { CommerceProperty } from \"@msdyn365-commerce/retail-proxy\";\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({\r\n AddressDetail,\r\n items\r\n}) => {\r\n\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return (\r\n <>\r\n {item.description}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Select Component.\r\n * @param param0 - Root param.\r\n * @param param0.SelectAddress - Select address.\r\n * @param param0.addButton - Add button.\r\n * @param param0.items - IAddressSelectItem[].\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns - SelectAddress Node.\r\n */\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {addButton}\r\n {items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n {item.input}\r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Add Update Component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressForm - Address form.\r\n * @param param0.heading - Address heading.\r\n * @param param0.items - IAddressAddItem[].\r\n * @param param0.hasError - Boolean.\r\n * @param param0.error - Error message.\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns Address add update component node.\r\n */\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {heading}\r\n {items.map((item: IAddressAddItem) => {\r\n const { AddressItem, key, label, alert, input } = item;\r\n return (\r\n {label}\r\n {alert}\r\n {input}\r\n );\r\n })}\r\n {hasError && \r\n {error.title}\r\n {error.message}\r\n }\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Checkout Shipping Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutShippingAddress Module.\r\n */\r\nconst CheckoutShippingAddressView: React.FC = props => {\r\n const { CheckoutShippingAddress, viewState, showAddress, showAddressSelect, showAddOrUpdateAddress, cartLineImages } = props;\r\n const address = props.data.checkout.result?.shippingAddress;\r\n const [ nonEligibleItems, setnonEligibleItems ] = React.useState([]);\r\n React.useEffect(() => {\r\n void checkEligibilityForShippingAddress();\r\n }, [address])\r\n React.useEffect(() => {\r\n props.moduleState.setHasError(true);\r\n }, [])\r\n\r\n const _getExtensionPropertyValueByKey = (\r\n properties: CommerceProperty[] | undefined,\r\n key: string,\r\n valueType: CommercePropertyValueEnum\r\n ) => {\r\n const property = properties?.find(p => p.Key === key)?.Value;\r\n\r\n // eslint-disable-next-line security/detect-object-injection\r\n const val = property ? property[valueType] : null;\r\n return val;\r\n };\r\n\r\n\r\n const checkEligibilityForShippingAddress = async () => {\r\n const notEligibleList: string[] = [];\r\n const cart = props.data.checkout.result?.checkoutCart?.cart;\r\n if (cart && address) {\r\n const itemIds = cart.CartLines?.map(cl => cl.ItemId!) || [];\r\n const addressCountry = address.ThreeLetterISORegionName || null;\r\n const addressState = address.State || null;\r\n const addressRegion = address.County || null;\r\n const input = new GetProductEligibilityInput(itemIds, true, cart.Id || '', addressCountry, addressState, addressRegion);\r\n const eligibilityData = await GetProductEligibilityAction(input, props.context.actionContext);\r\n if (eligibilityData.length) {\r\n eligibilityData.forEach((i: any) => {\r\n const id = _getExtensionPropertyValueByKey(i.ExtensionProperties, 'ItemId', CommercePropertyValueEnum.string);\r\n if (!i.IsEligible) {\r\n notEligibleList.push(id as string);\r\n }\r\n });\r\n }\r\n }\r\n setnonEligibleItems(notEligibleList);\r\n props.moduleState.setHasError(notEligibleList.length > 0);\r\n }\r\n\r\n const renderCartError = () => {\r\n if (!nonEligibleItems.length) {\r\n return null;\r\n }\r\n return (\r\n
\r\n

\r\n The following items are not eligible for your current shipping address. Please remove them from the cart or change your address:\r\n

\r\n {nonEligibleItems.map(i => {\r\n const item = getCartLineFromItemId(i);\r\n return

{item?.ItemId} - {item?.Description}

\r\n })}\r\n \r\n
\r\n )\r\n }\r\n\r\n const removeIneligibleItems = async () => {\r\n const cartState = props.data.cart.result;\r\n const checkoutState = props.data.checkout.result;\r\n const badCartLines: string[] = [];\r\n cartState!.cart.CartLines!.forEach(cl => {\r\n if (nonEligibleItems.includes(cl.ItemId!)) {\r\n badCartLines.push(cl.LineId!);\r\n }\r\n })\r\n await checkoutState!.checkoutCart.removeCartLines({cartLineIds: badCartLines});\r\n await cartState!.removeCartLines({cartLineIds: badCartLines});\r\n window.location.reload();\r\n }\r\n\r\n const getCartLineFromItemId = (itemId: string) => props.data.checkout.result?.checkoutCart.cart.CartLines?.find(i => i.ItemId === itemId)\r\n return (\r\n \r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {viewState.isShowAddOrUpdateAddress && }\r\n {renderCartError()}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IPasswordResetLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst PasswordResetLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default PasswordResetLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IPasswordResetLoadingIcon {\n className: string;\n}\n\nconst PasswordResetLoadingIcon: React.FC = ({ className }) =>
;\n\nexport default PasswordResetLoadingIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IContentBlockAdditionalContentItemViewProps, IContentBlockAdditionalContentViewProps } from './components/additional-content';\nimport { IContentBlockViewProps } from './content-block';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IContentBlockAdditionalContentViewProps) => {\n return (\n \n {additionalContent.additionalContentItems?.map((item: IContentBlockAdditionalContentItemViewProps) => {\n return (\n <>\n {item.heading}\n \n {item.text}\n {item.links}\n \n \n );\n })}\n \n );\n};\n\nconst ContentBlockView: React.FC = props => {\n const {\n contentBlockContainer,\n imageContainer,\n detailsContainer,\n title,\n text,\n links,\n image,\n contentBlockAnchorTag,\n imageLink,\n imageAriaLabel,\n additionalContent\n } = props;\n\n if (imageLink) {\n return (\n \n \n {image}\n \n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n }\n return (\n \n {image}\n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n};\n\nexport default ContentBlockView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport {\n IMediaGalleryThumbnailItemViewProps,\n IMediaGalleryThumbnailsViewProps,\n IMediaGalleryViewProps\n} from '@msdyn365-commerce-modules/media-gallery';\nimport { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, KeyCodes, Module, Node, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\n/**\n * Render the thumbnail item images.\n * @param thumbnail - The carousel thumbnail line props.\n * @returns Return HTML having thumnailcontainer props with image.\n */\nconst renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\n\n return {Picture};\n};\n\n/**\n * Gets the thumbnail item to display media gallery images.\n * @param image - The media gallery images.\n * @param imageSettings - Image settings for the image gallery items.\n * @param imageId - Image id.\n * @param modifiedActiveIndex - Modified Index of the images when selection changes.\n * @param props - The Media gallery view props from business layer.\n * @returns Return thumbnail view props which will be used to render images.\n */\nconst GetThumbnailItemComponent = (\n image: IImageData,\n imageSettings: IImageSettings,\n imageId: number,\n modifiedActiveIndex: number,\n props: IMediaGalleryViewProps\n): IMediaGalleryThumbnailItemViewProps => {\n let fallbackImage: string | undefined = '';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Site level config can be of any type.\n const emptyPlaceHolderImage = props.context.app.config?.placeholderImageName as string;\n if (props.data.product.result) {\n fallbackImage = getFallbackImageUrl(\n props.data.product.result.ItemId,\n props.context.request.apiSettings,\n props.context.request.app?.config?.OmniChannelMedia\n );\n }\n if (emptyPlaceHolderImage && fallbackImage) {\n fallbackImage = `${fallbackImage},${emptyPlaceHolderImage}`;\n }\n\n /**\n * OnClick method of media gallery item.\n */\n const onClick = () => {\n props.callbackToggle?.();\n props.callbackThumbnailClick?.(imageId);\n props.state.activeIndex = imageId;\n };\n\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === imageId ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n /**\n * Keydown event of media gallery item.\n * @param event - React.KeyboardEvent.\n */\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCodes.Enter) {\n event.preventDefault();\n onClick();\n }\n };\n const defaultIndex = 0;\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'presentation',\n key: imageId\n },\n Picture: (\n \n \n \n \n \n \n \n \n )\n };\n};\n\n/**\n * Gets the empty thumbnail item to display media gallery images.\n * @param imageSettings - Image settings for the image gallery items.\n * @param props - The Media gallery view props from business layer.\n * @returns Return thumbnail view props which will be used to render empty images.\n */\nconst GetEmptyThumbnailItemComponent = (\n imageSettings: IImageSettings,\n props: IMediaGalleryViewProps\n): IMediaGalleryThumbnailItemViewProps => {\n let fallbackImage: string | undefined = '';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Site level config can be of any type.\n const emptyPlaceHolderImage = props.context.app.config?.placeholderImageName as string;\n if (props.data.product.result) {\n fallbackImage = getFallbackImageUrl(\n props.data.product.result.ItemId,\n props.context.request.apiSettings,\n props.context.request.app?.config?.OmniChannelMedia\n );\n }\n if (emptyPlaceHolderImage && fallbackImage) {\n fallbackImage = `${fallbackImage},${emptyPlaceHolderImage}`;\n }\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: 'ms-media-gallery__thumbnail-item',\n role: 'tab',\n tabIndex: 0,\n key: 0,\n 'aria-label': '',\n 'aria-selected': true\n },\n Picture: (\n \n )\n };\n};\n\n/**\n * Update media gallery items method.\n * @param items - The media gallery thumbnail item view props.\n * @returns The IImageData array.\n */\nconst getMediaGalleryItems = (items?: IMediaGalleryThumbnailItemViewProps[]): IImageData[] | undefined => {\n return items?.map(item => {\n return {\n altText: item.Picture.props.altText,\n src: item.Picture.props.src\n };\n });\n};\n\nconst defaultThumbnailImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=295&h=295&q=80&m=6&f=jpg', w: 295, h: 295 },\n xl: { q: 'w=295&h=295&q=80&m=6&f=jpg', w: 295, h: 295 }\n },\n lazyload: true,\n cropFocalRegion: true\n};\n\n/**\n * Render the Media gallery thumbnails to represent images in grid view.\n * @param thumbnails - The thumbnail view props.\n * @param props - The media gallery view props.\n * @returns - The single slide carousel component to render as media gallery image.\n */\nconst renderThumbnails = (thumbnails: IMediaGalleryThumbnailsViewProps, props: IMediaGalleryViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps } = thumbnails;\n const { state, Thumbnails } = props;\n const mediaGalleryItems = getMediaGalleryItems(Thumbnails.items);\n\n const items: IMediaGalleryThumbnailItemViewProps[] | undefined =\n // eslint-disable-next-line multiline-ternary -- need multiline for easy code reading\n state.lastUpdate && mediaGalleryItems && mediaGalleryItems[0].src === 'empty'\n ? [GetEmptyThumbnailItemComponent(defaultThumbnailImageSettings, props)]\n : // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery\n mediaGalleryItems?.map((item: IImageData, id: number) =>\n GetThumbnailItemComponent(item, defaultThumbnailImageSettings, id, state.activeIndex, props)\n );\n\n return (\n \n {items?.map(renderThumbnailItem)}\n \n );\n};\n\n/**\n * Render the Media gallery items using viewprops.\n * @param props - The media gallery view props.\n * @returns The media gallery module wrapping up images node.\n */\nconst mediaGalleryView: React.FC = props => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from media-gallery.tsx file\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\n return (\n \n \n {Modal}\n {renderThumbnails(Thumbnails, props)}\n \n );\n};\n\nexport default mediaGalleryView;\n"],"sourceRoot":""}