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qCAAqCvN,IAEvF8M,EAAcU,SACdZ,EAAMd,UACNc,EAAMZ,WAIP,QAEVa,MAAKzL,MAAAA,IAKK,CAAEqM,gBAAAA,EAAiBC,oCAJkBC,EAAAA,2BAAAA,+BAA0D,CAClGP,cAAepN,QAKtB6M,MAAK3I,IACK0J,EAAAA,EAAAA,mCAAkC1J,EAAOuJ,gBAAiBvJ,EAAOwJ,iCAE3EG,OAAOC,IAEJ,MADA9N,EAAQ+N,MAAMD,EAAME,SACd,IAAI1C,MAAM,+DAI5B,SAAe2C,EAAAA,EAAAA,IAA2B,CACtCnL,GAAI,8EACJoL,OAAmCvB,EACnCC,MAAOR,wBC/HX+B,EAAOC,QAAUvN,2BCAjBsN,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/get-html-parser-value.ts?1fb6","webpack://mattressfirm/./src/Utilities/get-view-port.tsx?4210","webpack://mattressfirm/./src/themes/mattressfirm/custom-components/dropdown/dropdown.tsx?23b4","webpack://mattressfirm/./src/modules/mfrm-adjustable-base-dimensions/mfrm-adjustable-base-dimensions.tsx?292a","webpack://mattressfirm/./src/modules/mfrm-adjustable-base-dimensions/mfrm-adjustable-base-dimensions.view.tsx?3c6a","webpack://mattressfirm/./lib/mfrm-adjustable-base-dimensions/module-registration.js?fd7a","webpack://mattressfirm/./src/dataActions/get-attributes-for-selected-variant.ts?e4b6","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import ReactHtmlParser from 'react-html-parser';\r\n\r\nconst getHtmlParserValue = (value?: string) => {\r\n let parsedValue = '';\r\n const parsedArr = value && ReactHtmlParser(value);\r\n if (parsedArr && parsedArr?.length > 0) {\r\n parsedValue = parsedArr[0] ? parsedArr[0].toString() : '';\r\n }\r\n return parsedValue;\r\n};\r\n\r\nexport default getHtmlParserValue;","import MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nconst _getViewPort = (context: ICoreContext): GridSize => {\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n } else {\r\n return 'xl';\r\n }\r\n }\r\n }\r\n return 'xs';\r\n};\r\n\r\nexport default _getViewPort;\r\n"," /**\r\n * Copyright (c) 2018 Microsoft Corporation\r\n */\r\n import { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\r\n import * as React from 'react';\r\n import { IDropdownProps } from './';\r\n import { IDropdownItemProps } from './dropdown.props';\r\n import { observer } from 'mobx-react';\r\n type IDropdownState = {\r\n /**\r\n * @friendlyName selectedIndex\r\n * @description selected index\r\n */\r\n selectedIndex: string;\r\n /**\r\n * @friendlyName preSelectionSet\r\n * @description is a preselection set for the dropdown\r\n */\r\n preSelectionSet?: boolean;\r\n };\r\n /**\r\n *\r\n * DropDown component\r\n * @extends {React.PureComponent}\r\n */\r\n @observer\r\n export class Dropdown extends React.PureComponent {\r\n private selectMenu: React.RefObject = React.createRef();\r\n private payLoad: IPayLoad;\r\n constructor(props: IDropdownProps, state: IDropdownState) {\r\n super(props);\r\n {\r\n /* VSI Customization - START */\r\n }\r\n const selectedValue = this.props.dropdownList[0].selectedValue || '';\r\n this.state = {\r\n selectedIndex: selectedValue\r\n };\r\n {\r\n /* VSI Customization - END */\r\n }\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, this.props.dropdownName);\r\n }\r\n public componentDidMount(): void {\r\n {\r\n /* VSI Customization - START */\r\n }\r\n if (this.selectMenu.current && this.state.selectedIndex === '') {\r\n this.selectMenu.current.selectedIndex = 0;\r\n }\r\n {\r\n /* VSI Customization - END */\r\n }\r\n }\r\n public componentDidUpdate(): void {\r\n const selectedValue = this.props.dropdownList[0].selectedValue || '';\r\n selectedValue && !this.state.preSelectionSet && this.setState({ selectedIndex: selectedValue, preSelectionSet: true });\r\n }\r\n public render(): JSX.Element {\r\n const { dropdownId, dropdownList, dropdownName, dropdownToggleName } = this.props;\r\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n return (\r\n \r\n \r\n {dropdownList.map(\r\n (item: IDropdownItemProps) =>\r\n item && (\r\n \r\n {item.value}\r\n \r\n )\r\n )}\r\n \r\n );\r\n }\r\n private _onChanged = async (event: React.ChangeEvent) => {\r\n this.setState({ selectedIndex: event.target.value });\r\n if (this.props.onChange) {\r\n await this.props.onChange({\r\n dropdownId: this.props.dropdownId,\r\n selectId: event.target.value,\r\n selectedValue: event.target.innerText\r\n });\r\n }\r\n };\r\n }","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { addThrottledEvent, Button, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport classNames from 'classnames';\r\nimport getHtmlParserValue from '../../Utilities/get-html-parser-value';\r\nimport * as React from 'react';\r\n\r\nimport { Dropdown } from '../../../src/themes/mattressfirm/custom-components/dropdown/dropdown';\r\nimport _getViewPort from '../../Utilities/get-view-port';\r\nimport { IMfrmAdjustableBaseDimensionsData } from './mfrm-adjustable-base-dimensions.data';\r\nimport { IMfrmAdjustableBaseDimensionsProps } from './mfrm-adjustable-base-dimensions.props.autogenerated';\r\n\r\ninterface IViewNames {\r\n Flat: string;\r\n HeadUp: string;\r\n FeetUp: string;\r\n ZeroGravity: string;\r\n}\r\ninterface IViewDimensions {\r\n MinHeight?: string;\r\n MaxHeight?: string;\r\n}\r\n\r\ninterface ISizeDimensions {\r\n Name: string;\r\n Length: string;\r\n Width: string;\r\n Height: string;\r\n Weight: string;\r\n HeadUp?: IViewDimensions;\r\n Flat?: IViewDimensions;\r\n ZeroGravity?: IViewDimensions;\r\n FeetUp?: IViewDimensions;\r\n}\r\ninterface IAdjustableBaseDimensions {\r\n [index: string]: ISizeDimensions;\r\n}\r\n\r\ninterface ISizeButtonsData {\r\n displayName: string | undefined;\r\n value: string;\r\n sizeDimensions: string;\r\n}\r\n\r\ninterface IViewButtonsData {\r\n value: string;\r\n displayName: string;\r\n}\r\n\r\nexport interface IDisplayValues {\r\n name: string;\r\n value: string;\r\n}\r\n\r\nexport interface ISelectedSize {\r\n dropdownId: string;\r\n selectId: string;\r\n selectedValue: string;\r\n}\r\nexport interface IState {\r\n selectedSize: string;\r\n selectedView: string;\r\n isMobile: boolean;\r\n isTablet: boolean;\r\n}\r\nexport interface IMfrmAdjustableBaseDimensionsViewProps extends IMfrmAdjustableBaseDimensionsProps {\r\n viewButtons: React.ReactNode;\r\n selectedSizeDimensions: React.ReactNode;\r\n selectedViewDimensions: React.ReactNode;\r\n displayImage: React.ReactNode;\r\n sizeSelection: React.ReactNode;\r\n}\r\n\r\nconst parseBackendData = (result: AttributeValue[] | undefined, backendAttribute: string) => {\r\n if (result && result.length) {\r\n // determine if product has adjustable base dimensions\r\n const backendDataString =\r\n result?.find(attr => attr.Name?.trim().toLowerCase() === backendAttribute.trim().toLowerCase())?.TextValue || '';\r\n const backendData = getHtmlParserValue(backendDataString);\r\n\r\n // determine if product is adjustable base\r\n const productType = result?.find(attr => attr.Name?.trim().toLowerCase() === 'product type')?.TextValue;\r\n const isAdjustableBase = productType?.trim().toLowerCase() === 'adjustable bases';\r\n if (isAdjustableBase && backendData.length) {\r\n return JSON.parse(backendData);\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n *\r\n * MfrmAdjustableBaseDimensions component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass MfrmAdjustableBaseDimensions extends React.PureComponent<\r\n IMfrmAdjustableBaseDimensionsProps,\r\n IState\r\n> {\r\n private validViews: IViewNames = {\r\n Flat: 'Flat',\r\n HeadUp: 'Head Up',\r\n FeetUp: 'Feet Up',\r\n ZeroGravity: 'Zero Gravity'\r\n };\r\n private initialSize: string = 'Queen';\r\n private adjustableBaseDimensions: IAdjustableBaseDimensions | undefined = parseBackendData(\r\n this.props.data.productSpecificationData.result,\r\n this.props.config.backendAttribute\r\n );\r\n private resizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n constructor(props: IMfrmAdjustableBaseDimensionsProps) {\r\n super(props);\r\n this.state = {\r\n selectedSize: this.initialSize,\r\n selectedView: this.initialView(),\r\n isMobile: false,\r\n isTablet: false\r\n };\r\n }\r\n\r\n public updateSize = (value: string) => {\r\n const defaultSelectedView =\r\n (this.adjustableBaseDimensions &&\r\n Object.keys(this.adjustableBaseDimensions[value]).find((key: string) => this.validViews[key])) ||\r\n '';\r\n this.setState({ selectedSize: value, selectedView: defaultSelectedView });\r\n };\r\n\r\n public updateView = (value: string) => {\r\n this.setState({ selectedView: value });\r\n };\r\n\r\n public componentDidMount(): void {\r\n if (Msdyn365.msdyn365Commerce.isBrowser) {\r\n this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', () => this._updateViewport());\r\n }\r\n this._updateViewport();\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n Msdyn365.msdyn365Commerce.isBrowser && window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n // Do not render if there is no adjustable base data\r\n if (!this.adjustableBaseDimensions) {\r\n return null;\r\n }\r\n const { isMobile, isTablet } = this.state;\r\n\r\n const sizeButtonsData = this._getSizeButtonsData();\r\n const viewButtonsData = this._getViewButtonsData();\r\n\r\n const sizeDimensionsData = this._getSizeDimensionsData();\r\n const viewDimensionsData = this._getViewDimensionsData();\r\n\r\n const viewProps = {\r\n ...this.props,\r\n viewButtons: this._getViewButtons(viewButtonsData),\r\n selectedSizeDimensions: this._getSelectedSizeDimensions(sizeDimensionsData),\r\n selectedViewDimensions: this._getSelectedViewDimensions(viewDimensionsData),\r\n displayImage: this._getDisplayImage(),\r\n sizeSelection: isMobile || isTablet ? this._getDropdown(sizeButtonsData) : this._getSizeButtons(sizeButtonsData)\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _updateViewport = () => {\r\n const { context } = this.props;\r\n const viewPort = _getViewPort(context);\r\n viewPort === 'xs' || viewPort === 'sm' ? this.setState({ isMobile: true }) : this.setState({ isMobile: false });\r\n viewPort === 'md' || viewPort === 'lg' ? this.setState({ isTablet: true }) : this.setState({ isTablet: false });\r\n };\r\n\r\n private dropdownCallback = (selectedSize: ISelectedSize): Promise => {\r\n return new Promise((resolve, reject) => {\r\n resolve(this.updateSize(selectedSize.selectId));\r\n });\r\n };\r\n\r\n private initialView = () => {\r\n if (!this.adjustableBaseDimensions) {\r\n return '';\r\n }\r\n return Object.keys(this.adjustableBaseDimensions[this.initialSize]).find(key => this.validViews[key]) || '';\r\n };\r\n\r\n private _getViewDimensionsData = () => {\r\n const selectedViewDimensions = [];\r\n if (this.adjustableBaseDimensions) {\r\n const selectedSizeData = this.adjustableBaseDimensions[this.state.selectedSize];\r\n const selectedViewData = selectedSizeData[this.state.selectedView];\r\n\r\n if (this.state.selectedView === 'Flat') {\r\n // Flat view only displays one value for 'Height'\r\n if (selectedViewData?.MaxHeight) {\r\n selectedViewDimensions.push({ name: 'Height', value: `${selectedViewData.MinHeight}\"` });\r\n }\r\n } else if (this.state.selectedView === 'ZeroGravity') {\r\n // Zero Gravity displays different height text to reflect the image\r\n if (selectedViewData?.MaxHeight) {\r\n selectedViewDimensions.push({ name: 'Head Height', value: `${selectedViewData.MaxHeight}\"` });\r\n }\r\n\r\n if (selectedViewData?.MinHeight) {\r\n selectedViewDimensions.push({ name: 'Feet Height', value: `${selectedViewData.MinHeight}\"` });\r\n }\r\n } else {\r\n // All other views display both Min and Max values\r\n if (selectedViewData?.MaxHeight) {\r\n selectedViewDimensions.push({ name: 'Max Height', value: `${selectedViewData.MaxHeight}\"` });\r\n }\r\n\r\n if (selectedViewData?.MinHeight) {\r\n selectedViewDimensions.push({ name: 'Min Height', value: `${selectedViewData.MinHeight}\"` });\r\n }\r\n }\r\n\r\n // add Length and Width to all views\r\n if (selectedSizeData?.Length) {\r\n selectedViewDimensions.push({ name: 'Length', value: `${selectedSizeData.Length}\"` });\r\n }\r\n if (selectedSizeData?.Width) {\r\n selectedViewDimensions.push({ name: 'Width', value: `${selectedSizeData.Width}\"` });\r\n }\r\n }\r\n\r\n return selectedViewDimensions;\r\n };\r\n\r\n private _getSizeDimensionsData = () => {\r\n const selectedSizeDimensions: IDisplayValues[] = [];\r\n if (this.adjustableBaseDimensions) {\r\n const selectedSizeData = this.adjustableBaseDimensions[this.state.selectedSize];\r\n\r\n if (selectedSizeData.Length && selectedSizeData.Width) {\r\n selectedSizeDimensions.push({ name: 'Total Size', value: `${selectedSizeData.Width}\" W x ${selectedSizeData.Length}\" L` });\r\n }\r\n if (selectedSizeData.Weight) {\r\n selectedSizeDimensions.push({ name: 'Weight Capacity', value: `${selectedSizeData.Weight} lbs.` });\r\n }\r\n }\r\n\r\n return selectedSizeDimensions;\r\n };\r\n\r\n private _getSizeButtonsData = () => {\r\n let sizeButtons: ISizeButtonsData[] = [];\r\n if (this.adjustableBaseDimensions) {\r\n sizeButtons = Object.keys(this.adjustableBaseDimensions).map((keyName, _i) => {\r\n const sizeDimensions = `${this.adjustableBaseDimensions && this.adjustableBaseDimensions[keyName].Width}\" x ${this\r\n .adjustableBaseDimensions && this.adjustableBaseDimensions[keyName].Length}\"`;\r\n return {\r\n displayName: this.adjustableBaseDimensions && this.adjustableBaseDimensions[keyName].Name,\r\n value: keyName || '',\r\n sizeDimensions\r\n };\r\n });\r\n }\r\n return sizeButtons;\r\n };\r\n\r\n private _getViewButtonsData = () => {\r\n const viewButtons: IViewButtonsData[] = [];\r\n const selectedSize = this.state.selectedSize;\r\n if (this.adjustableBaseDimensions) {\r\n const selectedSizeData = this.adjustableBaseDimensions[selectedSize];\r\n const selectedSizeDataKeys = Object.keys(selectedSizeData);\r\n\r\n for (const property of selectedSizeDataKeys) {\r\n const viewProperty = this.validViews[property];\r\n if (viewProperty) {\r\n viewButtons.push({ value: property, displayName: viewProperty });\r\n }\r\n }\r\n }\r\n\r\n return viewButtons;\r\n };\r\n\r\n private _getSizeButtons = (sizeButtonsData: ISizeButtonsData[]) => {\r\n return (\r\n
\r\n {sizeButtonsData.map((button: ISizeButtonsData) => {\r\n const selectedClassName = this.state.selectedSize === button.value ? 'selected-size' : '';\r\n\r\n return (\r\n // tslint:disable-next-line:react-this-binding-issue jsx-no-lambda\r\n this.updateSize(button.value)}\r\n >\r\n {button.displayName}
\r\n {button.sizeDimensions} \r\n \r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n private _getDropdown = (sizeButtonsData: ISizeButtonsData[]) => {\r\n const dropdownList = sizeButtonsData.map((size: ISizeButtonsData) => {\r\n return {\r\n value: size.displayName || '',\r\n id: size.value,\r\n selectedValue: this.state.selectedSize\r\n };\r\n });\r\n\r\n return (\r\n \r\n Size\r\n \r\n \r\n );\r\n };\r\n\r\n private _getViewButtons = (viewButtonsData: IViewButtonsData[]) => {\r\n return (\r\n
    \r\n {viewButtonsData.map((button: IViewButtonsData) => {\r\n const selectedClassName = this.state.selectedView === button.value ? 'selected-view' : '';\r\n return (\r\n button && (\r\n
  • \r\n {/* tslint:disable-next-line:react-this-binding-issue jsx-no-lambda */}\r\n this.updateView(button.value)}\r\n >\r\n {button.displayName}\r\n \r\n
  • \r\n )\r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n private _getSelectedSizeDimensions = (selectedSizeDimensions: IDisplayValues[]) => {\r\n return (\r\n
\r\n {selectedSizeDimensions.map((data: IDisplayValues) => {\r\n return (\r\n
\r\n {data.name} {data.value}\r\n
\r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n private _getSelectedViewDimensions = (selectedViewDimensions: IDisplayValues[]) => {\r\n return (\r\n
\r\n {selectedViewDimensions.map((data: IDisplayValues) => {\r\n return (\r\n
\r\n {' '}\r\n {data.name} {data.value}\r\n
\r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n private _getDisplayImage = () => {\r\n const {\r\n config: { headUpImage, flatImage, feetUpImage, zeroGravityImage }\r\n } = this.props;\r\n\r\n const images = {\r\n HeadUp: headUpImage,\r\n Flat: flatImage,\r\n ZeroGravity: zeroGravityImage,\r\n FeetUp: feetUpImage\r\n };\r\n const displayImageData: Msdyn365.IImageData | undefined = images[this.state.selectedView];\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n}\r\n\r\nexport default MfrmAdjustableBaseDimensions;\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\nimport * as React from 'react';\r\n\r\nimport { IMfrmAdjustableBaseDimensionsViewProps } from './mfrm-adjustable-base-dimensions';\r\n\r\nexport default (props: IMfrmAdjustableBaseDimensionsViewProps) => {\r\n const { viewButtons, selectedSizeDimensions, selectedViewDimensions, displayImage, sizeSelection } = props;\r\n\r\n return (\r\n
\r\n

Dimensions

\r\n {sizeSelection}\r\n
\r\n
\r\n {selectedSizeDimensions}\r\n {displayImage}\r\n {selectedViewDimensions}\r\n
\r\n
\r\n
Adjust Your View
\r\n {viewButtons}\r\n
\r\n
\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['mfrm-adjustable-base-dimensions'] = {\n c: () => require('partner/modules/mfrm-adjustable-base-dimensions/mfrm-adjustable-base-dimensions.tsx'),\n $type: 'contentModule',\n da: [{name:'productSpecificationData', path:'@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-selected-variant', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-adjustable-base-dimensions',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-adjustable-base-dimensions'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-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|mfrm-adjustable-base-dimensions|mfrm-adjustable-base-dimensions'] = {\n c: () => require('partner/modules/mfrm-adjustable-base-dimensions/mfrm-adjustable-base-dimensions.view.tsx'),\n cn: '__local__-__local__-mfrm-adjustable-base-dimensions'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { AttributeValue, ProductsDataActions, SimpleProduct, StoreOperationsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n getAttributeValuesByConfiguration,\n getSelectedProductIdFromActionInput,\n getSelectedVariant,\n QueryResultSettingsProxy,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Chains getting the SelectedVariant with GetActivePrice.\n */\nexport class AttributesForSelectedVariantInput implements IActionInput {\n public productId: number;\n\n public channelId: number;\n\n public catalogId: number;\n\n public selectedProduct: SimpleProduct | undefined;\n\n constructor(productId: number, channelId: number, selectedProduct?: SimpleProduct, catalogId?: number) {\n this.productId = productId;\n this.channelId = channelId;\n this.selectedProduct = selectedProduct;\n this.catalogId = catalogId || 0;\n }\n\n public getCacheKey = () => 'AttributesForSelectedVariant';\n\n public getCacheObjectType = () => 'ProductAttributeValue';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport const createAttributesForSelectedVariantInput = (\n inputData: ICreateActionContext>\n): AttributesForSelectedVariantInput => {\n const productId = getSelectedProductIdFromActionInput(inputData);\n const catalogId = getCatalogId(inputData.requestContext);\n\n if (productId) {\n return new AttributesForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId, undefined, catalogId);\n }\n throw new Error('Unable to create PriceForSelectedVariantInput, no productId found on module config or query');\n};\n\n/**\n * Calls the Retail API a get a list of dimension values for a given product.\n * @param input - The input.\n * @param context - The context.\n * @returns The attribute values.\n */\nexport async function getAttributesForSelectedVariantAction(\n input: AttributesForSelectedVariantInput,\n context: IActionContext\n): Promise {\n return Promise.resolve()\n .then(() => {\n const activeProduct: SimpleProduct | undefined = input.selectedProduct;\n\n if (!activeProduct) {\n const selectedVariantInput = new SelectedVariantInput(\n input.productId,\n input.channelId,\n undefined,\n undefined,\n context.requestContext\n );\n\n return getSelectedVariant(selectedVariantInput, context);\n }\n\n return activeProduct;\n })\n .then((productResult: SimpleProduct | null) => {\n const activeProduct: SimpleProduct | undefined = productResult;\n\n if (activeProduct) {\n return ProductsDataActions.getAttributeValuesAsync(\n {\n callerContext: context,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\n },\n activeProduct.RecordId,\n input.channelId,\n input.catalogId\n );\n }\n\n return null;\n })\n .then(async (attributeValues: AttributeValue[] | null) => {\n const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\n callerContext: context\n });\n\n return { attributeValues, channelInventoryConfiguration };\n })\n .then(result => {\n return getAttributeValuesByConfiguration(result.attributeValues, result.channelInventoryConfiguration);\n })\n .catch((error: Error) => {\n context.trace(error.message);\n throw new Error('[getPriceForSelectedVariantAction]Error executing action');\n });\n}\n\nexport default createObservableDataAction({\n id: '@msdyn365-commerce-modules/product-info/get-attributes-for-selected-variant',\n action: >getAttributesForSelectedVariantAction,\n input: createAttributesForSelectedVariantInput\n});\n","module.exports = React;","module.exports = ReactDOM;"],"names":["value","parsedValue","parsedArr","ReactHtmlParser","length","toString","context","MsDyn365","isBrowser","window","innerWidth","gridSettings","request","xs","w","sm","md","lg","Dropdown","React","constructor","props","state","super","selectMenu","_onChanged","async","this","setState","selectedIndex","event","target","onChange","dropdownId","selectId","selectedValue","innerText","dropdownList","payLoad","getPayloadObject","telemetryContent","dropdownName","componentDidMount","current","componentDidUpdate","preSelectionSet","render","dropdownToggleName","attribute","getTelemetryAttributes","Object","assign","id","ref","className","selected","hidden","disabled","map","item","key","__decorate","observer","MfrmAdjustableBaseDimensions","validViews","Flat","HeadUp","FeetUp","ZeroGravity","initialSize","adjustableBaseDimensions","parseBackendData","result","backendAttribute","_result$find","_result$find2","backendDataString","find","attr","_attr$Name","Name","trim","toLowerCase","TextValue","backendData","getHtmlParserValue","productType","_attr$Name2","JSON","parse","data","productSpecificationData","config","updateSize","defaultSelectedView","keys","selectedSize","selectedView","updateView","_updateViewport","viewPort","_getViewPort","isMobile","isTablet","dropdownCallback","Promise","resolve","reject","initialView","_getViewDimensionsData","selectedViewDimensions","selectedSizeData","selectedViewData","MaxHeight","push","name","MinHeight","Length","Width","_getSizeDimensionsData","selectedSizeDimensions","Weight","_getSizeButtonsData","sizeButtons","keyName","_i","sizeDimensions","displayName","_getViewButtonsData","viewButtons","selectedSizeDataKeys","property","viewProperty","_getSizeButtons","sizeButtonsData","button","selectedClassName","Button","classNames","onClick","_getDropdown","size","Node","_getViewButtons","viewButtonsData","title","_getSelectedSizeDimensions","_getSelectedViewDimensions","_getDisplayImage","headUpImage","flatImage","feetUpImage","zeroGravityImage","displayImageData","Msdyn365","alt","altText","src","imageSettings","resizeThrottledEventHandler","addThrottledEvent","componentWillUnmount","removeEventListener","sizeDimensionsData","viewDimensionsData","viewProps","_objectSpread","displayImage","sizeSelection","renderView","binding","modules","dataActions","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","__bindings__","viewDictionary","cn","AttributesForSelectedVariantInput","productId","channelId","selectedProduct","catalogId","getCacheKey","getCacheObjectType","dataCacheType","createAttributesForSelectedVariantInput","inputData","getSelectedProductIdFromActionInput","getCatalogId","requestContext","apiSettings","undefined","getAttributesForSelectedVariantAction","input","then","activeProduct","selectedVariantInput","SelectedVariantInput","getSelectedVariant","productResult","ProductsDataActions","callerContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","RecordId","attributeValues","channelInventoryConfiguration","StoreOperationsDataActions","getAttributeValuesByConfiguration","catch","error","trace","message","createObservableDataAction","action","module","exports","ReactDOM"],"sourceRoot":""}