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webpack://bestseller.commerce.online/external var \"React\"?0d3b","webpack://bestseller.commerce.online/external var \"ReactDOM\"?853b","webpack://bestseller.commerce.online/./src/shared/functions/is-valid-image.ts?b7db","webpack://bestseller.commerce.online/./lib/ext-media-gallery/module-registration.js?7d2c","webpack://bestseller.commerce.online/./src/modules/ext-media-gallery/ext-media-gallery.props.autogenerated.ts?4de4","webpack://bestseller.commerce.online/./src/modules/ext-media-gallery/utils/helper.ts?448e","webpack://bestseller.commerce.online/./src/modules/ext-media-gallery/utils/get-valid-product-images.ts?a5b9","webpack://bestseller.commerce.online/./src/modules/ext-media-gallery/ext-media-gallery.tsx?4052","webpack://bestseller.commerce.online/./src/modules/ext-media-gallery/ext-media-gallery.view.tsx?47b1"],"sourcesContent":["module.exports = React;","module.exports = ReactDOM;","import { generateImageUrl, ICommerceApiSettings } from '@msdyn365-commerce/core';\r\n/**\r\n * Parses whether a URL is valid\r\n * @param url\r\n * @returns\r\n */\r\nexport const isValidImage = (url?: string): boolean => {\r\n if (url) {\r\n return url.startsWith('https') || url.startsWith('Products');\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\nexport async function validateUrlsAsync(\r\n urls: string[],\r\n apiSettings: ICommerceApiSettings,\r\n filterLegacy: boolean = false\r\n): Promise {\r\n var results: Promise[] = [];\r\n var isValid = false;\r\n for (const url of urls) {\r\n results.push(validateUrlAsync(url, apiSettings, filterLegacy));\r\n }\r\n await Promise.all(results).then(values => {\r\n //If any of the values are true, the image is valid\r\n isValid = values.some(value => value);\r\n });\r\n\r\n return isValid;\r\n}\r\n\r\nexport async function validateUrlAsync(url: string, apiSettings: ICommerceApiSettings, filterLegacy: boolean = false): Promise {\r\n //If we filter legacy images and the image is a legacy image, we know it is not valid\r\n if (filterLegacy && !isValidImage(url)) {\r\n return false;\r\n }\r\n\r\n const imageUrl = generateImageUrl(apiSettings, url);\r\n\r\n if (imageUrl === '') {\r\n return false;\r\n }\r\n\r\n return new Promise(resolve => {\r\n try {\r\n const http = new XMLHttpRequest();\r\n http.open('HEAD', imageUrl ?? '', true);\r\n\r\n http.addEventListener('load', () => {\r\n resolve(http.status === 200 || http.status === 201);\r\n });\r\n\r\n http.addEventListener('error', () => {\r\n resolve(false);\r\n });\r\n\r\n http.send();\r\n } catch {\r\n resolve(false);\r\n }\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['ext-media-gallery'] = {\n c: () => require('partner/modules/ext-media-gallery/ext-media-gallery.tsx'),\n $type: 'contentModule',\n da: [{name:'mediaLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-by-id', runOn: 0},{name:'mediaLocationsForSelectedVariant', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-for-selected-variant', runOn: 0},{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'ext-media-gallery',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/ext-media-gallery'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-by-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-by-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\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|ext-media-gallery|ext-media-gallery'] = {\n c: () => require('partner/modules/ext-media-gallery/ext-media-gallery.view.tsx'),\n cn: '__local__-__local__-ext-media-gallery'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IExtMediaGallery contentModule 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\n\r\nexport const enum imageSource {\r\n pageContext = 'pageContext',\r\n productId = 'productId'\r\n}\r\n\r\nexport const enum imageZoom {\r\n inline = 'inline',\r\n container = 'container'\r\n}\r\n\r\nexport const enum thumbnailsOrientation {\r\n vertical = 'vertical',\r\n horizontal = 'horizontal'\r\n}\r\n\r\nexport const enum altTextSource {\r\n product = 'product',\r\n cms = 'cms'\r\n}\r\n\r\nexport interface IExtMediaGalleryConfig extends Msdyn365.IModuleConfig {\r\n imageSource?: imageSource;\r\n images?: Msdyn365.IImageData[];\r\n productId?: string;\r\n imageZoom?: imageZoom;\r\n allowFullScreen?: boolean;\r\n dataScale?: string;\r\n zoomedImageSettings?: Msdyn365.IImageSettings;\r\n thumbnailsOrientation?: thumbnailsOrientation;\r\n thumbnailImageSettings?: Msdyn365.IImageSettings;\r\n galleryImageSettings?: Msdyn365.IImageSettings;\r\n shouldHideMasterProductImagesForVariant?: boolean;\r\n altTextSource?: altTextSource;\r\n showPaginationTooltip?: boolean;\r\n shouldUpdateOnPartialDimensionSelection?: boolean;\r\n className?: string;\r\n skipImageValidation?: boolean;\r\n autoplay?: boolean;\r\n mute?: boolean;\r\n playPauseTrigger?: boolean;\r\n controls?: boolean;\r\n clientRender?: boolean;\r\n preventImageUpdateOnSizeDimensionUpdate?: boolean;\r\n}\r\n\r\nexport interface IExtMediaGalleryResources {\r\n nextScreenshotFlipperText: string;\r\n previousScreenshotFlipperText: string;\r\n fullScreenTitleText: string;\r\n ariaLabelForSlide: string;\r\n playLabel: string;\r\n pauseLabel: string;\r\n pausedLabel: string;\r\n playingLabel: string;\r\n unMuteLabel: string;\r\n muteLabel: string;\r\n fullScreenLabel: string;\r\n exitFullScreenLabel: string;\r\n seekBarLabel: string;\r\n videoTimeDurationLabel: string;\r\n closedCaptionLabel: string;\r\n optionButtonLabel: string;\r\n sliderThumbLabel: string;\r\n volumeThumbLabel: string;\r\n playVideoTitleText: string;\r\n}\r\n\r\nexport interface IExtMediaGalleryProps extends Msdyn365.IModule {\r\n resources: IExtMediaGalleryResources;\r\n config: IExtMediaGalleryConfig;\r\n}\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/* eslint-disable no-duplicate-imports */\r\nimport { IImageData, IRequestContext, IVideoData } from '@msdyn365-commerce/core';\r\n\r\nexport enum MediaType {\r\n /**\r\n * The None.\r\n */\r\n None = 0,\r\n /**\r\n * The Image type.\r\n */\r\n Image = 1,\r\n /**\r\n * The video type.\r\n */\r\n Video = 2,\r\n /**\r\n * The file type.\r\n */\r\n File = 3\r\n}\r\n\r\nexport interface IMediaData extends IImageData {\r\n mediaTypeValue?: MediaType;\r\n displayOrder?: number;\r\n videoData?: IVideoData;\r\n}\r\n\r\n/**\r\n * Gets correct alt text for image based on configuration of site.\r\n * @param productName Product name.\r\n * @param context Current request context.\r\n * @param imageAltText Alt-text from CMS image.\r\n */\r\nexport function getAltText(\r\n context: IRequestContext,\r\n shouldUseCmsAltText: boolean,\r\n productName?: string,\r\n imageAltText?: string\r\n): string | undefined {\r\n if (!context?.app?.config?.OmniChannelMedia) {\r\n return productName;\r\n }\r\n if (shouldUseCmsAltText) {\r\n return imageAltText;\r\n }\r\n return productName;\r\n}\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/* eslint-disable no-duplicate-imports */\r\nimport {\r\n commerceApiRequest,\r\n commerceVideoMetadataRequest,\r\n getCatalogId,\r\n IActionContext,\r\n IImageData,\r\n IImageSettings,\r\n IVideoData\r\n} from '@msdyn365-commerce/core';\r\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n getMediaLocationsForSelectedVariant,\r\n MediaLocationsForSelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getAltText } from './helper';\r\nimport { isValidImage } from '../../../shared/functions/is-valid-image';\r\n\r\nasync function validateMediaLocationAsync(mediaLocation: MediaLocation, filterLegacy?: boolean): Promise<[IImageData, boolean]> {\r\n const imageData: IImageData = {\r\n src: mediaLocation.Uri || '',\r\n altText: mediaLocation.AltText || ''\r\n };\r\n //BS CUSTOM\r\n if (mediaLocation.Uri && filterLegacy) {\r\n const fileName = mediaLocation?.Uri.split('fileName=/')[1];\r\n if (!isValidImage(fileName)) {\r\n return [imageData, false];\r\n }\r\n }\r\n if (mediaLocation.IsApplicableForChildEntities) {\r\n imageData.additionalProperties = { isApplicableForChildEntities: 'true' };\r\n }\r\n\r\n if (imageData.src === '') {\r\n return [imageData, false];\r\n }\r\n\r\n return new Promise<[IImageData, boolean]>(resolve => {\r\n try {\r\n const http = new XMLHttpRequest();\r\n http.open('HEAD', imageData.src!, true);\r\n\r\n http.addEventListener('load', () => {\r\n resolve([imageData, http.status === 200 || http.status === 201]);\r\n });\r\n\r\n http.addEventListener('error', () => {\r\n resolve([imageData, false]);\r\n });\r\n\r\n http.send();\r\n } catch {\r\n resolve([imageData, false]);\r\n }\r\n });\r\n}\r\n\r\nexport async function getValidProductImages(\r\n productId: number,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n imageSettings: IImageSettings,\r\n selectedProduct?: SimpleProduct,\r\n filterLegacy?: boolean\r\n): Promise {\r\n const catalogId = getCatalogId(actionContext.requestContext);\r\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\r\n\r\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\r\n .then(mediaLocations => {\r\n if (mediaLocations) {\r\n return Promise.all(mediaLocations.map(mediaLocation => validateMediaLocationAsync(mediaLocation, filterLegacy))).then(\r\n pairs => {\r\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\r\n }\r\n );\r\n }\r\n\r\n return [];\r\n })\r\n .catch(error => {\r\n actionContext.telemetry.exception(error);\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\r\n return [];\r\n });\r\n}\r\n\r\n/**\r\n * Gets product variant images on dimension change of buy-box module for Omni scenario.\r\n * @param productId Product record id.\r\n * @param shouldUseCmsAltText Alt-text source to use.\r\n * @param channelId Current channel id.\r\n * @param actionContext Current action context.\r\n * @param productName Product name.\r\n * @param selectedProduct Currently selected variant product.\r\n * @returns List of images.\r\n */\r\n\r\nexport async function getProductImages(\r\n productId: number,\r\n shouldUseCmsAltText: boolean,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n productName?: string,\r\n selectedProduct?: SimpleProduct\r\n): Promise {\r\n const catalogId = getCatalogId(actionContext.requestContext);\r\n if (actionContext.requestContext?.params?.isPreview) {\r\n const response = await commerceApiRequest(actionContext.requestContext, 'msdyn365-ochannel-product-info', 'post', {\r\n productId: productId,\r\n channelId: channelId,\r\n catalogId: catalogId\r\n });\r\n if (response.status !== 200) {\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant for preview scenario');\r\n return [];\r\n }\r\n const previewImageData = response?.data as MediaLocation[];\r\n if (previewImageData) {\r\n return previewImageData.map(mediaLocation => {\r\n return {\r\n src: mediaLocation.Uri ?? '',\r\n altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\r\n displayOrder: mediaLocation.DisplayOrder,\r\n mediaTypeValue: mediaLocation.MediaTypeValue,\r\n additionalProperties: mediaLocation.IsApplicableForChildEntities\r\n ? {\r\n isApplicableForChildEntities: 'true'\r\n }\r\n : undefined\r\n };\r\n });\r\n }\r\n return [];\r\n }\r\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\r\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\r\n .then(mediaLocations => {\r\n if (mediaLocations) {\r\n return mediaLocations.map(mediaLocation => {\r\n return {\r\n src: mediaLocation.Uri ?? '',\r\n altText: getAltText(actionContext.requestContext, shouldUseCmsAltText, productName, mediaLocation.AltText),\r\n displayOrder: mediaLocation.DisplayOrder,\r\n mediaTypeValue: mediaLocation.MediaTypeValue,\r\n additionalProperties: mediaLocation.IsApplicableForChildEntities\r\n ? {\r\n isApplicableForChildEntities: 'true'\r\n }\r\n : undefined\r\n };\r\n });\r\n }\r\n return [];\r\n })\r\n .catch(error => {\r\n actionContext.telemetry.exception(error);\r\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\r\n return [];\r\n });\r\n}\r\n\r\nexport async function validateProductImages(\r\n mediaLocations: MediaLocation[],\r\n actionContext: IActionContext,\r\n imageSettings: IImageSettings,\r\n filterLegacy?: boolean\r\n): Promise {\r\n return Promise.all(mediaLocations.map(mediaLocation => validateMediaLocationAsync(mediaLocation, filterLegacy)))\r\n .then(pairs => {\r\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\r\n })\r\n .catch(error => {\r\n actionContext.telemetry.exception(error);\r\n actionContext.telemetry.debug('Unable to validate product images');\r\n return [];\r\n });\r\n}\r\n\r\n/**\r\n * GetVideoMetadataFromAPI - Makes API call to get video metadata.\r\n * @param videoId: Video Id\r\n * @param actionContext: Action context\r\n * @returns: Returns the meta data of the video.\r\n */\r\nexport async function getVideoMetadataFromApi(videoId: string, actionContext: IActionContext): Promise {\r\n let videoPlayerData: IVideoData | undefined;\r\n if (videoId) {\r\n const response = await commerceVideoMetadataRequest(actionContext.requestContext, [videoId]);\r\n\r\n if (response.status !== 200) {\r\n actionContext.telemetry.debug(`Unable to get video metadata for videoId: ${videoId}`);\r\n return;\r\n }\r\n\r\n const videoData = response.data as [];\r\n if (videoData && ArrayExtensions.hasElements(videoData)) {\r\n videoPlayerData = videoData[0];\r\n }\r\n }\r\n return videoPlayerData;\r\n}\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/* eslint-disable no-duplicate-imports */\r\nimport { Carousel, ICarouselProps, Player, IPlayerData, IPlayerOptions, IVideoMetadata } from '@msdyn365-commerce/components';\r\nimport { IImageData, IImageSettings, Image, Video } from '@msdyn365-commerce/core';\r\nimport { MediaLocation, MediaType, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions, getFallbackImageUrl, ISelectedProduct, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n defaultDataScale,\r\n IComponentNodeProps,\r\n ImagefullView,\r\n IModalViewProps,\r\n IModuleProps,\r\n inlineZoomImageOnHover,\r\n inlineZoomImageOnMouseMove,\r\n inlineZoomImageOnMouseOut,\r\n inlineZoomInitClick,\r\n INodeProps,\r\n ISingleSlideCarouselProps,\r\n isMobile,\r\n KeyCodes,\r\n NodeTag,\r\n onContainerZoomInit,\r\n onMouseMoveLensContainer,\r\n onMouseOutLensContainer,\r\n onMouseOverImageContainer,\r\n removeContainerZoomStyle,\r\n removeInlineZoomStyle,\r\n SingleSlideCarousel,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { reaction } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { IExtMediaGalleryData } from './ext-media-gallery.data';\r\nimport { imageSource, imageZoom, IExtMediaGalleryProps, thumbnailsOrientation } from './ext-media-gallery.props.autogenerated';\r\nimport { getProductImages, getValidProductImages, getVideoMetadataFromApi, validateProductImages } from './utils';\r\nimport { getAltText, IMediaData } from './utils/helper';\r\n\r\n/**\r\n * IMediaGalleryState Interface.\r\n */\r\nexport interface IMediaGalleryState {\r\n animating: boolean;\r\n activeIndex: number;\r\n isImageZoomed: boolean;\r\n modalIsOpen: boolean;\r\n lastUpdate?: number;\r\n isMobileImageZoomed?: boolean;\r\n mediaGalleryItems?: IMediaData[];\r\n isInitialLoad?: boolean;\r\n shouldUseOptimizedImage?: boolean;\r\n lastSelectedProduct?: ISelectedProduct;\r\n}\r\n\r\n/**\r\n * IMediaGalleryThumbnailsViewProps Interface.\r\n */\r\nexport interface IMediaGalleryThumbnailsViewProps {\r\n ThumbnailsContainerProps: INodeProps;\r\n SingleSlideCarouselComponentProps: INodeProps;\r\n items?: IMediaGalleryThumbnailItemViewProps[];\r\n}\r\n\r\n/**\r\n * IMediaGalleryThumbnailItemViewProps Interface.\r\n */\r\nexport interface IMediaGalleryThumbnailItemViewProps {\r\n ThumbnailItemContainerProps: INodeProps;\r\n Picture: React.ReactElement;\r\n}\r\n\r\n/**\r\n * IMediaGalleryViewProps Interface.\r\n */\r\nexport interface IMediaGalleryViewProps extends IExtMediaGalleryProps {\r\n state: IMediaGalleryState;\r\n MediaGallery: IModuleProps;\r\n CarouselProps: INodeProps;\r\n Thumbnails: IMediaGalleryThumbnailsViewProps;\r\n Modal?: React.ReactElement | null;\r\n callbackToggle?(): void;\r\n callbackThumbnailClick?(index: number): void;\r\n callbackThumbnailKeyDown?(index: number): void;\r\n}\r\n\r\n/**\r\n * Props for carousel.\r\n */\r\ninterface IMediaGalleryCarouselItems {\r\n items: ItemType[];\r\n keys: (string | undefined)[];\r\n}\r\n\r\n/**\r\n * Media gallery component.\r\n */\r\nclass MediaGallery extends React.Component, IMediaGalleryState> {\r\n private readonly _inlineZoomDivRef: Map = new Map();\r\n\r\n private readonly fullScreenOverlayButtonRef: React.RefObject = React.createRef();\r\n private readonly player: React.RefObject = React.createRef();\r\n private fallbackImage?: string;\r\n\r\n private readonly defaultGalleryImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\r\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\r\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n private readonly defaultThumbnailImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\r\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n private readonly _zoomedImageSettings: IImageSettings;\r\n\r\n public constructor(props: IExtMediaGalleryProps) {\r\n super(props);\r\n this._toggleModal = this._toggleModal.bind(this);\r\n const mediaGalleryImages = this.getImagesData();\r\n this.state = {\r\n activeIndex: 0,\r\n animating: false,\r\n isImageZoomed: false,\r\n modalIsOpen: false,\r\n isInitialLoad: true,\r\n shouldUseOptimizedImage: !!this.props.config.skipImageValidation,\r\n mediaGalleryItems: mediaGalleryImages\r\n };\r\n\r\n this._zoomedImageSettings =\r\n props.config.zoomedImageSettings ?? props.config.galleryImageSettings ?? this.defaultGalleryImageSettings;\r\n\r\n this._onImageMouseOut = this._onImageMouseOut.bind(this);\r\n this._inlineZoomImageOnHover = this._inlineZoomImageOnHover.bind(this);\r\n this._onInlineImageClick = this._onInlineImageClick.bind(this);\r\n this._onContainerZoomImageClick = this._onContainerZoomImageClick.bind(this);\r\n this._onMouseOutLensContainer = this._onMouseOutLensContainer.bind(this);\r\n }\r\n\r\n public isMobile(): boolean {\r\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\r\n return size === 'xs';\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const source = this.props.config.imageSource ?? imageSource.pageContext;\r\n const shouldUpdateOnPartialDimensionSelection = this.props.config.shouldUpdateOnPartialDimensionSelection;\r\n this._setRenderType();\r\n if (!this.props.context.request.app?.config?.OmniChannelMedia) {\r\n if (source === imageSource.pageContext) {\r\n if (this.state.mediaGalleryItems === undefined && this.props.data.mediaLocationsForSelectedVariant.result) {\r\n const images = await validateProductImages(\r\n this.props.data.mediaLocationsForSelectedVariant.result,\r\n this.props.context.actionContext,\r\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n this.props.app.config.filterLegacyImageUrls\r\n );\r\n await this._setImages(images);\r\n } else if (this.state.mediaGalleryItems === undefined && this.props.data.product.result) {\r\n const product = this.props.data.product.result;\r\n const images = await getValidProductImages(\r\n product.RecordId,\r\n +this.props.context.request.apiSettings.channelId,\r\n this.props.context.actionContext,\r\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n product.productVariant,\r\n this.props.app.config.filterLegacyImageUrls\r\n );\r\n\r\n await this._setImages(images);\r\n } else {\r\n await this._setImages([]);\r\n }\r\n }\r\n }\r\n\r\n reaction(\r\n () => {\r\n const product = this.props.data.product.result;\r\n if (!product) {\r\n return null;\r\n }\r\n\r\n if (!shouldUpdateOnPartialDimensionSelection || !product.productVariant?.RecordId) {\r\n return `${product.RecordId}`;\r\n }\r\n\r\n return `${product.RecordId}-${product.productVariant.RecordId}`;\r\n },\r\n async () => {\r\n const product = this.props.data.product.result;\r\n let images: IImageData[] = [];\r\n if (product) {\r\n if (this.props.config.preventImageUpdateOnSizeDimensionUpdate) {\r\n const { lastSelectedProduct } = this.state;\r\n let differsBeyondSize = false;\r\n if (!lastSelectedProduct) {\r\n differsBeyondSize = true;\r\n } else {\r\n // check previous variant's dimensions against new one\r\n product?.Dimensions?.forEach(dimension => {\r\n const lastSelectedDimension = lastSelectedProduct?.Dimensions?.find(\r\n lastDimension =>\r\n dimension.DimensionTypeValue === lastDimension.DimensionTypeValue &&\r\n dimension.DimensionValue?.Value !== lastDimension.DimensionValue?.Value\r\n );\r\n // there'll only be a dimension to look at if it had a different value\r\n // 3 = size dimeension inside D365\r\n if (lastSelectedDimension && lastSelectedDimension.DimensionTypeValue !== 3) {\r\n differsBeyondSize = true;\r\n }\r\n });\r\n }\r\n this.setState({ lastSelectedProduct: product });\r\n //If the dimensions are the same, we don't need to update the images\r\n if (!differsBeyondSize) {\r\n return;\r\n }\r\n }\r\n if (this.props.context.app?.config?.OmniChannelMedia) {\r\n images = await getProductImages(\r\n product.RecordId,\r\n this.shouldUseCmsAltText(),\r\n +this.props.context.request.apiSettings.channelId,\r\n this.props.context.actionContext,\r\n product.Name,\r\n shouldUpdateOnPartialDimensionSelection ? product.productVariant : undefined\r\n );\r\n } else {\r\n images = await getValidProductImages(\r\n product.RecordId,\r\n +this.props.context.request.apiSettings.channelId,\r\n this.props.context.actionContext,\r\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n shouldUpdateOnPartialDimensionSelection ? product.productVariant : undefined,\r\n this.props.app.config.filterLegacyImageUrls\r\n );\r\n }\r\n await this._setImages(images);\r\n } else {\r\n await this._setImages([]);\r\n }\r\n },\r\n { fireImmediately: true }\r\n );\r\n\r\n if (source === imageSource.productId && this.props.data.mediaLocations.result) {\r\n const images = await validateProductImages(\r\n this.props.data.mediaLocations.result,\r\n this.props.context.actionContext,\r\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n this.props.app.config.filterLegacyImageUrls\r\n );\r\n await this._setImages(images);\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IExtMediaGalleryProps, nextState: IMediaGalleryState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { id, config, resources } = this.props;\r\n\r\n const { className, showPaginationTooltip } = config;\r\n\r\n const isVertical: boolean = config.thumbnailsOrientation === thumbnailsOrientation.vertical;\r\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- || is required.\r\n const isFullscreenAllowed: boolean = this.isMobile() || config.allowFullScreen || false;\r\n const zoomViewMode: string =\r\n config.imageZoom === imageZoom.inline ? imageZoom.inline : config.imageZoom === imageZoom.container ? imageZoom.container : '';\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Site level config can be of any type.\r\n const emptyPlaceHolderImage = this.props.context.app.config?.placeholderImageName as string;\r\n if (this.props.data.product.result) {\r\n this.fallbackImage = getFallbackImageUrl(\r\n this.props.data.product.result.ItemId,\r\n this.props.context.request.apiSettings,\r\n this.props.context.request.app?.config?.OmniChannelMedia\r\n );\r\n }\r\n if (emptyPlaceHolderImage && this.fallbackImage) {\r\n this.fallbackImage = `${this.fallbackImage}&fallback=${emptyPlaceHolderImage}`;\r\n }\r\n\r\n // bs extension - CLS improvements : on mobile sizes use the xs viewport settings to define the mediaGallery container size\r\n const imageSettings = this.props.config.galleryImageSettings;\r\n const style =\r\n this.isMobile() && imageSettings?.viewports?.xs\r\n ? { width: imageSettings?.viewports?.xs.w, height: imageSettings?.viewports?.xs.h }\r\n : {};\r\n\r\n const mediaGalleryCarouselItems = this._getMediaGalleryItems(isFullscreenAllowed, zoomViewMode);\r\n const mediaGalleryThumbnailCarouselItems = this._getMediaGalleryThumbnailItems();\r\n const viewProps: IMediaGalleryViewProps = {\r\n ...(this.props as IExtMediaGalleryProps),\r\n state: this.state,\r\n MediaGallery: {\r\n moduleProps: this.props,\r\n className: classnames(`ms-media-gallery ${isVertical ? 'vertical' : ''}`, className),\r\n style: style\r\n },\r\n Modal: isFullscreenAllowed ? this.imageModalSlider(zoomViewMode) : null,\r\n callbackToggle: this.openModalDialog,\r\n callbackThumbnailClick: this._generateOnThumbnailClick,\r\n callbackThumbnailKeyDown: this._generateOnThumbnailKeyDown,\r\n CarouselProps: {\r\n tag: Carousel,\r\n className: 'ms-media-gallery__carousel',\r\n items: mediaGalleryCarouselItems.items,\r\n activeIndex: this.state.activeIndex,\r\n next: this.next,\r\n previous: this.previous,\r\n interval: false,\r\n directionTextPrev: resources.previousScreenshotFlipperText,\r\n directionTextNext: resources.nextScreenshotFlipperText,\r\n onIndicatorsClickHandler: this.goToIndex,\r\n showPaginationTooltip: showPaginationTooltip === true,\r\n indicatorAriaText: resources.ariaLabelForSlide,\r\n handleOnExited: this.onExited,\r\n handleOnExiting: this.onExiting,\r\n key: mediaGalleryCarouselItems.keys\r\n } as IComponentNodeProps,\r\n Thumbnails: {\r\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: 'ms-media-gallery__thumbnails',\r\n vertical: isVertical,\r\n flipperPrevLabel: resources.previousScreenshotFlipperText,\r\n flipperNextLabel: resources.nextScreenshotFlipperText,\r\n parentId: id,\r\n useTabList: true,\r\n key: JSON.stringify(mediaGalleryThumbnailCarouselItems.keys)\r\n } as IComponentNodeProps,\r\n items: mediaGalleryThumbnailCarouselItems.items\r\n }\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Zoomed out image on previous/next click.\r\n */\r\n public updateZoomedInImage(): void {\r\n this.setState({ isImageZoomed: false });\r\n }\r\n\r\n private readonly onExiting = () => {\r\n this.setState({ animating: true });\r\n };\r\n\r\n private readonly onExited = () => {\r\n this.setState({ animating: false });\r\n };\r\n\r\n /**\r\n * On click next in carousel.\r\n */\r\n private readonly next = (): void => {\r\n removeInlineZoomStyle();\r\n if (this.isLastItem() === undefined) {\r\n return;\r\n }\r\n\r\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex + 1;\r\n this.goToIndex(nextIndex);\r\n\r\n this.updateZoomedInImage();\r\n };\r\n\r\n /**\r\n * On click previous in carousel.\r\n */\r\n private readonly previous = (): void => {\r\n removeInlineZoomStyle();\r\n const images = this.state.mediaGalleryItems;\r\n const nextIndex = this.isFirstItem() ? (images ? images.length - 1 : 0) : this.state.activeIndex - 1;\r\n this.goToIndex(nextIndex);\r\n this.updateZoomedInImage();\r\n };\r\n\r\n private readonly goToIndex = (index: number): void => {\r\n const { autoplay } = this.props.config;\r\n const currentIndex = this.state.activeIndex;\r\n const mediaItems = this.state.mediaGalleryItems;\r\n if (autoplay && mediaItems) {\r\n if (mediaItems[`${index}`]?.mediaTypeValue === MediaType.Video) {\r\n this.player.current?.play();\r\n } else if (mediaItems[`${currentIndex}`].mediaTypeValue === MediaType.Video) {\r\n this.player.current?.pause();\r\n }\r\n }\r\n this.setState({ activeIndex: index });\r\n };\r\n\r\n private _getMediaGalleryThumbnailItems(): IMediaGalleryCarouselItems {\r\n const mediaGalleryItems = this.state.mediaGalleryItems;\r\n const thumbnailImageSettings = this.props.config.thumbnailImageSettings;\r\n if (thumbnailImageSettings) {\r\n thumbnailImageSettings.cropFocalRegion = true;\r\n }\r\n\r\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\r\n\r\n if (!hasMediaGalleryItems) {\r\n if (this.state.lastUpdate) {\r\n const defaultKey = 0;\r\n return {\r\n items: [this._getEmptyThumbnailItem(thumbnailImageSettings, defaultKey, this.state.activeIndex)],\r\n keys: ['empty']\r\n };\r\n }\r\n return { items: [], keys: [] };\r\n }\r\n\r\n return {\r\n items: [\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n ...mediaGalleryItems!.map((item: IMediaData, index: number) => {\r\n if (item.mediaTypeValue === MediaType.Video) {\r\n return this.getVideoThumbNailItem(\r\n item,\r\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n index,\r\n this.state.activeIndex\r\n );\r\n } else {\r\n return this._getThumbnailItem(\r\n item,\r\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\r\n index,\r\n this.state.activeIndex\r\n );\r\n }\r\n })\r\n ],\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n keys: [...mediaGalleryItems!.map(item => item.src)]\r\n };\r\n }\r\n\r\n private getImagesData = (): IImageData[] => {\r\n if (this.props.config.skipImageValidation || this.props.context.request.app?.config?.OmniChannelMedia) {\r\n const source = this.props.config.imageSource ?? imageSource.pageContext;\r\n let images: IImageData[] = [];\r\n let mediaLocations: MediaLocation[] = [];\r\n if (source === imageSource.pageContext && this.props.data.mediaLocationsForSelectedVariant.result) {\r\n mediaLocations = this.props.data.mediaLocationsForSelectedVariant.result;\r\n } else if (source === imageSource.productId && this.props.data.mediaLocations.result) {\r\n mediaLocations = this.props.data.mediaLocations.result;\r\n }\r\n images = mediaLocations.map(mediaLocation => {\r\n return {\r\n src: mediaLocation.Uri ?? '',\r\n altText: getAltText(\r\n this.props.context.actionContext.requestContext,\r\n this.shouldUseCmsAltText(),\r\n this.props.data.product.result?.Name,\r\n mediaLocation.AltText\r\n ),\r\n additionalProperties: mediaLocation.IsApplicableForChildEntities\r\n ? {\r\n isApplicableForChildEntities: 'true'\r\n }\r\n : undefined\r\n };\r\n });\r\n const curatedImages = this.props.config.images ?? [];\r\n\r\n return [...this._filterMasterImageFromVariant(images), ...curatedImages];\r\n }\r\n return [];\r\n };\r\n\r\n private _getMediaGalleryItems(isFullscreenAllowed: boolean, zoomViewMode: string): IMediaGalleryCarouselItems {\r\n const mediaGalleryItems = this.state.mediaGalleryItems;\r\n const galleryImageSettings = this.props.config.galleryImageSettings;\r\n if (galleryImageSettings) {\r\n galleryImageSettings.cropFocalRegion = true;\r\n }\r\n\r\n const zoomView = isFullscreenAllowed ? 'fullscreen' : zoomViewMode;\r\n\r\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\r\n\r\n if (!hasMediaGalleryItems) {\r\n if (this.state.lastUpdate) {\r\n return { items: [this._renderEmptyImage(galleryImageSettings)], keys: ['empty'] };\r\n }\r\n return { items: [], keys: [] };\r\n }\r\n\r\n return {\r\n items: [\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n ...mediaGalleryItems!.map((item: IMediaData, index: number) => {\r\n return this._renderCarouselItemImageView(\r\n zoomView,\r\n item,\r\n galleryImageSettings ?? this.defaultGalleryImageSettings,\r\n index\r\n );\r\n })\r\n ],\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n keys: [...mediaGalleryItems!.map(item => item.src)]\r\n };\r\n }\r\n\r\n private async _setImages(images?: IMediaData[]): Promise {\r\n const curatedImage = this.props.config.images || [];\r\n const mediaToSet: IMediaData[] = this._filterMasterImageFromVariant(images);\r\n\r\n void Promise.all(\r\n mediaToSet.map(async mediaData => {\r\n if (mediaData.mediaTypeValue === MediaType.Video && mediaData.src) {\r\n try {\r\n const url = new URL(mediaData.src);\r\n const videoId = url.searchParams.get('CVID');\r\n if (videoId) {\r\n mediaData.videoData = await getVideoMetadataFromApi(videoId, this.props.context.actionContext);\r\n }\r\n } catch (error) {\r\n if (this.props.telemetry) {\r\n this.props.telemetry.debug('Error while fetching videoId');\r\n }\r\n }\r\n }\r\n return mediaData;\r\n })\r\n ).then(mediaData => {\r\n const mediaItems = mediaData.filter(element => {\r\n return (\r\n element.mediaTypeValue !== MediaType.Video ||\r\n (element.mediaTypeValue === MediaType.Video && element.videoData !== undefined)\r\n );\r\n });\r\n\r\n this.setState({\r\n mediaGalleryItems: [...mediaItems, ...curatedImage],\r\n activeIndex: 0,\r\n lastUpdate: Date.now(),\r\n shouldUseOptimizedImage: false\r\n });\r\n });\r\n\r\n this.setState({\r\n mediaGalleryItems: [...mediaToSet, ...curatedImage],\r\n activeIndex: 0,\r\n lastUpdate: Date.now(),\r\n shouldUseOptimizedImage: false\r\n });\r\n }\r\n\r\n private _setRenderType(): void {\r\n this.setState({\r\n isInitialLoad: false\r\n });\r\n }\r\n\r\n private _renderCarouselItemImageView(\r\n zoomView: string,\r\n media: IMediaData,\r\n imageSettings: IImageSettings,\r\n index: number,\r\n isInPopup: boolean = false\r\n ): React.ReactNode {\r\n if (media.mediaTypeValue === MediaType.Video) {\r\n if (isInPopup || zoomView !== 'fullscreen') {\r\n return <>{this._renderCarouselItemVideo(media, index, imageSettings)};\r\n }\r\n return <>{this._renderVideoThumbnail(media, index, imageSettings)};\r\n } else {\r\n if (this.isMobile()) {\r\n if (isInPopup) {\r\n return this._renderImageInContainerOnZoom(media, this._zoomedImageSettings, index);\r\n }\r\n return this._renderImageFullScreenOnZoom(media, imageSettings, index);\r\n }\r\n\r\n switch (zoomView) {\r\n case 'container': {\r\n return this._renderImageInContainerOnZoom(media, this._zoomedImageSettings, index);\r\n }\r\n case 'inline': {\r\n return this._renderImageInlineOnZoom(media, this._zoomedImageSettings, index);\r\n }\r\n case 'fullscreen': {\r\n return this._renderImageFullScreenOnZoom(media, imageSettings, index);\r\n }\r\n\r\n // No default\r\n }\r\n return <>{this._getCarouselItem(media, imageSettings, index, isInPopup)};\r\n }\r\n }\r\n\r\n private _filterMasterImageFromVariant(images?: IImageData[]): IImageData[] {\r\n const shouldHidePrimaryImages = this.props.config.shouldHideMasterProductImagesForVariant ?? true;\r\n let variantImages = images ?? [];\r\n const isVariantProduct =\r\n !ObjectExtensions.isNullOrUndefined(this.props.data.product.result?.MasterProductId) ||\r\n !ObjectExtensions.isNullOrUndefined(this.props.data.product.result?.productVariant);\r\n const itemId = this.props.data.product.result?.ItemId;\r\n if (shouldHidePrimaryImages && isVariantProduct && itemId) {\r\n variantImages = variantImages.filter(item => {\r\n const isApplicableForChildEntities = item.additionalProperties?.isApplicableForChildEntities;\r\n return !isApplicableForChildEntities;\r\n });\r\n if (!ArrayExtensions.hasElements(variantImages)) {\r\n variantImages = images ?? [];\r\n }\r\n }\r\n return variantImages;\r\n }\r\n\r\n private readonly _renderCarouselItemVideo = (mediaData: IMediaData, index: number, imageSettings: IImageSettings): React.ReactNode => {\r\n const videoData = mediaData.videoData;\r\n if (videoData) {\r\n const options: IPlayerOptions = this.props.config as IPlayerOptions;\r\n const playerResources = this.props.resources;\r\n const videoMetaData: IVideoMetadata = {};\r\n videoMetaData.videoId = videoData.id;\r\n videoMetaData.title = videoData.title;\r\n videoMetaData.duration = videoData.playTime;\r\n if (videoData.thumbnail) {\r\n videoMetaData.posterframeUrl = videoData.thumbnail.src;\r\n }\r\n if (videoData._links?.binaryReferences) {\r\n videoMetaData.videoBinaryReferences = videoData._links.binaryReferences;\r\n }\r\n const videoPlayerData: IPlayerData = { options, metaData: videoMetaData };\r\n const attributes = {\r\n id: `${this.props.id}__carousel-item__${index}`\r\n };\r\n return (\r\n \r\n );\r\n }\r\n return this._renderEmptyImage(imageSettings);\r\n };\r\n\r\n private readonly _getCarouselItem = (\r\n image: IImageData,\r\n imageSettings: IImageSettings,\r\n index: number,\r\n isInPopup: boolean = false\r\n ): React.ReactNode => (\r\n \r\n );\r\n\r\n private readonly _getThumbnailItem = (\r\n image: IImageData,\r\n imageSettings: IImageSettings,\r\n index: number,\r\n modifiedActiveIndex: number\r\n ): IMediaGalleryThumbnailItemViewProps => {\r\n const classes = classnames(\r\n 'ms-media-gallery__thumbnail-item',\r\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\r\n );\r\n\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: classes,\r\n role: 'tab',\r\n tabIndex: 0,\r\n key: index,\r\n 'aria-label': image.altText,\r\n 'aria-selected': modifiedActiveIndex === index,\r\n onClick: this._generateOnThumbnailClick(index),\r\n onKeyDown: this._generateOnThumbnailKeyDown(index)\r\n },\r\n Picture: (\r\n \r\n )\r\n };\r\n };\r\n\r\n /**\r\n * Gets the video thumbnail item to display media gallery.\r\n * @param props - The Media gallery view props from business layer.\r\n * @returns Return thumbnail view props which will be used to render video.\r\n */\r\n private readonly getVideoThumbNailItem = (\r\n mediaData: IMediaData,\r\n imageSettings: IImageSettings,\r\n index: number,\r\n modifiedActiveIndex: number\r\n ): IMediaGalleryThumbnailItemViewProps => {\r\n const classes = classnames(\r\n 'ms-media-gallery__thumbnail-item',\r\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\r\n );\r\n\r\n const videoData = mediaData.videoData;\r\n let image: IImageData;\r\n if (videoData?.thumbnail) {\r\n image = videoData.thumbnail;\r\n } else {\r\n image = {\r\n src: 'empty'\r\n };\r\n }\r\n\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: classes,\r\n role: 'tab',\r\n tabIndex: 0,\r\n key: index,\r\n 'aria-label': image.altText,\r\n 'aria-selected': modifiedActiveIndex === index,\r\n onClick: this._generateOnThumbnailClick(index),\r\n onKeyDown: this._generateOnThumbnailKeyDown(index)\r\n },\r\n Picture: (\r\n \r\n )\r\n };\r\n };\r\n\r\n /**\r\n * Ref Handler.\r\n * @param index -Remove item click function.\r\n * @returns Set inline zoom.\r\n */\r\n private readonly _refHandler = (index: number) => (divRef: HTMLDivElement) => {\r\n this._inlineZoomDivRef.set(index, divRef);\r\n };\r\n\r\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\r\n return (event: React.KeyboardEvent) => {\r\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\r\n event.preventDefault();\r\n\r\n this.goToIndex(index);\r\n }\r\n };\r\n };\r\n\r\n private readonly _generateOnThumbnailClick = (index: number) => {\r\n return (event: React.MouseEvent) => {\r\n event.preventDefault();\r\n\r\n this.goToIndex(index);\r\n };\r\n };\r\n\r\n private _renderImageInlineOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n private _inlineZoomImageOnHover(event: React.MouseEvent): void {\r\n inlineZoomImageOnHover(event, this.props.config.dataScale ?? String(defaultDataScale));\r\n }\r\n\r\n private _handleMobileViewZoomedImageClick(event: React.MouseEvent) {\r\n const target = this.state.shouldUseOptimizedImage ? (event.target as HTMLImageElement) : event.currentTarget;\r\n const mobileZoomedInImageClassName = 'msc-mobile-zoomed-in';\r\n if (!this.state.isMobileImageZoomed) {\r\n const bounds = target.getBoundingClientRect();\r\n const dataScale = Number(this.props.config.dataScale ?? defaultDataScale);\r\n\r\n const positionX = event.clientX - bounds.left;\r\n const positionY = event.clientY - bounds.top;\r\n const scaledPositionX = positionX * dataScale;\r\n const scaledPositionY = positionY * dataScale;\r\n\r\n target.style.transform = `scale(${dataScale})`;\r\n target.classList.add(mobileZoomedInImageClassName);\r\n target.parentElement!.style.overflow = 'auto';\r\n target.parentElement!.scrollTo(scaledPositionX - positionX, scaledPositionY - positionY);\r\n this.setState({\r\n isMobileImageZoomed: true\r\n });\r\n } else {\r\n target.style.transform = '';\r\n target.classList.remove(mobileZoomedInImageClassName);\r\n target.parentElement!.style.overflow = '';\r\n this.setState({\r\n isMobileImageZoomed: false\r\n });\r\n }\r\n }\r\n\r\n private _onInlineImageClick(event: React.MouseEvent): void {\r\n if (window.innerWidth <= 768) {\r\n // $msv-breakpoint-m\r\n this._handleMobileViewZoomedImageClick(event);\r\n return;\r\n }\r\n inlineZoomInitClick(event, this.props.config.dataScale ?? String(defaultDataScale));\r\n this.setState({\r\n isImageZoomed: true\r\n });\r\n }\r\n\r\n private _onImageMouseOut(event: React.MouseEvent): void {\r\n inlineZoomImageOnMouseOut(event);\r\n this.setState({\r\n isImageZoomed: false\r\n });\r\n }\r\n\r\n private _onContainerZoomImageClick(event: React.MouseEvent): void {\r\n if (window.innerWidth <= 768) {\r\n // $msv-breakpoint-m\r\n this._handleMobileViewZoomedImageClick(event);\r\n return;\r\n }\r\n\r\n onContainerZoomInit(event);\r\n\r\n this.setState({\r\n isImageZoomed: true\r\n });\r\n }\r\n\r\n private _onMouseOutLensContainer(event: React.MouseEvent): void {\r\n onMouseOutLensContainer(event);\r\n\r\n this.setState({\r\n isImageZoomed: false\r\n });\r\n }\r\n\r\n private _renderImageInContainerOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n private _renderImageFullScreenOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\r\n return (\r\n
\r\n \r\n
\r\n {}\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Render the video thumbnail in full screen.\r\n * @param mediaData - Media Data.\r\n * @param index - Index\r\n * @param imageSettings - Image settings.\r\n * @returns - JSX.Element\r\n */\r\n private readonly _renderVideoThumbnail = (mediaData: IMediaData, index: number, imageSettings: IImageSettings): React.ReactNode => {\r\n const videoData = mediaData.videoData;\r\n let image: IImageData;\r\n if (videoData?.thumbnail) {\r\n image = videoData.thumbnail;\r\n } else {\r\n image = {\r\n src: 'empty'\r\n };\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n {}\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n private _mapProductToImageData(product: SimpleProduct): IImageData {\r\n return {\r\n src: product.PrimaryImageUrl ?? ''\r\n };\r\n }\r\n\r\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n private _getEmptyThumbnailItem(\r\n imageSettings: IImageSettings | undefined,\r\n index: number,\r\n modifiedActiveIndex: number\r\n ): IMediaGalleryThumbnailItemViewProps {\r\n const classes = classnames(\r\n 'ms-media-gallery__thumbnail-item',\r\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\r\n );\r\n return {\r\n ThumbnailItemContainerProps: {\r\n tag: 'li' as NodeTag,\r\n className: classes,\r\n role: 'tab',\r\n tabIndex: 0,\r\n key: 'empty',\r\n 'aria-label': '',\r\n 'aria-selected': modifiedActiveIndex === index,\r\n onClick: this._generateOnThumbnailClick(index),\r\n onKeyDown: this._generateOnThumbnailKeyDown(index)\r\n },\r\n Picture: (\r\n \r\n )\r\n };\r\n }\r\n\r\n private readonly isFirstItem = () => this.state.activeIndex === 0;\r\n\r\n private readonly isLastItem = () => {\r\n const images = this.state.mediaGalleryItems;\r\n return images && this.state.activeIndex === images.length - 1;\r\n };\r\n\r\n private readonly openModalDialog = (): void => {\r\n this._toggleModal();\r\n };\r\n\r\n private _toggleModal(): void {\r\n if (this.state.modalIsOpen) {\r\n this.fullScreenOverlayButtonRef.current?.focus();\r\n const parentDiv = this._inlineZoomDivRef.get(this.state.activeIndex);\r\n if (parentDiv && parentDiv.children && parentDiv.children.length >= 2) {\r\n const image = parentDiv.children[1].querySelector('img');\r\n if (image) {\r\n image.removeAttribute('style');\r\n }\r\n }\r\n this.setState({\r\n isImageZoomed: false\r\n });\r\n }\r\n this.setState({\r\n isImageZoomed: false,\r\n modalIsOpen: !this.state.modalIsOpen\r\n });\r\n removeInlineZoomStyle();\r\n removeContainerZoomStyle();\r\n }\r\n\r\n private readonly imageModalSlider = (ZoomView: string): React.ReactElement => {\r\n const {\r\n data: {\r\n product: { result: product }\r\n },\r\n resources\r\n } = this.props;\r\n let mediaGalleryItems = this.state.mediaGalleryItems;\r\n\r\n if (!mediaGalleryItems && product) {\r\n mediaGalleryItems = [this._mapProductToImageData(product)];\r\n }\r\n const carouselprops = {\r\n tag: Carousel,\r\n className: 'ms-media-gallery__carousel',\r\n items:\r\n mediaGalleryItems &&\r\n mediaGalleryItems.map((item: IImageData, index: number) =>\r\n this._renderCarouselItemImageView(ZoomView, item, this._zoomedImageSettings, index, true)\r\n ),\r\n activeIndex: this.state.activeIndex,\r\n next: this.next,\r\n previous: this.previous,\r\n interval: false,\r\n directionTextPrev: resources.previousScreenshotFlipperText,\r\n directionTextNext: resources.nextScreenshotFlipperText,\r\n onIndicatorsClickHandler: this.goToIndex,\r\n showPaginationTooltip: true,\r\n hideIndicator: false,\r\n keyboard: false,\r\n handleOnExited: this.onExited,\r\n handleOnExiting: this.onExiting,\r\n isDisabledFunctionality: this.state.isMobileImageZoomed\r\n } as IComponentNodeProps;\r\n const carousel = ;\r\n\r\n const imageModalSliderProps: IModalViewProps = {\r\n modalIsOpen: this.state.modalIsOpen,\r\n ontoggle: this._toggleModal,\r\n galleryCarousel: carousel,\r\n classNames: classnames('ms-media-gallery__modal', 'msc-modal-input-required')\r\n };\r\n return ImagefullView(imageModalSliderProps) as React.ReactElement;\r\n };\r\n\r\n private shouldUseCmsAltText = (): boolean => {\r\n if (this.props.config.altTextSource === 'product') {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n };\r\n}\r\n\r\nexport default MediaGallery;\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/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IMediaGalleryThumbnailItemViewProps,\r\n IMediaGalleryThumbnailsViewProps,\r\n IMediaGalleryViewProps\r\n} from '@msdyn365-commerce-modules/media-gallery';\r\n\r\nconst MediaGalleryView: React.FC = props => {\r\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\r\n\r\n return (\r\n \r\n \r\n {Modal}\r\n {_renderThumbnails(Thumbnails)}\r\n \r\n );\r\n};\r\n\r\nconst _renderThumbnails = (thumbnails: IMediaGalleryThumbnailsViewProps): JSX.Element => {\r\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps, items } = thumbnails;\r\n\r\n return (\r\n \r\n {items && items.map(_renderThumbnailItem)}\r\n \r\n );\r\n};\r\n\r\nconst _renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\r\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\r\n\r\n return {Picture};\r\n};\r\n\r\nexport default MediaGalleryView;\r\n"],"names":["module","exports","React","ReactDOM","isValidImage","url","startsWith","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","imageSource","imageZoom","thumbnailsOrientation","altTextSource","MediaType","getAltText","context","shouldUseCmsAltText","productName","imageAltText","_context$app","app","config","OmniChannelMedia","async","validateMediaLocationAsync","mediaLocation","filterLegacy","imageData","src","Uri","altText","AltText","fileName","split","IsApplicableForChildEntities","additionalProperties","isApplicableForChildEntities","Promise","resolve","http","XMLHttpRequest","open","addEventListener","status","send","_unused","getValidProductImages","productId","channelId","actionContext","imageSettings","selectedProduct","catalogId","getCatalogId","requestContext","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","then","mediaLocations","all","map","pairs","filter","pair","catch","error","telemetry","exception","debug","validateProductImages","MediaGallery","constructor","props","_this","_ref","_props$config$zoomedI","super","this","_inlineZoomDivRef","Map","fullScreenOverlayButtonRef","player","defaultGalleryImageSettings","viewports","xs","q","w","h","sm","lg","lazyload","cropFocalRegion","defaultThumbnailImageSettings","onExiting","setState","animating","onExited","next","removeInlineZoomStyle","undefined","isLastItem","nextIndex","state","activeIndex","goToIndex","updateZoomedInImage","previous","images","mediaGalleryItems","isFirstItem","length","index","autoplay","currentIndex","mediaItems","_mediaItems","_this$player$current","mediaTypeValue","Video","current","play","_this$player$current2","pause","getImagesData","_this$props$context$r","skipImageValidation","request","_this$props$config$im","_this$props$config$im2","source","pageContext","data","mediaLocationsForSelectedVariant","result","_mediaLocation$Uri","_this$props$data$prod","product","Name","curatedImages","_filterMasterImageFromVariant","_renderCarouselItemVideo","mediaData","videoData","_videoData$_links","options","playerResources","resources","videoMetaData","videoId","title","duration","playTime","thumbnail","posterframeUrl","_links","binaryReferences","videoBinaryReferences","videoPlayerData","metaData","attributes","className","editProps","key","Player","Object","assign","ref","playerData","isEditor","params","_renderEmptyImage","_getCarouselItem","image","_this$props$context$r2","isInPopup","arguments","Image","fallBackSrc","fallbackImage","gridSettings","loadFailureBehavior","shouldSkipToMainImage","bypassHideOnFailure","_getThumbnailItem","modifiedActiveIndex","ThumbnailItemContainerProps","tag","classnames","role","tabIndex","onClick","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","imageFallbackOptimize","shouldUseOptimizedImage","getVideoThumbNailItem","classes","_refHandler","divRef","set","event","which","KeyCodes","Enter","Space","preventDefault","_renderVideoThumbnail","fullScreenTitleText","openModalDialog","_toggleModal","imageModalSlider","ZoomView","_mapProductToImageData","carouselprops","Carousel","items","item","_renderCarouselItemImageView","_zoomedImageSettings","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","onIndicatorsClickHandler","showPaginationTooltip","hideIndicator","keyboard","handleOnExited","handleOnExiting","isDisabledFunctionality","isMobileImageZoomed","carousel","imageModalSliderProps","modalIsOpen","ontoggle","galleryCarousel","classNames","ImagefullView","bind","mediaGalleryImages","isImageZoomed","isInitialLoad","zoomedImageSettings","galleryImageSettings","_onImageMouseOut","_inlineZoomImageOnHover","_onInlineImageClick","_onContainerZoomImageClick","_onMouseOutLensContainer","isMobile","variant","VariantType","Viewport","_this$props$config$im3","_this$props$context$r3","shouldUpdateOnPartialDimensionSelection","_setRenderType","_this$props$config$th","thumbnailImageSettings","filterLegacyImageUrls","_setImages","_this$props$config$th2","RecordId","apiSettings","productVariant","reaction","_product$productVaria","_this$props$context$a","_this$props$config$th3","preventImageUpdateOnSizeDimensionUpdate","lastSelectedProduct","differsBeyondSize","_product$Dimensions","Dimensions","forEach","dimension","_lastSelectedProduct$","lastSelectedDimension","find","lastDimension","_dimension$DimensionV","_lastDimension$Dimens","DimensionTypeValue","DimensionValue","Value","_actionContext$reques","isPreview","response","commerceApiRequest","previewImageData","displayOrder","DisplayOrder","MediaTypeValue","_mediaLocation$Uri2","getProductImages","fireImmediately","_this$props$config$th4","shouldComponentUpdate","nextProps","nextState","render","_this$props$context$a2","_imageSettings$viewpo","_imageSettings$viewpo2","_imageSettings$viewpo3","isVertical","vertical","isFullscreenAllowed","allowFullScreen","zoomViewMode","inline","container","emptyPlaceHolderImage","placeholderImageName","_this$props$context$r4","getFallbackImageUrl","ItemId","style","width","height","mediaGalleryCarouselItems","_getMediaGalleryItems","mediaGalleryThumbnailCarouselItems","_getMediaGalleryThumbnailItems","viewProps","moduleProps","Modal","callbackToggle","callbackThumbnailClick","callbackThumbnailKeyDown","CarouselProps","indicatorAriaText","ariaLabelForSlide","keys","Thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","useTabList","JSON","stringify","renderView","ArrayExtensions","hasElements","lastUpdate","defaultKey","_getEmptyThumbnailItem","zoomView","curatedImage","mediaToSet","URL","searchParams","get","commerceVideoMetadataRequest","getVideoMetadataFromApi","element","Date","now","media","_renderImageInContainerOnZoom","_renderImageFullScreenOnZoom","_renderImageInlineOnZoom","_this$props$config$sh","_this$props$data$prod2","_this$props$data$prod3","_this$props$data$prod4","shouldHidePrimaryImages","shouldHideMasterProductImagesForVariant","variantImages","isVariantProduct","ObjectExtensions","isNullOrUndefined","MasterProductId","itemId","_item$additionalPrope","_this$props$config$da","dataScale","defaultDataScale","onMouseOver","onMouseMove","inlineZoomImageOnMouseMove","_this$props$config$da2","inlineZoomImageOnHover","String","_handleMobileViewZoomedImageClick","target","currentTarget","mobileZoomedInImageClassName","transform","classList","remove","parentElement","overflow","_this$props$config$da3","bounds","getBoundingClientRect","Number","positionX","clientX","left","positionY","clientY","top","scaledPositionX","scaledPositionY","add","scrollTo","_this$props$config$da4","innerWidth","inlineZoomInitClick","inlineZoomImageOnMouseOut","onContainerZoomInit","onMouseOutLensContainer","_this$props$config$da5","onMouseOut","onMouseMoveLensContainer","onMouseOverImageContainer","href","_product$PrimaryImage","PrimaryImageUrl","_this$fullScreenOverl","focus","parentDiv","children","querySelector","removeAttribute","removeContainerZoomStyle","_renderThumbnails","thumbnails","Node","_renderThumbnailItem","Module"],"sourceRoot":""}