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E,gBAA4CnF,IAAtBQ,EAAQ2E,UAE/B1G,EAAAA,cAAA,QAAME,wBAAyB0B,EAAAA,GAAyBG,EAAQ2E,aAGpE,KAGHV,qBAAqBjE,GAGzB,OAAIA,EAAQ+E,aACD9G,EAAAA,cAAA,YAAOY,KAAKJ,MAAMuG,UAAUC,cAAgBpG,KAAKJ,MAAMuG,UAAUC,cAAgB,OAErFhH,EAAAA,cAAA,YAAOY,KAAKJ,MAAMuG,UAAUE,eAAiBrG,KAAKJ,MAAMuG,UAAUE,eAAiB,QA9S5FxD,GAAoByD,EAAAA,EAAAA,IAAA,CADzBC,EAAAA,IACK1D,GAkTN,qFC9VA,MAiBA,EAjB2EjD,IACvE,MAAM,qBAAEiD,EAAoB,+BAAEG,EAA8B,mCAAEE,EAAkC,2BAAEI,GAA+B1D,EAC3H4G,EACFlD,GACAmD,EAAAA,gBAAAA,YAA4BnD,IAC5BA,EAA2BoD,QAAOC,IAAQE,EAAAA,iBAAAA,kBAAmCF,KAEjF,OAAOH,GAAWC,EAAAA,gBAAAA,YAA4BD,GAC1CpH,EAAAA,cAAC8E,EAAAA,OAAMC,OAAAC,OAAA,GAAKvB,GACPjD,EAAMuD,MACP/D,EAAAA,cAAC6H,EAAAA,KAAI9C,OAAAC,OAAA,GAAKpB,GACN5D,EAAAA,cAAC6H,EAAAA,KAAI9C,OAAAC,OAAA,GAAKlB,GAAqCsD,KAGvD,aCzBR2F,EAAOC,QAAUhN,cCAjB+M,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/lobas-product-specification/components/lobas-product-specification-table-stucture.tsx?6829","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-product-specification/lobas-product-specification.props.autogenerated.ts?be30","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-product-specification/lobas-product-specification.tsx?a9f6","webpack://Msdyn365.Commerce.Online/./src/modules/lobas-product-specification/lobas-product-specification.view.tsx?da9a","webpack://Msdyn365.Commerce.Online/./lib/lobas-product-specification/module-registration.js?669e","webpack://Msdyn365.Commerce.Online/./src/dataActions/get-attributes-for-selected-variant.ts?e4b6","webpack://Msdyn365.Commerce.Online/./src/modules/product-specification/components/product-specification-table-stucture.tsx?c1c4","webpack://Msdyn365.Commerce.Online/./src/modules/product-specification/product-specification.tsx?6583","webpack://Msdyn365.Commerce.Online/./src/modules/product-specification/product-specification.view.tsx?7490","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) 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 * ILobasProductSpecification 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 ILobasProductSpecificationConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n displayStyle?: displayStyle;\r\n className?: string;\r\n clientRender?: boolean;\r\n exludedAttributes?: string[];\r\n}\r\n\r\nexport interface ILobasProductSpecificationResources {\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 ILobasProductSpecificationProps extends Msdyn365.IModule {\r\n resources: ILobasProductSpecificationResources;\r\n config: ILobasProductSpecificationConfig;\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/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 { AttributesForSelectedVariantInput, getAttributesForSelectedVariant } from '@msdyn365-commerce-modules/product-specification';\r\nimport { ProductSpecificationTableRow } from './components/lobas-product-specification-table-stucture';\r\nimport { ILobasProductSpecificationData } from './lobas-product-specification.data';\r\nimport { displayStyle, ILobasProductSpecificationProps } from './lobas-product-specification.props.autogenerated';\r\n\r\n/**\r\n * Maintain Drawer State.\r\n */\r\nexport interface ILobasProductSpecificationState {\r\n isDrawerOpen: boolean;\r\n drawerListId: number | undefined;\r\n}\r\n\r\n/**\r\n * Product specification view props.\r\n */\r\nexport interface ILobasProductSpecificationViewProps extends ILobasProductSpecificationProps<{}> {\r\n ProductSpecification: IModuleProps;\r\n ProductSpecificationTableProps: INodeProps;\r\n ProductSpecificationTableBodyProps: INodeProps;\r\n productSpecificationResult?: (JSX.Element | null)[];\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 ILobasProductSpecificationExtentedProps extends ILobasProductSpecificationProps {\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 LobasProductSpecification extends React.Component {\r\n public constructor(props: ILobasProductSpecificationExtentedProps) {\r\n super(props);\r\n this.state = {\r\n isDrawerOpen: 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 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: ILobasProductSpecificationExtentedProps, nextState: ILobasProductSpecificationState): 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: ILobasProductSpecificationData;\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 isAccrodion = this.props.config.displayStyle === displayStyle.accordion;\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 } as ILobasProductSpecificationViewProps;\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: ILobasProductSpecificationData): (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: ILobasProductSpecificationData): (JSX.Element | null)[] {\r\n const accordionItemContainer: IModuleProps = {\r\n moduleProps: this.props,\r\n className: 'ms-product-specification-title'\r\n };\r\n return content.productSpecificationData.result!.map(product => {\r\n const cellData: JSX.Element | null = this._renderProductCell(product);\r\n if (!cellData) {\r\n return null;\r\n }\r\n return (\r\n \r\n \r\n
{cellData}
\r\n \r\n
\r\n );\r\n });\r\n }\r\n\r\n private readonly _toggle = (drawerListId: number | undefined) => (): void => {\r\n if (this.state.drawerListId !== drawerListId) {\r\n this.setState({ drawerListId, isDrawerOpen: true });\r\n } else {\r\n this.setState({ drawerListId: undefined, isDrawerOpen: false });\r\n }\r\n };\r\n\r\n private _renderProductCell(product: AttributeValue): JSX.Element | null {\r\n 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 && product.CurrencyValue !== 0) {\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 && product.IntegerValue !== 0) {\r\n return (\r\n
\r\n {product.IntegerValue}\r\n {product.UnitOfMeasureSymbol}\r\n
\r\n );\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 && product.FloatValue !== 0) {\r\n return (\r\n
\r\n {product.FloatValue}\r\n {product.UnitOfMeasureSymbol}\r\n
\r\n );\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 && product.TextValue !== '') {\r\n const values = product.TextValue.split('|');\r\n const classname = values.length > 1 ? 'lobas-attribute-text' : '';\r\n\r\n if (values.length > 1) {\r\n const data = values.map((text, index) => {\r\n return (\r\n \r\n );\r\n });\r\n\r\n return
{data}
;\r\n } else {\r\n return ;\r\n }\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 LobasProductSpecification;\r\n","/* eslint-disable no-debugger */\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 { 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 { ILobasProductSpecificationViewProps } from './lobas-product-specification';\r\n\r\nconst ProductSpecificationView: React.FC = props => {\r\n const {\r\n ProductSpecification,\r\n ProductSpecificationTableProps,\r\n ProductSpecificationTableBodyProps,\r\n productSpecificationResult,\r\n config\r\n } = props;\r\n\r\n const rowdata =\r\n productSpecificationResult &&\r\n ArrayExtensions.hasElements(productSpecificationResult) &&\r\n productSpecificationResult.filter(\r\n row =>\r\n !ObjectExtensions.isNullOrUndefined(row) &&\r\n !config.exludedAttributes?.includes(row.props.productName) &&\r\n !(row.props.cellData.props.dangerouslySetInnerHTML === undefined && row.props.cellData.props.children === undefined) &&\r\n !(row.props.cellData.props.children === 0)\r\n );\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['lobas-product-specification'] = {\n c: () => require('partner/modules/lobas-product-specification/lobas-product-specification.tsx'),\n $type: 'contentModule',\n da: [{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: 'lobas-product-specification',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/lobas-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-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|lobas-product-specification|lobas-product-specification'] = {\n c: () => require('partner/modules/lobas-product-specification/lobas-product-specification.view.tsx'),\n cn: '__local__-__local__-lobas-product-specification'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { AttributeValue, ProductsDataActions, SimpleProduct, StoreOperationsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n getAttributeValuesByConfiguration,\n getSelectedProductIdFromActionInput,\n getSelectedVariant,\n QueryResultSettingsProxy,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Chains getting the SelectedVariant with GetActivePrice.\n */\nexport class AttributesForSelectedVariantInput implements IActionInput {\n public productId: number;\n\n public channelId: number;\n\n public catalogId: number;\n\n public selectedProduct: SimpleProduct | undefined;\n\n constructor(productId: number, channelId: number, selectedProduct?: SimpleProduct, catalogId?: number) {\n this.productId = productId;\n this.channelId = channelId;\n this.selectedProduct = selectedProduct;\n this.catalogId = catalogId || 0;\n }\n\n public getCacheKey = () => 'AttributesForSelectedVariant';\n\n public getCacheObjectType = () => 'ProductAttributeValue';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport const createAttributesForSelectedVariantInput = (\n inputData: ICreateActionContext>\n): AttributesForSelectedVariantInput => {\n const productId = getSelectedProductIdFromActionInput(inputData);\n const catalogId = getCatalogId(inputData.requestContext);\n\n if (productId) {\n return new AttributesForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId, undefined, catalogId);\n }\n throw new Error('Unable to create PriceForSelectedVariantInput, no productId found on module config or query');\n};\n\n/**\n * Calls the Retail API a get a list of dimension values for a given product.\n * @param input - The input.\n * @param context - The context.\n * @returns The attribute values.\n */\nexport async function getAttributesForSelectedVariantAction(\n input: AttributesForSelectedVariantInput,\n context: IActionContext\n): Promise {\n return Promise.resolve()\n .then(() => {\n const activeProduct: SimpleProduct | undefined = input.selectedProduct;\n\n if (!activeProduct) {\n const selectedVariantInput = new SelectedVariantInput(\n input.productId,\n input.channelId,\n undefined,\n undefined,\n context.requestContext\n );\n\n return getSelectedVariant(selectedVariantInput, context);\n }\n\n return activeProduct;\n })\n .then((productResult: SimpleProduct | null) => {\n const activeProduct: SimpleProduct | undefined = productResult;\n\n if (activeProduct) {\n return ProductsDataActions.getAttributeValuesAsync(\n {\n callerContext: context,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\n },\n activeProduct.RecordId,\n input.channelId,\n input.catalogId\n );\n }\n\n return null;\n })\n .then(async (attributeValues: AttributeValue[] | null) => {\n const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\n callerContext: context\n });\n\n return { attributeValues, channelInventoryConfiguration };\n })\n .then(result => {\n return getAttributeValuesByConfiguration(result.attributeValues, result.channelInventoryConfiguration);\n })\n .catch((error: Error) => {\n context.trace(error.message);\n throw new Error('[getPriceForSelectedVariantAction]Error executing action');\n });\n}\n\nexport default createObservableDataAction({\n id: '@msdyn365-commerce-modules/product-info/get-attributes-for-selected-variant',\n action: >getAttributesForSelectedVariantAction,\n input: createAttributesForSelectedVariantInput\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\n/**\n * Product specification table row.\n */\nexport interface IProductSpecificationTableRow {\n productName?: string;\n cellData?: React.ReactNode;\n className?: string;\n}\n\n/**\n * Product specification table row component.\n * @param props - For product specification table row.\n * @param props.productName - Product name.\n * @param props.cellData - Cell data.\n * @param props.className - Class name.\n * @returns - Returns JSX element.\n */\nexport const ProductSpecificationTableRow: React.FC = ({ productName, cellData, className }) => (\n \n \n {/* eslint-disable-next-line react/no-danger */}\n \n \n {cellData}\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Drawer, IModuleProps, INodeProps, Module } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { AttributesForSelectedVariantInput, getAttributesForSelectedVariant } from '../..';\nimport { ProductSpecificationTableRow } from './components/product-specification-table-stucture';\nimport { IProductSpecificationData } from './product-specification.data';\nimport { displayStyle, IProductSpecificationProps } from './product-specification.props.autogenerated';\n\n/**\n * Maintain Drawer State.\n */\nexport interface IProductSpecificationState {\n isDrawerOpen: boolean;\n isAdditionalMediaDrawerOpen: boolean;\n drawerListId: number | undefined;\n}\n\n/**\n * Product specification view props.\n */\nexport interface IProductSpecificationViewProps extends IProductSpecificationProps<{}> {\n ProductSpecification: IModuleProps;\n ProductSpecificationTableProps: INodeProps;\n ProductSpecificationTableBodyProps: INodeProps;\n productSpecificationResult?: (JSX.Element | null)[];\n\n title?: React.ReactNode;\n isAccrodion?: boolean;\n handleText?(event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * Check for display style either accordion or table.\n */\nexport interface IProductSpecificationExtentedProps extends IProductSpecificationProps {\n displayStyle?: displayStyle;\n}\n\n/**\n *\n * ProductSpecification component.\n * @extends {React.Component>}\n */\n@observer\nclass ProductSpecification extends React.Component {\n public constructor(props: IProductSpecificationExtentedProps) {\n super(props);\n this.state = {\n isDrawerOpen: false,\n isAdditionalMediaDrawerOpen: false,\n drawerListId: undefined\n };\n }\n\n public async componentDidMount(): Promise {\n const { context, data, telemetry } = this.props;\n const catalogId = Msdyn365.getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n reaction(\n () => (data.product.result ? data.product.result.RecordId : null),\n () => {\n if (context && data.product.result) {\n const actionInput = new AttributesForSelectedVariantInput(\n data.product.result.RecordId,\n\n +context.actionContext.requestContext.apiSettings.channelId,\n data.product.result,\n catalogId\n );\n\n getAttributesForSelectedVariant(actionInput, this.props.context.actionContext).catch((error: Error) => {\n telemetry.error(error.message);\n telemetry.debug('Unable to update attributes for Product');\n telemetry.error(error.message);\n });\n }\n }\n );\n }\n\n public shouldComponentUpdate(nextProps: IProductSpecificationExtentedProps, nextState: IProductSpecificationState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n let data: IProductSpecificationData;\n try {\n data = this.props.data;\n } catch (error) {\n this.props.telemetry.error(`Something went wrong ------${error}`);\n return
{error}
;\n }\n\n if (!data.productSpecificationData.result || data.productSpecificationData.result.length <= 0) {\n this.props.telemetry.error('Product specification content is empty, module wont render.');\n return null;\n }\n\n const { heading, className } = this.props.config;\n const { productSpecificationData } = this.props.data;\n const isAccrodion = this.props.config.displayStyle === displayStyle.accordion;\n const viewProps = {\n ...this.props,\n handleText: this.handleHeadingChange,\n ProductSpecification: {\n moduleProps: this.props,\n className: classnames('ms-product-specification', className)\n },\n ProductSpecificationTableProps: isAccrodion\n ? {\n moduleProps: this.props,\n className: classnames('ms-product-specification__accordion', className)\n }\n : {\n className: classnames('ms-product-specification__table table-striped table-bordered'),\n tag: 'table'\n },\n isAccrodion,\n ProductSpecificationTableBodyProps: isAccrodion\n ? {}\n : {\n className: '',\n tag: 'tbody'\n },\n title: heading?.text && (\n \n ),\n productSpecificationResult:\n productSpecificationData.result && (isAccrodion ? this._createDrawerBody(data) : this._createTableBody(data))\n } as IProductSpecificationViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle Heading Text Change.\n * @param event - Current event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n private _createTableBody(content: IProductSpecificationData): (JSX.Element | null)[] {\n const tableRows = content.productSpecificationData.result!.map((product, index) => {\n const cellData: JSX.Element | null = this._renderProductCell(product);\n\n if (!cellData) {\n return null;\n }\n\n return (\n <>\n \n \n );\n });\n\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\n tableRows.push(this._createAdditionalMediaDrawer());\n }\n\n return tableRows;\n }\n\n private _createDrawerBody(content: IProductSpecificationData): (JSX.Element | null)[] {\n const accordionItemContainer: IModuleProps = {\n moduleProps: this.props,\n className: 'ms-product-specification-title'\n };\n\n const drawers = content.productSpecificationData.result!.map(product => {\n const cellData: JSX.Element | null = this._renderProductCell(product);\n if (!cellData) {\n return null;\n }\n return (\n \n \n
{cellData}
\n \n
\n );\n });\n\n if (this.props.context.request.app?.config?.OmniChannelMedia && this.props.data.additionalMediaLocations.result?.length) {\n drawers.push(this._createAdditionalMediaDrawer());\n }\n\n return drawers;\n }\n private _createAdditionalMediaDrawer(): JSX.Element {\n const accordionItemContainer: IModuleProps = {\n moduleProps: this.props,\n className: 'ms-product-specification-title'\n };\n\n return (\n \n {\n this.setState(prevState => ({\n ...prevState,\n isAdditionalMediaDrawerOpen: !prevState.isAdditionalMediaDrawerOpen\n }));\n }}\n >\n
\n \n
\n \n
\n );\n }\n\n private readonly _toggle = (drawerListId: number | undefined) => (): void => {\n if (this.state.drawerListId !== drawerListId) {\n this.setState({ drawerListId, isDrawerOpen: true });\n } else {\n this.setState({ drawerListId: undefined, isDrawerOpen: false });\n }\n };\n\n private _renderProductCell(product: AttributeValue): JSX.Element | null {\n switch (product.DataTypeValue) {\n case 0: // None\n // Return span here instead of null so the row still shows\n return ;\n case 1: // Currency\n return this._renderCurrencyCell(product);\n case 2: // DateTime\n return this._renderDateTimeCell(product);\n case 3: // Decimal\n return this._renderDecimalCell(product);\n case 4: // Integer\n return this._renderIntegerCell(product);\n case 5: // Text\n return this._renderTextCell(product);\n case 6: // TrueFalse\n return this._renderTrueFalseCell(product);\n case 40: // Video\n this.props.telemetry.warning('Got video specification type, not supported yet so skipping line');\n return null;\n case 41: // Image\n this.props.telemetry.warning('Got image specification type, not supported yet so skipping line');\n return null;\n default:\n this.props.telemetry.warning(`Got unknown specification type ${product.DataTypeValue} so skipping line`);\n return null;\n }\n }\n\n private _renderCurrencyCell(product: AttributeValue): JSX.Element | null {\n if (product.CurrencyValue !== null && product.CurrencyValue !== undefined) {\n return (\n \n {product.CurrencyCode}\n {product.CurrencyValue}\n \n );\n }\n\n return null;\n }\n\n private _renderDateTimeCell(product: AttributeValue): JSX.Element | null {\n if (product.DateTimeOffsetValue?.toUTCString) {\n return {product.DateTimeOffsetValue.toUTCString()};\n }\n\n return null;\n }\n\n private _renderIntegerCell(product: AttributeValue): JSX.Element | null {\n if (product.IntegerValue !== null && product.IntegerValue !== undefined) {\n return {product.IntegerValue};\n }\n\n return null;\n }\n\n private _renderDecimalCell(product: AttributeValue): JSX.Element | null {\n if (product.FloatValue !== null && product.FloatValue !== undefined) {\n return {product.FloatValue};\n }\n\n return null;\n }\n\n private _renderTextCell(product: AttributeValue): JSX.Element | null {\n if (product.TextValue !== null && product.TextValue !== undefined) {\n // eslint-disable-next-line react/no-danger\n return ;\n }\n\n return null;\n }\n\n private _renderTrueFalseCell(product: AttributeValue): JSX.Element | null {\n // TODO 20369885 setting to default value is needed to work around a platform bug where\n // config string value does not get its default value.\n if (product.BooleanValue) {\n return {this.props.resources.trueValueText ? this.props.resources.trueValueText : 'Yes'};\n }\n return {this.props.resources.falseValueText ? this.props.resources.falseValueText : 'No'};\n }\n}\n\nexport default ProductSpecification;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductSpecificationViewProps } from './product-specification';\n\nconst ProductSpecificationView: React.FC = props => {\n const { ProductSpecification, ProductSpecificationTableProps, ProductSpecificationTableBodyProps, productSpecificationResult } = props;\n const rowdata =\n productSpecificationResult &&\n ArrayExtensions.hasElements(productSpecificationResult) &&\n productSpecificationResult.filter(row => !ObjectExtensions.isNullOrUndefined(row));\n\n return rowdata && ArrayExtensions.hasElements(rowdata) ? (\n \n {props.title}\n \n {rowdata}\n \n \n ) : null;\n};\n\nexport default ProductSpecificationView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["ProductSpecificationTableRow","_ref","productName","cellData","className","React","scope","dangerouslySetInnerHTML","getRichTextHtml","displayStyle","HeadingTag","LobasProductSpecification","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","_toggle","drawerListId","state","setState","isDrawerOpen","undefined","context","data","telemetry","catalogId","Msdyn365","request","reaction","product","result","RecordId","actionInput","AttributesForSelectedVariantInput","actionContext","requestContext","apiSettings","channelId","getAttributesForSelectedVariant","catch","error","message","debug","shouldComponentUpdate","nextProps","nextState","render","_heading$tag","productSpecificationData","length","isAccrodion","accordion","viewProps","_objectSpread","handleText","ProductSpecification","moduleProps","classnames","ProductSpecificationTableProps","tag","ProductSpecificationTableBodyProps","title","editProps","onEdit","productSpecificationResult","_createDrawerBody","_createTableBody","renderView","content","map","index","_renderProductCell","key","Name","accordionItemContainer","_product$Name","Module","Object","assign","Drawer","collapseProps","timeout","isOpen","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","DataTypeValue","_renderCurrencyCell","_renderDateTimeCell","_renderDecimalCell","_renderIntegerCell","_renderTextCell","_renderTrueFalseCell","warning","CurrencyValue","CurrencyCode","_product$DateTimeOffs","DateTimeOffsetValue","toUTCString","IntegerValue","UnitOfMeasureSymbol","FloatValue","TextValue","values","split","classname","BooleanValue","resources","trueValueText","falseValueText","__decorate","observer","rowdata","ArrayExtensions","filter","row","_config$exludedAttrib","ObjectExtensions","exludedAttributes","includes","children","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","queryResultSettings","QueryResultSettingsProxy","attributeValues","channelInventoryConfiguration","StoreOperationsDataActions","getAttributeValuesByConfiguration","trace","createObservableDataAction","action","isAdditionalMediaDrawerOpen","validateCatalogId","_this$props$context$r","_this$props$context$r2","_this$props$data$addi","tableRows","app","OmniChannelMedia","additionalMediaLocations","push","_createAdditionalMediaDrawer","_this$props$context$r3","_this$props$context$r4","_this$props$data$addi2","drawers","additionalDownloadsText","prevState","mediaLocation","Uri","href","download","AltText","module","exports","ReactDOM"],"sourceRoot":""}