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yDACtBrB,0SAMuBqB,0DACtBrB,2LAInCqF,MAAAA,GAAAA,EAAWS,YAAYE,GAGvBX,MAAAA,GAAAA,EAAWG,UAAUU,IAAI,gBAGzBF,EAAaG,iBAAiB,QAAQ,SAK/B,KACHd,MAAAA,GAAAA,EAAWS,YAAYJ,GACvBL,MAAAA,GAAAA,EAAWS,YAAYC,GACvBV,MAAAA,GAAAA,EAAWe,YAAYJ,IAI/B,MAAO,SACR,KAMiCK,CAAuB,uBAAwBrG,EAAqBqB","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/tbu-product-specification/components/tbu-product-specification-table-stucture.tsx?cd3a","webpack://Msdyn365.Commerce.Online/./src/modules/tbu-product-specification/tbu-product-specification.props.autogenerated.ts?5a66","webpack://Msdyn365.Commerce.Online/./src/modules/tbu-product-specification/tbu-product-specification.tsx?f36e","webpack://Msdyn365.Commerce.Online/./src/modules/tbu-product-specification/tbu-product-specification.view.tsx?b658"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt 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 \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 * ITbuProductSpecification 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 displayedData {\r\n allSpecifications = 'allSpecifications',\r\n onlyDatasheet = 'onlyDatasheet',\r\n onlyMSDS = 'onlyMSDS',\r\n onlyProtocol = 'onlyProtocol',\r\n onlyReferences = 'onlyReferences'\r\n}\r\n\r\nexport const enum displayStyle {\r\n accordion = 'accordion',\r\n table = 'table'\r\n}\r\n\r\nexport interface ITbuProductSpecificationConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n displayedData?: displayedData;\r\n formHiddenFieldId?: string;\r\n displayStyle?: displayStyle;\r\n className?: string;\r\n}\r\n\r\nexport interface ITbuProductSpecificationResources {\r\n trueValueText: string;\r\n falseValueText: 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 ITbuProductSpecificationProps extends Msdyn365.IModule {\r\n resources: ITbuProductSpecificationResources;\r\n config: ITbuProductSpecificationConfig;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt 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';\r\nimport { Drawer, IModuleProps, INodeProps, Module } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { reaction } from 'mobx'; //computed\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { AttributesForSelectedVariantInput, getAttributesForSelectedVariant } from '@msdyn365-commerce-modules/product-specification';\r\nimport { ProductSpecificationTableRow } from './components/tbu-product-specification-table-stucture';\r\nimport { ITbuProductSpecificationData } from './tbu-product-specification.data';\r\nimport { displayStyle, ITbuProductSpecificationProps, displayedData } from './tbu-product-specification.props.autogenerated';\r\n//DYN DKNimport { processFiscalIntegrationFiscalServiceReadDataResultAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\n/**\r\n * Maintain Drawer State.\r\n */\r\nexport interface IProductSpecificationState {\r\n isDrawerOpen: boolean;\r\n drawerListId: number | undefined;\r\n clamped: boolean;\r\n variantDescription: string;\r\n variantDescriptionExcerpt: string;\r\n collapseSpecifications: boolean;\r\n}\r\n\r\n/**\r\n * Product specification view props.\r\n */\r\nexport interface IProductSpecificationViewProps extends ITbuProductSpecificationProps<{}> {\r\n ProductSpecification: IModuleProps;\r\n ProductSpecificationTableProps: INodeProps;\r\n ProductSpecificationTableBodyProps: INodeProps;\r\n productSpecificationResult?: (JSX.Element | null)[];\r\n productSpecificationSection: JSX.Element;\r\n title?: React.ReactNode;\r\n isAccrodion?: boolean;\r\n handleText?(event: Msdyn365.ContentEditableEvent): void;\r\n isDatasheetFormActive: boolean;\r\n datasheetOriginInfo: string;\r\n formHiddenFieldId: string;\r\n}\r\n\r\n/**\r\n * Check for display style either accordion or table.\r\n */\r\nexport interface IProductSpecificationExtentedProps extends ITbuProductSpecificationProps {\r\n displayStyle?: displayStyle;\r\n formHiddenFieldId?: string;\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 drawerListId: undefined,\r\n clamped: false,\r\n variantDescription: '',\r\n variantDescriptionExcerpt: '',\r\n collapseSpecifications: true\r\n };\r\n }\r\n\r\n public productCategory: string = '';\r\n\r\n public async componentDidMount(): Promise {\r\n const { context, data, telemetry } = this.props;\r\n\r\n const categoryPaths = data.categoryPaths.result;\r\n if (categoryPaths && categoryPaths.length > 0) {\r\n const categoryName = categoryPaths[categoryPaths.length - 1].Name ?? '';\r\n this.productCategory = categoryName === 'Products' ? 'All products' : categoryName;\r\n }\r\n\r\n this._setVariantDescription(data);\r\n\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 );\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 this._setVariantDescription(this.props.data);\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: ITbuProductSpecificationData;\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 const err = error as Error;\r\n return (
{err.message}
) as React.ReactElement;\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 let countDatasheet = 0;\r\n const specs = data.productSpecificationData.result ?? null;\r\n if (specs && specs.length > 0) {\r\n for (var i = 0; i++; i < specs.length) {\r\n if (\r\n (specs[i].Name === 'Datasheet Link' || specs[i].Name === 'Datasheet_Link') &&\r\n specs[i].DataTypeValue === 5 &&\r\n specs[i].TextValue !== undefined &&\r\n specs[i].TextValue !== null &&\r\n specs[i].TextValue !== ''\r\n ) {\r\n countDatasheet++;\r\n }\r\n }\r\n }\r\n\r\n const supplierName = data.productSpecificationData.result?.find(attribute => attribute.Name === 'Supplier name')?.TextValue ?? '';\r\n const catalogNumber = data.productSpecificationData.result?.find(attribute => attribute.Name === 'Catalog Number')?.TextValue ?? '';\r\n const datasheetOriginInfo = `${supplierName}, ${catalogNumber}`;\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\r\n productSpecificationResult: isAccrodion ? this._createDrawerBody(data) : this._createTableBody(data),\r\n productSpecificationSection: this._createSpecificationSection(data),\r\n isDatasheetFormActive: countDatasheet > 0 ? false : true,\r\n datasheetOriginInfo: datasheetOriginInfo,\r\n formHiddenFieldId: this.props.config.formHiddenFieldId ?? ''\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 // @computed get sortedSpecifications() {\r\n // let results = this.props.data.productSpecificationData.result ?? [];\r\n // return results.sort((a, b) => ((a.Name?.toLowerCase() ?? '') > (b.Name?.toLowerCase() ?? '') ? 1 : -1));\r\n // }\r\n\r\n private _createSpecificationSection(content: ITbuProductSpecificationData): JSX.Element | null {\r\n // Only Datasheet\r\n let countDatasheet = 0;\r\n if (this.props.config.displayedData === displayedData.onlyDatasheet) {\r\n const datasheet = content.productSpecificationData.result?.map((product, index) => {\r\n if (\r\n (product.Name === 'Datasheet Link' || product.Name === 'Datasheet_Link') &&\r\n product.DataTypeValue === 5 &&\r\n product.TextValue !== undefined &&\r\n product.TextValue !== null &&\r\n product.TextValue !== ''\r\n ) {\r\n countDatasheet++;\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n });\r\n\r\n // Datasheet request form\r\n if (countDatasheet === 0) {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {datasheet}\r\n \r\n );\r\n }\r\n\r\n // Only MSDS\r\n if (this.props.config.displayedData === displayedData.onlyMSDS) {\r\n let countMSDS = 0;\r\n const msds = content.productSpecificationData.result?.map((product, index) => {\r\n if (\r\n (product.Name === 'MSDS Link' || product.Name === 'MSDS_Link') &&\r\n product.DataTypeValue === 5 &&\r\n product.TextValue !== undefined &&\r\n product.TextValue !== null &&\r\n product.TextValue !== ''\r\n ) {\r\n countMSDS++;\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n });\r\n\r\n if (countMSDS > 0) {\r\n return (\r\n \r\n {msds}\r\n \r\n );\r\n }\r\n\r\n return ;\r\n }\r\n\r\n // Only Protocol\r\n if (this.props.config.displayedData === displayedData.onlyProtocol) {\r\n let countProtocol = 0;\r\n const protocol = content.productSpecificationData.result?.map((product, index) => {\r\n if (\r\n product.Name === 'Protocol' &&\r\n product.DataTypeValue === 5 &&\r\n product.TextValue !== undefined &&\r\n product.TextValue !== null &&\r\n product.TextValue !== ''\r\n ) {\r\n countProtocol++;\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n });\r\n\r\n if (countProtocol > 0) {\r\n return (\r\n \r\n {protocol}\r\n \r\n );\r\n }\r\n\r\n return ;\r\n }\r\n\r\n // Only References\r\n if (this.props.config.displayedData === displayedData.onlyReferences) {\r\n let existReferences = false;\r\n const references = content.productSpecificationData.result?.map((product, index) => {\r\n if (\r\n (product.Name === 'Citations & References' || product.Name === 'Citations_References') &&\r\n product.DataTypeValue === 5 &&\r\n product.TextValue !== undefined &&\r\n product.TextValue !== null &&\r\n product.TextValue !== ''\r\n ) {\r\n //const html = stringToHTML(product.TextValue);\r\n existReferences = true;\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n return existReferences ? (\r\n \r\n

