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AA,GAC5ByD,OAAOsG,aAAarB,aAAe,IACnCF,EAAQE,aAEY,MAAMsB,EAAiB,GAC9BA,EAAe,mFAAqF,CAC5GrB,EAAGA,IAAMC,EAAQ,MACjBqB,GAAI,iDAEpBxG,OAAOsG,aAAetG,OAAOsG,cAAgB,GAC7CtG,OAAOsG,aAAaC,eAAchK,EAAAA,EAAA,GACPyD,OAAOsG,aAAaC,gBAAkB,IACtCA,UCnF3BE,EAAOC,QAAU1T,cCAjByT,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/only-c-product-collection/only-c-product-collection.props.autogenerated.ts?1906","webpack://Msdyn365.Commerce.Online/./src/modules/only-c-product-collection/only-c-product-collection.tsx?fba0","webpack://Msdyn365.Commerce.Online/./src/modules/only-c-product-collection/only-c-product-collection.view.tsx?55f5","webpack://Msdyn365.Commerce.Online/./src/themes/only/views/custom-components/SingleSlideCarousel.component.tsx?5b59","webpack://Msdyn365.Commerce.Online/./lib/only-c-product-collection/module-registration.js?7c54","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IOnlyCProductCollection containerModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\nexport const enum layout {\r\n carousel = 'carousel',\r\n grid = 'grid'\r\n}\r\n\r\nexport interface IOnlyCProductCollectionConfig extends Msdyn365.IModuleConfig {\r\n productCollection: Msdyn365.IProductList;\r\n variantsToShow?: number;\r\n heading?: IHeadingData;\r\n layout?: layout;\r\n allowBackNavigation?: boolean;\r\n imageSettings?: Msdyn365.IImageSettings;\r\n clientRender?: boolean;\r\n enableAffiliationBasedPricing?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport interface IOnlyCProductCollectionResources {\r\n priceFree: string;\r\n priceRangeSeparator: string;\r\n ratingAriaLabel: string;\r\n flipperNext: string;\r\n flipperPrevious: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n ratingCountAriaLabel: string;\r\n ratingCountAriaLabelSingleUser: string;\r\n newArrivalMsg: string;\r\n productLifeTag: string;\r\n splitSizeText: string;\r\n colorText: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface IOnlyCProductCollectionProps extends Msdyn365.IModule {\r\n resources: IOnlyCProductCollectionResources;\r\n config: IOnlyCProductCollectionConfig;\r\n slots: {\r\n quickview: React.ReactNode[];\r\n };\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { ProductPrice } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n DimensionAvailabilitiesForProductSearchResultInput,\r\n DimensionTypes,\r\n getDimensionAvailabilitiesForProductSearchResultAction,\r\n getPriceForProductSearchResult,\r\n IDimensionsApp,\r\n ObjectExtensions,\r\n PriceForProductSearchResultInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getTelemetryObject,\r\n IComponentNodeProps,\r\n IModuleProps,\r\n INodeProps,\r\n ISingleSlideCarouselProps,\r\n ITelemetryContent,\r\n NodeTag\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IOnlyCProductCollectionData } from './only-c-product-collection.data';\r\nimport { IOnlyCProductCollectionProps, layout } from './only-c-product-collection.props.autogenerated';\r\nimport ProductComponent from '../../themes/only/views/components/product.component';\r\nimport SingleSlideCarousel from '../../themes/only/views/custom-components/SingleSlideCarousel.component';\r\nimport { ProductSearchResultExtended } from '../only-c-search-result-container/actions/get-full-products-by-collection';\r\n\r\nexport interface IProductCollectionViewProps extends IOnlyCProductCollectionProps {\r\n heading?: React.ReactNode;\r\n ProductCollectionContainer: IModuleProps;\r\n SingleSlideCarouselComponentProps: INodeProps;\r\n GridComponentProps: INodeProps;\r\n products: IProductComponentViewProps[];\r\n isCarousel: boolean;\r\n productPrices?: ProductPrice[];\r\n}\r\n\r\nexport interface IProductComponentViewProps {\r\n ProductContainer: INodeProps;\r\n productComponent: React.ReactNode;\r\n}\r\nexport interface IProductComponentState {\r\n products: ProductSearchResultExtended[];\r\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\r\n}\r\n\r\n/**\r\n * ProductCollection component.\r\n */\r\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly productPrices: ProductPrice[];\r\n\r\n constructor(props: IOnlyCProductCollectionProps) {\r\n super(props);\r\n this.productPrices = [];\r\n this.state = {\r\n products: this.props.config.productCollection.products\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n public componentDidMount(): void {\r\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\r\n this._getActivePrice().catch(ex => this.props.telemetry.error(ex));\r\n }\r\n\r\n if (MsDyn365.isBrowser && document.addEventListener) {\r\n // VSI Customization to prevent empty Image display, extended to update state\r\n let products = this.state.products.slice();\r\n let timeOut: NodeJS.Timeout;\r\n document.addEventListener('DOMNodeInserted', (event: Event) => {\r\n const target = event.target as HTMLElement;\r\n const item =\r\n target?.classList?.contains('msc-empty_image') &&\r\n target?.closest('li')?.classList?.contains('ms-product-collection__item');\r\n if (item) {\r\n // setting to hidden is redundant as product will be reomved from state and module rerenderes without it\r\n // however it is faster, so hopefully can avoud showing empty images\r\n target.closest('li')?.classList?.add('hidden');\r\n const itemId = target.closest('li')?.attributes['itemId'].value;\r\n const colour = target.closest('li')?.attributes['colour'].value;\r\n // remove from state so that carousel re-renders (otherwise button clicks through items are unreliable)\r\n if (itemId && colour) {\r\n products = products.filter(product => product.ItemId !== itemId || product.variantColor !== colour);\r\n // debounce state updates to because react can't batch them inside native event handler\r\n // and don't want excessive re-renders\r\n if (timeOut) {\r\n clearTimeout(timeOut);\r\n }\r\n timeOut = setTimeout(() => {\r\n this.setState({ products: products });\r\n }, 50);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, className } = this.props.config;\r\n // const { resources } = this.props;\r\n\r\n // Initiallize state in case if the products were not found during initial module render\r\n this.initProductState(this.props.config.productCollection).catch(ex => this.props.telemetry.error(ex));\r\n\r\n const products = this.state.products;\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const headingLabel = heading ? heading.text : '';\r\n const headingComponent = heading && (\r\n \r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\r\n const updatedProducts = products?.map((item: ProductSearchResultExtended, index: number) => {\r\n const getProductData = this._getProduct(item, index);\r\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\r\n });\r\n\r\n const productCollectionViewProps = {\r\n ...this.props,\r\n heading: headingComponent,\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: '',\r\n // flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\r\n // flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\r\n parentId: this.props.id,\r\n telemetryContent: this.telemetryContent\r\n } as IComponentNodeProps,\r\n ProductCollectionContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-product-collection', className)\r\n },\r\n GridComponentProps: {\r\n tag: 'ul' as NodeTag,\r\n className: 'ms-product-collection__items'\r\n },\r\n isCarousel,\r\n\r\n products:\r\n ArrayExtensions.hasElements(updatedProducts) &&\r\n updatedProducts.filter(item => {\r\n return item !== undefined;\r\n }),\r\n productPrices: this.productPrices\r\n };\r\n if (products) {\r\n const itemIds = Array.from(new Set(products.map(item => item.ItemId)));\r\n let variantsToShow = this.props.config.variantsToShow ?? 1;\r\n if (variantsToShow < 1) {\r\n variantsToShow = 1;\r\n }\r\n return (\r\n <>\r\n {/* Idea was to tag li elements with product item id class, then can hide any variants over 3rd with nth-child,\r\n but nth-child doesn't take class into accout so using sibling combinator instead\r\n Thanks to https://betterprogramming.pub/css-select-nth-element-with-class-a313d080e2bf */}\r\n \r\n {this.props.renderView(productCollectionViewProps) as React.ReactElement}\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n\r\n /**\r\n * Get products dimension availabilities.\r\n * @param products - Products.\r\n * @returns Promise.\r\n */\r\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResultExtended[]): Promise => {\r\n const context = this.props.context as ICoreContext;\r\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\r\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\r\n const validProducts = ArrayExtensions.validValues(products);\r\n if (\r\n ArrayExtensions.hasElements(validProducts) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\r\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\r\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\r\n ) {\r\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\r\n new DimensionAvailabilitiesForProductSearchResultInput(validProducts, this.props.context as ICoreContext),\r\n this.props.context.actionContext\r\n );\r\n\r\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\r\n this.setState({ productsDimensionAvailabilities });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Helper method to initialize products state.\r\n * @param productCollection - List of products.\r\n */\r\n // @ts-ignore\r\n private readonly initProductState = async (productCollection: Msdyn365.IProductList) => {\r\n let products = this.state.products;\r\n const productCollectionProducts = productCollection.products;\r\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\r\n products = productCollectionProducts;\r\n this.setState({ products });\r\n }\r\n\r\n if (!ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\r\n await this._getProductsDimensionsAvailabilities(products);\r\n }\r\n };\r\n\r\n private readonly _getProduct = (product: ProductSearchResultExtended, index: number): IProductComponentViewProps | null => {\r\n if (!product || !product.Name) {\r\n this.props.telemetry.trace('[product-collection] Product or product name is null');\r\n return null;\r\n }\r\n const telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n const { imageSettings, allowBackNavigation } = this.props.config;\r\n const resources = this.props.resources;\r\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\r\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\r\n const quickviewSlot =\r\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\r\n const reviewCount = 1;\r\n const reviewTotalRatings = Number(product.TotalRatings);\r\n const reviewCountAriaLabelValue =\r\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\r\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n );\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator\r\n };\r\n return {\r\n ProductContainer: {\r\n tag: 'li' as NodeTag,\r\n className: `ms-product-collection__item item-${product.ItemId}`,\r\n role: 'listitem',\r\n key: index,\r\n itemId: product.ItemId,\r\n colour: product.variantColor\r\n },\r\n productComponent: (\r\n \r\n ArrayExtensions.hasElements(dimensionAvailability) &&\r\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\r\n )}\r\n />\r\n )\r\n };\r\n };\r\n\r\n /**\r\n * Get the active price for products.\r\n */\r\n private readonly _getActivePrice = async (): Promise => {\r\n const productsList = this.state.products;\r\n const products = await getPriceForProductSearchResult(\r\n new PriceForProductSearchResultInput(productsList),\r\n this.props.context.actionContext\r\n );\r\n\r\n await this._getProductsDimensionsAvailabilities(products);\r\n\r\n this.setState({ products });\r\n };\r\n}\r\n\r\nexport default ProductCollection;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './only-c-product-collection';\r\n\r\nconst ProductCollectionView: React.FC = props => {\r\n const { heading, ProductCollectionContainer, products, SingleSlideCarouselComponentProps, GridComponentProps, isCarousel } = props;\r\n if (products) {\r\n return (\r\n \r\n {heading}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/*\r\n * Replacement for out of the bix slide carousel to solve issue with extra next click being possible on last slide\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { addThrottledEvent, getCSS, ISingleSlideCarouselProps, Flipper } from '@msdyn365-commerce-modules/utilities';\r\n\r\ninterface ISingleSlideCarouselState {\r\n showPrevious: boolean;\r\n showNext: boolean;\r\n offset: number;\r\n}\r\n\r\n/**\r\n * SingleSlideCarousel - yup.\r\n */\r\nexport default class SingleSlideCarousel extends React.PureComponent {\r\n private static readonly itemsSelector: string = 'msc-ss-carousel-item';\r\n\r\n private static readonly verticalItemsSelector: string = 'msc-ss-carousel-vert-item';\r\n\r\n private direction: string;\r\n\r\n private item: HTMLElement | undefined;\r\n\r\n private slide: HTMLElement | undefined;\r\n\r\n private carousel: HTMLElement | undefined;\r\n\r\n private carouselSize: number = 0;\r\n\r\n private slideSize: number = 0;\r\n\r\n private itemSize: number = 0;\r\n\r\n private resizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n private readonly ref: React.RefObject;\r\n\r\n private readonly slideRef: React.RefObject;\r\n\r\n private readonly itemRef: React.RefObject;\r\n\r\n private readonly id: string;\r\n\r\n private scrollStart: number | undefined;\r\n\r\n private readonly scrollThreshold: number;\r\n\r\n private readonly flipperNextLabel: string = 'next';\r\n\r\n private readonly flipperPrevLabel: string = 'prev';\r\n\r\n constructor(props: ISingleSlideCarouselProps) {\r\n super(props);\r\n this._nextSlide = this._nextSlide.bind(this);\r\n this._previousSlide = this._previousSlide.bind(this);\r\n this._handleTouchStart = this._handleTouchStart.bind(this);\r\n this._handleTouchEnd = this._handleTouchEnd.bind(this);\r\n this._onFocus = this._onFocus.bind(this);\r\n this._onResized = this._onResized.bind(this);\r\n this.state = { showPrevious: false, showNext: false, offset: 0 };\r\n this.ref = React.createRef();\r\n this.slideRef = React.createRef();\r\n this.itemRef = React.createRef();\r\n this.direction = 'left';\r\n this.id = props.parentId || '';\r\n this.scrollThreshold = this.props.touchScrollThreshold !== undefined ? this.props.touchScrollThreshold : 100;\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n this.carousel = this.ref.current!;\r\n this.slide = this.slideRef.current!;\r\n this.item = this.itemRef.current!;\r\n this._setSizes();\r\n this._updateFlippers(this.state.offset);\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.direction = this.props.vertical ? 'top' : 'left';\r\n this.carousel = this.ref.current!;\r\n this.slide = this.slideRef.current!;\r\n this.item = this.itemRef.current!;\r\n this._setSizes();\r\n this.resizeThrottledEventHandler = window && addThrottledEvent(window, 'resize', this._onResized as EventListener);\r\n this._updateFlippers(0);\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window && window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const isVert: boolean = this.props.vertical === true;\r\n const slidePositionStyle = {} as React.CSSProperties;\r\n const modifiedChildren = this._getClonedChildren(isVert);\r\n slidePositionStyle[this.direction] = `${this.state.offset}px`;\r\n const carouselClass = isVert ? 'msc-ss-carousel-vert' : 'msc-ss-carousel';\r\n const carouselSlideClass = isVert ? 'msc-ss-carousel-vert-slide' : 'msc-ss-carousel-slide';\r\n const overflowClass = isVert ? 'msc-ss-carousel-vert-strip' : 'msc-ss-carousel-strip';\r\n const previousFlipperGlyph = isVert ? 'msi-chevron-up' : 'msi-chevron-left';\r\n const nextFlipperGlyph = isVert ? 'msi-chevron-down' : 'msi-chevron-right';\r\n const previousFlipperClassName = isVert ? 'msc-ss-carousel-vert__flipper' : 'msc-ss-carousel__flipper';\r\n const nextFlipperClassName = isVert\r\n ? 'msc-ss-carousel-vert__flipper msc-ss-carousel-vert__flipper--next'\r\n : 'msc-ss-carousel__flipper msc-ss-carousel__flipper--next';\r\n const disableClassName = !this.state.showPrevious || !this.state.showNext ? 'disabled' : null;\r\n return (\r\n
\r\n 0)}\r\n telemetryContent={this.props.telemetryContent}\r\n telemetryLabel={this.flipperPrevLabel}\r\n />\r\n 0)}\r\n telemetryContent={this.props.telemetryContent}\r\n telemetryLabel={this.flipperNextLabel}\r\n />\r\n
\r\n \r\n {modifiedChildren}\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private _getClonedChildren(isVert: boolean): React.DetailedReactHTMLElement, HTMLElement>[] {\r\n return React.Children.map(this.props.children, (child: React.ReactNode, index: number) => {\r\n const castChild = (child as React.ReactChild) as React.ReactElement;\r\n if (index === 1) {\r\n return React.cloneElement(castChild, {\r\n className: `${isVert ? SingleSlideCarousel.verticalItemsSelector : SingleSlideCarousel.itemsSelector} ${\r\n castChild.props.className\r\n }`,\r\n\r\n // @ts-expect-error\r\n ref: this.itemRef,\r\n onFocus: this._onFocus\r\n });\r\n }\r\n return React.cloneElement(castChild, {\r\n className: `${isVert ? SingleSlideCarousel.verticalItemsSelector : SingleSlideCarousel.itemsSelector} ${\r\n castChild.props.className\r\n }`,\r\n\r\n // @ts-expect-error\r\n onFocus: this._onFocus\r\n });\r\n });\r\n }\r\n\r\n private _nextSlide(): void {\r\n this._moveSingleSlide(true);\r\n }\r\n\r\n private _previousSlide(): void {\r\n this._moveSingleSlide(false);\r\n }\r\n\r\n private _handleTouchStart(evt: React.TouchEvent): void {\r\n if (evt.touches.length === 0) {\r\n this.scrollStart = undefined;\r\n } else {\r\n this.scrollStart = this.props.vertical === true ? evt.touches[0].screenY : evt.touches[0].screenX;\r\n }\r\n }\r\n\r\n private _handleTouchEnd(evt: React.TouchEvent): void {\r\n if (evt.changedTouches.length > 0 && this.scrollStart !== undefined) {\r\n const newTarget: number = this.props.vertical === true ? evt.changedTouches[0].screenY : evt.changedTouches[0].screenX;\r\n\r\n const delta = newTarget - this.scrollStart;\r\n\r\n if (delta > this.scrollThreshold) {\r\n this._previousSlide();\r\n }\r\n\r\n if (delta < -this.scrollThreshold) {\r\n this._nextSlide();\r\n }\r\n }\r\n\r\n this.scrollStart = undefined;\r\n\r\n return;\r\n }\r\n\r\n private _moveSingleSlide(next: boolean): void {\r\n let currentOffset = Number.parseInt(getCSS(this.slide!, this.direction), 10);\r\n const carouselSize = this.carouselSize;\r\n let maxScrollCount = Math.floor(carouselSize / this.itemSize);\r\n const directionModifier = next ? -1 : 1;\r\n currentOffset = !isNaN(currentOffset) && typeof currentOffset === 'number' ? currentOffset : 0;\r\n\r\n if (maxScrollCount === 0) {\r\n maxScrollCount = 1;\r\n }\r\n\r\n maxScrollCount = carouselSize % this.itemSize === 0 ? maxScrollCount - 1 : maxScrollCount;\r\n maxScrollCount = Math.max(maxScrollCount, 1);\r\n const maxScrollDistance = maxScrollCount * this.itemSize;\r\n let distanceToEdge = next ? this.slideSize - carouselSize + currentOffset : Math.abs(currentOffset);\r\n distanceToEdge = Math.max(0, distanceToEdge);\r\n\r\n const offset =\r\n maxScrollDistance <= distanceToEdge\r\n ? maxScrollDistance * directionModifier + currentOffset\r\n : distanceToEdge * directionModifier + currentOffset;\r\n\r\n this._updateFlippers(offset);\r\n }\r\n\r\n private _setSizes(): void {\r\n const item = this.item;\r\n if (item) {\r\n this.itemSize = this.props.vertical ? item.scrollHeight : item.scrollWidth;\r\n } else {\r\n this.itemSize = 0;\r\n }\r\n\r\n this.carouselSize = this._calculateCarouselSize();\r\n this.slideSize = this.slide ? (this.props.vertical ? this.slide.scrollHeight : this.slide.scrollWidth) : 0;\r\n }\r\n\r\n private _calculateCarouselSize(): number {\r\n if (!this.carousel) {\r\n return 0;\r\n }\r\n\r\n const carouselStyle = getComputedStyle(this.carousel);\r\n\r\n const padding = this.props.vertical\r\n ? Number.parseFloat(carouselStyle.paddingTop || '') + Number.parseFloat(carouselStyle.paddingBottom || '')\r\n : Number.parseFloat(carouselStyle.paddingLeft || '') + Number.parseFloat(carouselStyle.paddingRight || '');\r\n\r\n return this.props.vertical ? this.carousel.clientHeight - padding : this.carousel.clientWidth - padding;\r\n }\r\n\r\n private _canScrollPrevious(offset: number): boolean {\r\n return !isNaN(offset) && offset !== 0;\r\n }\r\n\r\n private _canScrollNext(offset: number): boolean {\r\n // out of the box calculation doesn't return false when there are just a few pixels left\r\n // (think that's a result of hiding products without images)\r\n // if (this.carouselSize + Math.abs(offset) >= this.slideSize) {\r\n // return false;\r\n // }\r\n // instead get the space left to the size of the carousel\r\n const spaceLeft = this.slideSize - (this.carouselSize + Math.abs(offset));\r\n // then only retunr false if its a few pixels\r\n // (think problematic space is hidden slide borders, so should be more than total items)\r\n const totalItems = Math.floor(this.slideSize / this.itemSize);\r\n if (spaceLeft < totalItems) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n private _updateFlippers(offset: number): void {\r\n this.setState({\r\n showPrevious: this._canScrollPrevious(offset),\r\n showNext: this._canScrollNext(offset),\r\n offset\r\n });\r\n }\r\n\r\n private _scrollItemIntoView(item: HTMLElement): void {\r\n const carouselSize = this.carouselSize;\r\n let offset = this.props.vertical ? item.offsetTop : item.offsetLeft;\r\n let updateOffset = false;\r\n\r\n const left = Number.parseInt(getCSS(this.slide!, 'left'), 10) || 0;\r\n const top = Number.parseInt(getCSS(this.slide!, 'top'), 10) || 0;\r\n\r\n if (this.props.vertical) {\r\n if (top < 0 && -top > offset) {\r\n if (offset !== 0) {\r\n offset = -offset + 1;\r\n }\r\n updateOffset = true;\r\n } else if (top + offset > carouselSize - this.itemSize) {\r\n offset = carouselSize - this.itemSize - offset - 1;\r\n updateOffset = true;\r\n }\r\n } else if (this.direction === 'left') {\r\n if (left < 0 && -left > offset) {\r\n if (offset !== 0) {\r\n offset = -offset + 1;\r\n }\r\n updateOffset = true;\r\n } else if (left + offset > carouselSize - this.itemSize) {\r\n offset = carouselSize - this.itemSize - offset + 19;\r\n updateOffset = true;\r\n }\r\n }\r\n\r\n if (updateOffset) {\r\n this._updateFlippers(offset);\r\n\r\n if (this.props.vertical) {\r\n setTimeout(() => {\r\n (this.slide as Node).parentElement!.scrollTop = 0;\r\n }, 0);\r\n } else {\r\n setTimeout(() => {\r\n (this.slide as Node).parentElement!.scrollLeft = 0;\r\n }, 0);\r\n }\r\n }\r\n }\r\n\r\n private _onFocus(event: React.FocusEvent): void {\r\n const target = event.currentTarget as HTMLElement;\r\n this._scrollItemIntoView(target);\r\n }\r\n\r\n private _onCarouselResized(): void {\r\n this._setSizes();\r\n let offset = Number.parseInt(getCSS(this.slide!, this.direction), 10);\r\n\r\n // Ensure the carousel slide fits across the entire alotted space\r\n if (!isNaN(offset) && offset < 0 && this.slideSize + offset < this.carouselSize) {\r\n offset = Math.min(0, this.carouselSize - this.slideSize);\r\n }\r\n\r\n this._updateFlippers(offset);\r\n }\r\n\r\n private readonly _onResized = (): void => {\r\n this._onCarouselResized();\r\n };\r\n}\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['only-c-product-collection'] = {\n c: () => require('partner/modules/only-c-product-collection/only-c-product-collection.tsx'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'only-c-product-collection',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/only-c-product-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|only-c-product-collection|only-c-product-collection'] = {\n c: () => require('partner/modules/only-c-product-collection/only-c-product-collection.view.tsx'),\n cn: '__local__-__local__-only-c-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["layout","HeadingTag","ProductCollection","React","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","_getProductsDimensionsAvailabilities","async","context","dimensionsToDisplayOnProductCard","app","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","ArrayExtensions","validValues","products","hasElements","includes","DimensionTypes","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","actionContext","setState","initProductState","state","productCollectionProducts","productCollection","_getProduct","product","index","_this$props$data$feat","_this$state$productsD","Name","telemetry","trace","telemetryContent","getTelemetryObject","request","telemetryPageName","friendlyName","imageSettings","allowBackNavigation","resources","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","slots","quickview","length","reviewCountAriaLabelValue","Number","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","data","featureState","result","find","priceResources","priceRangeSeparator","ProductContainer","tag","className","ItemId","role","key","itemId","colour","variantColor","productComponent","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","id","typeName","quickViewButton","IsEnabled","newArrivalMsg","productLifeTag","maxSizeDisplay","splitSizeText","colorText","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","RecordId","_getActivePrice","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","productPrices","componentDidMount","enableAffiliationBasedPricing","requestContext","user","isAuthenticated","catch","ex","error","MsDyn365","isBrowser","document","addEventListener","timeOut","slice","_target$classList","_target$closest","classList","contains","closest","_target$closest2","_target$closest3","_target$closest4","add","attributes","filter","clearTimeout","setTimeout","render","isCarousel","carousel","headingLabel","headingComponent","Msdyn365","editProps","onEdit","updatedProducts","map","item","getProductData","ObjectExtensions","isNullOrUndefined","undefined","productCollectionViewProps","_objectSpread","SingleSlideCarouselComponentProps","SingleSlideCarousel","parentId","ProductCollectionContainer","moduleProps","classnames","GridComponentProps","_this$props$config$va","itemIds","Array","from","Set","variantsToShow","type","cssSelector","i","renderView","_renderCarousel","carouselContainer","items","Node","Object","assign","_renderProduct","_renderGrid","gridContainer","Module","carouselSize","slideSize","itemSize","flipperNextLabel","flipperPrevLabel","_onResized","_onCarouselResized","_nextSlide","bind","_previousSlide","_handleTouchStart","_handleTouchEnd","_onFocus","showPrevious","showNext","offset","ref","slideRef","itemRef","direction","scrollThreshold","touchScrollThreshold","componentDidUpdate","current","slide","_setSizes","_updateFlippers","vertical","resizeThrottledEventHandler","window","addThrottledEvent","componentWillUnmount","removeEventListener","isVert","slidePositionStyle","modifiedChildren","_getClonedChildren","carouselClass","carouselSlideClass","overflowClass","previousFlipperGlyph","nextFlipperGlyph","previousFlipperClassName","nextFlipperClassName","disableClassName","onTouchStart","onTouchEnd","Flipper","glyphProps","onClick","disabled","displayTooltip","telemetryLabel","style","useTabList","children","child","castChild","verticalItemsSelector","itemsSelector","onFocus","_moveSingleSlide","evt","touches","scrollStart","screenY","screenX","changedTouches","delta","next","currentOffset","parseInt","getCSS","maxScrollCount","Math","floor","directionModifier","isNaN","max","maxScrollDistance","distanceToEdge","abs","scrollHeight","scrollWidth","_calculateCarouselSize","carouselStyle","getComputedStyle","padding","parseFloat","paddingTop","paddingBottom","paddingLeft","paddingRight","clientHeight","clientWidth","_canScrollPrevious","_canScrollNext","_scrollItemIntoView","offsetTop","offsetLeft","updateOffset","left","top","parentElement","scrollTop","scrollLeft","currentTarget","min","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}