{"version":3,"sources":["webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/zoom-image/ZoomImage.tsx?3088","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/table/Table.tsx?8faf","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/progress/Progress.tsx?fbb5","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/tooltip/UncontrolledTooltip.tsx?30ec","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/slider/SliderThumb.tsx?5d3f","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/slider/Slider.tsx?bb4c","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/table/checkbox.tsx?36f8","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/wrapper/node.tsx?cdf8","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/waiting/Waiting.tsx?ba13","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/tooltip/Tooltip.tsx?8355","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/popover/index.ts?bf24","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/collapse/Collapse.tsx?27f6","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/button/Button.tsx?457f","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/index.ts?5680","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/popup-products/Popup-products.tsx?2288","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/common/KeyCodes.ts?0c24","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/labeled-dropdown/LabeledDropdown.tsx?ab7c","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/wrapper/module.tsx?dadb","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/isMobile/isMobile.props.ts?d9d2","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/quantity/Quantity.tsx?b66b","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/incremental-quantity/index.ts?6ddc","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/price/price-editor-mode-selection.tsx?3c70","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/price/price-editor.tsx?ca15","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/pagination/PaginationLink.tsx?b97e","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/zoom-image/ImagefullView.tsx?adc9","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/flipper/Flipper.tsx?36cd","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/table/index.ts?75ef","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/isMobile/isMobile.tsx?1fd3","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/incremental-quantity/IncrementalQuantity.tsx?1af1","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/drawer/Drawer.tsx?da2c","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/popup/Popup.tsx?0173","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/heading/Heading.tsx?c36b","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/popper-content/PopperContent.tsx?1148","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/fade/Fade.tsx?31ba","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/common/telemetryHelper.ts?068b","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/alert/Alert.tsx?44c5","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/back-to-top/BackToTop.tsx?0cf6","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/single-slide-carousel/SingleSlideCarousel.tsx?b47d","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/quantity/index.ts?f7b4","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/drawer/ControlledDrawer.tsx?9a39","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/common/utilities.ts?93e6","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/pagination/PaginationItem.tsx?6f25","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/form-builder/form-builder.tsx?c7f3","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/common/stringExtensions.ts?f421","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/pagination/UncontrolledPagination.tsx?4877","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/pagination/Pagination.tsx?ebf9","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/popover/Popover.tsx?3cf4","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/modal/Portal.tsx?c937","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/modal/Modal.tsx?7d4b","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/modal/ModalBody.tsx?c097","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/modal/ModalFooter.tsx?8e31","webpack:///./node_modules/@msdyn365-commerce-modules/utilities/src/modal/ModalHeader.tsx?627d"],"names":["removeInlineZoomStyle","zoomedImages","document","body","getElementsByClassName","zoomedImagesArray","Array","from","item","style","width","height","defaultDataScale","onMouseOutLensContainer","event","zoomLens","currentTarget","visibility","classList","remove","zoomedImageContainer","querySelector","getCenter","size","x","y","getLensPosition","cursorPosition","lensSize","originalSize","lensCenter","position","maxPositionX","Math","min","max","maxPositionY","getCursorPosition","element","containerBoundingRect","getBoundingClientRect","pageX","left","window","pageXOffset","pageY","top","pageYOffset","formatPixelsValue","numericValue","handleInlineStyles","zoomedImage","dataScaleText","removeAttribute","imageElement","parentElement","previousElementSibling","dataScale","Number","imageContainerSize","offsetWidth","offsetHeight","zoomedImageSize","opacity","imageCenter","offset","scaledCursorPosition","zoomedImagePosition","inlineZoomInitClick","type","zoomImg","nextElementSibling","handleMouseMovementInContainerZoom","lens","zoomedContainer","createElement","setAttribute","appendChild","getAttribute","displayedImageSize","imageInitialHeight","naturalHeight","imageInitialWidth","naturalWidth","imageContainerHeight","widthScaleRatio","heightScaleRatio","scaleRatio","getDisplayedImageSize","lensPosition","mainImageSource","backgroundImage","offsetCenter","lensScaledPositionX","lensScaledPositionY","backgroundPositionX","backgroundPositionY","backgroundSize","topPosition","onMouseOverImageContainer","add","onMouseMoveLensContainer","onContainerZoomInit","containerDiv","inlineZoomImageOnMouseMove","inlineZoomImageOnMouseOut","inlineZoomImageOnHover","scale","zoomedImg","removeContainerZoomStyle","TableDataType","Table","React","PureComponent","constructor","props","super","componentClassName","headingPrefix","capitalizeHeadingPrefix","_selectSortingKey","target","columnName","sortingKey","ascendingOrder","this","state","newOrder","setState","showActions","_onCheckBoxChangeHandler","rows","checkBoxCallback","index","ObjectExtensions","isNumber","isSelected","_renderHeadingRow","columnData","resources","showCheckBoxes","enableToModify","minifyActions","actionLinkText","isSortable","resourcePrefix","isSingleSelectOnly","businessUserSelectCheckBoxAriaLabelText","sortByAscending","sortByDescending","sortingClassName","sortingValue","columns","map","data","cellIndex","updatedCellIndex","heading","name","columnSortValue","undefined","columnAriaLabel","ariaLabel","format","sortable","onClick","onKeyUp","_handleKeyPressPrev","className","classnames","key","scope","role","tabIndex","trim","radioCheckBox","CheckBoxButton","onChange","actionContent","tableCell","header","content","_renderRow","excludedColumns","actions","formatPrice","rowsData","additionalNameAriaLabel","row","value","toString","cell","includes","id","extraClass","Price","cellContent","columnSpecificClass","rowKey","selectedIndex","actionButtons","_renderActions","buttonReferences","records","buttonReference","editLinkText","deleteLinkText","viewLinkText","editLinkTooltip","deleteLinkTooltip","viewLinkTooltip","actionLinkTooltip","minifiedButtonText","onEdit","onDelete","onView","handleClickEdit","edit","current","handleClickDelete","delete","handleClickView","Node","Button","innerRef","title","_toggleActions","newKey","_sortTableRow","table","sortingkey","sort","userOne","userTwo","userOneData","find","userTwoData","cleanFirst","toLowerCase","cleanSecond","_getCurrentPageData","tableRows","start","end","result","i","push","colSpan","_renderPrev","paginationPreviousText","_renderNext","paginationNextText","keyCode","KeyCodes","Enter","Space","headings","render","showPagination","paginationProperty","classname","paginationLinks","skipCount","itemPerPage","nextText","prevText","paginationText","url","UncontrolledPagination","qsp","items","length","itemsPerPage","startingItem","previousText","previousAriaLabel","nextAriaLabel","tableBody","tableHead","Progress","percent","defaultProps","UncontrolledTooltip","isOpen","_toggle","bind","_isAutoDisplayTriggered","isCartPage","StringExtensions","isNullOrWhitespace","cartPageUrl","location","shouldShowMiniCart","Tooltip","Object","toggle","previousState","SliderThumb","sliderButtonRef","sliderThumbClass","trackThumbClass","ref","onMouseDown","handleStart","onMouseUp","handleEnd","onTouchMove","handleDrag","onTouchEnd","onKeyDown","handleKeydown","onFocus","handleFocus","onBlur","handleBlur","showTooltip","placement","tooltip","handleTooltipText","sliderValue","orientations","horizontal","dimension","direction","coordinate","vertical","EventType","Slider","thumb1Ref","thumb2Ref","_renderLabels","labels","label","labelId","labelPositioning","labelString","_renderSliderThumbs","thumbStyles","isMobileCheck","isMobile","variant","VariantType","Browser","context","gridSettings","xs","w","sm","md","lg","xl","isMobileView","sliderAriaLabelMin","sliderThumbs","sliderAriaLabelMax","isRangeSlider","step","orientation","_handleOnChange","_handleStart","_handleDrag","_handleEnd","ariaValueText","_handleUpdate","dimensionStr","toUpperCaseFirstChar","sliderPos","handlePos","limit","grab","e","stopPropagation","eventType","addEventListener","castTarget","thumbid","_prevState","active","_getThumbAndPublishEvent","Start","_position","castEvent","node","coordinateStyle","directionStyle","clientCoordinateStyle","touches","pos","_getValueFromPosition","_getPositionFromValue","percentage","round","clamp","baseVal","_coordinates","fill","handle","_setSliderValue","sliderThumb","Change","_publishNotification","thumb","delegate","slider","firstThumbValue","secondThumbValue","NaN","nativeEventType","elmenentId","replace","_getThumbFromProps","End","onChangeEnd","onChangeStart","_willThumbsCrossOver","_handleOnClick","MsDyn365","isBrowser","shouldSliderAdjustToRTL","nextState","componentDidMount","componentDidUpdate","shouldComponentUpdate","nextProps","_nextState","shouldRender","thumb1Position","thumb2Position","componentWillUnmount","removeEventListener","sliderClass","sliderBaseClass","sliderId","camelCasedDirection","positionThumb1","coordsThumb1","fillStyle","handleStyle","trackProgressClass","sliderKey","String","positionThumb2","coordsThumb2","showProgressBar","fillTrackValue","showLabels","castThumb","thumbId","thumbPressed","thumb1","thumb2","thumbInteractedWith","parseInt","thumbFound","filter","keycode","checkCondition","inForm","isChecked","cssClass","checked","tag","Tag","Element","restAttribute","Waiting","watingClassName","DEFAULT_DELAYS","show","hide","addTargetEvents","handleDocumentClick","removeTargetEvents","onMouseOverTooltip","onMouseLeaveTooltip","onMouseOverTooltipContent","onMouseLeaveTooltipContent","onFocusOutTarget","onEscKeyDown","onEscKeyDownNative","tabPressed","getTargetElement","getElementsByTagName","bodyClasses","attributes","getNamedItem","removeNamedItem","clearHideTimeout","clearShowTimeout","hideTimeout","showTimeout","setTimeout","getDelay","nativeEvent","nextFocus","activeElement","contains","delay","isNaN","ariaAttr","createAttribute","setNamedItem","clearTimeout","trigger","triggers","split","forEach","displayMode","disabled","preventDefault","cssModule","placementPrefix","hideArrow","innerClassName","modifiers","boundariesElement","arrowClassName","classes","mapToCssModules","classNames","popperClasses","PopperContent","shouldShowCloseButton","onMouseOver","onMouseLeave","Collapse","_transitionStatusToClassHash","entering","entered","exiting","exited","_tagRef","_updateParentElement","minHeight","_onEntering","_onExit","_onExited","_onExiting","_reevaluateHeight","children","navbar","in","collapseIn","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited","otherProps","transitionProps","Transition","TransitionTimeouts","status","collapseClass","_getTransitionClass","firstElementChild","scrollHeight","isAppearing","block","color","outline","href","PopupProducts","popupProps","processStatusClass","dialogStrings","text","modalOpen","setModalOpen","closeModal","Modal","onClosed","ModalHeader","ModalBody","closeWindowButtonText","LabeledDropdown","_onSelectOption","selectedKey","selectedOption","keys","dropdownOptions","option","indexOf","labelText","labelClassname","dropdownId","dropdownClassname","labelClassNames","dropdownClassNames","_getSelectedIndex","htmlFor","selected","controlledByParent","onSelectOption","selectedOptions","toggleColor","Module","moduleProps","renderModuleAttributes","Quantity","inputRef","_validateMin","minValue","currentInput","currentCount","_handleChange","currentValue","pattern","inputQuantityAriaLabel","inputElement","HTMLInputElement","debounce","PriceEditorModeSelectionState","getPriceEditorModeSelectionStateResources","modeState","full","payFullAmountButtonText","partial","specifyAmountButtonText","Error","onClickHandler","handleStateChange","togglePopoverHandler","setPopoverState","isPopoverState","PriceEditorModeSelectionComponent","popoverReference","createRef","isPopoverShown","setIsPopoverShown","useState","setModeState","currentState","onChangeMode","clickedState","onStateChanged","Popover","EnumExtensions","getEnumValues","stateStringRepresentation","renderModeStateItem","PriceEditor","_handleInputFocus","isInputFocused","_handleInputBlur","_handleEditorModeStateChange","newState","_updateAmount","maximumValue","_inputRef","focus","newAmount","handleChange","parseFloat","toFixed","_precision","isNullOrUndefined","minimumValue","defaultValue","defaultAmount","hasMultipleModes","mode","formattedValue","editedValue","priceEditorInputAriaLabel","PaginationLink","payLoad","getPayloadObject","telemetryContent","next","previous","etext","paginationLinkclasses","defaultCaret","isArray","contentAction","attribute","getTelemetryAttributes","ImagefullView","galleryCarousel","modalWindow","autoFocus","applicationNode","modalIsOpen","ontoggle","zIndex","modalHeader","cloneElement","Flipper","telemetryLabel","glyphProps","displayTooltip","sizeClass","innerWidth","Viewport","device","Type","IncrementalQuantity","_handleUpdateState","_minValue","isUpdating","_onIncrement","_onDecrement","IncrementalQuantity_1","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","decrementDisabled","isGiftCard","incrementDisabled","TelemetryConstant","DecrementQuantity","decrementAttributes","IncrementQuantity","incrementAttributes","ariaLablelText","extraClassDecrement","extraClassIncrement","decrementButtonAriaLabel","incrementButtonAriaLabel","invokeCallback","currQuantity","updatedQuantity","observer","Drawer","isManuallyToggled","collapseProps","buttonText","drawerGlyphClass","toggleGlyphClassName","animateGlyph","drawerOpenGlyph","openGlyph","closeGlyph","drawerCloseGlyph","drawerClass","toggleButtonProps","_generateDrawerButtonInnerMarkup","collapseState","drawerButtonTextClass","toggleButtonClassName","glyphPlacement","toggleButtonText","_generateGlyphMarkup","glyphClass","onToggle","innerText","Popup","imageSettings","product","price","productQuantity","priceComponent","navigationUrl","ContinueShopping","continueShoppingAttribute","ViewBagAndCheckout","viewBagAttribute","fallbackImageUrl","getFallbackImageUrl","ItemId","actionContext","requestContext","apiSettings","cropFocalRegion","quantity","itemsString","headerItemOneText","headerItemFormatText","shouldDisplayUnitOfMeasure","app","config","unitOfMeasureDisplayType","reducedDimensions","Dimensions","reduce","str","productDimension","DimensionValue","Value","headerMessageText","Image","src","PrimaryImageUrl","fallBackSrc","altText","Name","loadFailureBehavior","DefaultUnitOfMeasure","goToCartText","continueShoppingText","Heading","headingTag","HTag","_handlePlacementChange","_handleProps","prevProps","_renderChildren","container","_show","_hide","flip","fallbackPlacement","focusOut","arrowClassNameOrUndefined","attrs","popperClassName","extendedModifiers","enabled","behavior","preventOverflow","update","order","fn","targetElement","ReactPopper","component","display","Arrow","Fade","baseClass","baseClassActive","fadeIn","timeoutOrUndefined","addEndListener","baseClassAlways","baseClassActiveAlways","isActive","getTelemetryObject","pageName","moduleName","telemetry","recid","contentCategory","pgname","mname","etype","contentData","setTelemetryAttribute","onTelemetryClick","linkText","logEvent","TelemetryEvent","Custom","Alert","closeClassName","transition","fade","assertive","includeAlertClass","closeClasses","alertTransition","buttonId","innerContent","closeAriaLabel","BackToTop","_renderHeading","Msdyn365","editProps","_reevaluatePosition","_scrollToTop","threshold","delayInMs","scrollStepInPx","_scrollStep","documentElement","scrollTop","clearInterval","intervalId","scrollTo","setInterval","innerHeight","clientHeight","tabIndexValue","SingleSlideCarousel","carouselSize","slideSize","itemSize","flipperNextLabel","flipperPrevLabel","_onResized","_onCarouselResized","_nextSlide","_previousSlide","_handleTouchStart","_handleTouchEnd","_onFocus","showPrevious","showNext","slideRef","itemRef","parentId","scrollThreshold","touchScrollThreshold","carousel","slide","_setSizes","_updateFlippers","resizeThrottledEventHandler","addThrottledEvent","isVert","slidePositionStyle","modifiedChildren","_getClonedChildren","carouselClass","carouselSlideClass","overflowClass","previousFlipperGlyph","nextFlipperGlyph","previousFlipperClassName","nextFlipperClassName","disableClassName","onTouchStart","useTabList","child","castChild","verticalItemsSelector","itemsSelector","_moveSingleSlide","evt","scrollStart","screenY","screenX","changedTouches","delta","currentOffset","getCSS","maxScrollCount","floor","directionModifier","maxScrollDistance","distanceToEdge","abs","scrollWidth","_calculateCarouselSize","carouselStyle","getComputedStyle","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","clientWidth","_canScrollPrevious","_canScrollNext","_scrollItemIntoView","offsetTop","offsetLeft","updateOffset","scrollLeft","ControlledDrawer","isExpanded","Expand","_generateTitle","isStart","additionalClassName","titleLClassName","onTextChange","charAt","toUpperCase","substr","property","createThrottledEvent","listener","timer","last","now","Date","throttledEventHandler","c","join","canUseDOM","getTarget","selection","querySelectorAll","console","error","findDOMElements","isRef","isElement","Carousel","focusableElements","PaginationItem","paginationItemClasses","FormBuilderErrorComponent","errorMessage","FormBuilder","_onSubmit","async","formData","formKey","values","resourceId","resourceValue","onSubmit","isSubmitted","_onInputChange","changedValueIndex","Promise","reject","currentKey","requiredValueMissing","setValue","isRequired","resolve","Dictionary","confirmationComponent","submitButtonText","requiredValueMissingErrorMessage","every","ArrayExtensions","hasElements","autoComplete","getValue","required","isAnyRequiredValueMissing","getValues","findIndex","isMissing","formatSpecifier","parameters","match","isNullOrWhiteSpace","activePage","maxPages","ceil","qsps","splitUrl","secondSplit","hash","parsedQsps","qspPair","baseUrl","listClassName","listTag","ListTag","activeQsp","paginationClasses","listpaginationClasses","_generatePageLinks","_generateUrl","page","qspUrl","_generatePaginationArrow","disable","tooltipId","nextId","prevId","ariaDescribedBy","nextAreaDescribed","prevAreaDescribed","_generatePaginationItem","_generateEllipse","leftDistance","rightDistance","leftEllipse","pagesDisplayed","rightEllipse","pages","displayedPagesOnLeft","startingIndex","endIndex","Pagination","popover","_addTargetEvents","_handleDocumentClick","_removeTargetEvents","getRef","_focusOutTarget","_focusOutPopover","_keyDown","Portal","defaultNode","createPortal","mounted","_getFocusableChildren","_handleBackdropClick","_handleBackdropMouseDown","_handleEscape","_handleTab","_onOpened","_onClosed","wasOpen","mouseDownElement","_open","HTMLElement","_close","_prevProps","prevState","shouldUpdateFocusToFirstElement","focusableElementArr","componentWillReceiveProps","wrapClassName","modalClassName","backdropClassName","contentClassName","modalTransition","backdropTransition","backdrop","onOpened","external","verticalPosition","horizontalPosition","keyboard","returnFocusRef","ariaLabelledbyId","dialogAttributes","modalAttributes","modalTransitions","backdropTransitions","Backdrop","dialogBaseClass","dialogClasses","dialog","openCount","scrollY","scrollbarWidth","right","removeProperty","modalOpenClassName","modalOpenClassNameRegex","RegExp","_getFocusedChild","focusableChildren","which","totalFocusable","currentFocus","focusedIndex","el","shiftKey","ModalFooter","closeButton","wrapTag","closeButtonLabel","WrapTag"],"mappings":"6dAQO,SAASA,IACZ,MAAMC,EAA0CC,SAASC,KAAKC,uBAAuB,6BAG/EC,EAAoBC,MAAMC,KAAKN,GACrC,IAAK,MAAMO,KAAQH,EACfG,EAAKC,MAAMC,MAAQ,IACnBF,EAAKC,MAAME,OAAS,IAOrB,MAAMC,EAAmB,EAMzB,SAASC,EAAwBC,GACpC,MAAMC,EAAWD,EAAME,cACvBD,EAASN,MAAMQ,WAAa,SAC5BF,EAASG,UAAUC,OAAO,wCAE1B,MAAMC,EAAuBlB,SAASC,KAAKkB,cAA8B,6BACrED,IACAA,EAAqBX,MAAMQ,WAAa,UAuDhD,SAASK,EAAUC,GAEf,MAAO,CACHC,EAAGD,EAAKb,MAFU,EAGlBe,EAAGF,EAAKZ,OAHU,GAc1B,SAASe,EAAgBC,EAA2BC,EAAiBC,GACjE,MAAMC,EAAaR,EAAUM,GAEvBG,EAAsB,CACxBP,EAAGG,EAAeH,EAAIM,EAAWN,EACjCC,EAAGE,EAAeF,EAAIK,EAAWL,GAK/BO,EAAeH,EAAanB,MAAQkB,EAASlB,MACnDqB,EAASP,EAAIS,KAAKC,IAAID,KAAKE,IAAIJ,EAASP,EAFnB,GAEqCQ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AAYA,GACRA,mBACAA,iBACAA,sBACAA,sBACAA,oBACAA,kBACAA,sBACAA,4BACAA,wBACAA,sBACAA,wBACAA,4BACAA,kBACAA,oBACAA,8BACAA,0BACAA,gCACAA,8BACAA,sBACAA,wBACAA,wBACAA,wBACAA,0BACAA,2BACAA,yBACAA,yBACAA,kCACAA,oCACAA,qCACAA,oBACAA,0BACAA,0BACAA,0BACAA,0BACAA,2BACAA,2BACAA,2BACAA,2BACAA,2BACAA,2BACAA,yCACAA,iCACAA,mCACAA,+BACAA,qCACAA,+BACAA,+BACAA,+BACAA,+BACAA,+BACAA,+BACAA,+BACAA,+BACAA,+BACAA,iCACAA,iCACAA,iCACAA,qCACAA,yCACAA,yCACAA,2CACAA,6CACAA,2BACAA,iCACAA,uBACAA,yBACAA,uBACAA,uBACAA,qCACAA,uBACAA,6BACAA,6BACAA,6BACAA,6BACAA,iDACAA,+CACAA,iDACAA,mDACAA,uCACAA,2CACAA,2CACAA,6CACAA,uCACAA,qCACAA,uDACAA,yDACAA,2DACAA,+DACAA,iEACAA,+DACAA,6DACAA,iEACAA,mEACAA,iEACAA,mCACAA,+BACAA,qCACAA,uBAlGJ,CAAYA,MAAQ,M,kCCApB,uEAYe,MAAMyU,UAAwBtd,gBAKzCE,YAAYC,GACRC,MAAMD,GACNU,KAAK0c,gBAAkB1c,KAAK0c,gBAAgB1S,KAAKhK,MACjD,MAAM2c,EAAc3c,KAAKV,MAAMsd,eAAe/Z,IACxCga,EAAO7c,KAAKV,MAAMwd,gBAAgBlb,IAAImb,GAAWA,EAAOla,KAC9D7C,KAAKC,MAAQ,CAAEyE,cAAemY,EAAKG,QAAQL,IAGxCvU,SACH,MAAM,UACF6U,EADE,eAEFC,EAFE,WAGFC,EAHE,gBAIFL,EAJE,kBAKFM,GACApd,KAAKV,MAEH+d,EAAkB3E,IAAW,wBAAyBwE,GACtDI,EAAqB5E,IAAW,iBAAkB0E,GAClD1Y,EAAgB1E,KAAKud,oBAE3B,OACIpe,gCACIA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AACsgC,EAAOh1B,iBAAK8L,EAAU,CAAE5T,UAAW6V,IAC9BsB,GAAY3a,gBAAC8V,EAAG,CAACtS,UAAW8V,YAAgB,mBAAoBR,IAC7D6B,GAEJwlB","file":"static/js/5.ad95b3cc01de91f8135a.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/**\n * Removing inline zoom style.\n */\nexport function removeInlineZoomStyle(): void {\n const zoomedImages: HTMLCollectionOf = document.body.getElementsByClassName('ms-inline-zoom__zoomedImg');\n\n // eslint-disable-next-line xss/no-mixed-html -- Need raw HTML.\n const zoomedImagesArray = Array.from(zoomedImages) as HTMLImageElement[];\n for (const item of zoomedImagesArray) {\n item.style.width = '0';\n item.style.height = '0';\n }\n}\n\n/**\n * Represents default data scale value which should be used in case improper value specified in module config.\n */\nexport const defaultDataScale = 2;\n\n/**\n * Clears zooming state and reverts to initial image.\n * @param event - Event of moving the mouse out of the image.\n */\nexport function onMouseOutLensContainer(event: React.MouseEvent): void {\n const zoomLens = event.currentTarget;\n zoomLens.style.visibility = 'hidden';\n zoomLens.classList.remove('ms-containerZoom__zoom-lens__opacity');\n\n const zoomedImageContainer = document.body.querySelector('.ms-containerZoom__result');\n if (zoomedImageContainer) {\n zoomedImageContainer.style.visibility = 'hidden';\n }\n}\n\n/**\n * Represents size dimensions.\n */\ninterface ISize {\n width: number;\n height: number;\n}\n\n/**\n * Represents two-dimensional position.\n */\ninterface ILocation {\n\n /**\n * Left offset.\n */\n x: number; // eslint-disable-line @typescript-eslint/naming-convention -- To align with html standards.\n\n /**\n * Top offset.\n */\n y: number; // eslint-disable-line @typescript-eslint/naming-convention -- To align with html standards.\n}\n\n/**\n * Retrieves the displayed image size preserving image proportions.\n * @param imageElement - The html image element which is displayed.\n * @returns The dimensions of the displayed image ignoring all the offsets and paddings.\n */\nfunction getDisplayedImageSize(imageElement: HTMLImageElement): ISize {\n const imageInitialHeight = imageElement.naturalHeight;\n const imageInitialWidth = imageElement.naturalWidth;\n const imageContainerHeight = imageElement.height;\n const imageContainerWidth = imageElement.width;\n\n const widthScaleRatio = imageContainerWidth / imageInitialWidth;\n const heightScaleRatio = imageContainerHeight / imageInitialHeight;\n\n const scaleRatio = Math.min(widthScaleRatio, heightScaleRatio);\n\n return {\n width: imageInitialWidth * scaleRatio,\n height: imageInitialHeight * scaleRatio\n };\n}\n\n/**\n * Retrieves the center point based on the given dimensions.\n * @param size - Dimensions of an element.\n * @returns The point of the center.\n */\nfunction getCenter(size: ISize): ILocation {\n const centerDivider = 2;\n return {\n x: size.width / centerDivider,\n y: size.height / centerDivider\n };\n}\n\n/**\n * Retrieves the position where the lens must be placed based by the mouse position, lens size, and container size.\n * @param cursorPosition - The location of the mouse.\n * @param lensSize - The size of the lens.\n * @param originalSize - The container in which the lens should be placed.\n * @returns The location where the lens must be placed.\n */\nfunction getLensPosition(cursorPosition: ILocation, lensSize: ISize, originalSize: ISize) {\n const lensCenter = getCenter(lensSize);\n\n const position: ILocation = {\n x: cursorPosition.x - lensCenter.x,\n y: cursorPosition.y - lensCenter.y\n };\n\n // Limit lens to be inside the image element.\n const minPositionX = 0;\n const maxPositionX = originalSize.width - lensSize.width;\n position.x = Math.min(Math.max(position.x, minPositionX), maxPositionX);\n\n const minPositionY = 0;\n const maxPositionY = originalSize.height - lensSize.height;\n position.y = Math.min(Math.max(position.y, minPositionY), maxPositionY);\n\n return position;\n}\n\n/**\n * Retrieves mouse position.\n * @param event - Mouse event.\n * @param element - Element in which the event happened.\n * @returns Mouse position inside the given element.\n */\nfunction getCursorPosition(event: React.MouseEvent, element: HTMLElement): ILocation {\n const containerBoundingRect = element.getBoundingClientRect();\n return {\n x: event.pageX - containerBoundingRect.left - window.pageXOffset,\n y: event.pageY - containerBoundingRect.top - window.pageYOffset\n };\n}\n\n/**\n * Formats number to represent pixels, e.g. 42px.\n * @param numericValue - The numeric value of pixels.\n * @returns String in pixel format.\n */\nfunction formatPixelsValue(numericValue: number): string {\n return `${numericValue}px`;\n}\n\n/**\n * Formats the given url to be a background image style value.\n * @param sourceUrl - The image source.\n * @returns Background image style value.\n */\nfunction formatBackgroundImageUrl(sourceUrl: string): string {\n return `url('${sourceUrl}')`;\n}\n\n/**\n * Get the cursor position on image click.\n * @param zoomedImage - The target image.\n * @param dataScaleText - Zoom factor for image.\n * @param event - Mouse event action.\n */\nfunction handleInlineStyles(zoomedImage: EventTarget & HTMLImageElement, dataScaleText: string, event: React.MouseEvent): void {\n zoomedImage.removeAttribute('style');\n const imageElement = zoomedImage.parentElement!.previousElementSibling!.querySelector('img')!;\n\n const dataScale = Number(dataScaleText);\n\n const imageContainerSize: ISize = {\n width: imageElement.offsetWidth,\n height: imageElement.offsetHeight\n };\n\n const zoomedImageSize: ISize = {\n width: imageContainerSize.width * dataScale,\n height: imageContainerSize.height * dataScale\n };\n\n zoomedImage.style.width = formatPixelsValue(zoomedImageSize.width);\n zoomedImage.style.height = formatPixelsValue(zoomedImageSize.height);\n zoomedImage.style.opacity = '1';\n\n const cursorPosition = getCursorPosition(event, imageElement);\n const imageCenter = getCenter(imageContainerSize);\n const offset: ILocation = {\n x: cursorPosition.x - imageCenter.x,\n y: cursorPosition.y - imageCenter.y\n };\n\n const scaledCursorPosition: ILocation = {\n x: cursorPosition.x * dataScale,\n y: cursorPosition.y * dataScale\n };\n scaledCursorPosition.x -= offset.x;\n scaledCursorPosition.y -= offset.y;\n\n const zoomedImagePosition = getLensPosition(scaledCursorPosition, imageContainerSize, zoomedImageSize);\n\n zoomedImage.style.left = formatPixelsValue(-zoomedImagePosition.x);\n zoomedImage.style.top = formatPixelsValue(-zoomedImagePosition.y);\n}\n\n/**\n * ZoomIn functionality on image click.\n * @param event -The mouse event.\n * @param dataScale -The zoom factor.\n */\nexport function inlineZoomInitClick(event: React.MouseEvent, dataScale?: string): void {\n if (event.type === 'touchmove' || event.type === 'touchstart' || event.type === 'touchend') {\n return;\n }\n\n const zoomImg = event.currentTarget.parentElement?.nextElementSibling?.querySelector('img');\n if (!zoomImg) {\n return;\n }\n\n handleInlineStyles(zoomImg, dataScale ?? '2', event);\n}\n\n/**\n * Updates lens and zoomed image positions on the page.\n * @param event - Mouse movement event.\n * @param imageElement - Original image element.\n * @param lens - The element which shows the part of the image which is zoomed.\n */\nfunction handleMouseMovementInContainerZoom(\n event: React.MouseEvent, imageElement: HTMLImageElement, lens: EventTarget & HTMLDivElement): void {\n\n let zoomedContainer = document.body.querySelector('.ms-containerZoom__result');\n if (!zoomedContainer) {\n zoomedContainer = document.createElement('div');\n zoomedContainer.setAttribute('class', 'ms-containerZoom__result');\n document.body.appendChild(zoomedContainer);\n }\n\n const lensSize: ISize = {\n width: lens.offsetWidth,\n height: lens.offsetHeight\n };\n\n const dataScale = Number(lens.getAttribute('data-scale') ?? defaultDataScale);\n\n const cursorPosition = getCursorPosition(event, imageElement);\n const displayedImageSize = getDisplayedImageSize(imageElement);\n const imageContainerSize: ISize = {\n width: imageElement.offsetWidth,\n height: imageElement.offsetHeight\n };\n\n const lensPosition = getLensPosition(cursorPosition, lensSize, imageContainerSize);\n lens.style.visibility = 'unset';\n lens.style.left = formatPixelsValue(lensPosition.x);\n lens.style.top = formatPixelsValue(lensPosition.y);\n\n const mainImageSource = imageElement.getAttribute('src')!;\n\n zoomedContainer.style.visibility = 'unset';\n zoomedContainer.style.backgroundImage = formatBackgroundImageUrl(mainImageSource);\n zoomedContainer.style.width = formatPixelsValue(lensSize.width * dataScale);\n zoomedContainer.style.height = formatPixelsValue(lensSize.width * dataScale);\n\n const offsetSize: ISize = {\n width: imageContainerSize.width - displayedImageSize.width,\n height: imageContainerSize.height - displayedImageSize.height\n };\n const offsetCenter = getCenter(offsetSize);\n const lensScaledPositionX = (offsetCenter.x - lensPosition.x) * dataScale;\n const lensScaledPositionY = (offsetCenter.y - lensPosition.y) * dataScale;\n\n zoomedContainer.style.backgroundPositionX = formatPixelsValue(lensScaledPositionX);\n zoomedContainer.style.backgroundPositionY = formatPixelsValue(lensScaledPositionY);\n\n zoomedContainer.style.backgroundSize =\n `${formatPixelsValue(displayedImageSize.width * dataScale)} ${formatPixelsValue(displayedImageSize.height * dataScale)}`;\n\n const topPosition = imageElement.getBoundingClientRect().top;\n zoomedContainer.style.top = formatPixelsValue(topPosition);\n}\n\n/**\n * Updates lens and zoomed image opacity.\n * @param event - Mouse movement event.\n */\nexport function onMouseOverImageContainer(event: React.MouseEvent): void {\n // eslint-disable-next-line xss/no-mixed-html -- Need raw HTML.\n const lens = event.currentTarget.parentElement!.previousElementSibling! as HTMLDivElement;\n lens.classList.add('ms-containerZoom__zoom-lens__opacity');\n\n const imageElement = event.currentTarget as HTMLImageElement;\n\n handleMouseMovementInContainerZoom(event, imageElement, lens);\n}\n\n/**\n * Updates lens and zoomed image positions.\n * @param event - Mouse movement event.\n */\nexport function onMouseMoveLensContainer(event: React.MouseEvent): void {\n if (event.type === 'touchmove' || event.type === 'touchstart' || event.type === 'touchend') {\n return;\n }\n\n const imageElement = event.currentTarget.nextElementSibling!.querySelector('img')!;\n const lens = event.currentTarget;\n\n handleMouseMovementInContainerZoom(event, imageElement, lens);\n}\n\n/**\n * Updates lens and zoomed image initialization.\n * @param event - Mouse movement event.\n */\nexport function onContainerZoomInit(event: React.MouseEvent): void {\n if (!document.body.querySelector('.ms-containerZoom__result')) {\n const containerDiv = document.createElement('div');\n containerDiv.setAttribute('class', 'ms-containerZoom__result');\n document.body.appendChild(containerDiv);\n }\n\n onMouseOverImageContainer(event);\n}\n\n/**\n * Updates zoomed image positions.\n * @param event - Mouse movement event.\n */\nexport function inlineZoomImageOnMouseMove(event: React.MouseEvent): void {\n if (event.type === 'touchmove' || event.type === 'touchstart' || event.type === 'touchend') {\n return;\n }\n\n const parentElement = event.currentTarget.parentElement!.parentElement!;\n const zoomImg = event.currentTarget;\n\n const dataScale = parentElement.getAttribute('data-scale') ?? `${defaultDataScale}`;\n handleInlineStyles(zoomImg, dataScale, event);\n}\n\n/**\n * Updates zoomed image positions.\n * @param event - Mouse movement event.\n */\nexport function inlineZoomImageOnMouseOut(event: React.MouseEvent): void {\n if (event.type === 'touchmove' || event.type === 'touchstart' || event.type === 'touchend') {\n return;\n }\n\n event.currentTarget.style.height = '0';\n event.currentTarget.style.width = '0';\n}\n\n/**\n * Iniline ZoomIn functionality.\n * @param event -The mouse event.\n * @param dataScale -The zoom factor.\n */\nexport function inlineZoomInit(event: React.MouseEvent, dataScale: string = '2'): void {\n if (event.type === 'touchmove' || event.type === 'touchstart' || event.type === 'touchend') {\n return;\n }\n\n const zoomedImage = event.currentTarget.parentElement?.nextElementSibling?.querySelector('img');\n if (!zoomedImage) {\n return;\n }\n\n handleInlineStyles(zoomedImage, dataScale, event);\n}\n\n/**\n * ZoomIn functionality on image Hover.\n * @param event -The mouse event.\n * @param scale -The zoom factor.\n */\nexport function inlineZoomImageOnHover(event: React.MouseEvent, scale: string = '2'): void {\n if (event.type === 'touchmove' || event.type === 'touchstart' || event.type === 'touchend') {\n return;\n }\n\n const zoomedImg = event.currentTarget.parentElement!.nextElementSibling!.querySelector('img')!;\n handleInlineStyles(zoomedImg, scale, event);\n}\n\n/**\n * Remove container zoomed image.\n */\nexport function removeContainerZoomStyle(): void {\n\n const zoomLens = document.body.querySelector('.ms-containerZoom__zoom-lens');\n if (zoomLens) {\n zoomLens.style.visibility = 'hidden';\n zoomLens.classList.remove('ms-containerZoom__zoom-lens__opacity');\n }\n\n const zoomedImageContainer = document.body.querySelector('.ms-containerZoom__result');\n if (zoomedImageContainer) {\n zoomedImageContainer.style.visibility = 'hidden';\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { Button, format, KeyCodes, Node, UncontrolledPagination } from '..';\nimport CheckBoxButton from './checkbox';\n\n/**\n * Table Resources.\n */\nexport interface ITableResources {\n\n}\n\n/**\n * Table props.\n */\nexport interface IDataTableProps {\n resources: ITableResources;\n headings: (IHeadingsProperty | undefined)[];\n rows: ITableRowProps[];\n className?: string;\n editLinkText?: string;\n actionLinkText?: string;\n deleteLinkText?: string;\n viewLinkText?: string;\n editLinkTooltip?: string;\n actionLinkTooltip?: string;\n deleteLinkTooltip?: string;\n viewLinkTooltip?: string;\n enableToModify: boolean;\n showCheckBoxes?: boolean;\n isSortable?: boolean;\n showPagination?: boolean;\n paginationProperty: IPaginationProperty;\n minifyActions?: boolean;\n minifiedButtonText?: string;\n excludedColumns?: string[]; // Filled with ITableItemProps.id of columns not to show\n isSingleSelectOnly: boolean;\n businessUserSelectCheckBoxAriaLabelText?: string;\n sortByAscending?: string;\n sortByDescending?: string;\n resourcePrefix?: string;\n actions: {\n onDelete?(userData: ITableItemProps[], referenceBack?: HTMLButtonElement | null): void | undefined;\n onEdit?(userData: ITableItemProps[], referenceBack?: HTMLButtonElement | null): void | undefined;\n onView?(userData: ITableItemProps[]): void | undefined;\n };\n checkBoxCallback?(records: ITableRowProps[]): void;\n formatPrice?(price: number): string;\n}\n\n/**\n * Table IPaginationProperty props.\n */\nexport interface IPaginationProperty {\n itemPerPage: number;\n skipCount: number;\n prevText: string;\n nextText: string;\n paginationText: string;\n url: string;\n}\n\n/**\n * Table ITableItemProps props.\n */\nexport interface ITableItemProps {\n id: string;\n type: TableDataType;\n value: boolean | number | string;\n className?: string;\n}\n\n/**\n * Table IButtonReferences props.\n */\nexport interface IButtonReferences {\n edit?: React.RefObject;\n delete?: React.RefObject;\n}\n\n/**\n * Table ITableRowProps props.\n */\nexport interface ITableRowProps {\n row: ITableItemProps[];\n isSelected: boolean;\n buttonReferences?: IButtonReferences;\n}\n\n/**\n * Table IDataTableCells props.\n */\ninterface IDataTableCells {\n header: boolean;\n className: string;\n content: string | number | React.ReactNode;\n cellIndex: number;\n scope: 'col' | 'row';\n colSpan?: number;\n records?: ITableRowProps;\n}\n\n/**\n * Table IHeadingsProperty props.\n */\nexport interface IHeadingsProperty {\n name: string;\n sortable: boolean;\n ariaLabel?: string;\n}\n\n/**\n * Table ITableState props.\n */\nexport interface ITableState {\n sortingKey: string;\n ascendingOrder: boolean;\n showActions: boolean;\n selectedIndex: string;\n}\n\n/**\n * Table TableDataType props.\n */\nexport enum TableDataType {\n Number = 'Number',\n Text = 'Text',\n Price = 'Price'\n}\n\nexport default class Table extends React.PureComponent {\n public componentClassName: string = 'ms-table';\n\n private readonly headingPrefix: string = 'table';\n\n private readonly capitalizeHeadingPrefix: string = 'Table';\n\n constructor(props: IDataTableProps) {\n super(props);\n this.state = {\n ascendingOrder: true,\n sortingKey: props.headings[0] && props.headings[0].name || '',\n showActions: props.minifyActions !== undefined ? !props.minifyActions : true,\n selectedIndex: ''\n };\n }\n\n public render(): JSX.Element {\n const { className, headings, rows, isSortable, showPagination, paginationProperty } = this.props;\n const { sortingKey, ascendingOrder } = this.state;\n\n const classname = classnames(this.componentClassName, className);\n let tableRows = isSortable && sortingKey ? this._sortTableRow(rows, sortingKey, ascendingOrder) : rows;\n let paginationLinks = null;\n\n if (showPagination) {\n const { skipCount, itemPerPage, nextText, prevText, paginationText, url } = paginationProperty;\n\n paginationLinks = (\n \n );\n\n tableRows = this._getCurrentPageData(tableRows, skipCount, skipCount + itemPerPage);\n }\n\n const tableBody = this._renderRow(tableRows);\n const tableHead = this._renderHeadingRow(headings);\n\n return (\n
\n \n \n {tableHead}\n \n \n {tableBody}\n \n
\n {paginationLinks}\n
\n );\n }\n\n /**\n * Set sorting key.\n * @param event -The mouse event.\n */\n private readonly _selectSortingKey = (event: React.MouseEvent | React.KeyboardEvent) => {\n const target = event.target as HTMLElement;\n const columnName = target.getAttribute('data-sort-name') ? target.getAttribute('data-sort-name') as string : '';\n const { sortingKey, ascendingOrder } = this.state;\n let newOrder = true;\n\n if (sortingKey === columnName) {\n newOrder = !ascendingOrder;\n }\n\n this.setState({\n sortingKey: columnName,\n ascendingOrder: newOrder,\n showActions: false\n });\n };\n\n /**\n * Checkbox change.\n * @param rows -Table rows.\n * @param checkBoxCallback -Checkboxcallback function.\n * @param index -Index value for row.\n * @returns Checkbox rows.\n */\n private readonly _onCheckBoxChangeHandler = (rows: ITableRowProps[], checkBoxCallback: (records: ITableRowProps[]) => void, index?: number) => () => {\n if (ObjectExtensions.isNumber(index)) {\n rows[index].isSelected = !rows[index].isSelected;\n }\n checkBoxCallback(rows);\n };\n\n private readonly _renderHeadingRow = (columnData: (IHeadingsProperty | undefined)[]) => {\n const {\n resources, showCheckBoxes, enableToModify, minifyActions, rows,\n actionLinkText, isSortable, checkBoxCallback, resourcePrefix,\n isSingleSelectOnly, businessUserSelectCheckBoxAriaLabelText, sortByAscending, sortByDescending\n } = this.props;\n const { sortingKey, ascendingOrder } = this.state;\n\n const sortingClassName = ascendingOrder ? 'asc' : 'dsc';\n\n const sortingValue = ascendingOrder ? sortByAscending : sortByDescending;\n\n const columns = columnData.map((data, cellIndex) => {\n if (!data) {\n return;\n }\n const counterAddition = 1;\n const updatedCellIndex = cellIndex + counterAddition;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- unsafe assignment.\n const heading = resources[`${this.headingPrefix}${data.name}HeadingText`] ||\n resources[`${resourcePrefix!}${this.capitalizeHeadingPrefix}${data.name}HeadingText`] ||\n resources[`${data.name}HeadingText`] || data.name;\n\n const columnSortValue = (sortingKey === data.name && sortingValue !== undefined) ? sortingValue : '';\n\n const columnAriaLabel = data.ariaLabel ? `${format(data.ariaLabel, heading)} ${columnSortValue}` : '';\n\n const content = isSortable && data.sortable && (\n \n \n {heading}\n \n \n ) || \n {heading}\n ;\n\n return (\n content\n );\n });\n\n const radioCheckBox = showCheckBoxes && checkBoxCallback && !isSingleSelectOnly && (\n \n );\n\n const actionContent = (\n \n {minifyActions ? '' : actionLinkText}\n \n );\n\n return (\n \n { showCheckBoxes && this.tableCell({\n header: true,\n className: `${this.componentClassName}__heading-row-data__checkbox checkbox`, content: radioCheckBox,\n cellIndex: -1,\n scope: 'col' }) }\n { columns }\n { enableToModify && this.tableCell({\n header: true,\n className: `${this.componentClassName}__heading-row-data action-links`,\n content: actionContent,\n cellIndex: 1,\n scope: 'col'\n }) }\n \n );\n };\n\n private readonly _renderRow = (rows: ITableRowProps[]) => {\n const {\n enableToModify, showCheckBoxes, excludedColumns, actions,\n checkBoxCallback, formatPrice, isSingleSelectOnly,\n businessUserSelectCheckBoxAriaLabelText\n } = this.props;\n\n const tableRows = rows.map((rowsData, index) => {\n let className = index % 2 ? `${this.componentClassName}__row even-row` : `${this.componentClassName}__row odd-row`;\n let showActions = false;\n\n const additionalNameAriaLabel = rowsData.row[0].value.toString();\n const columnData = rowsData.row.map(cell => {\n if (excludedColumns && excludedColumns.includes(cell.id)) {\n return;\n }\n\n // Numbers/price data types will always be right-aligned per design standards\n const extraClass = cell.type === TableDataType.Number || cell.type === TableDataType.Price ? 'num-type' : '';\n const cellContent = cell.type === TableDataType.Price && formatPrice ? formatPrice(cell.value as number) : cell.value;\n const columnSpecificClass = cell.className || '';\n return this.tableCell({ header: false, className: classnames(`${this.componentClassName}__row-data`, extraClass, columnSpecificClass), content: cellContent, cellIndex: index, scope: 'row' });\n });\n\n const radioCheckBox = showCheckBoxes && checkBoxCallback && (\n \n );\n const rowKey = `row-${index}`;\n\n if (rowKey === this.state.selectedIndex && this.state.showActions) {\n className += ' selected';\n showActions = true;\n }\n\n const actionButtons = actions && this._renderActions(rowsData.row, showActions, rowKey, rowsData.buttonReferences);\n\n return (\n \n { showCheckBoxes && this.tableCell({ header: false, className: `${this.componentClassName}__row-data`, content: radioCheckBox, cellIndex: index, scope: 'row', records: rowsData }) }\n { columnData }\n { enableToModify && this.tableCell({ header: false, className: `${this.componentClassName}__row-data`, content: actionButtons, cellIndex: index, scope: 'row', records: rowsData }) }\n \n );\n });\n\n return tableRows;\n };\n\n private readonly _renderActions = (data: ITableItemProps[], showActions: boolean, key: string, buttonReference?: IButtonReferences): React.ReactNode => {\n const { editLinkText, deleteLinkText, viewLinkText, editLinkTooltip, deleteLinkTooltip, viewLinkTooltip, actionLinkTooltip,\n minifyActions, minifiedButtonText, actionLinkText, actions: { onEdit, onDelete, onView } } = this.props;\n const handleClickEdit = onEdit !== undefined ? () => {\n onEdit(data, buttonReference?.edit?.current);\n } : undefined;\n const handleClickDelete = onDelete !== undefined ? () => {\n onDelete(data, buttonReference?.delete?.current);\n } : undefined;\n const handleClickView = onView !== undefined ? () => {\n onView(data);\n } : undefined;\n\n const actionButtons = (\n \n { handleClickView && \n {viewLinkText}\n }\n { handleClickEdit && \n {editLinkText}\n }\n { handleClickDelete && \n {deleteLinkText}\n }\n \n );\n\n if (minifyActions) {\n return (\n \n \n {minifiedButtonText ? minifiedButtonText : ''}\n \n { showActions && actionButtons }\n \n );\n }\n return actionButtons;\n\n };\n\n private readonly _toggleActions = (event: React.MouseEvent) => {\n const target = event && event.target as HTMLElement;\n const newKey = target && target.getAttribute('data-type') ? target.getAttribute('data-type') as string : '';\n this.setState({\n showActions: !this.state.showActions,\n selectedIndex: newKey\n });\n };\n\n private readonly _sortTableRow = (table: ITableRowProps[], sortingkey: string, ascendingOrder: boolean): ITableRowProps[] => {\n return table.sort((userOne: ITableRowProps, userTwo: ITableRowProps) => {\n const userOneData = userOne.row.find(cell => {\n return cell.id === sortingkey;\n });\n const userTwoData = userTwo.row.find(cell => {\n return cell.id === sortingkey;\n });\n\n if (!userOneData || !userTwoData) {\n return -1;\n }\n\n if (typeof userOneData.value === 'number' && typeof userTwoData.value === 'number') {\n return ascendingOrder ? (userOneData.value - userTwoData.value) : (userTwoData.value - userOneData.value);\n }\n\n const cleanFirst = userOneData.value as string && userOneData.value.toString().toLowerCase().trim();\n const cleanSecond = userOneData.value as string && userTwoData.value.toString().toLowerCase().trim();\n\n if (!cleanFirst || !cleanSecond) {\n return -1;\n }\n if (ascendingOrder) {\n return cleanFirst < cleanSecond ? -1 : 1;\n }\n return cleanFirst > cleanSecond ? -1 : 1;\n\n });\n };\n\n private readonly _getCurrentPageData = (tableRows: ITableRowProps[], start: number, end: number): ITableRowProps[] => {\n if (start >= end) {\n return tableRows;\n }\n\n const result = [];\n for (let i = start; i < end; i++) {\n tableRows[i] && result.push(tableRows[i]);\n }\n\n return result;\n };\n\n private readonly tableCell = (props: IDataTableCells) => {\n const { className, header, cellIndex, scope, colSpan, content } = props;\n const hiddenTabIndex = -1;\n const initialTabIndex = 0;\n return header ? (\n initialTabIndex ? initialTabIndex : hiddenTabIndex}\n >\n {content}\n \n ) : (\n \n {content}\n \n );\n };\n\n /**\n * Renders a Pagination previous text.\n * @param paginationPreviousText - Pagination previous text from resources.\n * @returns Previous text and flipper icon.\n */\n private readonly _renderPrev = (paginationPreviousText: string) => {\n return (\n
\n
\n );\n };\n\n /**\n * Renders a Pagination next text.\n * @param paginationNextText - Pagination next text from resources.\n * @returns Next text and flipper icon.\n */\n private readonly _renderNext = (paginationNextText: string) => {\n return (\n
\n \n {paginationNextText}\n \n
\n );\n };\n\n /**\n * Calls method display result.\n * @param event - Keyboard event.\n */\n private readonly _handleKeyPressPrev = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter || event.keyCode === KeyCodes.Space) {\n this._selectSortingKey(event);\n }\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classname from 'classnames';\nimport * as React from 'react';\n\nexport interface IProgressProps {\n id?: string;\n className?: string;\n max: number;\n min?: number;\n value: number;\n ariaLabel?: string;\n}\n\nexport const Progress: React.FC = (props: IProgressProps) => {\n const { id, className, max, min, value, ariaLabel } = props;\n const percent = Math.max(0, Math.min(value * 100 / max, 100));\n const style = { width: `${percent}%` };\n\n return (\n
\n \n
\n );\n};\n\n// Set default props\nProgress.defaultProps = {\n 'aria-valuemax': 100,\n 'aria-valuenow': 0\n} as Partial;\n\nexport default Progress;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport Tooltip from './Tooltip';\nimport { IUncontrolledTooltipProps } from './Tooltip.props';\n\nexport interface IUncontrolledTooltipState {\n isOpen: boolean;\n}\n\n/**\n * UncontrolledTooltip examples.\n */\nexport default class UncontrolledTooltip extends React.PureComponent {\n private _isAutoDisplayTriggered: boolean;\n\n constructor(props: IUncontrolledTooltipProps) {\n super(props);\n this.state = { isOpen: false };\n this._toggle = this._toggle.bind(this);\n this._isAutoDisplayTriggered = false;\n }\n\n public render(): JSX.Element {\n const isCartPage = !StringExtensions.isNullOrWhitespace(this.props.cartPageUrl) &&\n window.location.toString().includes(this.props.cartPageUrl!);\n\n if (this.props.shouldShowMiniCart && !isCartPage) {\n if (!this._isAutoDisplayTriggered) {\n // First time trigger auto mini cart.\n this.setState({ isOpen: true });\n this._isAutoDisplayTriggered = true;\n } else if (!this.state.isOpen) {\n // If tooptip is closed, reset the flag.\n this._isAutoDisplayTriggered = false;\n }\n }\n\n return ;\n }\n\n private _toggle(): void {\n this.setState(previousState => ({ isOpen: !previousState.isOpen }));\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { UncontrolledTooltip } from '..';\nimport { ISliderThumbProps } from './SliderThumb.props';\n\n/**\n * Sliderthumb - This is a sliderthumb component this component which is\n * used to control the slider thumb.\n */\nexport default class SliderThumb extends React.PureComponent {\n\n public static defaultProps: Partial = {\n showTooltip: true,\n tooltip: {\n placement: 'top'\n }\n };\n\n public sliderButtonRef: React.RefObject = React.createRef();\n\n public render(): JSX.Element {\n const sliderThumbBaseClass = 'slider__thumb ';\n const sliderThumbClass = this.props.trackThumbClass ? `${sliderThumbBaseClass} ${this.props.trackThumbClass}` : sliderThumbBaseClass;\n\n return (\n <>\n \n { this.props.showTooltip &&\n \n {this.props.handleTooltipText ? this.props.handleTooltipText(this.props.sliderValue!) : this.props.sliderValue!.toString()}\n }\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IRequestContext } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { format, isMobile, Progress, VariantType } from '..';\nimport { clamp, toUpperCaseFirstChar } from '../common/utilities';\nimport { ISliderChangeNotification, ISliderLabel, ISliderProps, ISliderThumbProps } from './Slider.props';\nimport SliderThumb from './SliderThumb';\n\n// This maintains the min and max values for the 2 thumbs\nexport interface ISliderState {\n sliderThumbs: ISliderThumbProps[];\n limit: number;\n grab: number;\n active: boolean;\n id: string;\n}\n\nconst orientations = {\n horizontal: {\n dimension: 'width',\n direction: 'left',\n coordinate: 'x'\n },\n vertical: {\n dimension: 'height',\n direction: 'top',\n coordinate: 'y'\n }\n};\n\ninterface IFillCoordinates {\n fill: number;\n handle: number;\n label: number;\n}\n\nenum EventType {\n Start,\n End,\n Change\n}\n\nconst rangeDefaultChkValue = 0;\n\n/**\n * Slider - This is a slider component this component morphs into a range slider\n * based on flags.\n */\n\nexport default class Slider extends React.Component {\n public static defaultProps: Partial = {\n showTooltip: true,\n inForm: false,\n orientation: 'horizontal',\n min: 0,\n max: 100,\n step: 1,\n sliderThumbs: [{ id: 'slider_thumb_id', value: 50 }]\n };\n\n private static readonly sliderBaseClass: string = 'slider';\n\n public isRangeSlider: boolean;\n\n private readonly ref: React.RefObject = React.createRef();\n\n private readonly thumb1Ref: React.RefObject = React.createRef();\n\n private readonly thumb2Ref: React.RefObject = React.createRef();\n\n public static getDerivedStateFromProps(props: ISliderProps, state: ISliderState): ISliderState | null {\n if ((props.sliderThumbs.length > 0 && props.sliderThumbs[0].value !== state.sliderThumbs[0].value) ||\n (props.sliderThumbs.length > 1 && props.sliderThumbs[1].value !== state.sliderThumbs[1].value)) {\n const nextState = { ...state };\n nextState.sliderThumbs[0].value = props.sliderThumbs[0].value;\n if (props.sliderThumbs.length > 1) {\n nextState.sliderThumbs[1].value = props.sliderThumbs[1].value;\n }\n return nextState;\n }\n return null;\n }\n\n constructor(props: ISliderProps) {\n super(props);\n this.isRangeSlider = this.props.sliderThumbs.length === 2;\n this.state = {\n sliderThumbs: this.props.sliderThumbs,\n grab: 0,\n limit: 0,\n active: false,\n id: ''\n };\n this._handleUpdate = this._handleUpdate.bind(this);\n this._handleDrag = this._handleDrag.bind(this);\n this._handleEnd = this._handleEnd.bind(this);\n this._handleStart = this._handleStart.bind(this);\n this._handleOnChange = this._handleOnChange.bind(this);\n this._setSliderValue = this._setSliderValue.bind(this);\n this._getThumbFromProps = this._getThumbFromProps.bind(this);\n this._publishNotification = this._publishNotification.bind(this);\n this._getThumbAndPublishEvent = this._getThumbAndPublishEvent.bind(this);\n this._willThumbsCrossOver = this._willThumbsCrossOver.bind(this);\n this._handleOnClick = this._handleOnClick.bind(this);\n if (MsDyn365.isBrowser && document.body.parentElement && document.body.parentElement.getAttribute('dir') === 'rtl' && (this.props.shouldSliderAdjustToRTL === undefined || this.props.shouldSliderAdjustToRTL)) {\n orientations.horizontal.direction = 'right';\n }\n }\n\n public componentDidMount(): void {\n this._handleUpdate();\n MsDyn365.isBrowser && window.addEventListener('resize', this._handleUpdate);\n }\n\n public componentDidUpdate(): void {\n if (this.ref.current && this.ref.current.offsetWidth > rangeDefaultChkValue && this.state.limit === rangeDefaultChkValue) {\n this._handleUpdate();\n }\n }\n\n public shouldComponentUpdate(nextProps: ISliderProps, _nextState: ISliderState): boolean {\n let shouldRender = true;\n if (this.isRangeSlider) {\n const thumb1Position = this._getPositionFromValue(nextProps.sliderThumbs[0].value);\n const thumb2Position = this._getPositionFromValue(nextProps.sliderThumbs[1].value);\n\n /**\n * During first render the second thumb isn't positioned since handleUpdate positions it after it's mounted\n * in the componentDidMount method. This check is to make sure that the first render happens correctly and then\n * for all subsequent renders and updates, the thumb2 position cannot be 0 thanks to this condition.\n */\n shouldRender = thumb2Position > 0 ? thumb2Position >= thumb1Position + nextProps.step : true;\n }\n return shouldRender;\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this._handleUpdate);\n }\n\n public render(): JSX.Element {\n const { orientation } = this.props;\n const sliderClass = this.props.className ? `${Slider.sliderBaseClass} slider-${orientation} ${this.props.className}` : `${Slider.sliderBaseClass} slider-${orientation}`;\n\n const sliderId = this.props.id;\n const dimension = orientations[orientation].dimension;\n const direction = orientations[orientation].direction;\n const camelCasedDirection = toUpperCaseFirstChar(direction);\n const positionThumb1 = this._getPositionFromValue(this.props.sliderThumbs[0].value);\n const coordsThumb1 = this._coordinates(positionThumb1);\n let fillStyle = { [dimension]: `${coordsThumb1.fill}px` };\n const handleStyle: React.CSSProperties[] = [];\n handleStyle.push({ [direction]: `${coordsThumb1.handle}px` });\n const trackProgressClass = classnames('progress-bar', this.props.trackProgressClass ? this.props.trackProgressClass : '');\n const sliderKey = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n\n if (this.isRangeSlider) {\n const positionThumb2 = this._getPositionFromValue(this.props.sliderThumbs[1].value);\n const coordsThumb2 = this._coordinates(positionThumb2);\n handleStyle.push({ [direction]: `${coordsThumb2.handle}px` });\n if (orientation === 'vertical') {\n fillStyle = {\n 'marginBottom': `${coordsThumb1.fill}px`,\n [dimension]: `${coordsThumb2.fill - coordsThumb1.fill}px`\n };\n } else {\n fillStyle = {\n [`margin${camelCasedDirection}`]: `${orientations.horizontal.direction === 'right' ? coordsThumb1.fill - this.state.grab : coordsThumb1.fill}px`,\n [dimension]: `${coordsThumb2.handle - coordsThumb1.handle}px`\n };\n }\n }\n\n return (\n
\n
\n {this.props.showProgressBar && (\n \n )}\n
\n {this._renderSliderThumbs(handleStyle)}\n
\n {this.props.showLabels ? this._renderLabels(this.props.labels!) : null}\n
\n );\n }\n\n private readonly _renderLabels = (labels: ISliderLabel[]): JSX.Element => {\n return (\n
\n {labels.map((label: ISliderLabel) => {\n return (\n
\n {label.labelString}\n
\n );\n })}\n
\n );\n };\n\n private readonly _renderSliderThumbs = (thumbStyles: React.CSSProperties[]): React.ReactFragment | JSX.Element | null => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Added gridsetting values.\n const context = {\n gridSettings: {\n xs: { w: 767 },\n sm: { w: 991 },\n md: { w: 1199 },\n lg: { w: 1599 },\n xl: { w: 1600 }\n }\n } as IRequestContext;\n\n const isMobileCheck = isMobile({ variant: VariantType.Browser, context });\n const isMobileView = isMobileCheck === 'xs' || isMobileCheck === 'sm';\n\n const sliderAriaLabelMin = format('{0} {1}', this.props.sliderThumbs[0].ariaLabel, this.state.sliderThumbs[0].value);\n\n const sliderAriaLabelMax = this.isRangeSlider ? format('{0} {1}', this.props.sliderThumbs[1].ariaLabel, this.state.sliderThumbs[1].value) : '';\n return (\n <>\n \n \n {' '}\n {this.isRangeSlider && (\n <>\n \n \n \n )}\n \n );\n };\n\n private readonly _handleUpdate = (): void => {\n const { orientation } = this.props;\n const dimensionStr = toUpperCaseFirstChar(orientations[orientation].dimension);\n\n // To get the offsetWidth and offsetHeight of the slider element\n const sliderPos = this.ref.current![`offset${dimensionStr}`];\n const handlePos = this.thumb1Ref.current!.sliderButtonRef.current![`offset${dimensionStr}`];\n\n if (handlePos !== 0) {\n this.setState({\n limit: sliderPos - handlePos,\n grab: orientations.horizontal.direction === 'right' ? -handlePos / 2 : handlePos / 2\n });\n }\n };\n\n private readonly _handleStart = (e: React.TouchEvent | React.KeyboardEvent | React.MouseEvent): void => {\n e.stopPropagation();\n const eventType = e.type;\n document.addEventListener('mousemove', (this._handleDrag as unknown) as EventListener);\n document.addEventListener('mouseup', (this._handleEnd as unknown) as EventListener);\n const castTarget = e.target as HTMLElement;\n const thumbid = castTarget && castTarget.id;\n this.setState(\n (_prevState: ISliderState) => {\n return { active: true, id: thumbid };\n },\n () => {\n this._getThumbAndPublishEvent(castTarget, EventType.Start, eventType);\n }\n );\n };\n\n private _handleEnd(e: React.KeyboardEvent | React.MouseEvent | React.TouchEvent): void {\n e.stopPropagation();\n const eventType = e.type;\n const castTarget = e.target as HTMLElement;\n this.setState(\n (_prevState: ISliderState) => {\n return { active: false, id: '' };\n },\n () => {\n this._getThumbAndPublishEvent(castTarget, EventType.End, eventType);\n }\n );\n document.removeEventListener('mousemove', (this._handleDrag as unknown) as EventListener);\n document.removeEventListener('mouseup', (this._handleEnd as unknown) as EventListener);\n }\n\n private _handleDrag(e: React.MouseEvent | React.TouchEvent): void {\n e.stopPropagation();\n const value = this._position(e);\n const eventType = e.type;\n const castThumb = e.target as HTMLElement;\n const thumbId = this.state.id || (castThumb && castThumb.id);\n const thumbPressed = this._getThumbFromProps(thumbId);\n\n if (thumbPressed && !this._willThumbsCrossOver(thumbPressed[0], e)) {\n thumbPressed[0].value = value;\n this._setSliderValue(thumbPressed, castThumb, eventType);\n }\n }\n\n private _handleOnClick(e: React.MouseEvent | React.TouchEvent): void {\n e.stopPropagation();\n const position = this._position(e);\n const castThumb = e.target as HTMLElement;\n const eventType = e.type;\n const thumb1 = this._getThumbFromProps(this.props.sliderThumbs[0].id);\n\n if (this.isRangeSlider) {\n const thumb2 = this._getThumbFromProps(this.props.sliderThumbs[1].id);\n\n if (thumb1 && thumb2) {\n const currentMinValue = thumb1[0].value;\n const currentMaxValue = thumb2[0].value;\n const lengthToMinValue = position - currentMinValue;\n const lengthToMaxValue = currentMaxValue - position;\n\n if (lengthToMinValue < lengthToMaxValue) {\n thumb1[0].value = position;\n } else {\n thumb2[0].value = position;\n }\n\n this.setState(\n (_prevState: ISliderState) => {\n return ({ sliderThumbs: [thumb1[0], thumb2[0]] });\n },\n () => {\n this._getThumbAndPublishEvent(castThumb, EventType.Change, eventType);\n }\n );\n }\n\n } else if (thumb1) {\n thumb1[0].value = position;\n this.setState(\n (_prevState: ISliderState) => {\n return ({ sliderThumbs: thumb1 });\n },\n () => {\n this._getThumbAndPublishEvent(castThumb, EventType.Change, eventType);\n }\n );\n }\n }\n\n private readonly _position = (e: React.KeyboardEvent | React.MouseEvent | React.TouchEvent): number => {\n const { grab } = this.state;\n const { orientation } = this.props;\n const castEvent = (e as unknown) as TouchEvent;\n const node = this.ref;\n const coordinateStyle = toUpperCaseFirstChar(orientations[orientation].coordinate);\n const directionStyle = orientations[orientation].direction;\n\n // String conversion to the right property value\n const clientCoordinateStyle = `client${coordinateStyle}`;\n const coordinate = !castEvent.touches ? e[clientCoordinateStyle] : castEvent.touches[0][clientCoordinateStyle];\n const direction = node.current!.getBoundingClientRect()[directionStyle];\n const pos = orientations.horizontal.direction === 'right' ? direction - coordinate - grab : coordinate - direction - grab;\n return this._getValueFromPosition(pos);\n };\n\n private readonly _getPositionFromValue = (value: number): number => {\n const { limit } = this.state;\n const { min, max } = this.props;\n const diffMaxMin = max - min;\n const diffValMin = value - min;\n const percentage = diffValMin / diffMaxMin;\n return Math.round(percentage * limit);\n };\n\n /**\n * Translate position of slider to slider value.\n * @param {number} pos - Current position/coordinates of slider.\n * @returns {number} Value - Slider value.\n */\n private readonly _getValueFromPosition = (pos: number): number => {\n const { limit } = this.state;\n const { orientation, min, max, step } = this.props;\n\n const percentage = clamp(pos, 0, limit) / (limit || 1);\n const baseVal = step * Math.round((percentage * (max - min)) / step);\n const value = orientation === 'horizontal' ? baseVal + min : max - baseVal;\n\n return clamp(value, min, max);\n };\n\n /**\n * Grab coordinates of slider.\n * @param {Object} pos - Position object.\n * @returns {Object} - Slider fill/handle coordinates.\n */\n private readonly _coordinates = (pos: number): IFillCoordinates => {\n const { limit, grab } = this.state;\n const { orientation } = this.props;\n const value = this._getValueFromPosition(pos);\n const position = this._getPositionFromValue(value);\n const handlePos = orientation === 'horizontal' ? position + grab : position;\n const fillPos = orientation === 'horizontal' ? handlePos : limit - handlePos;\n\n return {\n fill: fillPos,\n handle: handlePos,\n label: handlePos\n };\n };\n\n private _handleOnChange(e: React.ChangeEvent): void {\n e.stopPropagation();\n const castTarget = e.target as HTMLInputElement;\n const thumbInteractedWith = castTarget && this._getThumbFromProps(castTarget.id.replace('range', ''));\n const eventType = e.type;\n thumbInteractedWith![0].value = Number.parseInt(e.target.value, 10);\n this._setSliderValue(thumbInteractedWith!, castTarget, eventType);\n }\n\n private readonly _setSliderValue = (sliderThumb: ISliderThumbProps[], castTarget: HTMLElement, eventType: string): void => {\n if (this.isRangeSlider) {\n if (this.props.sliderThumbs[0].value > this.props.sliderThumbs[1].value) {\n this.props.sliderThumbs[0].value = this.props.sliderThumbs[1].value;\n }\n this.setState((_prevState: ISliderState) => {\n return {\n sliderThumbs: { ...this.props.sliderThumbs }\n };\n }, () => {\n this._getThumbAndPublishEvent(castTarget, EventType.Change, eventType);\n });\n } else {\n this.setState((_prevState: ISliderState) => {\n return {\n sliderThumbs: sliderThumb\n };\n }, () => {\n this._getThumbAndPublishEvent(castTarget, EventType.Change, eventType);\n });\n }\n };\n\n private _getThumbFromProps(thumbId: string): ISliderThumbProps[] | null {\n let thumbFound;\n\n thumbFound = this.props.sliderThumbs.filter((thumb: ISliderThumbProps) => {\n return thumb.id === thumbId;\n });\n\n return thumbFound.length > 0 ? thumbFound : null;\n }\n\n private readonly _publishNotification = (\n thumb: ISliderThumbProps | null,\n delegate: (sliderNotification: Readonly) => void,\n eventType: string\n ): void => {\n delegate({\n id: (thumb && thumb.id) || '',\n slider: this,\n firstThumbValue: this.state.sliderThumbs[0].value,\n secondThumbValue: (this.state.sliderThumbs[1] && this.state.sliderThumbs[1].value) || Number.NaN,\n eventType\n });\n };\n\n private readonly _getThumbAndPublishEvent = (element: HTMLElement, eventType: EventType, nativeEventType: string): void => {\n let elmenentId = '';\n if (element && element.id && eventType === EventType.Change) {\n elmenentId = element.id.replace('range', '');\n }\n const thumb = element && this._getThumbFromProps(elmenentId);\n\n if (eventType === EventType.End) {\n if (this.props.onChangeEnd) {\n this._publishNotification(thumb && thumb[0], this.props.onChangeEnd, nativeEventType);\n }\n }\n if (eventType === EventType.Start) {\n if (this.props.onChangeStart) {\n this._publishNotification(thumb && thumb[0], this.props.onChangeStart, nativeEventType);\n }\n }\n if (eventType === EventType.Change) {\n if (this.props.onChange) {\n this._publishNotification(thumb && thumb[0], this.props.onChange, nativeEventType);\n }\n }\n };\n\n private _willThumbsCrossOver(\n thumbPressed: ISliderThumbProps,\n event: React.KeyboardEvent | React.MouseEvent | React.TouchEvent\n ): boolean {\n if (!this.isRangeSlider) {\n return false;\n }\n let keycode = 0;\n let checkCondition = false;\n\n if (event.type === 'keydown') {\n const castEvent = (event as unknown) as KeyboardEvent;\n keycode = castEvent.keyCode;\n if (\n (thumbPressed === this.props.sliderThumbs[1] && (keycode === 38 || keycode === 39)) ||\n (thumbPressed === this.props.sliderThumbs[0] && (keycode === 37 || keycode === 40))\n ) {\n return false;\n }\n checkCondition = true;\n\n }\n if (event.type === 'touchmove' || event.type === 'mousemove' || event.type === 'click') {\n const value = this._position(event);\n if (\n (this.state.sliderThumbs[1].value < value && thumbPressed.id === this.props.sliderThumbs[1].id) ||\n (this.state.sliderThumbs[0].value > value && thumbPressed.id === this.props.sliderThumbs[0].id)\n ) {\n return false;\n }\n checkCondition = true;\n\n }\n\n return !(checkCondition && this.props.sliderThumbs[1].value - this.props.step * 2 >= this.props.sliderThumbs[0].value);\n\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IRadioButtonProps {\n isChecked?: boolean;\n value?: string;\n ariaSetSize?: number;\n ariaPosInSet?: number;\n ariaLabel?: string;\n name: string;\n className?: string;\n isSingleSelectOnly?: boolean;\n onChange(reacords: object): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.value\n * @param root0.ariaLabel\n * @param root0.name\n * @param root0.className\n * @param root0.onChange\n * @param root0.isSingleSelectOnly\n * @extends {React.FC}\n */\nconst CheckBoxButton: React.FC = ({\n isChecked,\n value,\n ariaLabel,\n name,\n className,\n onChange,\n isSingleSelectOnly\n}) => {\n\n const cssClass = classnames('ms-input-radio', className ? className : '');\n return (\n \n );\n};\n\nexport default CheckBoxButton;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nexport type NodeTag = React.ReactType;\n\nexport interface INodeProps {\n\n /* Wrapper class */\n className: string;\n\n /* Children node */\n children?: React.ReactNode;\n\n /* Wrapper Tag */\n tag?: NodeTag;\n\n /* Other attrributes */\n [x: string]: any;\n}\n\nexport type IComponentNodeProps = INodeProps & T & {\n\n /* Wrapper Tag */\n tag?: React.ReactType;\n};\n\nexport const Node: React.FC = React.forwardRef(({ className = '', tag: Tag = 'div', element: Element, ...restAttribute }, ref) => {\n return ();\n});\n\nexport default Node;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { IWaitingProps } from './Waiting.props';\n\n/**\n * Waiting - this component is a visual indication of a pre-loader.\n */\nexport default class Waiting extends React.PureComponent {\n public static defaultProps: Partial = {\n className: 'msc-waiting-circular'\n };\n\n public render(): JSX.Element {\n const { className, ...props } = this.props;\n const watingClassName = `msc-waiting ${className}`;\n\n return (
);\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { getTargetElement, mapToCssModules } from '../common/utilities';\nimport PopperContent from '../popper-content/PopperContent';\nimport { ITooltipProps } from './Tooltip.props';\n\nconst DEFAULT_DELAYS = {\n show: 0,\n hide: 250\n};\n\n/**\n * Tooltip component.\n */\nexport default class Tooltip extends React.PureComponent {\n public static defaultProps: Partial = {\n isOpen: false,\n shouldShowMiniCart: false,\n shouldShowCloseButton: false,\n hideArrow: false,\n placement: 'top',\n placementPrefix: 'msc-bs-tooltip',\n delay: DEFAULT_DELAYS,\n toggle: () => {\n return;\n }\n };\n\n public ref: React.RefObject;\n\n public hideTimeout?: number;\n\n public showTimeout?: number;\n\n public target: HTMLElement | null;\n\n public isMobile: boolean;\n\n public tabPressed: boolean;\n\n constructor(props: ITooltipProps) {\n super(props);\n\n this.ref = React.createRef();\n this.addTargetEvents = this.addTargetEvents.bind(this);\n this.handleDocumentClick = this.handleDocumentClick.bind(this);\n this.removeTargetEvents = this.removeTargetEvents.bind(this);\n this.toggle = this.toggle.bind(this);\n this.onMouseOverTooltip = this.onMouseOverTooltip.bind(this);\n this.onMouseLeaveTooltip = this.onMouseLeaveTooltip.bind(this);\n this.onMouseOverTooltipContent = this.onMouseOverTooltipContent.bind(this);\n this.onMouseLeaveTooltipContent = this.onMouseLeaveTooltipContent.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.onFocusOutTarget = this.onFocusOutTarget.bind(this);\n this.onEscKeyDown = this.onEscKeyDown.bind(this);\n this.onEscKeyDownNative = this.onEscKeyDownNative.bind(this);\n this.target = null;\n this.isMobile = false;\n this.tabPressed = false;\n }\n\n public componentDidMount(): void {\n this.target = getTargetElement(this.props.target);\n this.addTargetEvents();\n\n // Remove the attr from parent obj when tooltip is hidden\n\n const body = document.getElementsByTagName('body').item(0);\n if (body) {\n const bodyClasses = body.getAttribute('class');\n if (bodyClasses && bodyClasses.includes('mobile')) {\n this.isMobile = true;\n }\n }\n\n if (this.target !== null && this.target.attributes.getNamedItem('aria-describedby') !== null) {\n this.target.attributes.removeNamedItem('aria-describedby');\n }\n }\n\n public componentWillUnmount(): void {\n this.clearHideTimeout();\n this.clearShowTimeout();\n this.removeTargetEvents();\n }\n\n public onMouseOverTooltip(e: MouseEvent): void {\n if (this.hideTimeout) {\n this.clearHideTimeout();\n }\n this.showTimeout = window.setTimeout(this.show.bind(this, e), this.getDelay('show'));\n }\n\n public onMouseLeaveTooltip(e: MouseEvent): void {\n if (this.showTimeout) {\n this.clearShowTimeout();\n }\n this.hideTimeout = window.setTimeout(this.hide.bind(this, e), this.getDelay('hide'));\n }\n\n public onMouseOverTooltipContent(): void {\n if (this.hideTimeout) {\n this.clearHideTimeout();\n }\n }\n\n public onMouseLeaveTooltipContent(e: React.MouseEvent): void {\n if (this.showTimeout) {\n this.clearShowTimeout();\n }\n this.hideTimeout = window.setTimeout(this.hide.bind(this, e.nativeEvent), this.getDelay('hide'));\n }\n\n public onFocusOutTarget(e: Event): void {\n if (!this.props.isOpen) {\n return;\n }\n\n if (this.tabPressed) {\n this.tabPressed = false;\n setTimeout(() => {\n const nextFocus = document.activeElement;\n\n if (!this.ref || !this.ref.current || !this.ref.current.contains(nextFocus)) {\n this.hide(e);\n }\n }, 1);\n } else {\n this.hide(e);\n }\n }\n\n public onEscKeyDown(e: React.KeyboardEvent): void {\n if (e.keyCode === 9) {\n this.tabPressed = true;\n } else if (e.key === 'Escape') {\n this.hide(e.nativeEvent);\n }\n }\n\n public onEscKeyDownNative(e: KeyboardEvent): void {\n if (e.keyCode === 9) {\n this.tabPressed = true;\n } else if (e.key === 'Escape') {\n this.hide(e);\n }\n }\n\n public getDelay(key: 'show' | 'hide'): number {\n const { delay } = this.props;\n if (typeof delay === 'object') {\n return (isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key]);\n }\n\n return delay || 0;\n }\n\n public show(e: Event): void {\n if (!this.props.isOpen) {\n this.clearShowTimeout();\n this.toggle(e);\n\n // Create a new attr for parent obj when tooltip shown\n if (this.target !== null) {\n const ariaAttr = document.createAttribute('aria-describedby');\n ariaAttr.value = this.props.id as string;\n this.target.attributes.setNamedItem(ariaAttr);\n }\n }\n }\n\n public hide(e: Event): void {\n if (this.props.isOpen) {\n this.clearHideTimeout();\n this.toggle(e);\n\n // Remove the attr from parent obj when tooltip is hidden\n if (this.target !== null && this.target.attributes.getNamedItem('aria-describedby') !== null) {\n this.target.attributes.removeNamedItem('aria-describedby');\n }\n }\n }\n\n public clearShowTimeout(): void {\n clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n\n public clearHideTimeout(): void {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n\n public handleDocumentClick(e: Event): void {\n if (!this.target) {\n return;\n }\n\n const target = e.target as HTMLElement;\n if (e.target === this.target || this.target.contains(target)) {\n if (this.hideTimeout) {\n this.clearHideTimeout();\n }\n\n if (!this.props.isOpen) {\n this.toggle(e);\n }\n } else if (this.props.isOpen && target.getAttribute('role') !== 'tooltip') {\n if (this.showTimeout) {\n this.clearShowTimeout();\n }\n this.hideTimeout = window.setTimeout(this.hide.bind(this, e), this.getDelay('hide'));\n }\n }\n\n public addTargetEvents(): void {\n if (!this.target) {\n return;\n }\n\n if (this.props.trigger) {\n const triggers = this.props.trigger.split(' ');\n if (!triggers.includes('manual')) {\n if (triggers.includes('click')) {\n ['click', 'touchstart'].forEach((event: string) => {\n document.addEventListener(event, this.handleDocumentClick, true);\n });\n }\n if (triggers.includes('hover')) {\n this.target.addEventListener('mouseover', this.onMouseOverTooltip, true);\n this.target.addEventListener('mouseout', this.onMouseLeaveTooltip, true);\n }\n if (triggers.includes('focus')) {\n this.target.addEventListener('focusin', this.show, true);\n if (this.props.displayMode === 'FLYOUT') {\n this.target.addEventListener('focusout', this.onFocusOutTarget, true);\n } else {\n this.target.addEventListener('focusout', this.hide, true);\n }\n }\n this.target.addEventListener('keydown', this.onEscKeyDownNative, true);\n }\n } else {\n this.target.addEventListener('mouseover', this.onMouseOverTooltip, true);\n this.target.addEventListener('mouseout', this.onMouseLeaveTooltip, true);\n this.target.addEventListener('keydown', this.onEscKeyDownNative, true);\n this.target.addEventListener('focusin', this.show, true);\n if (this.props.displayMode === 'FLYOUT') {\n this.target.addEventListener('focusout', this.onFocusOutTarget, true);\n } else {\n this.target.addEventListener('focusout', this.hide, true);\n }\n\n ['click', 'touchstart'].forEach((event: string) => {\n document.addEventListener(event, this.handleDocumentClick, true);\n });\n }\n }\n\n public removeTargetEvents(): void {\n if (!this.target) {\n return;\n }\n\n this.target.removeEventListener('mouseover', this.onMouseOverTooltip, true);\n this.target.removeEventListener('mouseout', this.onMouseLeaveTooltip, true);\n this.target.removeEventListener('keydown', this.onEscKeyDownNative, true);\n this.target.removeEventListener('focusin', this.show, true);\n this.target.removeEventListener('focusout', this.onFocusOutTarget, true);\n this.target.removeEventListener('focusout', this.hide, true);\n\n ['click', 'touchstart'].forEach((event: string) => {\n document.removeEventListener(event, this.handleDocumentClick, true);\n });\n }\n\n public toggle(e?: Event): void {\n if (e && this.props.disabled) {\n e.preventDefault();\n }\n\n if (this.props.toggle) {\n this.props.toggle();\n }\n }\n\n public render(): JSX.Element | null {\n if (!this.props.isOpen || this.isMobile) {\n return null;\n }\n\n const {\n cssModule,\n isOpen,\n target,\n placementPrefix,\n hideArrow,\n className,\n innerClassName,\n innerRef,\n modifiers,\n toggle,\n delay,\n placement,\n disabled,\n trigger,\n boundariesElement,\n offset,\n arrowClassName,\n displayMode,\n id,\n ...attributes\n } = this.props;\n\n const classes = mapToCssModules(classNames(\n displayMode === 'FLYOUT' ? 'msc-flyout-inner' : 'msc-tooltip-inner',\n this.props.innerClassName\n ), this.props.cssModule);\n\n const popperClasses = mapToCssModules(classNames(\n displayMode === 'FLYOUT' ? 'msc-flyout' : 'msc-tooltip',\n 'show',\n this.props.className\n ), this.props.cssModule);\n\n return (\n
\n \n {this.props.toggle && this.props.shouldShowCloseButton ? : ''}\n \n \n
\n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport Popover from './Popover';\n\nexport * from './Popover.props';\n\nexport {\n Popover\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nimport { mapToCssModules, TransitionStatuses, TransitionTimeouts } from '../common/utilities';\nimport { ICollapseProps } from './Collapse.props';\n\nexport interface ICollapseState {\n height: number | null;\n}\n\ntype IHash = {\n [key in TransitionStatuses]: string;\n};\n\n/**\n * This is the controlled version of a Collapse component, and as such the toggle behavior is expected to be handled in a parent component.\n * @see See [Uncontrolled Components - React](https://reactjs.org/docs/uncontrolled-components.html) to learn more.\n * @visibleName Collapse (controlled)\n */\nexport default class Collapse extends React.Component {\n public static defaultProps: Partial = {\n isOpen: false,\n tag: 'div',\n timeout: TransitionTimeouts.Collapse\n };\n\n public props: ICollapseProps;\n\n public state: ICollapseState;\n\n private readonly _transitionStatusToClassHash: IHash = {\n entering: 'collapsing',\n entered: 'collapse show',\n exiting: 'collapsing',\n exited: 'collapse'\n };\n\n private readonly _tagRef: React.RefObject = React.createRef();\n\n constructor(props: ICollapseProps) {\n super(props);\n this.props = props;\n\n this.state = {\n height: 0\n };\n\n this._onEntering = this._onEntering.bind(this);\n this._onExit = this._onExit.bind(this);\n this._onExited = this._onExited.bind(this);\n this._onExiting = this._onExiting.bind(this);\n this._reevaluateHeight = this._reevaluateHeight.bind(this);\n }\n\n public componentDidMount(): void {\n window && window.addEventListener('resize', this._reevaluateHeight);\n }\n\n public componentDidUpdate(nextProps: ICollapseProps): void {\n if (nextProps.children !== this.props.children) {\n this._reevaluateHeight();\n }\n }\n\n public componentWillUnmount(): void {\n window && window.removeEventListener('resize', this._reevaluateHeight);\n }\n\n public shouldComponentUpdate(nextProps: ICollapseProps,\n nextState: ICollapseState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n tag,\n isOpen,\n className,\n children,\n navbar,\n cssModule,\n\n in: collapseIn,\n mountOnEnter,\n unmountOnExit,\n appear,\n enter,\n exit,\n timeout,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n\n ...otherProps\n } = this.props;\n\n const Tag = tag || 'div';\n const transitionProps = {\n in: collapseIn,\n mountOnEnter,\n unmountOnExit,\n appear,\n enter,\n exit,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited\n };\n\n const { height } = this.state;\n const style = height === null || height === 0 ? null : { minHeight: height };\n\n return (\n \n {(status: TransitionStatuses) => {\n const collapseClass = this._getTransitionClass(status);\n const classes = mapToCssModules(classNames(className, collapseClass, navbar && 'navbar-collapse'), cssModule);\n\n return (\n \n {children}\n \n );\n }}\n \n );\n }\n\n private _reevaluateHeight(): void {\n const node = this._tagRef.current;\n if (node !== null && node.firstElementChild && node.firstElementChild.scrollHeight > 0) {\n this.setState({ height: node.firstElementChild.scrollHeight });\n }\n }\n\n private _getTransitionClass(status: TransitionStatuses): string {\n return this._transitionStatusToClassHash[status] || 'collapse';\n }\n\n private _onEntering(node: HTMLElement, isAppearing: boolean): void {\n this.setState({ height: node.scrollHeight });\n\n if (this.props.onEntering) {\n this.props.onEntering(node, isAppearing);\n }\n }\n\n private _onExit(node: HTMLElement): void {\n this.setState({ height: node.scrollHeight });\n\n if (this.props.onExit) {\n this.props.onExit(node);\n }\n }\n\n private _onExiting(node: HTMLElement): void {\n this.setState({ height: 0 });\n\n if (this.props.onExiting) {\n this.props.onExiting(node);\n }\n }\n\n /**\n * Get Parent element.\n * @param node - HTML Element.\n */\n private readonly _updateParentElement = (node: HTMLElement): void => {\n const parentElement = node.parentElement;\n if (parentElement) {\n if (parentElement.classList.contains('collapse') && parentElement.classList.contains('show')) {\n parentElement.style.minHeight = 'auto';\n }\n this._updateParentElement(parentElement);\n }\n };\n\n private _onExited(node: HTMLElement): void {\n this.setState({ height: null });\n this._updateParentElement(node);\n\n if (this.props.onExited) {\n this.props.onExited(node);\n }\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport { IButtonProps } from './Button.props';\n\n/**\n * Button component.\n */\nexport default class Button extends React.PureComponent {\n\n public static defaultProps: Partial = {\n tag: 'button',\n outline: false\n };\n\n public props: IButtonProps;\n\n constructor(props: IButtonProps) {\n super(props);\n this.props = props;\n this.onClick = this.onClick.bind(this); // Put this in componentDidMount\n }\n\n public render(): JSX.Element {\n const {\n active,\n block,\n className,\n cssModule,\n color,\n outline,\n size,\n tag,\n innerRef,\n ...attributes\n } = this.props;\n const classes = mapToCssModules(\n classNames(\n className,\n 'msc-btn',\n outline && color ? `btn-outline-${color}` : (color && outline === false ? `btn-${color}` : color === undefined && outline === true ? 'btn-outline' : ''),\n size ? `btn-${size}` : false,\n block ? 'btn-block' : false,\n { active, disabled: this.props.disabled }\n ),\n cssModule\n );\n\n let Tag = tag || 'button';\n\n if (attributes.href && Tag === 'button') {\n Tag = 'a';\n }\n\n return (\n \n );\n }\n\n private readonly onClick = (e: React.MouseEvent) => {\n if (this.props.disabled) {\n e.preventDefault();\n\n return;\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport Alert from './alert/Alert';\nimport { IAlertProps } from './alert/Alert.props';\nimport BackToTop from './back-to-top/BackToTop';\nimport Button from './button/Button';\nimport { IButtonProps } from './button/Button.props';\nimport Collapse from './collapse/Collapse';\nimport { ICollapseProps } from './collapse/Collapse.props';\nimport {\n getPayloadObject, getTelemetryAttributes, getTelemetryObject,\n IContentAction, IPayLoad, ITelemetryContent, onTelemetryClick, TelemetryConstant\n} from './common/telemetryHelper';\nimport ControlledDrawer from './drawer/ControlledDrawer';\nimport Drawer, { IDrawerState } from './drawer/Drawer';\nimport Fade, { IFadeState } from './fade/Fade';\nimport { IFadeProps } from './fade/Fade.props';\nimport Flipper from './flipper/Flipper';\nimport { FormBuilder } from './form-builder/form-builder';\nimport Heading from './heading/Heading';\nimport { HeadingTag, IHeadingProps } from './heading/Heading.props';\nimport { IncrementalQuantity } from './incremental-quantity';\nimport { isMobile } from './isMobile/isMobile';\nimport { VariantType } from './isMobile/isMobile.props';\nimport LabeledDropdown from './labeled-dropdown/LabeledDropdown';\nimport { ILabeledDropdownOnChangeNotification, ILabeledDropdownOption } from './labeled-dropdown/LabeledDropdown.props';\nimport Pagination from './pagination/Pagination';\nimport PaginationItem from './pagination/PaginationItem';\nimport PaginationLink from './pagination/PaginationLink';\nimport UncontrolledPagination from './pagination/UncontrolledPagination';\nimport PopperContent from './popper-content/PopperContent';\nimport Popup, { IPopupProps } from './popup/Popup';\nimport PopupProducts, { IPopupProductsProps } from './popup-products/Popup-products';\nimport Progress from './progress/Progress';\nimport SingleSlideCarousel from './single-slide-carousel/SingleSlideCarousel';\nimport { ISingleSlideCarouselProps } from './single-slide-carousel/SingleSlideCarousel.props';\nimport Slider from './slider/Slider';\nimport { ISliderChangeNotification, ISliderLabel, ISliderProps, ISliderThumbProps } from './slider/Slider.props';\nimport Table, { IDataTableProps, ITableItemProps } from './table/Table';\nimport Tooltip from './tooltip/Tooltip';\nimport UncontrolledTooltip from './tooltip/UncontrolledTooltip';\nimport Waiting from './waiting/Waiting';\nimport { ImagefullView, IModalViewProps } from './zoom-image/ImagefullView';\nimport {\n defaultDataScale, inlineZoomImageOnHover, inlineZoomImageOnMouseMove, inlineZoomImageOnMouseOut, inlineZoomInit,\n inlineZoomInitClick, onContainerZoomInit, onMouseMoveLensContainer, onMouseOutLensContainer,\n onMouseOverImageContainer, removeContainerZoomStyle, removeInlineZoomStyle\n} from './zoom-image/ZoomImage';\n\nexport * from './common/KeyCodes';\nexport * from './common/stringExtensions';\nexport * from './common/utilities';\nexport * from './modal';\nexport * from './popover';\nexport * from './price';\nexport * from './quantity';\nexport * from './table';\nexport * from './wrapper/module';\nexport * from './wrapper/node';\nexport {\n Alert,\n BackToTop,\n Button,\n Collapse,\n ControlledDrawer,\n defaultDataScale,\n Drawer,\n Fade,\n Flipper,\n FormBuilder,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n Heading,\n HeadingTag,\n IAlertProps,\n IButtonProps,\n ICollapseProps,\n IContentAction,\n IDataTableProps,\n IDrawerState,\n IFadeProps,\n IFadeState,\n IHeadingProps,\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption,\n ImagefullView,\n IModalViewProps,\n IncrementalQuantity,\n inlineZoomImageOnHover,\n inlineZoomImageOnMouseMove,\n inlineZoomImageOnMouseOut,\n inlineZoomInit,\n inlineZoomInitClick,\n IPayLoad,\n IPopupProductsProps,\n IPopupProps,\n ISingleSlideCarouselProps,\n ISliderChangeNotification,\n ISliderLabel,\n ISliderProps,\n ISliderThumbProps,\n isMobile,\n ITableItemProps,\n ITelemetryContent,\n LabeledDropdown,\n onContainerZoomInit,\n onMouseMoveLensContainer,\n onMouseOutLensContainer,\n onMouseOverImageContainer,\n onTelemetryClick,\n Pagination,\n PaginationItem,\n PaginationLink,\n PopperContent,\n Popup,\n PopupProducts,\n Progress,\n removeContainerZoomStyle,\n removeInlineZoomStyle,\n SingleSlideCarousel,\n Slider,\n Table,\n TelemetryConstant,\n Tooltip,\n UncontrolledPagination,\n UncontrolledTooltip,\n VariantType,\n Waiting\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { Button } from '..';\nimport { Modal, ModalBody, ModalHeader } from '../modal';\n\nexport interface IPopupProductsProps {\n dialogStrings?: {\n closeWindowButtonText: string;\n };\n\n className: string;\n processStatusClass: string;\n text: string;\n\n modalOpen: boolean | undefined;\n setModalOpen(newValue: boolean): void;\n}\n\nexport const PopupProducts = (popupProps: IPopupProductsProps) => {\n const { processStatusClass, dialogStrings, className, text, modalOpen, setModalOpen } = popupProps;\n\n const closeModal = React.useCallback(() => {\n setModalOpen(false);\n }, [setModalOpen]);\n\n if (!dialogStrings || !text) {\n return null;\n }\n\n return (\n \n \n \n
\n
\n {text}\n
\n \n \n \n );\n};\n\nexport default PopupProducts;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport enum KeyCodes {\n Back = 8,\n Tab = 9,\n Enter = 13,\n Shift = 16,\n Ctrl = 17,\n Alt = 18,\n Break = 19,\n CapsLock = 20,\n Escape = 27,\n Space = 32,\n PageUp = 33,\n PageDown = 34,\n End = 35,\n Home = 36,\n ArrowLeft = 37,\n ArrowUp = 38,\n ArrowRight = 39,\n ArrowDown = 40,\n Print = 44,\n Insert = 45,\n Delete = 46,\n Colon2 = 59, // Opera and Firefox\n Equals2 = 61, // Opera\n Equals3 = 107, // Firefox\n Minus2 = 109, // Opera and Firefox\n Period = 190,\n WindowsLeft = 91,\n WindowsRight = 92,\n WindowsOpera = 219, // Opera\n Menu = 93,\n NumPad0 = 96,\n NumPad1 = 97,\n NumPad2 = 98,\n NumPad3 = 99,\n NumPad4 = 100,\n NumPad5 = 101,\n NumPad6 = 102,\n NumPad7 = 103,\n NumPad8 = 104,\n NumPad9 = 105,\n NumPadMultiply = 106,\n NumPadPlus = 107,\n NumPadMinus = 109,\n NumPadDot = 110,\n NumPadDivide = 111,\n Function1 = 112,\n Function2 = 113,\n Function3 = 114,\n Function4 = 115,\n Function5 = 116,\n Function6 = 117,\n Function7 = 118,\n Function8 = 119,\n Function9 = 120,\n Function10 = 121,\n Function11 = 122,\n Function12 = 123,\n NavigationUp = 138,\n NavigationDown = 139,\n NavigationLeft = 140,\n NavigationRight = 141,\n NavigationAccept = 142,\n NumLock = 144,\n ScrollLock = 145,\n Colon = 186,\n Equals = 187,\n Comma = 188,\n Minus = 189,\n ForwardSlash = 191,\n Tilde = 192,\n GamepadA = 195,\n GamepadB = 196,\n GamepadX = 197,\n GamepadY = 198,\n GamepadRightButton = 199,\n GamepadLeftButton = 200,\n GamepadLeftTrigger = 201,\n GamepadRightTrigger = 202,\n GamepadDPadUp = 203,\n GamepadDPadDown = 204,\n GamepadDPadLeft = 205,\n GamepadDPadRight = 206,\n GamepadSelect = 207,\n GamepadStart = 208,\n GamepadLeftThumbstick = 209,\n GamepadRightThumbstick = 210,\n GamepadLeftThumbstickUp = 211,\n GamepadLeftThumbstickDown = 212,\n GamepadLeftThumbstickRight = 213,\n GamepadLeftThumbstickLeft = 214,\n GamepadRightThumbstickUp = 215,\n GamepadRightThumbstickDown = 216,\n GamepadRightThumbstickRight = 217,\n GamepadRightThumbstickLeft = 218,\n OpenBracket = 219,\n BackSlash = 220,\n CloseBracket = 221,\n Quote = 222\n}\n\n/**\n * Here for test coverage.\n */\nexport class KeycodesClass {\n public testCoverage(): string {\n return ':(';\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { ILabeledDropdownProps } from './LabeledDropdown.props';\n\nexport interface ILabeledDropdownState {\n selectedIndex: number;\n}\n\n/**\n * Labeled Dropdown component.\n */\nexport default class LabeledDropdown extends React.PureComponent {\n public static defaultProps: Partial = {\n toggleColor: 'link'\n };\n\n constructor(props: ILabeledDropdownProps) {\n super(props);\n this._onSelectOption = this._onSelectOption.bind(this);\n const selectedKey = this.props.selectedOption.key;\n const keys = this.props.dropdownOptions.map(option => (option.key));\n this.state = { selectedIndex: keys.indexOf(selectedKey) };\n }\n\n public render(): JSX.Element {\n const {\n labelText,\n labelClassname,\n dropdownId,\n dropdownOptions,\n dropdownClassname\n } = this.props;\n\n const labelClassNames = classNames('msc-l-dropdown__label', labelClassname);\n const dropdownClassNames = classNames('msc-l-dropdown', dropdownClassname);\n const selectedIndex = this._getSelectedIndex();\n\n return (\n <>\n \n \n \n );\n }\n\n private _getSelectedIndex(): number {\n if (this.props.controlledByParent) {\n let selectedIndex = -1;\n const selectedKey = this.props.selectedOption.key;\n for (let i = 0; i < this.props.dropdownOptions.length; i++) {\n if (this.props.dropdownOptions[i].key === selectedKey) {\n selectedIndex = i;\n break;\n }\n }\n\n return selectedIndex;\n }\n\n return this.state.selectedIndex;\n }\n\n private _onSelectOption(event: React.ChangeEvent): void {\n const {\n dropdownOptions,\n onSelectOption\n } = this.props;\n const index = event.currentTarget.selectedOptions[0].index;\n const selectedOption = dropdownOptions[index];\n this.setState({ selectedIndex: index });\n onSelectOption({ selectedOption });\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\nimport { INodeProps } from './node';\n\nexport interface IModuleProps extends INodeProps {\n moduleProps: Msdyn365.IModule;\n}\n\nexport const Module: React.FC = ({ className = '', id = '', tag: Tag = 'div', moduleProps, ...restAttribute }) => (\n \n);\n\nexport default Module;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\n\nexport enum VariantType {\n Browser,\n Viewport\n}\n\n/**\n * IsMobile properties.\n */\nexport interface IMobileProps {\n\n /**\n * Contains variant i.e browser | viewport.\n */\n variant?: VariantType;\n context?: Msdyn365.IRequestContext;\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport debounce from 'lodash/debounce';\nimport * as React from 'react';\n\nimport { IQuantityProps } from './Quantity.props';\n\ninterface IQuantityState {\n currentInput: number;\n}\n\n/**\n * Quantity Component - This component is used to allow input of quantity between a\n * range of values.\n */\n\nexport default class Quantity extends React.PureComponent {\n public static defaultProps: Partial = {\n min: 1\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n constructor(props: IQuantityProps) {\n super(props);\n this.state = { currentInput: props.currentCount ?? 1 };\n this._handleChange = this._handleChange.bind(this);\n }\n\n public render(): JSX.Element {\n const currentValue = this.state.currentInput;\n\n return (\n \n );\n }\n\n private _handleChange(e: React.ChangeEvent): void {\n const currentValue = Number.parseInt((e.target.value), 10);\n const minValue = this.props.min === undefined ? 1 : this.props.min;\n const inputElement = this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\n\n if (currentValue > this.props.max) {\n this.setState(\n { currentInput: this.props.max },\n () => {\n debounce(\n () => {\n this.props.onChange && this.props.onChange(this.state.currentInput);\n },\n 200)();\n }\n );\n } else {\n this.setState(\n { currentInput: currentValue },\n () => {\n debounce(\n () => {\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue)) {\n this.props.onChange && this.props.onChange(this.state.currentInput);\n\n if (inputElement) {\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\n inputElement.setAttribute('value', currentValue.toString());\n }\n }\n },\n 200)();\n }\n );\n }\n }\n\n private readonly _validateMin = (): void => {\n const minValue = this.props.min === undefined ? 1 : this.props.min;\n if (isNaN(this.state.currentInput) || (this.state.currentInput < minValue)) {\n this.setState({ currentInput: minValue }, () => {\n this.props.onChange && this.props.onChange(this.state.currentInput);\n });\n } else {\n this.props.onChange && this.props.onChange(this.state.currentInput);\n }\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport IncrementalQuantity from './IncrementalQuantity';\n\nexport * from './IncrementalQuantity.props';\n\nexport {\n IncrementalQuantity\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\nimport Button from '../button/Button';\nimport { Popover } from '../popover';\n\n/**\n * Resources for the price editor mode selection.\n */\nexport interface IPriceEditorModeSelectionResources {\n specifyAmountButtonText: string;\n payFullAmountButtonText: string;\n}\n\n/**\n * Props for the price editor mode selection.\n */\nexport interface IPriceEditorModeSelectionProps {\n className: string;\n\n resources: IPriceEditorModeSelectionResources;\n\n currentState: PriceEditorModeSelectionState;\n onStateChanged(state: PriceEditorModeSelectionState): void;\n}\n\n/**\n * Defines editor modes for the amount.\n */\nexport enum PriceEditorModeSelectionState {\n full = 0,\n partial = 1\n}\n\n/**\n * Retrieves resource value based by the given mode state.\n * @param modeState - Given state.\n * @param resources - All resources.\n * @returns Resource value for the given state.\n */\nconst getPriceEditorModeSelectionStateResources = (modeState: PriceEditorModeSelectionState, resources: IPriceEditorModeSelectionResources): string => {\n switch (modeState) {\n case PriceEditorModeSelectionState.full:\n return resources.payFullAmountButtonText;\n case PriceEditorModeSelectionState.partial:\n return resources.specifyAmountButtonText;\n default:\n throw new Error('Failed to retrieve resource description for unknown price editor selection state.');\n }\n};\n\n/**\n * On click functionality.\n * @param handleStateChange - Handle change state function.\n * @param modeState - New state.\n * @returns Event handler.\n */\nconst onClickHandler = (handleStateChange: (modeState: PriceEditorModeSelectionState) => void, modeState: PriceEditorModeSelectionState) => () => {\n handleStateChange(modeState);\n};\n\n/**\n * Renders a button that allows to update the mode to the given state.\n * @param modeState - The state to render.\n * @param resources - Resource values.\n * @param className - Element class name.\n * @param handleStateChange - Event handler to update the state.\n * @returns React node.\n */\nconst renderModeStateItem = (\n modeState: PriceEditorModeSelectionState,\n resources: IPriceEditorModeSelectionResources,\n className: string,\n handleStateChange: (modeState: PriceEditorModeSelectionState) => void): React.ReactNode => {\n\n const stateStringRepresentation = PriceEditorModeSelectionState[modeState];\n\n return (\n \n );\n};\n\n/**\n * On Toggle Popover functionality.\n * @param setPopoverState -Set popover state function.\n * @param isPopoverState -Boolean value.\n * @returns Set toggle popover state functionality.\n */\nconst togglePopoverHandler = (setPopoverState: React.Dispatch>, isPopoverState: boolean) => () => {\n setPopoverState(!isPopoverState);\n};\n\n/**\n * Price editor component which handles selection modes (for instance, full or partial amount).\n * @param props - Configuration of the component.\n * @returns React element.\n */\nexport const PriceEditorModeSelectionComponent: React.FC = (props: IPriceEditorModeSelectionProps) => {\n const popoverReference = React.createRef();\n const [isPopoverShown, setIsPopoverShown] = React.useState(false);\n\n const [modeState, setModeState] = React.useState(props.currentState);\n\n /**\n * Updates component state when a selection is changed.\n * @param clickedState - New mode state.\n */\n const onChangeMode = (clickedState: PriceEditorModeSelectionState) => {\n setModeState(clickedState);\n setIsPopoverShown(false);\n props.onStateChanged(clickedState);\n };\n\n return (\n
\n \n {getPriceEditorModeSelectionStateResources(modeState, props.resources)}\n \n \n {\n EnumExtensions.getEnumValues(PriceEditorModeSelectionState).map(state => {\n return renderModeStateItem(state, props.resources, props.className, onChangeMode);\n })\n }\n \n
\n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IPriceEditorModeSelectionResources, PriceEditorModeSelectionComponent, PriceEditorModeSelectionState } from './price-editor-mode-selection';\n\n/**\n * Resources for price editor.\n */\nexport interface IPriceEditorResources extends IPriceEditorModeSelectionResources {\n priceEditorInputAriaLabel: string;\n}\n\n/**\n * The props required to render the component.\n */\nexport interface IPriceEditorProps {\n className: string;\n\n defaultAmount: number;\n\n resources: IPriceEditorResources;\n\n minimumValue?: number;\n maximumValue?: number;\n\n handleChange?(newValue: number): void;\n}\n\n/**\n * The state of the component.\n */\nexport interface IPriceEditorState {\n currentValue?: number;\n isInputFocused: boolean;\n}\n\n/**\n * Provides an input field which allows entering a price amount.\n */\nexport class PriceEditor extends React.PureComponent {\n\n private static readonly _precision = 2;\n\n private readonly _inputRef: React.RefObject;\n\n public constructor(props: IPriceEditorProps) {\n super(props);\n\n this._inputRef = React.createRef();\n\n let defaultValue = props.defaultAmount;\n\n if (!ObjectExtensions.isNullOrUndefined(this.props.minimumValue) && defaultValue < this.props.minimumValue) {\n defaultValue = this.props.minimumValue;\n } else if (!ObjectExtensions.isNullOrUndefined(this.props.maximumValue) && defaultValue > this.props.maximumValue) {\n defaultValue = this.props.maximumValue;\n }\n\n this.state = {\n currentValue: defaultValue,\n isInputFocused: false\n };\n }\n\n public render(): JSX.Element {\n const containerClassName = 'msc-price-editor';\n\n const hasMultipleModes = !ObjectExtensions.isNullOrUndefined(this.props.maximumValue);\n\n let mode = PriceEditorModeSelectionState.partial;\n\n if (!ObjectExtensions.isNullOrUndefined(this.props.maximumValue) && this.state.currentValue === this.props.maximumValue) {\n mode = PriceEditorModeSelectionState.full;\n }\n\n const formattedValue = this.state.currentValue?.toFixed(PriceEditor._precision) ?? '';\n const editedValue = this.state.currentValue ?? '';\n\n return (\n
\n \n {\n hasMultipleModes &&
\n \n
\n }\n
\n );\n }\n\n /**\n * Handles input focus.\n */\n private readonly _handleInputFocus = () => {\n this.setState({ isInputFocused: true });\n };\n\n /**\n * Handles input blur.\n */\n private readonly _handleInputBlur = () => {\n this.setState({ isInputFocused: false });\n };\n\n /**\n * Handles editor mode state change.\n * @param newState - New selection mode state.\n */\n private readonly _handleEditorModeStateChange = (newState: PriceEditorModeSelectionState) => {\n if (newState === PriceEditorModeSelectionState.full) {\n this._updateAmount(this.props.maximumValue!);\n } else {\n this.setState({ currentValue: undefined });\n this._inputRef.current?.focus();\n }\n };\n\n /**\n * Update the price and calls corresponding callbacks.\n * @param newAmount - New price amount.\n */\n private readonly _updateAmount = (newAmount: number) => {\n this.setState({ currentValue: newAmount });\n\n if (this.props.handleChange) {\n this.props.handleChange(newAmount);\n }\n };\n\n /**\n * Handles value change.\n * @param event - React change event.\n */\n private readonly _handleChange = (event: React.ChangeEvent) => {\n let currentValue = Number.parseFloat(event.target.value);\n\n if (Number.isNaN(currentValue)) {\n this.setState({ currentValue: undefined });\n return;\n }\n\n currentValue = +currentValue.toFixed(PriceEditor._precision);\n\n if (!ObjectExtensions.isNullOrUndefined(this.props.minimumValue) && currentValue < this.props.minimumValue) {\n this._updateAmount(this.props.minimumValue);\n } else if (!ObjectExtensions.isNullOrUndefined(this.props.maximumValue) && currentValue > this.props.maximumValue) {\n this._updateAmount(this.props.maximumValue);\n } else {\n this._updateAmount(currentValue);\n }\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '../common/telemetryHelper';\nimport { mapToCssModules } from '../common/utilities';\nimport { IPaginationLinkProps } from './PaginationLink.props';\n\n/**\n * PaginationLink component.\n */\nexport default class PaginationLink extends React.PureComponent {\n public static defaultProps: Partial = {\n tag: 'a',\n role: 'link'\n };\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: IPaginationLinkProps) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public render(): JSX.Element {\n let { className, cssModule, next, previous, tag: Tag, children, telemetryContent, ...props }: any = this.props;\n let etext: string = children;\n const paginationLinkclasses = mapToCssModules(classNames(className, 'msc-page-link'), cssModule);\n\n let defaultCaret;\n if (previous) {\n defaultCaret = '\\u00AB';\n etext = 'previous';\n } else if (next) {\n defaultCaret = '\\u00BB';\n etext = 'next';\n }\n\n if (children && Array.isArray(children) && children.length === 0) {\n children = null;\n }\n if (!props.href && Tag === 'a') {\n Tag = 'span';\n }\n\n if (previous || next) {\n children = [\n (\n \n {children || defaultCaret}\n \n )\n ];\n }\n\n this.payLoad.contentAction.etext = etext;\n const attribute = getTelemetryAttributes(telemetryContent, this.payLoad);\n\n return (\n \n {children}\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport { Modal, ModalBody, ModalHeader, Node } from '..';\n\nexport interface IModalViewProps {\n classNames?: string;\n galleryCarousel: React.ReactElement;\n modalIsOpen: boolean;\n ontoggle(): void;\n}\n\nexport const ImagefullView: React.FC = (props: IModalViewProps): React.ReactElement => {\n const body = (\n \n { props.galleryCarousel }\n \n );\n\n const modalWindow = (\n \n );\n\n const modalHeader = (\n \n );\n\n return React.cloneElement(modalWindow, {}, modalHeader, body);\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, UncontrolledTooltip } from '..';\nimport { IFlipperProps } from './Flipper.props';\n\nexport type FlipperSize = 'small' | 'medium' | 'large';\n\n/**\n * Flipper Component - This component is used to add\n * flippers to a carousel/jumbotron.\n */\nexport default class Flipper extends React.PureComponent {\n private readonly payLoad: IPayLoad;\n\n constructor(props: IFlipperProps) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, this.props.telemetryLabel!);\n }\n\n public render(): JSX.Element {\n const { className, glyphProps, size, displayTooltip, disabled, telemetryContent, telemetryLabel, ...props } = this.props;\n const sizeClass = size === 'small' ? 'msc-flipper__small' : (size === 'large' ? 'msc-flipper__large' : '');\n const classNames = className ? `msc-flipper ${sizeClass} ${className}` : `msc-flipper ${sizeClass}`;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n\n // Do not flip next/previous glyphs in RTL (commonly chevron-left and chevron-right)\n glyphProps.className = `${glyphProps.className} msc-no-rtl-flip-required`;\n\n return (\n <>\n \n \n \n {displayTooltip && !disabled && \n {' '}\n {props['aria-label']}\n }\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport * from './checkbox';\nexport * from './Table';\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365 from '@msdyn365-commerce/core';\n\nimport { IMobileProps, VariantType } from './isMobile.props';\n\n/**\n * IsMobile component.\n * @param props\n */\nexport const isMobile = (props: IMobileProps) => {\n const { variant, context } = props;\n switch (variant) {\n case VariantType.Browser:\n if (MsDyn365.isBrowser && window.innerWidth) {\n const gridSettings = context?.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n\n }\n }\n\n return 'lg';\n case VariantType.Viewport:\n const viewport = context?.device?.Type === 'Mobile' ? 'xs' : 'lg';\n return viewport;\n default:\n return 'lg';\n }\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IRequestContext } from '@msdyn365-commerce/core';\nimport { debounce } from 'lodash';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isMobile, VariantType } from '..';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, TelemetryConstant } from '../common/telemetryHelper';\nimport { IIncrementalQuantityProps } from './IncrementalQuantity.props';\n\n/**\n * IIncrementalQuantityState interface.\n */\ninterface IIncrementalQuantityState {\n currentInput: number;\n isUpdating: boolean;\n}\n\n/**\n * Quantity Component - This component is used to add or remove quantity.\n */\n@observer\nexport default class IncrementalQuantity extends React.PureComponent {\n public static defaultProps: Partial = {\n min: 1,\n decrementGlyphClass: 'fas fa-minus',\n incrementGlyphClass: 'fas fa-plus'\n };\n\n private readonly _minValue: number;\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: IIncrementalQuantityProps) {\n super(props);\n this.state = { currentInput: props.currentCount ?? 1, isUpdating: false };\n this._onIncrement = this._onIncrement.bind(this);\n this._onDecrement = this._onDecrement.bind(this);\n this._handleChange = this._handleChange.bind(this);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n this._minValue = this.props.min ?? IncrementalQuantity.defaultProps.min!;\n }\n\n public static getDerivedStateFromProps(props: Readonly, state: IIncrementalQuantityState): IIncrementalQuantityState {\n const nextState = { ...state };\n\n if (props.disabled && !state.isUpdating) {\n nextState.isUpdating = true;\n }\n\n if (!props.disabled && state.isUpdating) {\n nextState.currentInput = props.currentCount ?? 1;\n nextState.isUpdating = false;\n }\n return nextState;\n }\n\n public render(): JSX.Element {\n const {\n min,\n max\n } = this.props;\n\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\n const decrementDisabled = this.state.currentInput <= (min ?? 1) || this.props.isGiftCard;\n const incrementDisabled = this.state.currentInput >= max || this.props.isGiftCard;\n const currentValue = this.state.currentInput;\n this.payLoad.contentAction.etext = TelemetryConstant.DecrementQuantity;\n const decrementAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.IncrementQuantity;\n const incrementAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n const ariaLablelText = `${this.props.inputQuantityAriaLabel ?? ''} ${this.state.currentInput}`;\n\n let extraClassDecrement = '';\n if (decrementDisabled) {\n // The quantity has reached its boundaries (max or min)\n extraClassDecrement = 'disabled';\n\n } else if (this.props.disabled) {\n // This.props.disabled shows if the state is not succeded yet\n extraClassDecrement = 'transition';\n }\n let extraClassIncrement = '';\n if (incrementDisabled) {\n // The quantity has reached its boundaries (max or min)\n extraClassIncrement = 'disabled';\n } else if (this.props.disabled) {\n // This.props.disabled shows if the state is not succeded yet\n extraClassIncrement = 'transition';\n }\n\n return (\n <>\n
\n \n \n \n \n \n \n \n
\n \n );\n }\n\n /**\n * It checks if its in mobile view or not.\n * @returns Boolean.\n */\n private readonly isMobileView = (): boolean => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Added gridsetting values.\n const context = {\n gridSettings: {\n xs: { w: 767 },\n sm: { w: 991 },\n md: { w: 1199 },\n lg: { w: 1599 },\n xl: { w: 1600 }\n }\n } as IRequestContext;\n\n const isMobileCheck = isMobile({ variant: VariantType.Browser, context });\n return isMobileCheck === 'xs' || isMobileCheck === 'sm';\n };\n\n private _onIncrement(): void {\n let invokeCallback = false;\n const currQuantity = this.state.currentInput;\n let updatedQuantity: number;\n\n if (currQuantity < this.props.max) {\n invokeCallback = true;\n updatedQuantity = currQuantity + 1;\n } else {\n invokeCallback = false;\n updatedQuantity = this.props.max;\n }\n\n if (invokeCallback && this.props.onChange) {\n if (this.props.onChange(updatedQuantity)) {\n this.setState({ currentInput: updatedQuantity });\n }\n }\n }\n\n private _onDecrement(): void {\n let invokeCallback = false;\n const currQuantity = this.state.currentInput;\n let updatedQuantity: number;\n\n if (currQuantity >= this._minValue) {\n invokeCallback = true;\n updatedQuantity = currQuantity - 1;\n } else {\n invokeCallback = false;\n updatedQuantity = this._minValue;\n }\n\n if (invokeCallback && this.props.onChange) {\n if (this.props.onChange(updatedQuantity)) {\n this.setState({ currentInput: updatedQuantity });\n }\n }\n }\n\n private _handleChange(e: React.ChangeEvent): void {\n let currentValue = Number.parseInt((e.target.value), 10);\n if (!Number.isNaN(currentValue)) {\n currentValue = Math.min(this.props.max, Math.max(this._minValue, currentValue));\n }\n this.setState(\n { currentInput: currentValue }\n );\n }\n\n /**\n * Updates html element and triggers callbacks whenever state is changed.\n */\n private readonly _handleUpdateState = () => {\n debounce(() => {\n if (Number.isNaN(this.state.currentInput)) {\n return;\n }\n\n // Due of usage debouncer, we may ignore onChange return value\n this.props.onChange && this.props.onChange(this.state.currentInput);\n\n const inputElement = this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\n if (inputElement) {\n inputElement.setAttribute('aria-valuenow', this.state.currentInput.toString());\n inputElement.setAttribute('value', this.state.currentInput.toString());\n }\n }, 200)();\n };\n\n /**\n * Validates min and updates.\n */\n private readonly _validateMin = (): void => {\n if (Number.isNaN(this.state.currentInput)) {\n this.setState(\n { currentInput: this._minValue },\n this._handleUpdateState\n );\n } else {\n const currentValue = Math.min(this.props.max, Math.max(this._minValue, this.state.currentInput));\n if (currentValue !== this.state.currentInput) {\n this.setState(\n { currentInput: currentValue },\n this._handleUpdateState\n );\n } else {\n this._handleUpdateState();\n }\n }\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { Button } from '..';\nimport Collapse from '../collapse/Collapse';\nimport { ICollapseProps } from '../collapse/Collapse.props';\nimport { IDrawerProps } from './Drawer.props';\n\n/**\n * Drawer State Interface\n */\nexport interface IDrawerState {\n isOpen: boolean;\n buttonText?: string;\n}\n\n/**\n * Glyph placement type.\n */\nexport type GlyphPlacement = 'start' | 'end';\n\n/**\n * Drawer - This is a full width uncontrolled collapse where the button glyph changes\n * when the drawer is open and closed.\n */\n\nexport default class Drawer extends React.PureComponent {\n public state: IDrawerState;\n\n private readonly drawerOpenGlyph: string;\n\n private readonly drawerCloseGlyph: string;\n\n private readonly drawerGlyphClass: string;\n\n private isManuallyToggled: boolean;\n\n constructor(props: IDrawerProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this.isManuallyToggled = false;\n this.state = { isOpen: (props.collapseProps?.isOpen) ?? false, buttonText: '' };\n this.drawerGlyphClass = classnames('drawer__glyph',\n\n this.props.toggleGlyphClassName ? this.props.toggleGlyphClassName : '');\n\n if (this.props.animateGlyph) {\n this.drawerOpenGlyph = classnames(this.drawerGlyphClass,\n\n this.props.openGlyph ? this.props.openGlyph : (this.props.closeGlyph ? this.props.closeGlyph : ''));\n this.drawerCloseGlyph = this.drawerOpenGlyph;\n } else {\n this.drawerOpenGlyph = classnames(this.drawerGlyphClass,\n\n this.props.openGlyph ? this.props.openGlyph : '');\n this.drawerCloseGlyph = classnames(this.drawerGlyphClass,\n\n this.props.closeGlyph ? this.props.closeGlyph : '');\n }\n }\n\n public render(): JSX.Element {\n const collapseProps = { ...this.props.collapseProps } as ICollapseProps;\n\n // If the drawer is manually toggled by pressing the button, then we use the internal state\n if (collapseProps.isOpen === undefined || this.isManuallyToggled) {\n collapseProps.isOpen = this.state.isOpen;\n } else {\n this.state.isOpen = collapseProps.isOpen;\n }\n collapseProps.children = this.props.children;\n const drawerClass = classnames('drawer',\n\n this.props.className ? this.props.className : '');\n this.isManuallyToggled = false;\n return (\n
\n \n {this._generateDrawerButtonInnerMarkup(collapseProps.isOpen)}\n \n \n
\n );\n }\n\n /**\n * Method generate drawer inner markup.\n * @param collapseState -Drawer button collapse state.\n * @returns Jsx element.\n */\n private _generateDrawerButtonInnerMarkup(collapseState: boolean): JSX.Element {\n const drawerButtonTextClass = classnames('drawer__buttontext',\n\n this.props.toggleButtonClassName ? this.props.toggleButtonClassName : '');\n if (this.props.glyphPlacement === 'end') {\n return (\n <>\n \n {this.props.toggleButtonText}\n \n {this._generateGlyphMarkup('drawer__glyph__end', collapseState)}\n \n );\n }\n\n if (this.props.glyphPlacement === 'start') {\n return (\n <>\n {this._generateGlyphMarkup('drawer__glyph__start', collapseState)}\n \n {this.props.toggleButtonText}\n \n \n );\n }\n return (\n {this.props.toggleButtonText}\n );\n\n }\n\n /**\n * Method generate glyph markup.\n * @param location -Glyph icon location.\n * @param collapseState -Drawer button collapse state.\n * @returns Jsx element.\n */\n private _generateGlyphMarkup(location: string, collapseState: boolean): JSX.Element {\n let glyphClass = collapseState ? this.drawerOpenGlyph : this.drawerCloseGlyph;\n glyphClass = `${glyphClass} ${location}`;\n return (\n \n );\n }\n\n /**\n * Method on click of drawer button.\n * @param e -Mouse event for drawer button.\n */\n private _toggle(e: React.MouseEvent | React.KeyboardEvent): void {\n e.preventDefault();\n this.isManuallyToggled = true;\n\n if (this.props.onToggle) {\n this.setState({ isOpen: !this.state.isOpen, buttonText: e.currentTarget.innerText }, () => this.props.onToggle && this.props.onToggle(this.state));\n } else {\n this.setState({ isOpen: !this.state.isOpen });\n }\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IComponentProps, IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '..';\nimport { Modal, ModalBody, ModalHeader } from '../modal';\n\nexport interface IPopupProps extends IComponentProps<{ product: SimpleProduct | undefined; price: ProductPrice | undefined }> {\n dialogStrings?: {\n goToCartText: string;\n continueShoppingText: string;\n headerItemOneText: string;\n headerItemFormatText: string;\n headerMessageText: string;\n freePriceText: string;\n originalPriceText: string;\n currentPriceText: string;\n };\n\n className: string;\n imageSettings?: IImageSettings;\n gridSettings: IGridSettings | undefined;\n productQuantity: number;\n priceComponent: React.ReactNode;\n navigationUrl?: string;\n modalOpen: boolean | undefined;\n telemetryContent?: ITelemetryContent;\n setModalOpen(newValue: boolean): void;\n}\n\nexport const Popup = (popupProps: IPopupProps) => {\n const { dialogStrings, className, imageSettings, gridSettings, data: { product, price }, productQuantity, priceComponent, navigationUrl, modalOpen, telemetryContent, setModalOpen, context } = popupProps;\n const closeModal = React.useCallback(() => {\n setModalOpen(false);\n }, [setModalOpen]);\n if (!dialogStrings || !product) {\n return null;\n }\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.ContinueShopping);\n const continueShoppingAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ViewBagAndCheckout;\n const viewBagAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n const fallbackImageUrl = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n const quantity = productQuantity !== undefined ? productQuantity : 1;\n const itemsString = quantity === 1 ? dialogStrings.headerItemOneText : dialogStrings.headerItemFormatText.replace('{0}', quantity.toString());\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const shouldDisplayUnitOfMeasure = context.app.config?.unitOfMeasureDisplayType && context.app.config.unitOfMeasureDisplayType !== 'none';\n\n const reducedDimensions: string = product.Dimensions ? product.Dimensions.reduce(\n (str, productDimension) => {\n if (productDimension.DimensionValue && productDimension.DimensionValue.Value) {\n if (str) {\n return `${str}, ${productDimension.DimensionValue.Value}`;\n }\n\n return `${productDimension.DimensionValue.Value}`;\n }\n\n return str;\n },\n '') : '';\n\n return (\n \n \n \n {itemsString}\n \n \n {dialogStrings.headerMessageText}\n \n \n \n \n \n {product.Name}\n \n {reducedDimensions !== '' ?
\n {reducedDimensions}\n
: ''}\n {price ? (\n
\n {priceComponent}\n
\n ) : ''}\n {product.DefaultUnitOfMeasure && shouldDisplayUnitOfMeasure ? (\n
\n \n {product.DefaultUnitOfMeasure}\n \n
\n ) : ''}\n \n {dialogStrings.goToCartText}\n \n \n {dialogStrings.continueShoppingText}\n \n
\n \n );\n};\n\nexport default Popup;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeadingProps } from './Heading.props';\n\n/**\n * Heading component.\n * @extends {React.PureComponent}\n */\n\nconst Heading = ({ headingTag: HTag = 'h1', tag: Tag, className, text }: IHeadingProps) => (\n Tag ? \n {text}\n : \n {text}\n \n);\n\nexport default Heading;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport { Data } from 'popper.js';\nimport * as React from 'react';\nimport { Arrow, Popper as ReactPopper } from 'react-popper';\n\nimport { getTargetElement, mapToCssModules } from '../common/utilities';\nimport { IPopperContentProps } from './PopperContent.props';\n\nexport interface IPopperContentState {\n placement?: string;\n isOpen: boolean;\n}\n\n/**\n * Renders popper content. This is an internal helper class shared between components.\n */\nexport default class PopperContent extends React.Component {\n\n public static defaultProps: Partial = {\n boundariesElement: 'scrollParent',\n placement: 'auto',\n hideArrow: false,\n isOpen: false,\n offset: 0,\n fallbackPlacement: 'flip',\n flip: true,\n container: 'body',\n modifiers: {}\n };\n\n constructor(props: IPopperContentProps) {\n super(props);\n\n this._handlePlacementChange = this._handlePlacementChange.bind(this);\n this.state = { isOpen: props.isOpen };\n }\n\n public componentDidMount(): void {\n this._handleProps();\n }\n\n public componentDidUpdate(prevProps: IPopperContentProps): void {\n if (this.props.isOpen !== prevProps.isOpen) {\n this._handleProps();\n }\n }\n\n public shouldComponentUpdate(nextProps: IPopperContentProps,\n nextState: IPopperContentState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n return this.props.isOpen ? this._renderChildren() : null;\n }\n\n private _handlePlacementChange(data: Data): Data {\n if (this.state.placement !== data.placement) {\n this.setState({ placement: data.placement });\n }\n\n return data;\n }\n\n private _handleProps(): void {\n if (this.props.container !== 'inline') {\n if (this.props.isOpen) {\n this._show();\n } else {\n this._hide();\n }\n }\n }\n\n private _hide(): void {\n this.setState({ isOpen: false });\n }\n\n private _show(): void {\n this.setState({ isOpen: true });\n }\n\n private _renderChildren(): JSX.Element | null {\n const {\n cssModule,\n children,\n isOpen,\n flip,\n offset,\n target,\n fallbackPlacement,\n focusOut,\n placementPrefix,\n arrowClassName: arrowClassNameOrUndefined,\n hideArrow,\n className,\n tag,\n modifiers,\n boundariesElement,\n ...attrs\n } = this.props;\n\n const arrowClassName = mapToCssModules(\n classNames(\n 'msc-arrow',\n arrowClassNameOrUndefined\n ),\n cssModule\n );\n\n const placement = (this.state.placement || attrs.placement || 'auto').split('-')[0];\n const popperClassName = mapToCssModules(\n classNames(\n className,\n placementPrefix ? `${placementPrefix}-${placement}` : placement\n ),\n this.props.cssModule\n );\n\n const extendedModifiers = {\n offset: { offset },\n flip: { enabled: flip, behavior: fallbackPlacement },\n preventOverflow: { boundariesElement },\n update: {\n enabled: true,\n order: 950,\n fn: this._handlePlacementChange\n },\n ...modifiers\n };\n\n const targetElement = getTargetElement(target);\n if (targetElement === null) {\n return null;\n }\n\n return (\n \n {children}\n {!hideArrow && }\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Transition, { ENTERED, ENTERING, EXITED, EXITING, UNMOUNTED } from 'react-transition-group/Transition';\n\nimport { mapToCssModules, TransitionTimeouts } from '../common/utilities';\nimport { IFadeProps } from './Fade.props';\n\nexport interface IFadeState {\n fadeIn: boolean;\n}\n\ntype TransitionStatus =\n typeof ENTERING |\n typeof ENTERED |\n typeof EXITING |\n typeof EXITED |\n typeof UNMOUNTED;\n\n/**\n * Fade component.\n */\nexport default class Fade extends React.Component {\n\n public static defaultProps: Partial = {\n tag: 'div',\n baseClass: 'fade',\n baseClassActive: 'show',\n timeout: TransitionTimeouts.Fade,\n in: true,\n appear: true,\n enter: true,\n exit: true\n };\n\n public shouldComponentUpdate(nextProps: IFadeProps): boolean {\n if (nextProps.in || (this.props.in !== nextProps.in)) {\n return true;\n }\n return false;\n }\n\n public render(): JSX.Element | null {\n const {\n tag,\n className,\n cssModule,\n baseClass,\n baseClassActive,\n\n appear,\n enter,\n exit,\n in: fadeIn,\n mountOnEnter,\n unmountOnExit,\n timeout: timeoutOrUndefined,\n addEndListener,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children,\n\n ...otherProps } = this.props;\n const timeout = timeoutOrUndefined !== undefined ? timeoutOrUndefined : TransitionTimeouts.Fade;\n\n const transitionProps = {\n appear,\n enter,\n exit,\n in: fadeIn,\n mountOnEnter,\n unmountOnExit,\n timeout,\n addEndListener,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children\n };\n\n const Tag = this.props.tag ? this.props.tag : 'div';\n const baseClassAlways = baseClass || 'fade';\n const baseClassActiveAlways = baseClassActive || 'show';\n\n return (\n \n {(status: TransitionStatus) => {\n const isActive = status === 'entered';\n const classes = mapToCssModules(\n classNames([\n className,\n baseClassAlways,\n isActive && baseClassActiveAlways\n ]),\n cssModule\n );\n\n return (\n \n {children}\n \n );\n }}\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IDictionary, TelemetryEvent } from '@msdyn365-commerce/core';\nimport { ITelemetry } from '@msdyn365-commerce/telemetry-internal';\n\nexport interface IContentAction {\n pgname: string;\n mname: string;\n etext?: string;\n recid?: string;\n etype?: string;\n}\n\nexport interface IPayLoad {\n contentCategory: string;\n contentAction: IContentAction;\n}\n\nexport interface ITelemetryContent {\n pageName: string;\n moduleName: string;\n telemetry?: ITelemetry;\n}\n\nexport enum TelemetryConstant {\n ShopSimliarLooks = 'shop similar looks',\n ShopSimliarDescription = 'shop similar description',\n PickupInStore = 'pick up in store',\n PreferredStore = 'set as preferred store',\n RemovePreferredStore = 'remove preferred store',\n IncrementQuantity = 'Increment quantity',\n DecrementQuantity = 'Decrement quantity',\n Checkout = 'Checkout',\n GuestCheckout = 'Guest checkout',\n BackToShopping = 'Back to shopping',\n ApplyPromoCode = 'Apply promo code',\n ViewMore = 'View more',\n OrderDetails = 'Order details',\n AvailablePoints = 'Available points',\n ExpiringPoints = 'Expiring points',\n AddUser = 'Add user',\n BuyItAgain = 'Buy it again',\n ContactNumber = 'ContactNumber',\n CheckoutChange = 'Change',\n Save = 'Save',\n SaveContinue = 'Save and Continue',\n Cancel = 'Cancel',\n DeliveryOptions = 'Delivery options',\n CheckoutTermsAndConditions = 'Checkout terms and conditions',\n ExpandAll = 'Expand all',\n CollapseAll = 'Collapse all',\n Expand = 'Expand',\n Collapse = 'Collapse',\n SignIn = 'Sign in',\n SignUp = 'Sign up',\n SignOut = 'Sign out',\n LoyaltyDetailLink = 'Loyalty detail ink',\n LoyaltyTermsLink = 'Loyalty terms link',\n LoyaltyTermsCancel = 'Loyalty terms cancel',\n LoyaltyTermsSubmit = 'Loyalty terms submit',\n LoyaltyTermsAgree = 'Loyalty terms agree',\n RemoveCartItem = 'Remove cart item',\n EditCart = 'Edit cart',\n BackToTop = 'Back to top',\n Logo = 'Logo',\n NavIcon = 'Navigation icon',\n ViewBagAndCheckout = 'View bag and checkout',\n ContinueShopping = 'Continue shopping',\n AddOrderTemplateToCart = 'Add order template to cart',\n PromoBannerClose = 'Close promo banner',\n WriteReview = 'Write Review',\n Next = 'Next',\n Previous = 'Previous',\n SubmitReview = 'Submit review',\n SuccessButton = 'Success',\n SearchStore = 'Search store',\n ShowAllStore = 'Show all store',\n ToggleMapView = 'Toggle map view',\n PrivacyPolicy = 'Privacy policy',\n ViewShoppingBag = 'View shopping bag',\n MyProfile = 'My profile',\n seeDetails = 'See Details'\n}\n\n/**\n * Returns the payload Object.\n * @param {string} contentCategory - Content Category.\n * @param {IModule} props - Module props.\n * @param pageName\n * @param {string} moduleName - Module Name.\n * @param {string} etext - Etext Name.\n * @param {string} recid - Recid Name.\n * @param telemetry\n */\nexport function getTelemetryObject(pageName: string, moduleName: string, telemetry: ITelemetry): ITelemetryContent {\n const telemetryContent: ITelemetryContent = { pageName, moduleName, telemetry };\n return telemetryContent;\n}\n\n/**\n * Returns the payload Object.\n * @param {string} contentCategory - Content Category.\n * @param {IModule} props - Module props.\n * @param {string} moduleName - Module Name.\n * @param eventType\n * @param telemetryContent\n * @param {string} etext - Etext Name.\n * @param {string} recid - Recid Name.\n */\nexport function getPayloadObject(eventType: string, telemetryContent: ITelemetryContent, etext: string, recid?: string): IPayLoad {\n const pageName = telemetryContent && telemetryContent.pageName ? telemetryContent.pageName : '';\n const moduleName = telemetryContent && telemetryContent.moduleName ? telemetryContent.moduleName : '';\n const payload: IPayLoad = {\n contentCategory: eventType,\n contentAction: {\n pgname: pageName,\n mname: moduleName,\n etext,\n recid,\n etype: eventType\n }\n };\n return payload;\n}\n\n/**\n * Returns the telemetry Attributes.\n * @param {IModule} props - Module Props.\n * @param telemetryContent\n * @param {IPayLoad} payLoad - Pay Load.\n */\nexport function getTelemetryAttributes(telemetryContent: ITelemetryContent, payLoad: IPayLoad): IDictionary | undefined {\n const contentData = payLoad.contentAction.recid ? payLoad.contentAction.recid : payLoad.contentAction.etext;\n const attributes: IDictionary | undefined = telemetryContent &&\n telemetryContent.telemetry &&\n telemetryContent.telemetry.setTelemetryAttribute &&\n telemetryContent.telemetry.setTelemetryAttribute(contentData!, payLoad.contentAction);\n return attributes;\n}\n\n/**\n * Returns the telemetry Attributes.\n * @param {IModule} props - Module Props.\n * @param {IPayLoad} payLoad - Pay Load.\n */\n\nexport const onTelemetryClick = (telemetryContent: ITelemetryContent, payLoad: IPayLoad, linkText: string) => () => {\n payLoad.contentAction.etext = linkText;\n if (telemetryContent && telemetryContent.telemetry) {\n telemetryContent.telemetry.logEvent(TelemetryEvent.Custom, payLoad);\n }\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport Fade from '../fade/Fade';\nimport UncontrolledTooltip from '../tooltip/UncontrolledTooltip';\nimport { IAlertProps } from './Alert.props';\n\n/**\n * Alert component.\n */\nexport default class Alert extends React.PureComponent {\n\n public static defaultProps: Partial = {\n color: 'success',\n isOpen: true,\n tag: 'div',\n closeAriaLabel: 'Close',\n fade: true,\n assertive: false,\n includeAlertClass: true,\n transition: {\n ...Fade.defaultProps,\n unmountOnExit: true\n }\n };\n\n public render(): JSX.Element {\n const {\n id,\n className,\n closeClassName,\n cssModule,\n tag,\n toggle,\n color,\n isOpen,\n children,\n transition,\n fade,\n assertive,\n includeAlertClass,\n 'aria-label': ariaLabel\n } = this.props;\n\n const classes = includeAlertClass ? mapToCssModules(\n classNames(\n className,\n 'msc-alert',\n `msc-alert-${color}`\n ),\n cssModule\n ) : className;\n\n const closeClasses = mapToCssModules(classNames('close', closeClassName), cssModule);\n\n const alertTransition = {\n ...Fade.defaultProps,\n ...transition,\n baseClass: fade ? 'fade' : '',\n timeout: fade ? (transition ? transition.timeout : 0) : 0,\n appear: !!fade,\n enter: !!fade,\n exit: !!fade\n };\n\n const Tag = tag || 'div';\n const buttonId = fade ? 'buttonDismiss' : 'buttonFadeless';\n\n const innerContent = (\n <>\n {toggle ?
\n \n \n close\n \n
: null}\n {children}\n \n );\n\n const style = isOpen ? undefined : { display: 'none' };\n\n // When using assertive alerts, you need to have the assertive region rendered on the page from\n // the start. When using fade, the entire fade region doesn't render. So you gotta first wrap the\n // fade region in a tag, keep that tag hidden if the alert is closed.\n //\n // Note that this current approach will have some issues if tag is something like li. But that is a bridge\n // that can be crossed when/if we need to cross it this works for divs/spans so it should be good enough for now\n if (fade && assertive) {\n return (\n \n \n {innerContent}\n \n \n );\n } else if (fade) {\n return (\n \n {innerContent}\n \n );\n }\n return (\n \n {innerContent}\n \n );\n\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\nimport { getPayloadObject, getTelemetryAttributes, TelemetryConstant } from '..';\nimport { IBackToTopProps } from './BackToTop.props';\n\nexport interface IBackToTopStateAttributes {\n 'aria-hidden': boolean;\n 'tabIndex': number;\n}\n\nexport interface IBackToTopState extends React.ComponentState {\n attributes: IBackToTopStateAttributes;\n}\n\n/**\n * Back To Top - This component is used to scroll to the top of the page.\n */\nexport default class BackToTop extends React.PureComponent {\n public static defaultProps: Partial = {\n className: 'btn btn-lg btn-secondary',\n delayInMs: 0,\n scrollStepInPx: 25\n };\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: IBackToTopProps) {\n super(props);\n this.state = { attributes: { 'aria-hidden': true, tabIndex: -1 } };\n this._reevaluatePosition = this._reevaluatePosition.bind(this);\n this._scrollToTop = this._scrollToTop.bind(this);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.BackToTop);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public componentDidMount(): void {\n window.addEventListener('resize', this._reevaluatePosition);\n window.addEventListener('scroll', this._reevaluatePosition);\n this._reevaluatePosition();\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this._reevaluatePosition);\n window.removeEventListener('scroll', this._reevaluatePosition);\n }\n\n public render(): JSX.Element {\n const { className, threshold, delayInMs, scrollStepInPx, ...props } = this.props;\n const children = this.props.children || ();\n if (this.props.text) {\n return (\n \n {this._renderHeading(this.props.text)}\n );\n }\n return (\n \n {children}\n );\n\n }\n\n private readonly _renderHeading = (text: string): JSX.Element | undefined => {\n return (\n \n );\n };\n\n private _scrollStep(): void {\n if ((document.documentElement.scrollTop || document.body.scrollTop) === 0) {\n clearInterval(this.state.intervalId);\n this.setState({ intervalId: 0 });\n this._reevaluatePosition();\n }\n\n if (this.state.intervalId !== 0) {\n window.scrollTo(0, document.body.scrollTop - this.props.scrollStepInPx);\n document.body.scrollTop = document.body.scrollTop > 0 ? document.body.scrollTop - this.props.scrollStepInPx : 0;\n }\n }\n\n private _scrollToTop(e: any): void {\n e.preventDefault();\n const intervalId = setInterval(this._scrollStep.bind(this), this.props.delayInMs);\n this.setState({ intervalId });\n }\n\n private _reevaluatePosition(): void {\n // TODO:\n // change the threshold minimum to zero\n // add a prop for specifying multiplier of page height instead of absolute threshold\n // add clientWidth check to hide at < 768\n const scrollTop = window.pageYOffset || document.body.scrollTop;\n const height = Math.min(window.innerHeight, document.documentElement.clientHeight);\n const threshold = Math.min(this.props.threshold !== undefined ? this.props.threshold : -1, 100);\n const hide = scrollTop > 0 && threshold >= 0 ? scrollTop < (document.documentElement.scrollHeight - height) * threshold / 100 : scrollTop < height * 2;\n const tabIndexValue = hide ? -1 : 0;\n this.setState({ attributes: { 'aria-hidden': hide, tabIndex: tabIndexValue } });\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { addThrottledEvent, getCSS } from '../common/utilities';\nimport Flipper from '../flipper/Flipper';\nimport { ISingleSlideCarouselProps } from './SingleSlideCarousel.props';\n\ninterface ISingleSlideCarouselState {\n showPrevious: boolean;\n showNext: boolean;\n offset: number;\n}\n\n/**\n * SingleSlideCarousel - yup.\n */\nexport default class SingleSlideCarousel extends React.PureComponent {\n private static readonly itemsSelector: string = 'msc-ss-carousel-item';\n\n private static readonly verticalItemsSelector: string = 'msc-ss-carousel-vert-item';\n\n private direction: string;\n\n private item: HTMLElement | undefined;\n\n private slide: HTMLElement | undefined;\n\n private carousel: HTMLElement | undefined;\n\n private carouselSize: number = 0;\n\n private slideSize: number = 0;\n\n private itemSize: number = 0;\n\n private resizeThrottledEventHandler?: (event: Event) => void;\n\n private readonly ref: React.RefObject;\n\n private readonly slideRef: React.RefObject;\n\n private readonly itemRef: React.RefObject;\n\n private readonly id: string;\n\n private scrollStart: number | undefined;\n\n private readonly scrollThreshold: number;\n\n private readonly flipperNextLabel: string = 'next';\n\n private readonly flipperPrevLabel: string = 'prev';\n\n constructor(props: ISingleSlideCarouselProps) {\n super(props);\n this._nextSlide = this._nextSlide.bind(this);\n this._previousSlide = this._previousSlide.bind(this);\n this._handleTouchStart = this._handleTouchStart.bind(this);\n this._handleTouchEnd = this._handleTouchEnd.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onResized = this._onResized.bind(this);\n this.state = { showPrevious: false, showNext: false, offset: 0 };\n this.ref = React.createRef();\n this.slideRef = React.createRef();\n this.itemRef = React.createRef();\n this.direction = 'left';\n this.id = props.parentId || '';\n this.scrollThreshold = this.props.touchScrollThreshold !== undefined ? this.props.touchScrollThreshold : 100;\n }\n\n public componentDidUpdate(): void {\n this.carousel = this.ref.current!;\n this.slide = this.slideRef.current!;\n this.item = this.itemRef.current!;\n this._setSizes();\n this._updateFlippers(this.state.offset);\n }\n\n public componentDidMount(): void {\n this.direction = this.props.vertical ? 'top' : 'left';\n this.carousel = this.ref.current!;\n this.slide = this.slideRef.current!;\n this.item = this.itemRef.current!;\n this._setSizes();\n this.resizeThrottledEventHandler =\n window && addThrottledEvent(window, 'resize', this._onResized as EventListener);\n this._updateFlippers(0);\n }\n\n public componentWillUnmount(): void {\n window && window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\n }\n\n public render(): JSX.Element {\n const isVert: boolean = this.props.vertical === true;\n const slidePositionStyle = {} as React.CSSProperties;\n const modifiedChildren = this._getClonedChildren(isVert);\n slidePositionStyle[this.direction] = `${this.state.offset}px`;\n const carouselClass = (isVert) ? 'msc-ss-carousel-vert' : 'msc-ss-carousel';\n const carouselSlideClass = (isVert) ? 'msc-ss-carousel-vert-slide' : 'msc-ss-carousel-slide';\n const overflowClass = (isVert) ? 'msc-ss-carousel-vert-strip' : 'msc-ss-carousel-strip';\n const previousFlipperGlyph = (isVert) ? 'msi-chevron-up' : 'msi-chevron-left';\n const nextFlipperGlyph = (isVert) ? 'msi-chevron-down' : 'msi-chevron-right';\n const previousFlipperClassName = (isVert) ? 'msc-ss-carousel-vert__flipper' : 'msc-ss-carousel__flipper';\n const nextFlipperClassName = (isVert) ? 'msc-ss-carousel-vert__flipper msc-ss-carousel-vert__flipper--next' : 'msc-ss-carousel__flipper msc-ss-carousel__flipper--next';\n const disableClassName = !this.state.showPrevious || !this.state.showNext ? 'disabled' : null;\n return (\n \n 0)}\n telemetryContent={this.props.telemetryContent}\n telemetryLabel={this.flipperPrevLabel}\n />\n 0)}\n telemetryContent={this.props.telemetryContent}\n telemetryLabel={this.flipperNextLabel}\n />\n
\n \n {modifiedChildren}\n \n
\n
\n );\n }\n\n private _getClonedChildren(isVert: boolean): React.DetailedReactHTMLElement, HTMLElement>[] {\n return React.Children.map(this.props.children, (child: React.ReactNode, index: number) => {\n const castChild = (child as React.ReactChild) as React.ReactElement;\n if (index === 1) {\n return React.cloneElement(castChild, {\n className: `${isVert ? SingleSlideCarousel.verticalItemsSelector : SingleSlideCarousel.itemsSelector} ${castChild.props.className}`,\n\n // @ts-expect-error\n ref: this.itemRef,\n onFocus: this._onFocus\n });\n }\n return React.cloneElement(castChild, {\n className: `${isVert ? SingleSlideCarousel.verticalItemsSelector : SingleSlideCarousel.itemsSelector} ${castChild.props.className}`,\n\n // @ts-expect-error\n onFocus: this._onFocus\n });\n });\n }\n\n private _nextSlide(): void {\n this._moveSingleSlide(true);\n }\n\n private _previousSlide(): void {\n this._moveSingleSlide(false);\n }\n\n private _handleTouchStart(evt: React.TouchEvent): void {\n if (evt.touches.length === 0) {\n this.scrollStart = undefined;\n } else {\n this.scrollStart = this.props.vertical === true ? evt.touches[0].screenY : evt.touches[0].screenX;\n }\n }\n\n private _handleTouchEnd(evt: React.TouchEvent): void {\n if (evt.changedTouches.length > 0 && this.scrollStart !== undefined) {\n const newTarget: number = this.props.vertical === true ? evt.changedTouches[0].screenY : evt.changedTouches[0].screenX;\n\n const delta = newTarget - this.scrollStart;\n\n if (delta > this.scrollThreshold) {\n this._previousSlide();\n }\n\n if (delta < -this.scrollThreshold) {\n this._nextSlide();\n }\n }\n\n this.scrollStart = undefined;\n\n return;\n }\n\n private _moveSingleSlide(next: boolean): void {\n let currentOffset = Number.parseInt(getCSS(this.slide!, this.direction), 10);\n const carouselSize = this.carouselSize;\n let maxScrollCount = Math.floor(carouselSize / (this.itemSize));\n const directionModifier = next ? -1 : 1;\n currentOffset = !isNaN(currentOffset) && typeof currentOffset === 'number' ? currentOffset : 0;\n\n if (maxScrollCount === 0) {\n maxScrollCount = 1;\n }\n\n maxScrollCount = carouselSize % (this.itemSize) === 0 ? maxScrollCount - 1 : maxScrollCount;\n maxScrollCount = Math.max(maxScrollCount, 1);\n const maxScrollDistance = maxScrollCount * (this.itemSize);\n let distanceToEdge = next ? this.slideSize - carouselSize + currentOffset : Math.abs(currentOffset);\n distanceToEdge = Math.max(0, distanceToEdge);\n\n const offset =\n maxScrollDistance <= distanceToEdge ? maxScrollDistance * directionModifier + currentOffset : distanceToEdge * directionModifier + currentOffset;\n\n this._updateFlippers(offset);\n }\n\n private _setSizes(): void {\n const item = this.item;\n if (item) {\n this.itemSize = this.props.vertical ? item.scrollHeight : item.scrollWidth;\n } else {\n this.itemSize = 0;\n }\n\n this.carouselSize = this._calculateCarouselSize();\n this.slideSize = this.slide ? (this.props.vertical ? this.slide.scrollHeight : this.slide.scrollWidth) : 0;\n }\n\n private _calculateCarouselSize(): number {\n if (!this.carousel) {\n return 0;\n }\n\n const carouselStyle = getComputedStyle(this.carousel);\n\n const padding = this.props.vertical ? Number.parseFloat(carouselStyle.paddingTop || '') + Number.parseFloat(carouselStyle.paddingBottom || '') : Number.parseFloat(carouselStyle.paddingLeft || '') + Number.parseFloat(carouselStyle.paddingRight || '');\n\n return this.props.vertical ? this.carousel.clientHeight - padding : this.carousel.clientWidth - padding;\n }\n\n private _canScrollPrevious(offset: number): boolean {\n return !isNaN(offset) && offset !== 0;\n }\n\n private _canScrollNext(offset: number): boolean {\n if (this.carouselSize + Math.abs(offset) >= this.slideSize) {\n return false;\n }\n\n return true;\n }\n\n private _updateFlippers(offset: number): void {\n this.setState({\n showPrevious: this._canScrollPrevious(offset),\n showNext: this._canScrollNext(offset),\n offset\n });\n }\n\n private _scrollItemIntoView(item: HTMLElement): void {\n const carouselSize = this.carouselSize;\n let offset = (this.props.vertical) ? item.offsetTop : item.offsetLeft;\n let updateOffset = false;\n\n const left = Number.parseInt(getCSS(this.slide!, 'left'), 10) || 0;\n const top = Number.parseInt(getCSS(this.slide!, 'top'), 10) || 0;\n\n if (this.props.vertical) {\n if (top < 0 && -top > offset) {\n if (offset !== 0) {\n offset = -offset + 1;\n }\n updateOffset = true;\n } else if (top + offset > carouselSize - this.itemSize) {\n offset = carouselSize - this.itemSize - offset - 1;\n updateOffset = true;\n }\n } else if (this.direction === 'left') {\n if (left < 0 && -left > offset) {\n if (offset !== 0) {\n offset = -offset + 1;\n }\n updateOffset = true;\n } else if (left + offset > carouselSize - this.itemSize) {\n offset = carouselSize - this.itemSize - offset + 19;\n updateOffset = true;\n }\n }\n\n if (updateOffset) {\n this._updateFlippers(offset);\n\n if (this.props.vertical) {\n setTimeout(() => {\n (this.slide as Node).parentElement!.scrollTop = 0;\n }, 0);\n } else {\n setTimeout(() => {\n (this.slide as Node).parentElement!.scrollLeft = 0;\n }, 0);\n }\n }\n }\n\n private _onFocus(event: React.FocusEvent): void {\n const target = event.currentTarget as HTMLElement;\n this._scrollItemIntoView(target);\n }\n\n private _onCarouselResized(): void {\n this._setSizes();\n let offset = Number.parseInt(getCSS(this.slide!, this.direction), 10);\n\n // Ensure the carousel slide fits across the entire alotted space\n if (!isNaN(offset) && offset < 0 && this.slideSize + offset < this.carouselSize) {\n offset = Math.min(0, this.carouselSize - this.slideSize);\n }\n\n this._updateFlippers(offset);\n }\n\n private readonly _onResized = (): void => {\n this._onCarouselResized();\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport Quantity from './Quantity';\n\nexport * from './Quantity.props';\n\nexport {\n Quantity\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { Button, getPayloadObject, getTelemetryAttributes, IPayLoad, TelemetryConstant } from '..';\nimport Collapse from '../collapse/Collapse';\nimport { ICollapseProps } from '../collapse/Collapse.props';\nimport { IDrawerProps } from './Drawer.props';\n\nexport interface IControlledDrawerState {\n isOpen: boolean;\n}\n\nexport type GlyphPlacement = 'start' | 'end';\n\n/**\n * ControlledDrawer - This is a full width controlled collapse where the button glyph changes\n * when the drawer is open and closed. The toggle function can be managed by the parent.\n */\n\nexport default class ControlledDrawer extends React.PureComponent {\n private readonly drawerOpenGlyph: string;\n\n private readonly drawerCloseGlyph: string;\n\n private readonly drawerGlyphClass: string;\n\n private isManuallyToggled: boolean;\n\n private isExpanded: boolean;\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: IDrawerProps) {\n super(props);\n const { openGlyph, closeGlyph } = this.props;\n this._toggle = this._toggle.bind(this);\n this.isManuallyToggled = false;\n this.state = { isOpen: (props.collapseProps && props.collapseProps.isOpen) || false };\n this.isExpanded = this.state.isOpen;\n this.drawerGlyphClass = classnames('drawer__glyph', this.props.toggleGlyphClassName || '');\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\n\n if (this.props.animateGlyph) {\n this.drawerOpenGlyph = classnames([this.drawerGlyphClass, openGlyph || closeGlyph || '']);\n this.drawerCloseGlyph = this.drawerOpenGlyph;\n } else {\n this.drawerOpenGlyph = classnames([this.drawerGlyphClass, openGlyph || '']);\n this.drawerCloseGlyph = classnames([this.drawerGlyphClass, closeGlyph || '']);\n }\n }\n\n public render(): JSX.Element {\n const collapseProps = { ...this.props.collapseProps } as ICollapseProps;\n collapseProps.isOpen = this.isManuallyToggled ? this.state.isOpen : collapseProps.isOpen || false;\n collapseProps.children = this.props.children;\n const drawerClass = classnames('drawer', this.props.className || '');\n this.isManuallyToggled = false;\n this.isExpanded = collapseProps.isOpen;\n this.state = { isOpen: collapseProps.isOpen };\n this.payLoad.contentAction.etext = collapseProps.isOpen ? TelemetryConstant.Collapse : TelemetryConstant.Expand;\n const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n return (\n
\n \n {this._generateDrawerButtonInnerMarkup(collapseProps.isOpen)}\n \n \n
\n );\n }\n\n private _generateDrawerButtonInnerMarkup(collapseState: boolean): JSX.Element {\n const { toggleButtonText } = this.props;\n const drawerButtonTextClass = classnames('drawer__buttontext', this.props.toggleButtonClassName || '');\n if (this.props.glyphPlacement === 'end') {\n return (\n <>\n {this._generateTitle(classnames(drawerButtonTextClass, '__start'), toggleButtonText.toString())}\n {this._generateGlyphMarkup('drawer__glyph__end', collapseState)}\n \n );\n }\n\n const isStart = this.props.glyphPlacement === 'start';\n const additionalClassName = `__${isStart ? 'end' : 'start'}`;\n return (\n <>\n {isStart && this._generateGlyphMarkup('drawer__glyph__start', collapseState)}\n {this._generateTitle(classnames(drawerButtonTextClass, additionalClassName), this.props.toggleButtonText.toString())}\n \n );\n }\n\n private _generateTitle(titleLClassName: string, title: string): JSX.Element {\n if (this.props.onTextChange && this.props.requestContext) {\n return (\n \n );\n }\n return (\n \n {title}\n \n );\n\n }\n\n private _generateGlyphMarkup(location: string, collapseState: boolean): JSX.Element {\n const glyphClass = `${collapseState ? this.drawerOpenGlyph : this.drawerCloseGlyph} ${location}`;\n return (\n \n );\n }\n\n private _toggle(e: React.MouseEvent | React.KeyboardEvent): void {\n e.preventDefault();\n this.isExpanded = !this.isExpanded;\n this.setState({ isOpen: this.isExpanded });\n this.isManuallyToggled = true;\n if (this.props.onToggle) {\n this.props.onToggle(this.state);\n }\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport interface IClientDimension {\n width: number;\n height: number;\n}\n\n/* A type safe Dictionary */\nexport interface IDictionaryStringString {\n [key: string]: string;\n}\n\n/**\n * @interface IGrid\n * @classdesc - The IGrid interface contract.\n * @export\n */\nexport interface IGrid {\n rows: number;\n columns: number;\n}\n\n/**\n * Clamp position between a range.\n * @param {number} value - Value to be clamped.\n * @param {number} min - Minimum value in range.\n * @param {number} max - Maximum value in range.\n * @returns The clap value if min passed is less than max else returns 0.\n */\nexport function clamp(value: number, min: number, max: number): number {\n if (min <= max) {\n return Math.min(Math.max(value, min), max);\n }\n return 0;\n\n}\n\n/**\n * Upper case the first letter of the string, if only one char exists on the string, uppercase it.\n * @param {string} value - Value to be upper cased.\n * @returns The upper cased string of the passed value, if it has just one char uppercase it.\n */\nexport function toUpperCaseFirstChar(value: string): string {\n if (value.length > 1) {\n return value.charAt(0).toUpperCase() + value.substr(1);\n }\n if (value.length === 1) {\n return value.charAt(0).toUpperCase();\n }\n return '';\n\n}\n\nexport function htmlCollectionToArray(nodeList: HTMLCollection): HTMLElement[] {\n return Array.prototype.slice.call(nodeList);\n}\n\nexport function getCSS(element: HTMLElement, property: string): string {\n let style = element.style[property];\n\n if (!style) {\n style = getComputedStyle(element)[property];\n }\n\n return style;\n}\n\nexport function createThrottledEvent(listener: EventListener, threshold: number):\n(event: Event) => void {\n let timer: any;\n let last = 0;\n\n return (event: Event) => {\n const now = Date.now();\n\n if (timer) {\n clearTimeout(timer);\n timer = undefined;\n }\n\n if (last && (now < last + threshold)) {\n timer = setTimeout(() => {\n last = Date.now();\n listener(event);\n },\n threshold - (now - last));\n } else {\n last = now;\n listener(event);\n }\n };\n}\n\nexport function addThrottledEvent(target: EventTarget, name: string, listener: EventListener, threshold: number = 150):\n(event: Event) => void {\n\n const throttledEventHandler = createThrottledEvent(listener, threshold);\n target.addEventListener(name, throttledEventHandler, false);\n\n return throttledEventHandler;\n}\n\n/* RTS utilities */\n/* TODO: Using any here for now, need to convert cssmodules into a dictionary in all modules */\nexport function mapToCssModules(className: string = '', cssModule: any): string {\n if (!cssModule) {\n return className;\n }\n\n return className\n .split(' ')\n .map((c: string) => cssModule[c] || c)\n .join(' ');\n}\n\nexport function isRef(target: any): boolean {\n if (!target) {\n return false;\n }\n\n return (>target).current !== undefined;\n}\n\nexport function isElement(target: any): boolean {\n if (!target) {\n return false;\n }\n\n return (target).addEventListener !== undefined;\n}\n\nexport const keyCodes = {\n esc: 27,\n space: 32,\n tab: 9,\n up: 38,\n down: 40,\n enter: 13\n};\n\ninterface IMap {\n [key: string]: T;\n}\nconst warned: IMap = {};\n\nexport function warnOnce(message: string): void {\n if (!warned[message]) {\n if (typeof console !== 'undefined') {\n throw new Error(message);\n }\n warned[message] = true;\n }\n}\n\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nexport function findDOMElements(target: string): NodeListOf | string | null {\n try {\n if (typeof target === 'string' && canUseDOM) {\n let selection = document.querySelectorAll(target);\n\n if (selection.length === 0) {\n selection = document.querySelectorAll(`#${target}`);\n }\n\n if (selection.length === 0) {\n throw new Error();\n }\n return selection;\n }\n\n return target;\n } catch {\n console.error(`The target '${target}' could not be identified in the dom, tip: check spelling`);\n return null;\n }\n}\n\nexport function getTarget(target: string | HTMLElement | React.Ref): HTMLElement | React.Ref | null | string {\n const selection = findDOMElements(target);\n if (selection && selection.length > 0) {\n return selection[0];\n }\n\n return target;\n}\n\nexport function getTargetElement(target: string | HTMLElement | React.Ref): HTMLElement | null {\n const targetElement = getTarget(target);\n if (isRef(targetElement)) {\n return (>targetElement).current;\n }\n if (isElement(targetElement)) {\n return targetElement;\n }\n\n return null;\n}\n\nexport const TransitionTimeouts = {\n Fade: 150,\n Collapse: 350,\n Modal: 300,\n Carousel: 600\n};\n\nexport type TransitionStatuses = 'entering' | 'entered' | 'exiting' | 'exited';\n\nexport const focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'iframe',\n 'object',\n 'embed',\n '[tabindex]:not(.modal)',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])'\n];\n\n/**\n * @name - extend\n * @description - extends an object with properties/values from one or more others.\n * @export\n * @public\n * @param {any[]} parameters - The objects to merge together.\n * @returns {any} - The extended object.\n */\n\nexport function extend(...parameters: any[]): any {\n if (!parameters || parameters.length === 0) {\n return null;\n }\n\n const recursive = (typeof (parameters[0]) === 'boolean') && parameters[0];\n\n if (parameters.length < 2) {\n return recursive ? null : parameters[0];\n }\n\n if (recursive && (parameters.length < 3)) {\n return parameters[1];\n }\n\n const target = recursive ? parameters[1] : parameters[0];\n\n for (let paramIndex = recursive ? 2 : 1; paramIndex < parameters.length; paramIndex++) {\n if (parameters[paramIndex] !== undefined) {\n for (const key of Object.keys(parameters[paramIndex])) {\n if (parameters[paramIndex].hasOwnProperty(key)) {\n const source = parameters[paramIndex][key];\n\n if (recursive) {\n let isSourceArray = Array.isArray ? Array.isArray(source) : ({}).toString.call(source) === '[object Array]';\n let isTargetArray = !!target[key] && (Array.isArray ? Array.isArray(target[key]) : ({}).toString.call(target[key]) === '[object Array]');\n let isSourceObject = !isSourceArray && (typeof source === 'object');\n let isTargetObject = !isTargetArray && !!target[key] && (typeof target[key] === 'object');\n\n if (isSourceArray && isTargetArray) {\n for (const [arrayIndex, element] of source.entries()) {\n isSourceArray = Array.isArray ? Array.isArray(element) : ({}).toString.call(element) === '[object Array]';\n isTargetArray = !!target[key][arrayIndex] && (Array.isArray ? Array.isArray(target[key][arrayIndex]) : ({}).toString.call(target[key][arrayIndex]) === '[object Array]');\n isSourceObject = !isSourceArray && (typeof element === 'object');\n isTargetObject = !isTargetArray && !!target[key][arrayIndex] && (typeof target[key][arrayIndex] === 'object');\n\n if (isSourceArray) {\n target[key][arrayIndex] = extend(true, isTargetArray ? target[key][arrayIndex] : [], element);\n } else if (isSourceObject) {\n target[key][arrayIndex] = extend(true, isTargetObject ? target[key][arrayIndex] : {}, element);\n } else {\n target[key][arrayIndex] = element;\n }\n }\n continue;\n } else if (isSourceArray) {\n target[key] = extend(true, [], source);\n continue;\n } else if (isSourceObject) {\n target[key] = extend(true, isTargetObject ? target[key] : {}, source);\n continue;\n }\n }\n\n target[key] = source;\n }\n }\n }\n }\n\n return target;\n}\n\n/**\n * @name - getDimensions\n * @description - Gets the dimension of an element.\n * @export\n * @param {HTMLElement} containerElement - The container element.\n * @returns {IClientDimension} - The client dimension.\n * {IClientDimension.width} - The client width\n * {IClientDimension.height} - The client height.\n */\nexport function getDimensions(containerElement: HTMLElement): IClientDimension | null {\n if (containerElement === null) {\n return null;\n }\n return {\n width: containerElement.clientWidth,\n height: containerElement.clientHeight\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport { IPaginationItemProps } from './PaginationItem.props';\n\n/**\n * PaginationItem component.\n */\nexport default class PaginationItem extends React.PureComponent {\n public static defaultProps: Partial = {\n tag: 'li'\n };\n\n public render(): JSX.Element {\n const { active, className, cssModule, disabled, tag: Tag, ...props }: any = this.props;\n\n const paginationItemClasses = mapToCssModules(\n classNames(className, 'msc-page-item', {\n active,\n disabled\n }),\n cssModule\n );\n\n return ;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ArrayExtensions, Dictionary, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport Button from '../button/Button';\nimport { IFormKeyProps } from './form-builder.props';\n\n/**\n * The state of the form builder.\n */\nexport interface IFormBuilderState {\n\n /**\n * The captured values.\n */\n values: string[];\n\n /**\n * If the form has been submitted.\n */\n isSubmitted: boolean;\n}\n\n/**\n * The properties of the form builder.\n */\nexport interface IFormBuilderProps {\n\n /**\n * The component showing confirmation after form submitted successfully.\n */\n confirmationComponent: React.ReactNode;\n\n /**\n * The heading for the component shown above the input boxes.\n */\n heading: string;\n\n /**\n * The text shown on the submit button.\n */\n submitButtonText: string;\n\n /**\n * The keys of the form values to capture, which will be shown as labels for the inputs.\n */\n keys: IFormKeyProps[];\n\n /**\n * The error message shown when submitting the form and required value is missing.\n */\n requiredValueMissingErrorMessage: string;\n\n /**\n * The action to perform when the form is submitted.\n * @param { formKey: IFormKeyProps, value: string[] } entry - The form data as key-value pairs to submit.\n */\n onSubmit(entry?: { formKey: IFormKeyProps; value: string }[]): Promise;\n}\n\n/**\n * The interface for properties of form builder error.\n */\nexport interface IFormBuilderErrorProps {\n errorMessage?: string;\n}\n\n/**\n * The error component in form builder.\n * @param errorProperties - The error properties.\n * @param errorProperties.errorMessage - The error message to show.\n * @returns The error component.\n */\nexport const FormBuilderErrorComponent: React.FC = ({\n errorMessage\n}) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \n \n {errorMessage}\n \n \n );\n};\n\n/**\n * The component to capture form data.\n */\nexport class FormBuilder extends React.Component {\n private readonly requiredValueMissing: Dictionary;\n\n public constructor(props: IFormBuilderProps) {\n super(props);\n this.state = { values: this.props.keys.map(() => ''), isSubmitted: false };\n\n // Setup a boolean dictionary to keep track if required value is missing for every field to submit.\n this.requiredValueMissing = new Dictionary();\n for (const formKey of this.props.keys) {\n if (formKey.resourceId) {\n this.requiredValueMissing.setValue(formKey.resourceId, formKey.isRequired ?? false);\n }\n }\n }\n\n public shouldComponentUpdate(nextProps: IFormBuilderProps, nextState: IFormBuilderState): boolean {\n if (this.props.heading !== nextProps.heading ||\n this.props.confirmationComponent !== nextProps.confirmationComponent ||\n this.props.submitButtonText !== nextProps.submitButtonText ||\n this.props.requiredValueMissingErrorMessage !== nextProps.requiredValueMissingErrorMessage) {\n return true;\n }\n\n // If any form key has changed, the component should update.\n if (!this.props.keys.every((formKey: IFormKeyProps, index: number) => {\n return nextProps.keys[Number(index)].isRequired === formKey.isRequired &&\n nextProps.keys[Number(index)].resourceId === formKey.resourceId &&\n nextProps.keys[Number(index)].resourceValue === formKey.resourceValue;\n })) {\n return true;\n }\n\n // If any value has changed, the component should update.\n if (this.state.isSubmitted !== nextState.isSubmitted ||\n !this.state.values.every((value: string, index: number) => {\n return value === nextState[Number(index)];\n })) {\n return true;\n }\n\n return false;\n }\n\n public render(): JSX.Element {\n return (\n <>\n {\n !this.state.isSubmitted && ArrayExtensions.hasElements(this.props.keys) &&\n
\n

\n {this.props.heading}\n

\n
\n \n {\n this.props.keys.filter((formKey: IFormKeyProps) => {\n return !ObjectExtensions.isNullOrUndefined(formKey.resourceId) &&\n !ObjectExtensions.isNullOrUndefined(formKey.resourceValue);\n }).map((formKey: IFormKeyProps, index: number) => {\n const currentValue: string = this.state.values[Number(index)];\n return (\n
\n \n
\n );\n })\n }\n
\n \n {this.props.submitButtonText}\n \n
\n \n
\n
\n }\n {\n this.state.isSubmitted &&\n this.props.confirmationComponent\n }\n \n );\n }\n\n private get isAnyRequiredValueMissing(): boolean {\n const notFound: number = -1;\n return this.requiredValueMissing.getValues().findIndex((isMissing: boolean) => isMissing) !== notFound;\n }\n\n /**\n * The action to perform when the submit button is clicked.\n * @param event - The click event.\n * @returns The async result.\n */\n private readonly _onSubmit = async (event: React.SyntheticEvent): Promise => {\n event.preventDefault(); // Prevents form submission\n const formData: { formKey: IFormKeyProps; value: string }[] = this.props.keys.map((formKey: IFormKeyProps, index: number) => {\n const currentValue: string = this.state.values[Number(index)];\n return {\n formKey: { resourceId: formKey.resourceId!, resourceValue: formKey.resourceValue },\n value: currentValue\n };\n });\n await this.props.onSubmit(formData);\n this.setState((previousState: Readonly) => {\n return { values: previousState.values, isSubmitted: true };\n });\n };\n\n /**\n * The action to perform when any input in the form has changed.\n * @param event - The input change event.\n * @returns The async result.\n */\n private readonly _onInputChange = async (event: React.ChangeEvent): Promise => {\n event.preventDefault();\n const changedValueIndex: number = Number.parseInt(event.target.getAttribute('data-index') ?? '', 10);\n if (ObjectExtensions.isNullOrUndefined(changedValueIndex)) {\n return Promise.reject(new Error('form-builder: invalid value index.'));\n }\n const newState = {\n values: this.state.values.map((value: string, index: number) => {\n const currentKey: IFormKeyProps = this.props.keys[Number(index)];\n if (index === changedValueIndex && currentKey.resourceId) {\n this.requiredValueMissing.setValue(currentKey.resourceId, (currentKey.isRequired ?? false) && event.target.value === '');\n return event.target.value;\n }\n return value;\n })\n };\n this.setState(newState);\n return Promise.resolve();\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport function format(formatSpecifier: string, ...parameters: any[]): string {\n if (!formatSpecifier) {\n return '';\n }\n\n return formatSpecifier.replace(/{(\\d+)}/g, (match: string, index: number) => {\n\n if (index >= parameters.length) {\n return match;\n }\n\n const value = parameters[index];\n\n if (typeof value !== 'number' && !value) {\n return '';\n }\n\n if (typeof value === 'string') {\n return value;\n }\n\n return value.toString();\n });\n}\n\n/**\n * @name - isNullOrWhiteSpace\n * @description - Determines if the specified string is undefined, null, empty, or whitespace.\n * @export\n * @public\n * @param {string} value - The string to examine.\n * @returns {boolean} - True if the value is undefined, null, empty, or whitespace, otherwise false.\n */\nexport function isNullOrWhiteSpace(value: string): boolean {\n return (!value) || (typeof value !== 'string') || (!trim(value));\n}\n\n/**\n * @name - trim\n * @description - Trims leading and trailing whitespace from the string.\n * @export\n * @public\n * @param {string} value - The string to examine.\n * @returns {string} - The trimmed string.\n */\nexport function trim(value: string): string {\n // Any flavor of !value (ie. null/undefined/'') should return itself.\n if (!value || (typeof value !== 'string')) {\n return value;\n }\n\n if (value.trim) {\n return value.trim();\n }\n\n return value.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * @name - startsWith\n * @description - Determines if the specified string starts with the specified value.\n * @param ignoreCase\n * @export\n * @public\n * @param {string} value - The string to look in.\n * @param {string} prefix - The prefix to look for.\n * @returns {boolean} - True if the string starts with the prefix, otherwise false.\n */\nexport function startsWith(value: string, prefix: string, ignoreCase: boolean = true): boolean {\n if (!value || !prefix) {\n return false;\n }\n\n if (ignoreCase) {\n value = value.toLocaleLowerCase();\n prefix = prefix.toLocaleLowerCase();\n }\n\n // @ts-expect-error\n if ((value).startsWith) {\n return (value).startsWith(prefix);\n }\n\n return value.startsWith(prefix);\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { UncontrolledTooltip } from '..';\nimport { mapToCssModules } from '../common/utilities';\nimport PaginationItem from './PaginationItem';\nimport PaginationLink from './PaginationLink';\nimport { IUncontrolledPaginationProps } from './UncontrolledPagination.props';\n\n/**\n * Uncontrolled Pagination component.\n */\nexport default class UncontrolledPagination extends React.PureComponent {\n public static defaultProps: Partial = {\n tag: 'nav',\n listTag: 'ul',\n 'aria-label': 'pagination',\n items: 0,\n itemsPerPage: 25,\n startingItem: 0\n };\n\n private static readonly pagesDisplayed: number = 7;\n\n private maxPages: number;\n\n private activePage: number = 0;\n\n private qsps: { [param: string]: string };\n\n private url: string;\n\n private hash: string;\n\n constructor(props: IUncontrolledPaginationProps) {\n super(props);\n this.maxPages = this.props.items ? Math.ceil(this.props.items / this.props.itemsPerPage!) : 0;\n this.activePage = Math.floor((this.props.startingItem || 0) / this.props.itemsPerPage!);\n this.qsps = {};\n const splitUrl = this.props.url.split('?');\n\n if (splitUrl[1]) {\n this.url = splitUrl[0];\n const secondSplit = splitUrl[1].split('#');\n this.hash = secondSplit[1] ? `#${secondSplit[1]}` : '';\n const parsedQsps = secondSplit[0].split('&');\n\n for (const qsp of parsedQsps) {\n const qspPair = qsp.split('=');\n\n if (this.props.qsp !== qspPair[0]) {\n this.qsps[qspPair[0]] = qspPair[1];\n }\n }\n } else {\n const secondSplit = splitUrl[0].split('#');\n this.url = secondSplit[0];\n this.hash = secondSplit[1] ? `#${secondSplit[1]}` : '';\n }\n }\n\n public render(): JSX.Element {\n const {\n className,\n baseUrl,\n qsp,\n items,\n itemsPerPage,\n startingItem,\n previousText,\n nextText,\n previousAriaLabel,\n nextAriaLabel,\n listClassName,\n cssModule,\n children,\n size,\n tag: Tag,\n listTag: ListTag,\n 'aria-label': label,\n role,\n ...props\n\n }: any = this.props;\n\n this.maxPages = this.props.items ? Math.ceil(this.props.items / this.props.itemsPerPage!) : 0;\n this.activePage = Math.floor((this.props.startingItem || 0) / this.props.itemsPerPage!);\n this.qsps = {};\n const splitUrl = this.props.url.split('?');\n\n if (splitUrl[1]) {\n this.url = splitUrl[0];\n const secondSplit = splitUrl[1].split('#');\n this.hash = secondSplit[1] ? `#${secondSplit[1]}` : '';\n const parsedQsps = secondSplit[0].split('&');\n\n for (const activeQsp of parsedQsps) {\n const qspPair = activeQsp.split('=');\n\n if (this.props.qsp !== qspPair[0]) {\n this.qsps[qspPair[0]] = qspPair[1];\n }\n }\n } else {\n const secondSplit = splitUrl[0].split('#');\n this.url = secondSplit[0];\n this.hash = secondSplit[1] ? `#${secondSplit[1]}` : '';\n }\n\n const paginationClasses = mapToCssModules(\n classNames(\n className\n ),\n cssModule\n );\n\n const listpaginationClasses = mapToCssModules(\n classNames(\n listClassName,\n 'msc-pagination',\n {\n [`msc-pagination-${size}`]: !!size\n }\n ),\n cssModule\n );\n\n return (\n \n \n {this._generatePageLinks()}\n \n \n );\n }\n\n private _generateUrl(page: number): string {\n const items = this.props.itemsPerPage! * page;\n const keys = Object.keys(this.qsps);\n let qspUrl = page > 0 ? `?${this.props.qsp}=${items}` : '';\n\n keys.forEach((key: string) => {\n qspUrl = qspUrl ? `${qspUrl}&${key}=${this.qsps[key]}` : `?${key}=${this.qsps[key]}`;\n });\n\n return this.url + qspUrl + this.hash;\n }\n\n private _generatePaginationArrow(next: boolean, disable: boolean, className: string): React.ReactElement {\n const url = disable ? undefined : this._generateUrl(this.activePage + (next ? 1 : -1));\n const tooltipId = next ? this.props.nextId : this.props.prevId;\n const ariaDescribedBy = next ? this.props.nextAreaDescribed : this.props.prevAreaDescribed;\n const placement = next ? 'right' : 'left';\n const tag = disable ? 'span' : 'a';\n\n return (\n \n \n {next ? this.props.nextText : this.props.previousText}\n \n {tooltipId && (\n \n {next ? 'next' : 'previous'}\n \n )}\n \n );\n }\n\n private _generatePaginationItem(page: number): React.ReactElement {\n const active = this.activePage === page;\n const url = this._generateUrl(page);\n page += 1;\n\n return (\n \n \n {page}\n \n \n );\n }\n\n private _generateEllipse(): React.ReactElement {\n return (\n \n \n ...\n \n \n );\n }\n\n private _generatePageLinks(): React.ReactFragment {\n const displayCountSide = 3;\n let leftDistance = this.activePage;\n let rightDistance = this.maxPages - this.activePage - 1;\n const leftEllipse = this.maxPages > UncontrolledPagination.pagesDisplayed && leftDistance > 3;\n const rightEllipse = this.maxPages > UncontrolledPagination.pagesDisplayed && rightDistance > 3;\n\n leftDistance = Math.min(leftDistance, displayCountSide);\n rightDistance = Math.min(rightDistance, displayCountSide);\n const pages = [];\n const ellipseOffset = leftEllipse ? -1 : 0;\n const displayedPagesOnLeft = leftDistance + (displayCountSide - rightDistance) + ellipseOffset;\n const startingIndex = Math.max(this.activePage - displayedPagesOnLeft, 0);\n const endIndex = Math.min((startingIndex + 5 + (rightEllipse ? 0 : 1) + (leftEllipse ? 0 : 1)),\n (rightEllipse ? this.maxPages - 1 : this.maxPages));\n\n if (leftEllipse) {\n pages.push(this._generatePaginationItem(0));\n pages.push(this._generateEllipse());\n }\n\n for (let i = startingIndex; i < endIndex; i++) {\n pages.push(this._generatePaginationItem(i));\n }\n\n if (rightEllipse) {\n pages.push(this._generateEllipse());\n pages.push(this._generatePaginationItem(this.maxPages - 1));\n }\n\n return (\n <>\n { this._generatePaginationArrow(false, (this.activePage === 0), 'previous') }\n {pages}\n { this._generatePaginationArrow(true, (this.activePage === this.maxPages - 1), 'next') }\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport { IPaginationProps } from './Pagination.props';\n\n/**\n * Pagination component.\n */\nexport default class Pagination extends React.PureComponent {\n public static defaultProps: Partial = {\n tag: 'nav',\n listTag: 'ul',\n 'aria-label': 'pagination'\n };\n\n public render(): JSX.Element {\n const {\n className,\n listClassName,\n cssModule,\n size,\n tag: Tag,\n listTag: ListTag,\n 'aria-label': label,\n role,\n ...props\n\n }: any = this.props;\n\n const paginationClasses = mapToCssModules(classNames(className), cssModule);\n\n const listpaginationClasses = mapToCssModules(\n classNames(listClassName, 'msc-pagination', {\n [`msc-pagination-${size}`]: !!size\n }),\n cssModule\n );\n\n return (\n \n \n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { canUseDOM, getTargetElement, mapToCssModules } from '../common/utilities';\nimport PopperContent from '../popper-content/PopperContent';\nimport { IPopoverProps } from './Popover.props';\n\n/**\n * Popover component.\n */\nexport default class Popover extends React.PureComponent {\n public static defaultProps: Partial = {\n isOpen: false,\n placement: 'right',\n toggle: () => {\n return;\n }\n };\n\n public props: IPopoverProps;\n\n private target: HTMLElement | null;\n\n private popover: HTMLDivElement | null;\n\n private tabPressed: boolean = false;\n\n constructor(props: IPopoverProps) {\n super(props);\n this.props = props;\n\n this.popover = null;\n this._addTargetEvents = this._addTargetEvents.bind(this);\n this._handleDocumentClick = this._handleDocumentClick.bind(this);\n this._removeTargetEvents = this._removeTargetEvents.bind(this);\n this.getRef = this.getRef.bind(this);\n this._toggle = this._toggle.bind(this);\n this._focusOutTarget = this._focusOutTarget.bind(this);\n this._focusOutPopover = this._focusOutPopover.bind(this);\n this._keyDown = this._keyDown.bind(this);\n this._show = this._show.bind(this);\n this._hide = this._hide.bind(this);\n this.target = null;\n }\n\n public componentDidMount(): void {\n this.target = getTargetElement(this.props.target);\n this._handleProps();\n }\n\n public componentDidUpdate(): void {\n this._handleProps();\n }\n\n public componentWillUnmount(): void {\n this._removeTargetEvents();\n }\n\n public getRef(ref: HTMLDivElement | null): void {\n this.popover = ref;\n }\n\n public render(): JSX.Element | null {\n if (!this.props.isOpen) {\n return null;\n }\n\n const {\n cssModule,\n isOpen,\n target,\n placementPrefix,\n hideArrow,\n className,\n innerClassName,\n modifiers,\n placement,\n container,\n offset,\n toggle,\n boundariesElement,\n role,\n ...attributes\n } = this.props;\n\n const classes = mapToCssModules(\n classNames(\n 'msc-popover-inner',\n this.props.innerClassName\n ),\n this.props.cssModule\n );\n\n const popperClasses = mapToCssModules(\n classNames(\n 'msc-popover',\n 'show',\n this.props.className\n ),\n this.props.cssModule\n );\n\n return (\n \n \n \n );\n }\n\n private _handleProps(): void {\n if (this.props.isOpen) {\n this._show();\n } else {\n this._hide();\n }\n }\n\n private _show(): void {\n this.tabPressed = false;\n this._addTargetEvents();\n if (!this.props.isOpen) {\n this._toggle();\n }\n }\n\n private _hide(): void {\n this._removeTargetEvents();\n if (this.props.isOpen) {\n this._toggle();\n }\n }\n\n private _handleDocumentClick(e: Event): void {\n if (!this.target) {\n return;\n }\n\n const target = e.target as HTMLElement;\n\n if (e.target !== this.target &&\n !this.target.contains(target) &&\n e.target !== this.popover &&\n !(this.popover && this.popover.contains(target))\n ) {\n if (this.props.isOpen) {\n this._toggle();\n }\n }\n }\n\n private _addTargetEvents(): void {\n if (!this.target) {\n return;\n }\n if (canUseDOM) {\n ['click', 'touchstart'].forEach((event: string) => {\n document.addEventListener(event, this._handleDocumentClick, true);\n });\n this.target.addEventListener('focusout', this._focusOutTarget, true);\n this.target.addEventListener('keydown', this._keyDown, true);\n }\n }\n\n private _removeTargetEvents(): void {\n if (!this.target) {\n return;\n }\n if (canUseDOM) {\n ['click', 'touchstart'].forEach((event: string) => {\n document.removeEventListener(event, this._handleDocumentClick, true);\n });\n this.target.removeEventListener('focusout', this._focusOutTarget, true);\n this.target.removeEventListener('keydown', this._keyDown, true);\n }\n }\n\n private _focusOutPopover(): void {\n setTimeout(() => {\n const nextFocus = document.activeElement;\n if (this.popover && !this.popover.contains(nextFocus)) {\n this._hide();\n }\n }, 1);\n }\n\n private _focusOutTarget(): void {\n if (this.tabPressed) {\n this.tabPressed = false;\n setTimeout(() => {\n const nextFocus = document.activeElement;\n if (this.popover && !this.popover.contains(nextFocus)) {\n this._hide();\n }\n }, 1);\n }\n }\n\n private _keyDown(e: KeyboardEvent): void {\n if (e.keyCode === 9) {\n this.tabPressed = true;\n } else if (this.props.isOpen && e.keyCode === 27 && this.props.toggle) {\n this.props.toggle();\n }\n }\n\n private _toggle(): void {\n if (this.props.disabled) {\n return;\n }\n\n if (this.props.toggle) {\n this.props.toggle();\n }\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { canUseDOM } from '../common/utilities';\nimport { IPortalProps } from './Portal.props';\n\nexport interface IPortalState {\n defaultNode: Element | null;\n}\n\n/**\n * Portal component.\n */\nexport default class Portal extends React.PureComponent {\n constructor(props: IPortalProps) {\n super(props);\n\n this.state = {\n defaultNode: null\n };\n }\n\n public componentWillUnmount(): void {\n if (this.state.defaultNode) {\n this.state.defaultNode.remove();\n }\n }\n\n public render(): React.ReactPortal | null {\n let node = null;\n if (!canUseDOM) {\n return null;\n }\n\n if (!this.props.node && !this.state.defaultNode) {\n node = document.createElement('div');\n document.body.appendChild(node);\n this.setState({ defaultNode: node });\n }\n return createPortal(this.props.children, this.props.node || node);\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { focusableElements, TransitionTimeouts } from '../common/utilities';\nimport Fade from '../fade/Fade';\nimport IModalProps from './Modal.props';\nimport Portal from './Portal';\n\nexport interface IModalState {\n wasOpen: boolean;\n isOpen: boolean;\n mouseDownElement: EventTarget | null;\n}\n\nexport type ModalVerticalPosition = 'top' | 'center' | 'bottom';\nexport type ModalHorizontalPosition = 'left' | 'center' | 'right';\n\n/**\n * Modal component.\n */\nexport default class Modal extends React.PureComponent {\n public static defaultProps: Partial = {\n isOpen: false,\n autoFocus: true,\n verticalPosition: 'top', // Needs to be non-null since we use non-null assertion in getVerticalPositionClass\n horizontalPosition: 'center', // Needs to be non-null since we use non-null assertion in getHorizontalPositionClass\n role: 'dialog',\n backdrop: true,\n keyboard: true,\n zIndex: 1000,\n tabIndex: 0,\n fade: true,\n modalTransition: {\n timeout: TransitionTimeouts.Modal\n },\n backdropTransition: {\n mountOnEnter: true,\n timeout: TransitionTimeouts.Fade // Uses standard fade transition\n }\n };\n\n private static openCount: number = 0;\n\n private element: HTMLElement | null;\n\n private mounted: boolean;\n\n private readonly ref: React.RefObject;\n\n /**\n * This property is initialized in componentDidMount rather than constructor in case the dialog needs to be pre-rendered.\n */\n private applicationNode!: HTMLElement | null;\n\n constructor(props: IModalProps) {\n super(props);\n this.element = null;\n this.ref = React.createRef();\n this.mounted = false;\n\n this._getFocusableChildren = this._getFocusableChildren.bind(this);\n this._handleBackdropClick = this._handleBackdropClick.bind(this);\n this._handleBackdropMouseDown = this._handleBackdropMouseDown.bind(this);\n this._handleEscape = this._handleEscape.bind(this);\n this._handleTab = this._handleTab.bind(this);\n this._onOpened = this._onOpened.bind(this);\n this._onClosed = this._onClosed.bind(this);\n\n this.state = {\n wasOpen: false,\n isOpen: props.isOpen || false,\n mouseDownElement: null\n };\n\n if (props.isOpen) {\n this._open();\n }\n }\n\n public componentDidMount(): void {\n if (this.props.onEnter) {\n this.props.onEnter();\n }\n this.mounted = true;\n\n const element = document.createElement('div');\n element.setAttribute('tabindex', '-1');\n element.style.visibility = 'hidden';\n element.style.position = 'position';\n this.element = element;\n document.body.appendChild(element);\n\n this.applicationNode = (this.props.applicationNode instanceof HTMLElement) ? this.props.applicationNode : document.querySelector(`#${this.props.applicationNode}`);\n\n if (this.state.isOpen && !this.state.wasOpen) {\n this._open();\n }\n }\n\n public componentWillUnmount(): void {\n if (this.props.onExit) {\n this.props.onExit();\n }\n if (this.state.isOpen) {\n this._close();\n }\n this.mounted = false;\n\n if (this.element) {\n this.element.remove();\n }\n }\n\n public componentDidUpdate(_prevProps: IModalProps, prevState: IModalState): void {\n if ((this.state.isOpen && !prevState.isOpen) || (this.props.shouldUpdateFocusToFirstElement && !_prevProps.shouldUpdateFocusToFirstElement)) {\n setTimeout(() => {\n const focusableElementArr = this._getFocusableChildren();\n if (focusableElementArr && focusableElementArr.length > 0 && focusableElementArr[0]) {\n const firstFocusableElement = focusableElementArr[0] as HTMLElement;\n firstFocusableElement.focus();\n }\n }, 100);\n }\n }\n\n public componentWillReceiveProps(nextProps: IModalProps): void {\n if (nextProps.isOpen && !this.props.isOpen) {\n this.setState({ isOpen: nextProps.isOpen });\n }\n }\n\n public render(): JSX.Element | null {\n if (this.state.isOpen && !this.state.wasOpen) {\n this._open();\n }\n if (this.element !== null) {\n const {\n wrapClassName, modalClassName, backdropClassName, contentClassName, className, cssModule,\n modalTransition, backdropTransition, backdrop, isOpen, onOpened, onClosed,\n role, size, tabIndex, external, verticalPosition, horizontalPosition, keyboard, zIndex, fade, toggle,\n children, applicationNode, returnFocusRef, 'aria-labelledby': ariaLabelledbyId,\n ...dialogAttributes\n } = this.props;\n\n const modalAttributes = {\n onClick: this._handleBackdropClick,\n onMouseDown: this._handleBackdropMouseDown,\n onKeyUp: this._handleEscape,\n onKeyDown: this._handleTab,\n style: { display: 'block' }\n };\n\n const modalTransitions = {\n ...Fade.defaultProps,\n ...modalTransition,\n baseClass: fade && modalTransition ? modalTransition.baseClass : '',\n timeout: fade && modalTransition ? modalTransition.timeout : 0\n };\n const backdropTransitions = {\n ...Fade.defaultProps,\n ...backdropTransition,\n baseClass: fade && backdropTransition ? backdropTransition.baseClass : '',\n timeout: fade && backdropTransition ? backdropTransition.timeout : 0\n };\n\n const Backdrop = fade ? (\n \n ) :
;\n\n const dialogBaseClass = 'msc-modal__dialog';\n const dialogClasses =\n classNames([\n dialogBaseClass,\n className,\n size ? `msc-modal__${size}` : null\n ]);\n\n const dialog = (\n \n \n {children}\n
\n
\n );\n\n return (\n \n
\n \n {external}\n {dialog}\n \n {Backdrop}\n
\n
\n );\n }\n\n return null;\n }\n\n private _open(): void {\n if (this.element) {\n this.element.style.zIndex = `${this.props.zIndex || 1000}`;\n this.element.style.display = 'block';\n this.element.style.visibility = 'visible';\n if (Modal.openCount === 0) {\n if (window) {\n const scrollY = window.scrollY;\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.body.style.position = 'fixed';\n document.body.style.top = `-${scrollY}px`;\n document.body.style.right = `${scrollbarWidth}px`;\n document.body.style.left = '0px';\n }\n\n document.body.className = classNames(\n document.body.className,\n 'modal-open'\n );\n }\n Modal.openCount += 1;\n document.body.firstElementChild?.setAttribute('aria-hidden', 'true');\n if (this.applicationNode) {\n this.applicationNode.setAttribute('aria-hidden', 'true');\n }\n\n this.setState({ ...this.state, wasOpen: true });\n }\n }\n\n private _close(): void {\n if (!this.state.isOpen) {\n return;\n }\n\n if (this.element) {\n this.element.style.display = 'none';\n setTimeout(() => {\n if (this.element) {\n this.element.style.visibility = 'hidden';\n this.element.style.removeProperty('display');\n }\n }, 0);\n\n }\n\n if (Modal.openCount <= 1) {\n const modalOpenClassName = 'modal-open';\n document.body.firstElementChild?.setAttribute('aria-hidden', 'false');\n\n // Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`\n const modalOpenClassNameRegex = new RegExp(`(^| )${modalOpenClassName}( |$)`);\n document.body.className = document.body.className.replace(modalOpenClassNameRegex, ' ').trim();\n\n if (window) {\n const scrollY = document.body.style.top;\n document.body.style.position = '';\n document.body.style.top = '';\n document.body.style.right = '';\n document.body.style.left = '';\n window.scrollTo(0, -Number.parseInt(scrollY || '0', 10));\n }\n }\n Modal.openCount -= 1;\n\n if (this.applicationNode) {\n this.applicationNode.setAttribute('aria-hidden', 'false');\n }\n\n if (this.props.returnFocusRef && this.props.returnFocusRef.current) {\n this.props.returnFocusRef.current.focus();\n }\n\n this.setState({ ...this.state, wasOpen: false });\n }\n\n private _getFocusableChildren(): NodeListOf | null {\n if (this.element === null) {\n return null;\n }\n\n return this.element.querySelectorAll(focusableElements.join(', '));\n }\n\n private _getFocusedChild(): Element | null {\n const focusableChildren = this._getFocusableChildren();\n\n try {\n return document.activeElement;\n } catch {\n return focusableChildren === null ? null : focusableChildren[0];\n }\n }\n\n private _handleBackdropClick(e: React.MouseEvent): void {\n if (e.target === this.state.mouseDownElement) {\n e.stopPropagation();\n if (!this.props.isOpen || this.props.backdrop !== true) {\n return;\n }\n\n const container = this.ref.current;\n\n if (e.target && container && !container.contains(e.target as Node) && this.props.toggle) {\n this.props.toggle();\n }\n }\n }\n\n private _handleTab(e: React.KeyboardEvent): void {\n if (e.which !== 9) {\n return;\n }\n\n const focusableChildren = this._getFocusableChildren();\n if (focusableChildren === null) {\n return;\n }\n\n const totalFocusable = focusableChildren.length;\n const currentFocus = this._getFocusedChild();\n\n let focusedIndex = 0;\n\n for (let i = 0; i < totalFocusable; i += 1) {\n if (focusableChildren[i] === currentFocus) {\n focusedIndex = i;\n break;\n }\n }\n\n let el: HTMLElement | null = null;\n if (e.shiftKey && focusedIndex === 0) {\n e.preventDefault();\n el = focusableChildren[totalFocusable - 1] as HTMLElement;\n } else if (!e.shiftKey && focusedIndex === totalFocusable - 1) {\n e.preventDefault();\n el = focusableChildren[0] as HTMLElement;\n }\n if (el) {\n el.focus();\n }\n }\n\n private _handleBackdropMouseDown(e: React.MouseEvent): void {\n this.setState({\n mouseDownElement: e.target\n });\n }\n\n private _handleEscape(e: React.KeyboardEvent): void {\n if (this.props.isOpen && this.props.keyboard && e.keyCode === 27 && this.props.toggle) {\n this.props.toggle();\n }\n }\n\n private _onOpened(node: HTMLElement, isAppearing: boolean): void {\n if (this.props.onOpened !== undefined) {\n this.props.onOpened();\n }\n if (this.props.modalTransition !== undefined && this.props.modalTransition.onEntered !== undefined) {\n this.props.modalTransition.onEntered(node, isAppearing);\n }\n }\n\n private _onClosed(node: HTMLElement): void {\n if (this.props.onClosed !== undefined) {\n this.props.onClosed();\n }\n this._close();\n if (this.props.modalTransition !== undefined && this.props.modalTransition.onExited !== undefined) {\n this.props.modalTransition.onExited(node);\n }\n if (this.mounted) {\n this.setState({ isOpen: false });\n }\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport IModalBodyProps from './ModalBody.props';\n\n/**\n * ModalBody component.\n */\nexport default class ModalBody extends React.PureComponent {\n public static defaultProps: Partial = {\n tag: 'div'\n };\n\n public render(): JSX.Element {\n const { className, cssModule, tag, id, ...attributes } = this.props;\n const Tag = tag || 'div';\n const classes = mapToCssModules(classNames(className, 'msc-modal__body'), cssModule);\n return ;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport IModalFooterProps from './ModalFooter.props';\n\n/**\n * ModalFooter component.\n */\nexport default class ModalFooter extends React.PureComponent {\n public static defaultProps: Partial = {\n tag: 'div'\n };\n\n public render(): JSX.Element {\n const { className, cssModule, tag, ...attributes } = this.props;\n const Tag = tag || 'div';\n const classes = mapToCssModules(classNames(className, 'msc-modal__footer'), cssModule);\n return ;\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport classNames from 'classnames';\nimport * as React from 'react';\n\nimport { mapToCssModules } from '../common/utilities';\nimport IModalHeaderProps from './ModalHeader.props';\n\n/**\n * ModalHeader component.\n */\nexport default class ModalHeader extends React.PureComponent {\n public render(): JSX.Element {\n let closeButton;\n const {\n className,\n cssModule,\n children,\n toggle,\n tag,\n wrapTag,\n closeAriaLabel,\n closeButtonLabel,\n id,\n ...attributes\n } = this.props;\n\n const Tag = tag || 'h5';\n const WrapTag = wrapTag || 'div';\n const classes = mapToCssModules(classNames(className, 'msc-modal__header'), cssModule);\n\n if (toggle) {\n closeButton = (\n \n );\n }\n\n return (\n \n { children && \n {children}\n }\n {closeButton}\n \n );\n }\n}\n"],"sourceRoot":""}