Citations & references

\r\n
{references}
\r\n
\r\n ) : (\r\n \r\n );\r\n }\r\n\r\n // default allSpecifications\r\n //debugger;\r\n let countDefaultSpecifications = 0;\r\n const maxDisplayedDefaultSpecifications = 10;\r\n if (this.props.config.displayedData === displayedData.allSpecifications) {\r\n const specifications = content.productSpecificationData.result?.map((product, index) => {\r\n //const specifications = this.sortedSpecifications.map((product, index) => {\r\n if (!product) {\r\n return null;\r\n }\r\n const cellData: JSX.Element | null = this._renderProductCell(product);\r\n\r\n if (\r\n !cellData ||\r\n product.Name === 'Description' ||\r\n product.Name === 'ERP_MarketStatus' ||\r\n product.Name === 'Datasheet Link' ||\r\n product.Name === 'Datasheet_Link' ||\r\n product.Name === 'MSDS Link' ||\r\n product.Name === 'MSDS_Link' ||\r\n product.Name === 'Protocol' ||\r\n product.Name === 'Citations & References' ||\r\n product.Name === 'Citations_References' ||\r\n product.Name === 'External Item ID' ||\r\n product.Name === 'ERP_ExternalItemID' ||\r\n product.Name === 'ERP_EstimatedDate' ||\r\n product.Name === 'ERP_Sizes' ||\r\n product.Name === 'ERP_BasePrice' ||\r\n product.Name === 'Product Category' ||\r\n product.Name === 'Product Sub Category' ||\r\n product.Name?.startsWith('ERP_')\r\n ) {\r\n return null;\r\n }\r\n\r\n countDefaultSpecifications++;\r\n return this.state.collapseSpecifications && countDefaultSpecifications > maxDisplayedDefaultSpecifications ? (\r\n \r\n ) : (\r\n \r\n \r\n
{cellData}
\r\n \r\n );\r\n });\r\n\r\n const externalItemIdSpecification = content.productSpecificationData.result?.filter(\r\n specification => specification.Name === 'External Item ID' || specification.Name === 'ERP_ExternalItemID'\r\n );\r\n let externalItemId: JSX.Element | null = null;\r\n if (externalItemIdSpecification && externalItemIdSpecification[0]) {\r\n //externalItemId = this._renderProductCell(externalItemIdSpecification[0]);\r\n }\r\n\r\n return (\r\n \r\n
\r\n {/*
Specification
*/}\r\n
\r\n
\r\n {this.state.clamped ? this.state.variantDescriptionExcerpt : this.state.variantDescription}\r\n {/* {content.product.result?.MasterProductId !== null\r\n ? variantDescription\r\n : content.product.result?.Description} */}\r\n
\r\n {this.state.clamped ? (\r\n
\r\n See all description\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n
\r\n
\r\n \r\n {externalItemId ? Réf: : ''}\r\n {/* {content.product.result?.ItemId} */}\r\n {externalItemId}\r\n \r\n
\r\n
\r\n \r\n Product Sub Category : \r\n {this.productCategory}\r\n \r\n
\r\n {specifications}\r\n {countDefaultSpecifications > maxDisplayedDefaultSpecifications ? (\r\n \r\n {this.state.collapseSpecifications ? 'See all specifications' : 'See less specifications'}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n {/**/}\r\n \r\n
\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _createTableBody(content: ITbuProductSpecificationData): (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: ITbuProductSpecificationData): (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 readonly _setClamped = (): void => {\r\n this.setState({ clamped: !this.state.clamped });\r\n };\r\n\r\n private _setVariantDescription(data: ITbuProductSpecificationData): void {\r\n // const bouchon =\r\n // 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ut ultricies erat. Duis in ullamcorper odio. Pellentesque rhoncus sed magna quis sodales. Morbi quis dapibus ante, sit amet laoreet nisi. Nulla interdum ex ac justo malesuada tincidunt. In in ultrices lacus. Etiam et mi sed sem vestibulum accumsan. Proin sit amet dui sem. Sed vitae viverra mauris. Integer vitae molestie mi. Mauris pretium nibh odio, et lacinia sapien malesuada quis. Ut sit amet semper lacus, eu venenatis lacus. Maecenas dictum, elit ornare fermentum pellentesque, orci metus gravida ligula, sed scelerisque lorem odio sed neque. Nullam mattis molestie augue, vel accumsan purus. Sed ultricies nisl enim, feugiat dictum tellus fringilla sit amet. Curabitur in dignissim magna. Fusce efficitur risus vel lorem aliquet feugiat. Aliquam quis nisi blandit, maximus enim vel, ornare leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.';\r\n const maxLengthDescription = 350;\r\n const variantDescriptionSpecification = data.productSpecificationData.result?.filter(\r\n specification => specification.Name === 'Description'\r\n );\r\n if (\r\n variantDescriptionSpecification &&\r\n variantDescriptionSpecification[0] &&\r\n variantDescriptionSpecification[0].TextValue &&\r\n variantDescriptionSpecification[0].TextValue.length > maxLengthDescription\r\n ) {\r\n this.setState({\r\n clamped: true,\r\n variantDescription: variantDescriptionSpecification[0].TextValue,\r\n variantDescriptionExcerpt: `${variantDescriptionSpecification[0].TextValue.substring(0, maxLengthDescription)} ...`\r\n });\r\n } else {\r\n this.setState({\r\n clamped: false,\r\n variantDescription:\r\n variantDescriptionSpecification && variantDescriptionSpecification[0] && variantDescriptionSpecification[0].TextValue\r\n ? variantDescriptionSpecification[0].TextValue\r\n : '',\r\n variantDescriptionExcerpt:\r\n variantDescriptionSpecification && variantDescriptionSpecification[0] && variantDescriptionSpecification[0].TextValue\r\n ? variantDescriptionSpecification[0].TextValue\r\n : ''\r\n });\r\n // this.setState({\r\n // clamped: true,\r\n // variantDescription: bouchon,\r\n // variantDescriptionExcerpt: `${bouchon.substring(0, maxLengthDescription)} ...`\r\n // });\r\n }\r\n }\r\n\r\n private readonly _toggleSpecifications = (): void => {\r\n this.setState({ collapseSpecifications: !this.state.collapseSpecifications });\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 //DKNif (product.TextValue !== null && product.TextValue !== undefined) {\r\n //DKN\r\n if (\r\n product.TextValue !== null &&\r\n product.TextValue !== undefined &&\r\n product.TextValue !== '' &&\r\n product.TextValue !== 'Not specified' &&\r\n product.TextValue !== 'Button' &&\r\n product.TextValue !== 'Executive'\r\n ) {\r\n return ;\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// const stringToHTML = function (str :string) {\r\n// \tvar parser = new DOMParser();\r\n// \tvar doc = parser.parseFromString(str, 'text/html');\r\n// \treturn doc.body;\r\n// };\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\n//import { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IProductSpecificationViewProps } from './tbu-product-specification';\r\n\r\nconst ProductSpecificationView: React.FC = props => {\r\n const { productSpecificationSection, datasheetOriginInfo, formHiddenFieldId } = props;\r\n\r\n const useScriptMarketingForm = (position: string, datasheetOriginInfo: string, formHiddenFieldId: string) => {\r\n React.useEffect(() => {\r\n const placement: Element | null = document.getElementById(position);\r\n\r\n // Check if the script has already been added\r\n if (!placement?.classList.contains('script-added') && datasheetOriginInfo && formHiddenFieldId) {\r\n const script_1: HTMLScriptElement = document.createElement('script');\r\n script_1.src = 'https://mktdplp102cdn.azureedge.net/public/latest/js/form-loader.js?v=1.84.2007';\r\n script_1.type = 'text/javascript';\r\n script_1.id = 'marketing_1';\r\n placement?.appendChild(script_1);\r\n\r\n const script_2: HTMLScriptElement = document.createElement('script');\r\n script_2.src = 'https://mktdplp102cdn.azureedge.net/public/latest/js/ws-tracking.js?v=1.84.2007';\r\n script_2.type = 'text/javascript';\r\n script_2.id = 'marketing_1';\r\n placement?.appendChild(script_2);\r\n\r\n const inlineScript: HTMLScriptElement = document.createElement('script');\r\n inlineScript.type = 'text/javascript';\r\n //inlineScript.innerHTML = `console.log(\"test MSV !!!! ${datasheetOriginInfo}\")`; // Properly interpolate the dynamic content\r\n inlineScript.innerHTML = `/*MsCrmMkt.MsCrmFormLoader.on('afterFormLoad', function(event) {\r\n let datasheetOrginInfo = document.getElementById('${formHiddenFieldId}');\r\n datasheetOrginInfo.value = '${datasheetOriginInfo}';\r\n console.log('MSV 1');\r\n });*/\r\n\r\n function fallbackMarketingPopulate(){ \r\n console.log('fallbackMarketingPopulate script has begun.');\r\n let datasheetOriginInfo = document.getElementById('${formHiddenFieldId}');\r\n datasheetOriginInfo.value = '${datasheetOriginInfo}';\r\n console.log('fallbackMarketingPopulate script has finished.');\r\n }\r\n setTimeout(fallbackMarketingPopulate, 2000); `;\r\n placement?.appendChild(inlineScript);\r\n\r\n // Add a class to mark the script as added\r\n placement?.classList.add('script-added');\r\n\r\n // Attach a 'load' event listener to the last added script (inlineScript)\r\n inlineScript.addEventListener('load', () => {\r\n // The inline script is now guaranteed to be added and executed\r\n //console.log('Inline script has been executed.');\r\n });\r\n\r\n return () => {\r\n placement?.appendChild(script_1);\r\n placement?.appendChild(script_2);\r\n placement?.removeChild(inlineScript);\r\n };\r\n }\r\n // Return a dummy function for the default case\r\n return () => {};\r\n }, []);\r\n };\r\n\r\n return (\r\n \r\n {productSpecificationSection}\r\n {props.isDatasheetFormActive && useScriptMarketingForm('datasheetFormWrapper', datasheetOriginInfo, formHiddenFieldId)}\r\n {/*
*/}\r\n
\r\n );\r\n};\r\n\r\nexport default ProductSpecificationView;\r\n"],"names":["ProductSpecificationTableRow","productName","cellData","className","React","scope","dangerouslySetInnerHTML","getRichTextHtml","displayedData","displayStyle","HeadingTag","ProductSpecification","constructor","props","super","productCategory","handleHeadingChange","event","this","config","heading","text","target","value","_toggle","drawerListId","state","setState","isDrawerOpen","undefined","_setClamped","clamped","_toggleSpecifications","collapseSpecifications","variantDescription","variantDescriptionExcerpt","context","data","telemetry","categoryPaths","result","length","categoryName","Name","_setVariantDescription","reaction","product","RecordId","actionInput","AttributesForSelectedVariantInput","actionContext","requestContext","apiSettings","channelId","getAttributesForSelectedVariant","catch","error","message","debug","shouldComponentUpdate","nextProps","nextState","render","err","productSpecificationData","isAccrodion","accordion","countDatasheet","specs","i","DataTypeValue","TextValue","datasheetOriginInfo","find","attribute","viewProps","handleText","moduleProps","classnames","ProductSpecificationTableProps","tag","ProductSpecificationTableBodyProps","title","Msdyn365","editProps","onEdit","request","productSpecificationResult","_createDrawerBody","_createTableBody","productSpecificationSection","_createSpecificationSection","isDatasheetFormActive","formHiddenFieldId","renderView","content","onlyDatasheet","datasheet","map","index","id","key","href","rel","Drawer","collapseProps","timeout","isOpen","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","onlyMSDS","countMSDS","msds","onlyProtocol","countProtocol","protocol","onlyReferences","existReferences","references","countDefaultSpecifications","allSpecifications","specifications","_renderProductCell","startsWith","externalItemIdSpecification","filter","specification","externalItemId","onClick","accordionItemContainer","Module","Object","variantDescriptionSpecification","substring","_renderCurrencyCell","_renderDateTimeCell","_renderDecimalCell","_renderIntegerCell","_renderTextCell","_renderTrueFalseCell","warning","CurrencyValue","CurrencyCode","DateTimeOffsetValue","toUTCString","IntegerValue","FloatValue","BooleanValue","resources","trueValueText","falseValueText","observer","Node","position","placement","document","getElementById","classList","contains","script_1","createElement","src","type","appendChild","script_2","inlineScript","innerHTML","add","addEventListener","removeChild","useScriptMarketingForm"],"sourceRoot":""}