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C7I,IAAvB2D,EAAQkF,WAChC/J,EAAAA,cAAA,YAAO6E,EAAQkF,YAGnB,KAGHT,gBAAgBzE,GACpB,OAA0B,OAAtBA,EAAQmF,gBAA4C9I,IAAtB2D,EAAQmF,UAE/BhK,EAAAA,cAAA,QAAMqD,wBAAyBoB,EAAAA,GAAyBI,EAAQmF,aAGpE,KAGHT,qBAAqB1E,GAGzB,OAAIA,EAAQoF,aACDjK,EAAAA,cAAA,YAAOW,KAAK6C,MAAMiF,UAAUyB,cAAgBvJ,KAAK6C,MAAMiF,UAAUyB,cAAgB,OAErFlK,EAAAA,cAAA,YAAOW,KAAK6C,MAAMiF,UAAU0B,eAAiBxJ,KAAK6C,MAAMiF,UAAU0B,eAAiB,QAlb5F5G,GAAoB6G,EAAAA,EAAAA,IAAA,CADzBC,EAAAA,IACK9G,GAsbN,sFCleA,MAiBA,EAjB2EC,IACvE,MAAM,qBAAED,EAAoB,+BAAEyC,EAA8B,mCAAEE,EAAkC,2BAAEI,GAA+B9C,EAC3H8G,EACFhE,GACAiE,EAAAA,gBAAgBC,YAAYlE,IAC5BA,EAA2BmE,QAAOC,IAAQC,EAAAA,iBAAiBC,kBAAkBF,KAEjF,OAAOJ,GAAWC,EAAAA,gBAAgBC,YAAYF,GAC1CtK,EAAAA,cAAC6H,EAAAA,OAAMC,OAAAC,OAAA,GAAKxE,GACPC,EAAM2C,MACPnG,EAAAA,cAAC6K,EAAAA,KAAI/C,OAAAC,OAAA,GAAK/B,GACNhG,EAAAA,cAAC6K,EAAAA,KAAI/C,OAAAC,OAAA,GAAK7B,GAAqCoE,KAGvD","sources":["webpack://bestseller.commerce.online/external var \"React\"?0d3b","webpack://bestseller.commerce.online/external var \"ReactDOM\"?853b","webpack://bestseller.commerce.online/./src/dataActions/get-attributes-for-selected-variant.ts?e4b6","webpack://bestseller.commerce.online/./src/modules/product-specification/components/product-specification-table-stucture.tsx?c1c4","webpack://bestseller.commerce.online/./src/modules/product-specification/product-specification.tsx?6583","webpack://bestseller.commerce.online/./src/modules/product-specification/product-specification.view.tsx?7490","webpack://bestseller.commerce.online/./lib/ext-product-specification/module-registration.js?b249","webpack://bestseller.commerce.online/./src/modules/ext-product-specification/components/ext-product-specification-table-stucture.tsx?87f4","webpack://bestseller.commerce.online/./src/modules/ext-product-specification/ext-product-specification.props.autogenerated.ts?a97e","webpack://bestseller.commerce.online/./src/modules/ext-product-specification/ext-product-specification.tsx?b2e6","webpack://bestseller.commerce.online/./src/modules/ext-product-specification/ext-product-specification.view.tsx?cc3d"],"sourcesContent":["module.exports = React;","module.exports = ReactDOM;","/*!\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","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-product-specification'] = {\n c: () => require('partner/modules/ext-product-specification/ext-product-specification.tsx'),\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: false,\n ns: '__local__',\n n: 'ext-product-specification',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/ext-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__|modules|ext-product-specification|ext-product-specification'] = {\n c: () => require('partner/modules/ext-product-specification/ext-product-specification.view.tsx'),\n cn: '__local__-__local__-ext-product-specification'\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 in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\n/**\r\n * Product specification table row.\r\n */\r\nexport interface IProductSpecificationTableRow {\r\n productName?: string;\r\n cellData?: React.ReactNode;\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Product specification table row component.\r\n * @param props - For product specification table row.\r\n * @param props.productName - Product name.\r\n * @param props.cellData - Cell data.\r\n * @param props.className - Class name.\r\n * @returns - Returns JSX element.\r\n */\r\nexport const ProductSpecificationTableRow: React.FC = ({ productName, cellData, className }) => (\r\n \r\n \r\n {/* eslint-disable-next-line react/no-danger */}\r\n \r\n \r\n {cellData}\r\n \r\n);\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IExtProductSpecification 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 displayStyle {\r\n accordion = 'accordion',\r\n table = 'table'\r\n}\r\n\r\nexport interface IExtProductSpecificationConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n displayStyle?: displayStyle;\r\n className?: string;\r\n clientRender?: boolean;\r\n useCustomAttributes?: boolean;\r\n attributesArray?: IAttributesArrayData[];\r\n careDescriptionAttrArray?: string[];\r\n descriptionAttrArray?: string[];\r\n}\r\n\r\nexport interface IExtProductSpecificationResources {\r\n trueValueText: string;\r\n falseValueText: string;\r\n additionalDownloadsText: string;\r\n productIdText: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface IAttributesArrayData {\r\n attributeTitle?: string;\r\n attributeKey?: string;\r\n staticContent?: string;\r\n}\r\n\r\nexport interface IExtProductSpecificationProps extends Msdyn365.IModule {\r\n resources: IExtProductSpecificationResources;\r\n config: IExtProductSpecificationConfig;\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { Drawer, IModuleProps, INodeProps, Module } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { AttributesForSelectedVariantInput, getAttributesForSelectedVariant } from '@msdyn365-commerce-modules/product-specification';\r\nimport { ProductSpecificationTableRow } from './components/ext-product-specification-table-stucture';\r\nimport { IExtProductSpecificationData } from './ext-product-specification.data';\r\nimport { displayStyle, IExtProductSpecificationProps } from './ext-product-specification.props.autogenerated';\r\n\r\n/**\r\n * Maintain Drawer State.\r\n */\r\nexport interface IProductSpecificationState {\r\n isDrawerOpen: boolean;\r\n isAdditionalMediaDrawerOpen: boolean;\r\n drawerListId: number | undefined;\r\n}\r\n\r\n/**\r\n * Product specification view props.\r\n */\r\nexport interface IProductSpecificationViewProps extends IExtProductSpecificationProps<{}> {\r\n ProductSpecification: IModuleProps;\r\n ProductSpecificationTableProps: INodeProps;\r\n ProductSpecificationTableBodyProps: INodeProps;\r\n productSpecificationResult?: (JSX.Element | null)[];\r\n\r\n title?: React.ReactNode;\r\n isAccrodion?: boolean;\r\n handleText?(event: Msdyn365.ContentEditableEvent): void;\r\n}\r\n\r\n/**\r\n * Check for display style either accordion or table.\r\n */\r\nexport interface IProductSpecificationExtentedProps extends IExtProductSpecificationProps {\r\n displayStyle?: displayStyle;\r\n}\r\n\r\n/**\r\n *\r\n * ProductSpecification component.\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass ProductSpecification extends React.Component {\r\n public constructor(props: IProductSpecificationExtentedProps) {\r\n super(props);\r\n this.state = {\r\n isDrawerOpen: false,\r\n isAdditionalMediaDrawerOpen: false,\r\n drawerListId: undefined\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 validateCatalogId(catalogId);\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 let data: IExtProductSpecificationData;\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 { heading, className } = this.props.config;\r\n const { productSpecificationData } = this.props.data;\r\n const isAccrodion = this.props.config.displayStyle === displayStyle.accordion;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n handleText: this.handleHeadingChange,\r\n ProductSpecification: {\r\n moduleProps: this.props,\r\n className: classnames('ms-product-specification', className)\r\n },\r\n ProductSpecificationTableProps: isAccrodion\r\n ? {\r\n moduleProps: this.props,\r\n className: classnames('ms-product-specification__accordion', className)\r\n }\r\n : {\r\n className: classnames('ms-product-specification__table table-striped table-bordered'),\r\n tag: 'table'\r\n },\r\n isAccrodion,\r\n ProductSpecificationTableBodyProps: isAccrodion\r\n ? {}\r\n : {\r\n className: '',\r\n tag: 'tbody'\r\n },\r\n title: heading?.text && (\r\n \r\n ),\r\n productSpecificationResult:\r\n productSpecificationData.result && (isAccrodion ? this._createDrawerBody(data) : this._createTableBody(data))\r\n } as IProductSpecificationViewProps;\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\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 _createTableBody(content: IExtProductSpecificationData): (JSX.Element | null)[] {\r\n const tableRows = 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\r\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\r\n tableRows.push(this._createAdditionalMediaDrawer());\r\n }\r\n\r\n return tableRows;\r\n }\r\n\r\n private _createDrawerBody(content: IExtProductSpecificationData): (JSX.Element | null)[] {\r\n const accordionItemContainer: IModuleProps = {\r\n moduleProps: this.props,\r\n className: 'ms-product-specification-title'\r\n };\r\n\r\n var drawers: (JSX.Element | null)[] = [];\r\n //Load custom defined attributes, instead of loading every attribute.\r\n if (this.props.config.useCustomAttributes && this.props.config.attributesArray && this.props.config.attributesArray.length > 0) {\r\n var i = 0;\r\n this.props.config.attributesArray?.forEach(item => {\r\n var attributes: JSX.Element[] = [];\r\n var attribute;\r\n //If the item has an attribute key, it is a product attribute\r\n if (item.attributeKey) {\r\n //The care attributes are handled specially, because they all share one drawer\r\n if (item.attributeKey === 'Care') {\r\n this.props.config.careDescriptionAttrArray?.forEach(careAttribute => {\r\n var careAttr = content?.productSpecificationData?.result?.find(item => {\r\n return item.Name === careAttribute;\r\n });\r\n if (careAttr) {\r\n //Same function as the _renderTextCell but with a p element instead\r\n attributes.push(

);\r\n //Save one of the care attributes as the attribute for later\r\n attribute = careAttr;\r\n }\r\n });\r\n } else if (item.attributeKey === 'Description') {\r\n //The description attribute is handled specially, because it needs to include other elements - and needs to select between different attributes\r\n attribute = this._getDescription(\r\n content?.productSpecificationData?.result ?? [],\r\n this.props.config.descriptionAttrArray ?? []\r\n );\r\n if (attribute && attribute.TextValue) {\r\n var array = attribute.TextValue?.split('- ')\r\n .join('')\r\n .split('\\\\n')\r\n .join('\\n')\r\n .split('\\n');\r\n array.forEach(item => {\r\n attributes.push(

