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G,EAAAA,cAAA,QAAME,wBAAyB2B,EAAAA,GAAyBI,EAAQwE,aAGpE,KAGH8C,qBAAqBtH,GAGzB,OAAIA,EAAQ+H,aACDhK,EAAAA,cAAA,YAAOY,KAAKJ,MAAM6G,UAAU4C,cAAgBrJ,KAAKJ,MAAM6G,UAAU4C,cAAgB,OAErFjK,EAAAA,cAAA,YAAOY,KAAKJ,MAAM6G,UAAU6C,eAAiBtJ,KAAKJ,MAAM6G,UAAU6C,eAAiB,QA9S5F5J,GAAoB6J,EAAAA,EAAAA,IAAA,CADzBC,EAAAA,IACK9J,GAkTN,qFC9VA,MAiBA,EAjB2EE,IACvE,MAAM,qBAAEF,EAAoB,+BAAEuD,EAA8B,mCAAEE,EAAkC,2BAAEI,GAA+B3D,EAC3H6J,EACFlG,GACAmG,EAAAA,gBAAgBC,YAAYpG,IAC5BA,EAA2BqG,QAAOC,IAAQC,EAAAA,iBAAiBC,kBAAkBF,KAEjF,OAAOJ,GAAWC,EAAAA,gBAAgBC,YAAYF,GAC1CrK,EAAAA,cAACwH,EAAAA,OAAMC,OAAAC,OAAA,GAAKpH,GACPE,EAAMwD,MACPhE,EAAAA,cAAC4K,EAAAA,KAAInD,OAAAC,OAAA,GAAK7D,GACN7D,EAAAA,cAAC4K,EAAAA,KAAInD,OAAAC,OAAA,GAAK3D,GAAqCsG,KAGvD,aCzBRiE,EAAOC,QAAUvO,cCAjBsO,EAAOC,QAAUC","sources":["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","webpack://bestseller.commerce.online/./lib/ext-product-specification/module-registration.js?b249","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/external var \"React\"?0d3b","webpack://bestseller.commerce.online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\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","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 };","/*!\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":["ProductSpecificationTableRow","_ref","productName","cellData","className","React","scope","dangerouslySetInnerHTML","getRichTextHtml","displayStyle","HeadingTag","ProductSpecification","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","_toggle","drawerListId","state","setState","isDrawerOpen","undefined","isAdditionalMediaDrawerOpen","context","data","telemetry","catalogId","Msdyn365","request","validateCatalogId","reaction","product","result","RecordId","actionInput","AttributesForSelectedVariantInput","actionContext","requestContext","apiSettings","channelId","getAttributesForSelectedVariant","catch","error","message","debug","shouldComponentUpdate","nextProps","nextState","render","_heading$tag","productSpecificationData","length","isAccrodion","accordion","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","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","TextValue","_content$productSpeci2","_content$productSpeci3","_this$props$config$de","_attribute$TextValue","_getDescription","descriptionAttrArray","split","join","_content$productSpeci4","x","_item$attributeTitle","resources","productIdText","ItemId","Module","Object","assign","Drawer","collapseProps","timeout","isOpen","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","attributeTitle","onToggle","staticContent","_item$attributeTitle2","_product$Name","descriptionAttributes","description","additionalDownloadsText","prevState","mediaLocation","Uri","href","download","AltText","DataTypeValue","_renderCurrencyCell","_renderDateTimeCell","_renderDecimalCell","_renderIntegerCell","_renderTextCell","_renderTrueFalseCell","warning","CurrencyValue","CurrencyCode","_product$DateTimeOffs","DateTimeOffsetValue","toUTCString","IntegerValue","FloatValue","BooleanValue","trueValueText","falseValueText","__decorate","observer","rowdata","ArrayExtensions","hasElements","filter","row","ObjectExtensions","isNullOrUndefined","Node","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__","viewDictionary","cn","productId","selectedProduct","getCacheKey","getCacheObjectType","dataCacheType","createAttributesForSelectedVariantInput","inputData","getSelectedProductIdFromActionInput","getCatalogId","async","getAttributesForSelectedVariantAction","input","Promise","resolve","then","activeProduct","selectedVariantInput","SelectedVariantInput","getSelectedVariant","productResult","ProductsDataActions","callerContext","attributeValues","channelInventoryConfiguration","StoreOperationsDataActions","getAttributeValuesByConfiguration","trace","createObservableDataAction","action","module","exports","ReactDOM"],"sourceRoot":""}