{"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/bootloader/node_modules/core-js/modules/es.number.parse-float.js?5298","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","zoomedImage","document","body","querySelector","style","width","height","defaultDataScale","onMouseOutLensContainer","event","zoomLens","currentTarget","visibility","classList","remove","zoomedImageContainer","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","dataScaleText","removeAttribute","imageElement","parentElement","previousElementSibling","dataScale","Number","imageContainerSize","offsetWidth","offsetHeight","zoomedImageSize","opacity","imageCenter","offset","scaledCursorPosition","zoomedImagePosition","inlineZoomInitClick","_event$currentTarget$","type","zoomImg","nextElementSibling","handleMouseMovementInContainerZoom","lens","_lens$getAttribute","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","_parentElement$getAtt","inlineZoomImageOnMouseOut","inlineZoomImageOnHover","scale","arguments","length","undefined","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","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","_buttonReference$edit","edit","current","handleClickDelete","_buttonReference$dele","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","itemsPerPage","startingItem","previousText","previousAriaLabel","nextAriaLabel","tableBody","tableHead","Progress","percent","defaultProps","UncontrolledTooltip","isOpen","_toggle","bind","_isAutoDisplayTriggered","isCartPage","StringExtensions","isNullOrWhitespace","cartPageUrl","location","shouldShowMiniCart","Tooltip","Object","assign","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","_objectSpread","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","_ref","isChecked","cssClass","checked","tag","Tag","Element","restAttribute","_objectWithoutProperties","_excluded","Waiting","_this$props","watingClassName","DEFAULT_DELAYS","show","hide","addTargetEvents","handleDocumentClick","removeTargetEvents","onMouseOverTooltip","onMouseLeaveTooltip","onMouseOverTooltipContent","onMouseLeaveTooltipContent","onFocusOutTarget","onEscKeyDown","onEscKeyDownNative","tabPressed","getTargetElement","getElementsByTagName","item","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","$","parseFloat","stat","forced","Module","moduleProps","renderModuleAttributes","Quantity","_props$currentCount","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","renderModeStateItem","stateStringRepresentation","PriceEditor","_handleInputFocus","isInputFocused","_handleInputBlur","_handleEditorModeStateChange","newState","_this$_inputRef$curre","_updateAmount","maximumValue","_inputRef","focus","newAmount","handleChange","toFixed","_precision","isNullOrUndefined","minimumValue","defaultValue","defaultAmount","_this$state$currentVa","_this$state$currentVa2","_this$state$currentVa3","hasMultipleModes","mode","formattedValue","editedValue","priceEditorInputAriaLabel","PaginationLink","payLoad","getPayloadObject","telemetryContent","next","previous","etext","paginationLinkclasses","defaultCaret","Array","isArray","contentAction","attribute","getTelemetryAttributes","ImagefullView","galleryCarousel","modalWindow","autoFocus","applicationNode","modalIsOpen","ontoggle","zIndex","modalHeader","cloneElement","Flipper","telemetryLabel","glyphProps","displayTooltip","sizeClass","_context$device","innerWidth","Viewport","device","Type","IncrementalQuantity","IncrementalQuantity_1","_this$props$min","_handleUpdateState","_debounce","_minValue","isUpdating","_onIncrement","_onDecrement","_props$currentCount2","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","decrementDisabled","isGiftCard","incrementDisabled","TelemetryConstant","DecrementQuantity","decrementAttributes","IncrementQuantity","incrementAttributes","extraClassDecrement","extraClassIncrement","decrementButtonAriaLabel","incrementButtonAriaLabel","invokeCallback","currQuantity","updatedQuantity","__decorate","observer","Drawer","_props$collapseProps$","_props$collapseProps","isManuallyToggled","collapseProps","buttonText","drawerGlyphClass","toggleGlyphClassName","animateGlyph","drawerOpenGlyph","openGlyph","closeGlyph","drawerCloseGlyph","drawerClass","toggleButtonProps","_generateDrawerButtonInnerMarkup","collapseState","drawerButtonTextClass","toggleButtonClassName","glyphPlacement","toggleButtonText","_generateGlyphMarkup","glyphClass","onToggle","innerText","Popup","_context$app$config","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","_unused","console","error","findDOMElements","isRef","isElement","Carousel","focusableElements","PaginationItem","paginationItemClasses","FormBuilderErrorComponent","errorMessage","FormBuilder","_onSubmit","async","formData","formKey","values","resourceId","resourceValue","onSubmit","isSubmitted","_onInputChange","_event$target$getAttr","changedValueIndex","Promise","reject","currentKey","_currentKey$isRequire","requiredValueMissing","setValue","isRequired","resolve","Dictionary","_formKey$isRequired","confirmationComponent","submitButtonText","requiredValueMissingErrorMessage","every","ArrayExtensions","hasElements","autoComplete","_formKey$isRequired2","_formKey$isRequired3","getValue","required","isAnyRequiredValueMissing","getValues","findIndex","isMissing","formatSpecifier","_len","parameters","_key","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","_document$body$firstE","openCount","scrollY","scrollbarWidth","right","removeProperty","_document$body$firstE2","modalOpenClassName","modalOpenClassNameRegex","RegExp","_getFocusedChild","focusableChildren","which","totalFocusable","currentFocus","focusedIndex","el","shiftKey","ModalFooter","closeButton","wrapTag","closeButtonLabel","WrapTag"],"mappings":"6FAKO,SAASA,IACZ,MAAMC,EAAuCC,SAASC,KAAKC,cAAc,8BACrEH,IACAA,EAAYI,MAAMC,MAAQ,IAC1BL,EAAYI,MAAME,OAAS,KAJnC,sXAWO,MAAMC,EAAmB,EAMzB,SAASC,EAAwBC,GACpC,MAAMC,EAAWD,EAAME,cACvBD,EAASN,MAAMQ,WAAa,SAC5BF,EAASG,UAAUC,OAAO,wCAE1B,MAAMC,EAAuBd,SAASC,KAAKC,cAA8B,6BACrEY,IACAA,EAAqBX,MAAMQ,WAAa,UAuDhD,SAASI,EAAUC,GAEf,MAAO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,YAAgBC,IAAWvW,EAAW,qBAAsB8V,GAC5E,OAAOrZ,gBAACiW,EAAG3K,OAAAC,OAAA,GAAKoM,EAAU,CAAEpU,UAAWqW,MAR7BuoB,EAAA13B,aAA2C,CACrDuL,IAAK,O,+GCFE,MAAM0H,UAAoB1d,gBAC9BkJ,SACH,IAAIk5B,EACJ,MAAA7rB,EAWI1V,KAAKV,OAXH,UACFoD,EAAS,UACT8V,EAAS,SACT6B,EAAQ,OACR1P,EAAM,IACNwK,EAAG,QACHqsB,EAAO,eACPhS,EAAc,iBACdiS,EAAgB,GAChBt9B,GAEHuR,EADMoB,EAAUvB,YAAAG,EAAAF,GAGXJ,EAAMD,GAAO,KACbusB,EAAUF,GAAW,MACrBzoB,EAAUC,YAAgBC,IAAWvW,EAAW,qBAAsB8V,GAU5E,OARI7N,IACA42B,EACIpiC,gBAAA,UACIhD,KAAK,SAASoG,QAASoI,EAAQjI,UAAWsW,YAAgB,0BAA2BR,GAAU,aACnFgX,GAAkB,WAKtCrwB,gBAACuiC,EAAOj3B,OAAAC,OAAA,GAAKoM,EAAU,CAAEpU,UAAWqW,IAC9BsB,GAAYlb,gBAACiW,EAAG,CAAC1S,UAAWsW,YAAgB,mBAAoBR,IAC7D6B,GAEJknB","file":"static/js/1.c1f19f2a82d1602a3e9f.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport function removeInlineZoomStyle(): void {\n const zoomedImage: HTMLImageElement | null = document.body.querySelector('.ms-inline-zoom__zoomedImg');\n if (zoomedImage) {\n zoomedImage.style.width = '0';\n zoomedImage.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\nexport function onMouseOverImageContainer(event: React.MouseEvent): void {\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\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\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\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\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\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\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 this.setState({\n limit: sliderPos - handlePos,\n grab: orientations.horizontal.direction === 'right' ? -handlePos / 2 : handlePos / 2\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","'use strict';\nvar $ = require('../internals/export');\nvar parseFloat = require('../internals/number-parse-float');\n\n// `Number.parseFloat` method\n// https://tc39.es/ecma262/#sec-number.parseFloat\n// eslint-disable-next-line es/no-number-parsefloat -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseFloat !== parseFloat }, {\n parseFloat: parseFloat\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 { debounce } from 'lodash';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, TelemetryConstant } from '../common/telemetryHelper';\nimport { IIncrementalQuantityProps } from './IncrementalQuantity.props';\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\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 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 this._handleUpdateState\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 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":""}