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ErF9G,EAAAA,cAAA,YAAOvC,KAAK4C,MAAMgF,UAAU0B,eAAiBtJ,KAAK4C,MAAMgF,UAAU0B,eAAiB,QA9S5F3G,GAAoB4G,EAAAA,EAAAA,IAAA,CADzBC,EAAAA,IACK7G,GAkTN,qFC9VA,MAiBA,EAjB2EC,IACvE,MAAM,qBAAED,EAAoB,+BAAEwC,EAA8B,mCAAEE,EAAkC,2BAAEI,GAA+B7C,EAC3H6G,EACFhE,GACAiE,EAAAA,gBAAgBC,YAAYlE,IAC5BA,EAA2BmE,QAAOC,IAAQC,EAAAA,iBAAiBC,kBAAkBF,KAEjF,OAAOJ,GAAWC,EAAAA,gBAAgBC,YAAYF,GAC1ClH,EAAAA,cAACyE,EAAAA,OAAMC,OAAAC,OAAA,GAAKvE,GACPC,EAAM0C,MACP/C,EAAAA,cAACyH,EAAAA,KAAI/C,OAAAC,OAAA,GAAK/B,GACN5C,EAAAA,cAACyH,EAAAA,KAAI/C,OAAAC,OAAA,GAAK7B,GAAqCoE,KAGvD,aCzBRQ,EAAOC,QAAU3H,cCAjB0H,EAAOC,QAAUC","sources":["webpack://jansen-adventureworks/./lib/product-specification/module-registration.js?26aa","webpack://jansen-adventureworks/./src/dataActions/get-attributes-for-selected-variant.ts?e4b6","webpack://jansen-adventureworks/./src/modules/product-specification/components/product-specification-table-stucture.tsx?c1c4","webpack://jansen-adventureworks/./src/modules/product-specification/product-specification.tsx?6583","webpack://jansen-adventureworks/./src/modules/product-specification/product-specification.view.tsx?7490","webpack://jansen-adventureworks/external var \"React\"?0d3b","webpack://jansen-adventureworks/external var \"ReactDOM\"?853b"],"sourcesContent":["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['product-specification'] = {\n c: () => require('@msdyn365-commerce-modules/product-specification/dist/lib/modules/product-specification/product-specification'),\n $type: 'contentModule',\n da: [{name:'additionalMediaLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-additional-media-locations-for-selected-variant', runOn: 0},{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0},{name:'productSpecificationData', path:'@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-selected-variant', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'product-specification',\n p: 'product-specification',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/product-specification/dist/lib/modules/product-specification'\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 const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-additional-media-locations-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-additional-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['@msdyn365-commerce-modules|product-specification|modules|product-specification|product-specification'] = {\n c: () => require('@msdyn365-commerce-modules/product-specification/dist/lib/modules/product-specification/product-specification.view.js'),\n cn: '@msdyn365-commerce-modules-product-specification-product-specification'\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 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 },\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\n/**\n * Product specification table row.\n */\nexport interface IProductSpecificationTableRow {\n productName?: string;\n cellData?: React.ReactNode;\n className?: string;\n}\n\n/**\n * Product specification table row component.\n * @param props - For product specification table row.\n * @param props.productName - Product name.\n * @param props.cellData - Cell data.\n * @param props.className - Class name.\n * @returns - Returns JSX element.\n */\nexport const ProductSpecificationTableRow: React.FC = ({ productName, cellData, className }) => (\n \n \n {/* eslint-disable-next-line react/no-danger */}\n \n \n {cellData}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Drawer, IModuleProps, INodeProps, Module } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { AttributesForSelectedVariantInput, getAttributesForSelectedVariant } from '../..';\nimport { ProductSpecificationTableRow } from './components/product-specification-table-stucture';\nimport { IProductSpecificationData } from './product-specification.data';\nimport { displayStyle, IProductSpecificationProps } from './product-specification.props.autogenerated';\n\n/**\n * Maintain Drawer State.\n */\nexport interface IProductSpecificationState {\n isDrawerOpen: boolean;\n isAdditionalMediaDrawerOpen: boolean;\n drawerListId: number | undefined;\n}\n\n/**\n * Product specification view props.\n */\nexport interface IProductSpecificationViewProps extends IProductSpecificationProps<{}> {\n ProductSpecification: IModuleProps;\n ProductSpecificationTableProps: INodeProps;\n ProductSpecificationTableBodyProps: INodeProps;\n productSpecificationResult?: (JSX.Element | null)[];\n\n title?: React.ReactNode;\n isAccrodion?: boolean;\n handleText?(event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * Check for display style either accordion or table.\n */\nexport interface IProductSpecificationExtentedProps extends IProductSpecificationProps {\n displayStyle?: displayStyle;\n}\n\n/**\n *\n * ProductSpecification component.\n * @extends {React.Component>}\n */\n@observer\nclass ProductSpecification extends React.Component {\n public constructor(props: IProductSpecificationExtentedProps) {\n super(props);\n this.state = {\n isDrawerOpen: false,\n isAdditionalMediaDrawerOpen: false,\n drawerListId: undefined\n };\n }\n\n public async componentDidMount(): Promise {\n const { context, data, telemetry } = this.props;\n const catalogId = Msdyn365.getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n reaction(\n () => (data.product.result ? data.product.result.RecordId : null),\n () => {\n if (context && data.product.result) {\n const actionInput = new AttributesForSelectedVariantInput(\n data.product.result.RecordId,\n\n +context.actionContext.requestContext.apiSettings.channelId,\n data.product.result,\n catalogId\n );\n\n getAttributesForSelectedVariant(actionInput, this.props.context.actionContext).catch((error: Error) => {\n telemetry.error(error.message);\n telemetry.debug('Unable to update attributes for Product');\n telemetry.error(error.message);\n });\n }\n }\n );\n }\n\n public shouldComponentUpdate(nextProps: IProductSpecificationExtentedProps, nextState: IProductSpecificationState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n let data: IProductSpecificationData;\n try {\n data = this.props.data;\n } catch (error) {\n this.props.telemetry.error(`Something went wrong ------${error}`);\n return
{error}
;\n }\n\n if (!data.productSpecificationData.result || data.productSpecificationData.result.length <= 0) {\n this.props.telemetry.error('Product specification content is empty, module wont render.');\n return null;\n }\n\n const { heading, className } = this.props.config;\n const { productSpecificationData } = this.props.data;\n const isAccrodion = this.props.config.displayStyle === displayStyle.accordion;\n const viewProps = {\n ...this.props,\n handleText: this.handleHeadingChange,\n ProductSpecification: {\n moduleProps: this.props,\n className: classnames('ms-product-specification', className)\n },\n ProductSpecificationTableProps: isAccrodion\n ? {\n moduleProps: this.props,\n className: classnames('ms-product-specification__accordion', className)\n }\n : {\n className: classnames('ms-product-specification__table table-striped table-bordered'),\n tag: 'table'\n },\n isAccrodion,\n ProductSpecificationTableBodyProps: isAccrodion\n ? {}\n : {\n className: '',\n tag: 'tbody'\n },\n title: heading?.text && (\n \n ),\n productSpecificationResult:\n productSpecificationData.result && (isAccrodion ? this._createDrawerBody(data) : this._createTableBody(data))\n } as IProductSpecificationViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle Heading Text Change.\n * @param event - Current event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n private _createTableBody(content: IProductSpecificationData): (JSX.Element | null)[] {\n const tableRows = content.productSpecificationData.result!.map((product, index) => {\n const cellData: JSX.Element | null = this._renderProductCell(product);\n\n if (!cellData) {\n return null;\n }\n\n return (\n <>\n \n \n );\n });\n\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\n tableRows.push(this._createAdditionalMediaDrawer());\n }\n\n return tableRows;\n }\n\n private _createDrawerBody(content: IProductSpecificationData): (JSX.Element | null)[] {\n const accordionItemContainer: IModuleProps = {\n moduleProps: this.props,\n className: 'ms-product-specification-title'\n };\n\n const drawers = content.productSpecificationData.result!.map(product => {\n const cellData: JSX.Element | null = this._renderProductCell(product);\n if (!cellData) {\n return null;\n }\n return (\n \n \n
{cellData}
\n \n
\n );\n });\n\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\n drawers.push(this._createAdditionalMediaDrawer());\n }\n\n return drawers;\n }\n private _createAdditionalMediaDrawer(): JSX.Element {\n const accordionItemContainer: IModuleProps = {\n moduleProps: this.props,\n className: 'ms-product-specification-title'\n };\n\n return (\n \n {\n this.setState(prevState => ({\n ...prevState,\n isAdditionalMediaDrawerOpen: !prevState.isAdditionalMediaDrawerOpen\n }));\n }}\n >\n
\n \n
\n \n
\n );\n }\n\n private readonly _toggle = (drawerListId: number | undefined) => (): void => {\n if (this.state.drawerListId !== drawerListId) {\n this.setState({ drawerListId, isDrawerOpen: true });\n } else {\n this.setState({ drawerListId: undefined, isDrawerOpen: false });\n }\n };\n\n private _renderProductCell(product: AttributeValue): JSX.Element | null {\n switch (product.DataTypeValue) {\n case 0: // None\n // Return span here instead of null so the row still shows\n return ;\n case 1: // Currency\n return this._renderCurrencyCell(product);\n case 2: // DateTime\n return this._renderDateTimeCell(product);\n case 3: // Decimal\n return this._renderDecimalCell(product);\n case 4: // Integer\n return this._renderIntegerCell(product);\n case 5: // Text\n return this._renderTextCell(product);\n case 6: // TrueFalse\n return this._renderTrueFalseCell(product);\n case 40: // Video\n this.props.telemetry.warning('Got video specification type, not supported yet so skipping line');\n return null;\n case 41: // Image\n this.props.telemetry.warning('Got image specification type, not supported yet so skipping line');\n return null;\n default:\n this.props.telemetry.warning(`Got unknown specification type ${product.DataTypeValue} so skipping line`);\n return null;\n }\n }\n\n private _renderCurrencyCell(product: AttributeValue): JSX.Element | null {\n if (product.CurrencyValue !== null && product.CurrencyValue !== undefined) {\n return (\n \n {product.CurrencyCode}\n {product.CurrencyValue}\n \n );\n }\n\n return null;\n }\n\n private _renderDateTimeCell(product: AttributeValue): JSX.Element | null {\n if (product.DateTimeOffsetValue?.toUTCString) {\n return {product.DateTimeOffsetValue.toUTCString()};\n }\n\n return null;\n }\n\n private _renderIntegerCell(product: AttributeValue): JSX.Element | null {\n if (product.IntegerValue !== null && product.IntegerValue !== undefined) {\n return {product.IntegerValue};\n }\n\n return null;\n }\n\n private _renderDecimalCell(product: AttributeValue): JSX.Element | null {\n if (product.FloatValue !== null && product.FloatValue !== undefined) {\n return {product.FloatValue};\n }\n\n return null;\n }\n\n private _renderTextCell(product: AttributeValue): JSX.Element | null {\n if (product.TextValue !== null && product.TextValue !== undefined) {\n // eslint-disable-next-line react/no-danger\n return ;\n }\n\n return null;\n }\n\n private _renderTrueFalseCell(product: AttributeValue): JSX.Element | null {\n // TODO 20369885 setting to default value is needed to work around a platform bug where\n // config string value does not get its default value.\n if (product.BooleanValue) {\n return {this.props.resources.trueValueText ? this.props.resources.trueValueText : 'Yes'};\n }\n return {this.props.resources.falseValueText ? this.props.resources.falseValueText : 'No'};\n }\n}\n\nexport default ProductSpecification;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductSpecificationViewProps } from './product-specification';\n\nconst ProductSpecificationView: React.FC = props => {\n const { ProductSpecification, ProductSpecificationTableProps, ProductSpecificationTableBodyProps, productSpecificationResult } = props;\n const rowdata =\n productSpecificationResult &&\n ArrayExtensions.hasElements(productSpecificationResult) &&\n productSpecificationResult.filter(row => !ObjectExtensions.isNullOrUndefined(row));\n\n return rowdata && ArrayExtensions.hasElements(rowdata) ? (\n \n {props.title}\n \n {rowdata}\n \n \n ) : null;\n};\n\nexport default ProductSpecificationView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["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","AttributesForSelectedVariantInput","constructor","productId","channelId","selectedProduct","catalogId","getCacheKey","getCacheObjectType","dataCacheType","this","createAttributesForSelectedVariantInput","inputData","getSelectedProductIdFromActionInput","getCatalogId","requestContext","apiSettings","undefined","async","getAttributesForSelectedVariantAction","input","context","Promise","resolve","then","activeProduct","selectedVariantInput","SelectedVariantInput","getSelectedVariant","productResult","ProductsDataActions","callerContext","RecordId","attributeValues","channelInventoryConfiguration","StoreOperationsDataActions","result","getAttributeValuesByConfiguration","catch","error","trace","message","createObservableDataAction","action","ProductSpecificationTableRow","_ref","productName","cellData","className","React","scope","dangerouslySetInnerHTML","getRichTextHtml","ProductSpecification","props","super","handleHeadingChange","event","config","heading","text","target","value","_toggle","drawerListId","state","setState","isDrawerOpen","isAdditionalMediaDrawerOpen","data","telemetry","Msdyn365","request","validateCatalogId","reaction","product","actionInput","actionContext","getAttributesForSelectedVariant","debug","shouldComponentUpdate","nextProps","nextState","render","_heading$tag","productSpecificationData","length","isAccrodion","displayStyle","viewProps","handleText","moduleProps","classnames","ProductSpecificationTableProps","tag","ProductSpecificationTableBodyProps","title","editProps","onEdit","productSpecificationResult","_createDrawerBody","_createTableBody","renderView","content","_this$props$context$r","_this$props$data$addi","tableRows","map","index","_renderProductCell","key","Name","app","OmniChannelMedia","additionalMediaLocations","push","_createAdditionalMediaDrawer","_this$props$context$r2","_this$props$data$addi2","accordionItemContainer","drawers","_product$Name","Module","Object","assign","Drawer","collapseProps","timeout","isOpen","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","resources","additionalDownloadsText","prevState","mediaLocation","Uri","href","download","AltText","DataTypeValue","_renderCurrencyCell","_renderDateTimeCell","_renderDecimalCell","_renderIntegerCell","_renderTextCell","_renderTrueFalseCell","warning","CurrencyValue","CurrencyCode","_product$DateTimeOffs","DateTimeOffsetValue","toUTCString","IntegerValue","FloatValue","TextValue","BooleanValue","trueValueText","falseValueText","__decorate","observer","rowdata","ArrayExtensions","hasElements","filter","row","ObjectExtensions","isNullOrUndefined","Node","module","exports","ReactDOM"],"sourceRoot":""}