{item}

);\r\n });\r\n }\r\n } else {\r\n attribute = content?.productSpecificationData?.result?.find(x => {\r\n return x.Name === item.attributeKey;\r\n });\r\n }\r\n if (attribute) {\r\n var cellData: JSX.Element | null;\r\n //Displays the specially handled attributes differently\r\n switch (item.attributeKey) {\r\n case 'Care':\r\n cellData =
{attributes}
;\r\n break;\r\n case 'Description':\r\n cellData = (\r\n
\r\n
{attributes}
\r\n \r\n
\r\n );\r\n break;\r\n default:\r\n cellData = this._renderProductCell(attribute);\r\n break;\r\n }\r\n if (cellData) {\r\n drawers.push(\r\n \r\n \r\n
{cellData}
\r\n \r\n
\r\n );\r\n }\r\n }\r\n //If it is not an attribute, it is static content\r\n } else if (item.staticContent) {\r\n drawers.push(\r\n \r\n \r\n
\r\n {}\r\n
\r\n \r\n
\r\n );\r\n }\r\n i++;\r\n });\r\n } else {\r\n drawers = 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 if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\r\n drawers.push(this._createAdditionalMediaDrawer());\r\n }\r\n\r\n return drawers;\r\n }\r\n\r\n private _getDescription(attributes: AttributeValue[], descriptionAttributes: string[]): AttributeValue | undefined {\r\n for (var attribute of descriptionAttributes) {\r\n const description = attributes.find(x => {\r\n return x.Name === attribute;\r\n });\r\n if (description && description.TextValue && description.TextValue !== '') {\r\n return description;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private _createAdditionalMediaDrawer(): JSX.Element {\r\n const accordionItemContainer: IModuleProps = {\r\n moduleProps: this.props,\r\n className: 'ms-product-specification-title'\r\n };\r\n\r\n return (\r\n \r\n {\r\n this.setState(prevState => ({\r\n ...prevState,\r\n isAdditionalMediaDrawerOpen: !prevState.isAdditionalMediaDrawerOpen\r\n }));\r\n }}\r\n >\r\n
\r\n \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 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 _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 // eslint-disable-next-line react/no-danger\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 // TODO 20369885 setting to default value is needed to work around a platform bug where\r\n // config string value does not get its default value.\r\n if (product.BooleanValue) {\r\n return {this.props.resources.trueValueText ? this.props.resources.trueValueText : 'Yes'};\r\n }\r\n return {this.props.resources.falseValueText ? this.props.resources.falseValueText : 'No'};\r\n }\r\n}\r\n\r\nexport default ProductSpecification;\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 { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IProductSpecificationViewProps } from './ext-product-specification';\r\n\r\nconst ProductSpecificationView: React.FC = props => {\r\n const { ProductSpecification, ProductSpecificationTableProps, ProductSpecificationTableBodyProps, productSpecificationResult } = props;\r\n const rowdata =\r\n productSpecificationResult &&\r\n ArrayExtensions.hasElements(productSpecificationResult) &&\r\n productSpecificationResult.filter(row => !ObjectExtensions.isNullOrUndefined(row));\r\n\r\n return rowdata && ArrayExtensions.hasElements(rowdata) ? (\r\n \r\n {props.title}\r\n \r\n {rowdata}\r\n \r\n \r\n ) : null;\r\n};\r\n\r\nexport default ProductSpecificationView;\r\n"],"names":["module","exports","React","ReactDOM","AttributesForSelectedVariantInput","constructor","productId","channelId","selectedProduct","catalogId","getCacheKey","getCacheObjectType","dataCacheType","this","createAttributesForSelectedVariantInput","inputData","getSelectedProductIdFromActionInput","getCatalogId","requestContext","apiSettings","undefined","Error","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","id","action","ProductSpecificationTableRow","_ref","productName","cellData","className","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","_objectSpread","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","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","HeadingTag","accordion","useCustomAttributes","attributesArray","_this$props$config$at","i","forEach","item","_content$product$resu","attribute","attributes","attributeKey","_this$props$config$ca","careDescriptionAttrArray","careAttribute","_content$productSpeci","careAttr","find","_content$productSpeci2","_content$productSpeci3","_this$props$config$de","_attribute$TextValue","_getDescription","descriptionAttrArray","split","join","_content$productSpeci4","x","_item$attributeTitle","productIdText","ItemId","attributeTitle","staticContent","_item$attributeTitle2","descriptionAttributes","description"],"sourceRoot":""}