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OAAAC,OAAA,GAAKlB,GACP1C,EAAM6C,MACP/C,EAAAA,cAAC+D,EAAAA,KAAIF,OAAAC,OAAA,GAAKjB,GACN7C,EAAAA,cAAC+D,EAAAA,KAAIF,OAAAC,OAAA,GAAKhB,GAAqCO,KAGvD,aCzBRoL,EAAOC,QAAU1O,cCAjByO,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/evet_b2b_theme/views/product-specification.view.tsx?cc73","webpack://Msdyn365.Commerce.Online/./lib/product-specification/module-registration.js?26aa","webpack://Msdyn365.Commerce.Online/./src/dataActions/get-attributes-for-selected-variant.ts?e4b6","webpack://Msdyn365.Commerce.Online/./src/modules/product-specification/components/product-specification-table-stucture.tsx?c1c4","webpack://Msdyn365.Commerce.Online/./src/modules/product-specification/product-specification.tsx?6583","webpack://Msdyn365.Commerce.Online/./src/modules/product-specification/product-specification.view.tsx?7490","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) HSO.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Module, Node, IModuleProps, Drawer } from '@msdyn365-commerce-modules/utilities';\r\nimport { reaction } from 'mobx';\r\nimport * as React from 'react';\r\nimport {\r\n IProductSpecificationExtentedProps,\r\n IProductSpecificationViewProps,\r\n IProductSpecificationState,\r\n IProductSpecificationData,\r\n ProductSpecificationTableRow,\r\n AttributesForSelectedVariantInput,\r\n getAttributesForSelectedVariant\r\n} from '@msdyn365-commerce-modules/product-specification';\r\nimport { IProductSpecificationProps } from '../definition-extensions/product-specification.ext.props.autogenerated';\r\nimport { AttributeDefinition, AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport class ProductSpecificationView extends React.PureComponent, IProductSpecificationState> {\r\n public constructor(props: IProductSpecificationExtentedProps & IProductSpecificationProps<{}>) {\r\n super(props);\r\n this.state = {\r\n isDrawerOpen: false,\r\n drawerListId: undefined,\r\n isAdditionalMediaDrawerOpen: false\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const { context, data, telemetry } = this.props;\r\n const catalogId = Msdyn365.getCatalogId(this.props.context.request);\r\n reaction(\r\n () => (data.product.result ? data.product.result.RecordId : null),\r\n () => {\r\n if (context && data.product.result) {\r\n const actionInput = new AttributesForSelectedVariantInput(\r\n data.product.result.RecordId,\r\n\r\n +context.actionContext.requestContext.apiSettings.channelId,\r\n data.product.result,\r\n catalogId\r\n );\r\n\r\n getAttributesForSelectedVariant(actionInput, this.props.context.actionContext).catch((error: Error) => {\r\n telemetry.error(error.message);\r\n telemetry.debug('Unable to update attributes for Product');\r\n telemetry.error(error.message);\r\n });\r\n }\r\n }\r\n );\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IProductSpecificationExtentedProps, nextState: IProductSpecificationState): 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 | null {\r\n const { ProductSpecification, ProductSpecificationTableProps, ProductSpecificationTableBodyProps, title, isAccrodion } = (this.props as unknown) as IProductSpecificationViewProps;\r\n\r\n let data: IProductSpecificationData;\r\n try {\r\n data = this.props.data;\r\n } catch (error) {\r\n this.props.telemetry.error(`Something went wrong ------${error}`);\r\n return
{error}
;\r\n }\r\n\r\n if (!data.productSpecificationData.result || data.productSpecificationData.result.length <= 0) {\r\n this.props.telemetry.error('Product specification content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const filterProductSpecificationResult = this._filterProductSpecificationResult(data, isAccrodion);\r\n const rowdata =\r\n filterProductSpecificationResult &&\r\n ArrayExtensions.hasElements(filterProductSpecificationResult) &&\r\n filterProductSpecificationResult.filter(row => !ObjectExtensions.isNullOrUndefined(row));\r\n\r\n return rowdata && ArrayExtensions.hasElements(rowdata) ? (\r\n \r\n {title}\r\n \r\n {rowdata}\r\n \r\n \r\n ) : null;\r\n }\r\n\r\n /**\r\n * Handle Heading Text Change.\r\n * @param event - Current event.\r\n */\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.heading!.text = event.target.value;\r\n };\r\n\r\n private _filterProductSpecificationResult(\r\n content: IProductSpecificationData,\r\n isAccrodion: boolean | undefined\r\n ): (JSX.Element | null)[] {\r\n return isAccrodion ? content && this._createDrawerBody(content) : content && this._createTableBody(content);\r\n }\r\n\r\n private _createTableBody(content: IProductSpecificationData): (JSX.Element | null)[] {\r\n return content.productSpecificationData.result!.map((product, index) => {\r\n const cellData: JSX.Element | null = this._renderProductCell(product);\r\n\r\n if (!cellData) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n });\r\n }\r\n\r\n private _createDrawerBody(content: IProductSpecificationData): (JSX.Element | null)[] {\r\n const accordionItemContainer: IModuleProps = {\r\n moduleProps: this.props,\r\n className: 'ms-product-specification-title'\r\n };\r\n return content.productSpecificationData.result!.map(product => {\r\n const cellData: JSX.Element | null = this._renderProductCell(product);\r\n if (!cellData) {\r\n return null;\r\n }\r\n return (\r\n \r\n \r\n
{cellData}
\r\n \r\n
\r\n );\r\n });\r\n }\r\n\r\n private readonly _toggle = (drawerListId: number | undefined) => (): void => {\r\n if (this.state.drawerListId !== drawerListId) {\r\n this.setState({ drawerListId, isDrawerOpen: true });\r\n } else {\r\n this.setState({ drawerListId: undefined, isDrawerOpen: false });\r\n }\r\n };\r\n\r\n private _renderProductCell(product: AttributeValue): JSX.Element | null {\r\n if (this._isAttributeValueHidden(product)) {\r\n return null;\r\n }\r\n\r\n switch (product.DataTypeValue) {\r\n case 0: // None\r\n // Return span here instead of null so the row still shows\r\n return ;\r\n case 1: // Currency\r\n return this._renderCurrencyCell(product);\r\n case 2: // DateTime\r\n return this._renderDateTimeCell(product);\r\n case 3: // Decimal\r\n return this._renderDecimalCell(product);\r\n case 4: // Integer\r\n return this._renderIntegerCell(product);\r\n case 5: // Text\r\n return this._renderTextCell(product);\r\n case 6: // TrueFalse\r\n return this._renderTrueFalseCell(product);\r\n case 40: // Video\r\n this.props.telemetry.warning('Got video specification type, not supported yet so skipping line');\r\n return null;\r\n case 41: // Image\r\n this.props.telemetry.warning('Got image specification type, not supported yet so skipping line');\r\n return null;\r\n default:\r\n this.props.telemetry.warning(`Got unknown specification type ${product.DataTypeValue} so skipping line`);\r\n return null;\r\n }\r\n }\r\n\r\n private _isAttributeValueHidden(product: AttributeValue): boolean {\r\n let documentAttribute = (product && this.props.config.hideProductDocument && product.Name?.trim().toUpperCase().includes('document'.trim().toUpperCase())) || false;\r\n let descriptionAttribute = (product && this.props.config.hideProductDescription && product.Name?.trim().toUpperCase().includes('description'.trim().toUpperCase())) || false;\r\n let searchAttribute = (product && this.props.config.hideSearchKeyword && product.Name?.trim().toUpperCase().includes('search'.trim().toUpperCase())) || false;\r\n\r\n if (documentAttribute || descriptionAttribute || searchAttribute) {\r\n return true;\r\n }\r\n\r\n let extProp: string =\r\n (product &&\r\n product.ExtensionProperties &&\r\n product.ExtensionProperties.some(prop => {\r\n return prop.Key?.startsWith('AttributeDefinition');\r\n }) &&\r\n ArrayExtensions.firstOrDefault(product.ExtensionProperties.filter(prop => {\r\n return prop.Key?.startsWith('AttributeDefinition');\r\n }))?.Value?.StringValue) ||\r\n '';\r\n\r\n if (extProp != null && extProp != undefined && extProp != '') {\r\n let prop: AttributeDefinition = JSON.parse(extProp);\r\n return (this.props.config.hideHiddenAttribute && prop && prop.IsHidden) || false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _renderCurrencyCell(product: AttributeValue): JSX.Element | null {\r\n if (product.CurrencyValue !== null && product.CurrencyValue !== undefined) {\r\n return (\r\n \r\n {product.CurrencyCode}\r\n {product.CurrencyValue}\r\n \r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderDateTimeCell(product: AttributeValue): JSX.Element | null {\r\n if (product.DateTimeOffsetValue?.toUTCString) {\r\n return {product.DateTimeOffsetValue.toUTCString()};\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderIntegerCell(product: AttributeValue): JSX.Element | null {\r\n if (product.IntegerValue !== null && product.IntegerValue !== undefined) {\r\n return {product.IntegerValue};\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderDecimalCell(product: AttributeValue): JSX.Element | null {\r\n if (product.FloatValue !== null && product.FloatValue !== undefined) {\r\n return {product.FloatValue};\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderTextCell(product: AttributeValue): JSX.Element | null {\r\n if (product.TextValue !== null && product.TextValue !== undefined) {\r\n return ;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderTrueFalseCell(product: AttributeValue): JSX.Element | null {\r\n if (product.BooleanValue) {\r\n return {this.props.resources.trueValueText ? this.props.resources.trueValueText : 'Yes'};\r\n }\r\n\r\n return {this.props.resources.falseValueText ? this.props.resources.falseValueText : 'No'};\r\n }\r\n}\r\n\r\nexport default ProductSpecificationView;\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['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['__local__|__local__|themes|evet_b2b_theme|views|product-specification'] = {\n c: () => require('partner/themes/evet_b2b_theme/views/product-specification.view.tsx'),\n cn: '__local__-__local__-product-specification'\n };\nviewDictionary['@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 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","/*!\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":["ProductSpecificationView","React","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","_toggle","drawerListId","state","setState","isDrawerOpen","undefined","isAdditionalMediaDrawerOpen","context","data","telemetry","catalogId","Msdyn365","request","reaction","product","result","RecordId","actionInput","AttributesForSelectedVariantInput","actionContext","requestContext","apiSettings","channelId","getAttributesForSelectedVariant","catch","error","message","debug","shouldComponentUpdate","nextProps","nextState","render","ProductSpecification","ProductSpecificationTableProps","ProductSpecificationTableBodyProps","title","isAccrodion","productSpecificationData","length","filterProductSpecificationResult","_filterProductSpecificationResult","rowdata","ArrayExtensions","hasElements","filter","row","ObjectExtensions","isNullOrUndefined","Module","Object","assign","Node","content","_createDrawerBody","_createTableBody","map","index","cellData","_renderProductCell","ProductSpecificationTableRow","className","key","productName","Name","accordionItemContainer","moduleProps","_product$Name","Drawer","collapseProps","timeout","isOpen","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","_isAttributeValueHidden","DataTypeValue","_renderCurrencyCell","_renderDateTimeCell","_renderDecimalCell","_renderIntegerCell","_renderTextCell","_renderTrueFalseCell","warning","_product$Name2","_product$Name3","_product$Name4","_ArrayExtensions$firs","documentAttribute","hideProductDocument","trim","toUpperCase","includes","descriptionAttribute","hideProductDescription","searchAttribute","hideSearchKeyword","extProp","ExtensionProperties","some","prop","_prop$Key","Key","startsWith","firstOrDefault","_prop$Key2","Value","StringValue","JSON","parse","hideHiddenAttribute","IsHidden","CurrencyValue","CurrencyCode","_product$DateTimeOffs","DateTimeOffsetValue","toUTCString","IntegerValue","FloatValue","TextValue","dangerouslySetInnerHTML","BooleanValue","resources","trueValueText","falseValueText","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","productId","selectedProduct","getCacheKey","getCacheObjectType","dataCacheType","createAttributesForSelectedVariantInput","inputData","getSelectedProductIdFromActionInput","getCatalogId","async","getAttributesForSelectedVariantAction","input","Promise","resolve","then","activeProduct","selectedVariantInput","SelectedVariantInput","getSelectedVariant","productResult","ProductsDataActions","callerContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","attributeValues","channelInventoryConfiguration","StoreOperationsDataActions","getAttributeValuesByConfiguration","trace","createObservableDataAction","action","_ref","scope","getRichTextHtml","validateCatalogId","_heading$tag","displayStyle","viewProps","handleText","classnames","tag","editProps","onEdit","productSpecificationResult","renderView","_this$props$context$r","_this$props$data$addi","tableRows","app","OmniChannelMedia","additionalMediaLocations","push","_createAdditionalMediaDrawer","_this$props$context$r2","_this$props$data$addi2","drawers","additionalDownloadsText","prevState","mediaLocation","Uri","href","download","AltText","__decorate","observer","module","exports","ReactDOM"],"sourceRoot":""}