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,GADAL,EAAQE,YAAYE,GAAuBC,GACtCL,EAAQE,YAAYE,GAAqBE,QAC1C,MAAM,IAAIC,MAAM,oBAAsBH,EAAsB,mCAEhEJ,EAAQE,YAAYE,GAAqBE,QAAQE,UAAUC,eAAiBL,EACxEJ,EAAQE,YAAYE,GAAqBE,QAAQE,UAAU7L,KAC3DqL,EAAQE,YAAYF,EAAQE,YAAYE,GAAqBE,QAAQE,UAAU7L,IAAMyL,IAMhGJ,EAAQC,QAAQ,uBAAyB,CACtCS,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,gBACPC,GAAI,CAAC,CAACC,KAAK,UAAYC,KAAK,0EAA2EC,MAAO,GAAG,CAACF,KAAK,2BAA6BC,KAAK,yFAA0FC,MAAO,IAE1PC,KAAK,EACLC,GAAI,YACJC,EAAG,sBACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,mCAOAnB,EAF4B,yFACXQ,EAAQ,MAQzBR,EAF4B,0EACXQ,EAAQ,KAMjCY,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAavB,QAAOwB,EAAAA,EAAA,GACpBF,OAAOC,aAAavB,SAAW,IAC/BD,EAAQC,SAGXsB,OAAOC,aAAatB,YAAWuB,EAAAA,EAAA,GAC5BF,OAAOC,aAAatB,aAAe,IACnCF,EAAQE,c,mBChFnBwB,EAAOC,QAAU7N,O,oBCAjB4N,EAAOC,QAAUC,W","sources":["webpack://bju-press/./src/modules/buybox-kit-selector/buybox-kit-selector.tsx?ab6c","webpack://bju-press/./src/utilities/class-name-helper.ts?dd10","webpack://bju-press/./src/utilities/data-attribute-parser.ts?7345","webpack://bju-press/./src/utilities/global-constants.ts?5882","webpack://bju-press/./lib/buybox-kit-selector/module-registration.js?05e0","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/external var \"ReactDOM\"?853b"],"sourcesContent":["//==============================================================================\r\n// Buybox Kit Selector\r\n//\r\n// Displays steps with product options that lead to the corresponding product\r\n// page.\r\n//==============================================================================\r\nimport * as React from 'react';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport classnames from 'classnames';\r\n\r\nimport { getCatalogId } from '@msdyn365-commerce/core';\r\nimport { ProductSearchResult, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\nimport { clsHelper } from '../../utilities/class-name-helper';\r\nimport { attrNames } from '../../utilities/global-constants';\r\nimport { convertProductAttributes, AttributesWithMetadata } from '../../utilities/data-attribute-parser';\r\n\r\nimport { IBuyboxKitSelectorData } from './buybox-kit-selector.data';\r\nimport { IBuyboxKitSelectorProps } from './buybox-kit-selector.props.autogenerated';\r\n\r\n//==============================================================================\r\n// INTERFACES\r\n//==============================================================================\r\nexport interface SelectorMap {\r\n format: string;\r\n itemId: string;\r\n productName?: string;\r\n productPath?: string;\r\n}\r\n\r\nexport interface OptionObject {\r\n id: string;\r\n label: string;\r\n}\r\n\r\nexport interface StepObject {\r\n label: string;\r\n options: OptionObject[];\r\n}\r\n\r\nexport const enum KitFormat {\r\n onlineText = 'ONLINE-TEXT', // Online with textbooks and tests\r\n dvdText = 'DVD-TEXT', // DVD with textbooks and tests\r\n online = 'ONLINE', // Online without textbooks and tests\r\n dvd = 'DVD', // DVD without textbooks and tests\r\n text = 'TEXT', // Textbooks\r\n complete = 'COMPLETE', // Complete kit (student + teacher)\r\n student = 'STUDENT', // Student\r\n teacher = 'TEACHER' // Teacher\r\n}\r\n\r\n//==============================================================================\r\n// CLASS NAME UTILITY\r\n//==============================================================================\r\nconst BASE_CLASS = 'buybox-kit-selector';\r\nconst cls = (fragment?: string) => clsHelper(BASE_CLASS, fragment);\r\n\r\n//==============================================================================\r\n// CLASS DEFINITION\r\n//==============================================================================\r\n/**\r\n * BuyboxKitSelector component\r\n * @extends {React.Component>}\r\n */\r\n//==============================================================================\r\n@observer\r\nclass BuyboxKitSelector extends React.Component> {\r\n //==========================================================================\r\n // VARIABLES\r\n //==========================================================================\r\n @observable private productList: SelectorMap[] = [];\r\n private readonly labelFormat = this.props.config.labelFormat;\r\n private readonly labelTextInclude = this.props.config.labelTextInclude;\r\n private readonly labelTextType = this.props.config.labelTextType;\r\n private readonly resources = this.props.resources;\r\n private readonly optionsMap = {\r\n format: {\r\n text: [\r\n { id: KitFormat.onlineText, label: this.resources.buyboxKitSelector_optionOnline },\r\n { id: KitFormat.dvdText, label: this.resources.buyboxKitSelector_optionDvd },\r\n { id: KitFormat.text, label: this.resources.buyboxKitSelector_optionTextbooks }\r\n ],\r\n noText: [\r\n { id: KitFormat.online, label: this.resources.buyboxKitSelector_optionOnline },\r\n { id: KitFormat.dvd, label: this.resources.buyboxKitSelector_optionDvd },\r\n { id: KitFormat.text, label: this.resources.buyboxKitSelector_optionTextbooks }\r\n ]\r\n },\r\n text: {\r\n online: [\r\n { id: KitFormat.onlineText, label: this.resources.buyboxKitSelector_optionTextInclude },\r\n { id: KitFormat.online, label: this.resources.buyboxKitSelector_optionTextNoInclude }\r\n ],\r\n dvd: [\r\n { id: KitFormat.dvdText, label: this.resources.buyboxKitSelector_optionTextInclude },\r\n { id: KitFormat.dvd, label: this.resources.buyboxKitSelector_optionTextNoInclude }\r\n ],\r\n textbook: [\r\n { id: KitFormat.complete, label: this.resources.buyboxKitSelector_optionComplete },\r\n { id: KitFormat.student, label: this.resources.buyboxKitSelector_optionStudent },\r\n { id: KitFormat.teacher, label: this.resources.buyboxKitSelector_optionTeacher }\r\n ]\r\n }\r\n };\r\n private readonly stepMap = {\r\n [KitFormat.onlineText]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.text },\r\n { label: this.labelTextInclude, options: this.optionsMap.text.online }\r\n ],\r\n [KitFormat.online]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.noText },\r\n { label: this.labelTextInclude, options: this.optionsMap.text.online }\r\n ],\r\n [KitFormat.dvdText]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.text },\r\n { label: this.labelTextInclude, options: this.optionsMap.text.dvd }\r\n ],\r\n [KitFormat.dvd]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.noText },\r\n { label: this.labelTextInclude, options: this.optionsMap.text.dvd }\r\n ],\r\n [KitFormat.text]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.text },\r\n { label: this.labelTextType, options: this.optionsMap.text.textbook }\r\n ],\r\n [KitFormat.complete]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.text },\r\n { label: this.labelTextType, options: this.optionsMap.text.textbook }\r\n ],\r\n [KitFormat.student]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.text },\r\n { label: this.labelTextType, options: this.optionsMap.text.textbook }\r\n ],\r\n [KitFormat.teacher]: [\r\n { label: this.labelFormat, options: this.optionsMap.format.text },\r\n { label: this.labelTextType, options: this.optionsMap.text.textbook }\r\n ]\r\n };\r\n\r\n //==========================================================================\r\n // PUBLIC METHODS\r\n //==========================================================================\r\n //------------------------------------------------------\r\n // Invoked immediately after component is mounted\r\n //------------------------------------------------------\r\n public componentDidMount(): void {\r\n this._getProductList(attrNames.kitFormats);\r\n }\r\n\r\n //------------------------------------------------------\r\n // Render function\r\n //------------------------------------------------------\r\n public render(): JSX.Element | null {\r\n const { config, data } = this.props;\r\n const itemId = data.product.result?.ItemId;\r\n\r\n // If product list or item ID cannot be obtained, do not render module\r\n if (!this.productList.length || !itemId) {\r\n return null;\r\n }\r\n\r\n const selectedFormat = this._findSelectedFormat(this.productList, itemId);\r\n\r\n return (\r\n
\r\n {selectedFormat && this._renderSteps(selectedFormat)}\r\n
\r\n );\r\n }\r\n\r\n //==========================================================================\r\n // PRIVATE METHODS\r\n //==========================================================================\r\n //------------------------------------------------------\r\n // Render steps\r\n //------------------------------------------------------\r\n private readonly _renderSteps = (selectedFormat: SelectorMap): JSX.Element[] => {\r\n return this.stepMap[selectedFormat.format].map((step: StepObject, index: number) => {\r\n return (\r\n \r\n {this._renderStep(step, index, selectedFormat)}\r\n \r\n );\r\n });\r\n };\r\n\r\n //------------------------------------------------------\r\n // Render each step\r\n //------------------------------------------------------\r\n private readonly _renderStep = (step: StepObject, index: number, selectedFormat: SelectorMap): JSX.Element => {\r\n return (\r\n
\r\n {this._renderStepHeading(step, index)}\r\n {this._renderStepOptions(step, selectedFormat)}\r\n
\r\n );\r\n };\r\n\r\n //------------------------------------------------------\r\n // Render step heading\r\n //------------------------------------------------------\r\n private readonly _renderStepHeading = (step: StepObject, index: number): JSX.Element | null => {\r\n // Only return step label if set up in config\r\n if (step.label) {\r\n const { resources } = this.props;\r\n\r\n return (\r\n
\r\n \r\n {resources.buyboxKitSelector_stepLabel} {String(index + 1)}:\r\n \r\n \r\n {step.label}\r\n \r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n //------------------------------------------------------\r\n // Render step options\r\n //------------------------------------------------------\r\n private readonly _renderStepOptions = (step: StepObject, selectedFormat: SelectorMap): JSX.Element => {\r\n return (\r\n
\r\n {step.options.map((option: OptionObject, index: number) => {\r\n return (\r\n \r\n {this._renderStepOption(option, selectedFormat)}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n };\r\n\r\n //------------------------------------------------------\r\n // Render each option for step\r\n //------------------------------------------------------\r\n private readonly _renderStepOption = (option: OptionObject, selectedFormat: SelectorMap): JSX.Element | null => {\r\n\r\n // added textbook only support\r\n let optionId = option.id;\r\n if (option.id === KitFormat.text) {\r\n if (selectedFormat.format === KitFormat.student || selectedFormat.format === KitFormat.teacher || selectedFormat.format === KitFormat.complete) {\r\n optionId = selectedFormat.format;\r\n } else {\r\n optionId = KitFormat.complete;\r\n }\r\n }\r\n const optionItem = this.productList.find(product => product.format === optionId);\r\n const optionName = optionItem?.productName;\r\n const optionPath = optionItem?.productPath;\r\n\r\n // Only render option link if item path for it exists\r\n if (optionPath) {\r\n const isActive = selectedFormat.format === optionId;\r\n\r\n return (\r\n \r\n {option.label}\r\n \r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n //------------------------------------------------------\r\n // Find selected format from item ID\r\n //------------------------------------------------------\r\n private readonly _findSelectedFormat = (convertedData: SelectorMap[], itemId: string): SelectorMap | undefined => {\r\n return convertedData.find(format => format.itemId === itemId);\r\n };\r\n\r\n //------------------------------------------------------\r\n // Parse kit selector data into a friendlier format\r\n //\r\n // Ex input data: 'ONLINE-TEXT:004000b|ONLINE:004000d|\r\n // DVD-TEXT:004000c|DVD:004000e'\r\n //------------------------------------------------------\r\n private readonly _parseSelectorData = (selectorData: string): SelectorMap[] => {\r\n return selectorData.split('|').map(property => {\r\n const splitData = property.split(':');\r\n return {\r\n format: splitData[0],\r\n itemId: splitData[splitData.length - 1]\r\n };\r\n });\r\n };\r\n\r\n //------------------------------------------------------\r\n // Get converted product attributes\r\n //------------------------------------------------------\r\n private readonly _getConvertedAttributes = (): AttributesWithMetadata | undefined => {\r\n const { data } = this.props;\r\n const productAttributes = data.productSpecificationData?.result;\r\n return productAttributes && convertProductAttributes(productAttributes);\r\n };\r\n\r\n //------------------------------------------------------\r\n // Get product list with parsed properties\r\n //------------------------------------------------------\r\n private readonly _getProductList = async (attribute: string): Promise => {\r\n const convertedAttributes = this._getConvertedAttributes();\r\n const kitAttribute = convertedAttributes && convertedAttributes[attribute] as string;\r\n const parsedAttributes = kitAttribute && this._parseSelectorData(kitAttribute);\r\n\r\n const productItemIds = parsedAttributes && parsedAttributes.map(item => item.itemId);\r\n const productList = productItemIds && await this._getProducts(productItemIds);\r\n\r\n const productResult = parsedAttributes && productList && productList.map((item: ProductSearchResult) => {\r\n const product = parsedAttributes.find(product => product.itemId === item.ItemId);\r\n const format = product?.format!;\r\n const itemId = item.ItemId!;\r\n const productName = item.Name;\r\n const productPath = this._getProductPath(item);\r\n return {format, itemId, productName, productPath};\r\n });\r\n\r\n this.productList = productResult || [];\r\n };\r\n\r\n //------------------------------------------------------\r\n // Get products from item IDs\r\n //------------------------------------------------------\r\n private readonly _getProducts = async (itemIds: string[]): Promise => {\r\n const { context } = this.props;\r\n\r\n const itemList = itemIds?.map(itemId => ({ ItemId: itemId }));\r\n\r\n // Build a ProductSearchCriteria object\r\n const criteria: ProductSearchCriteria = {\r\n ItemIds: itemList,\r\n Context: {\r\n ChannelId: context.request.apiSettings.channelId,\r\n CatalogId: getCatalogId(context.request)\r\n }\r\n };\r\n\r\n try {\r\n // Fetch search results\r\n const searchResults = await searchByCriteriaAsync({ callerContext: context.actionContext }, criteria);\r\n return searchResults;\r\n } catch (error) {\r\n if (context.telemetry) {\r\n context.telemetry.exception(error as Error);\r\n context.telemetry.debug('Unable to find products');\r\n }\r\n }\r\n\r\n return [];\r\n };\r\n\r\n //------------------------------------------------------\r\n // Format product URL path from product rec ID\r\n //------------------------------------------------------\r\n private readonly _getProductPath = (product: ProductSearchResult): string | undefined => {\r\n return `/${String(product.RecordId)}.p`;\r\n };\r\n}\r\n\r\nexport default BuyboxKitSelector;\r\n","//==============================================================================\r\n// Class Name Helper\r\n//\r\n// Tool to standardize CSS class naming in module components and elements\r\n//==============================================================================\r\n\r\nexport function clsHelper(baseClass: string, fragment?: string, separator: string = '__'): string | undefined {\r\n return fragment ? `${baseClass}${separator}${fragment}` : undefined;\r\n}\r\n","//==============================================================================\r\n// D365 OData Attribute Parser\r\n//\r\n// In creating this, it became clear that \"attributes\" is a general term.\r\n//\r\n// Product attributes are a first-class entity. They have their own dedicated\r\n// fields and schema.\r\n//\r\n// The more generic term \"attributes\" is used as a generic extension system.\r\n// Almost every entity (including Product Attributes) has an ExtensionProperties\r\n// field for jamming extra information into. In some cases, D365 handles these\r\n// natively, such as sales order line and header attributes, or customer\r\n// attributes. Attributes using ExtensionProperties use the\r\n// CommerceProperty and CommercePropertyValue types.\r\n//\r\n// A major note about ExtensionProperty-based attributes: they have fields\r\n// for many different data types, but there's no indicator as to which\r\n// of the fields is actually used. The consumer of the data is expected to\r\n// know the data type ahead of time. In the case of D365-native attribute users\r\n// such as customers and sales orders, only the string type appears to work.\r\n//\r\n// This module includes parsers for generic ExtensionProperties-based attributes\r\n// and Product Attributes. Though different Product Attribute retail server\r\n// calls use the same AttributeValue entity to transmit the data, they appear\r\n// to return different fields from that entity. Because of this, two different\r\n// parser calls are included here. They currently share the same implementation,\r\n// but by including different call signatures we have the ability to diverge\r\n// the implementations if the need arises.\r\n//\r\n// A note about Product Attributes: These contain both a friendly name,\r\n// displayed to users in back office, and an internal name. The internal name\r\n// can be the same as the friendly name, but by convention we've been pushing\r\n// for a PascalCase scheme. At present, the searchByCriteria call returns only\r\n// the unfriendly name, and the GetAttributeValues call returns only the\r\n// friendly name. We don't have a known method of correlating the two. That may\r\n// be an argument for keeping the friendly and unfriendly names identical.\r\n//==============================================================================\r\nimport {\r\n CommerceProperty, // Generic attributes stored in ExtensionProperties\r\n CommercePropertyValue, // Generic attributes stored in AttributeValue\r\n AttributeValue, AttributeDataType, // Product attributes or Product Search Result attributes\r\n CustomerAttribute, // Customer attributes\r\n IDictionary,\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\n//==============================================================================\r\n// INTERFACES AND CONSTANTS\r\n//==============================================================================\r\nexport type CommerceValueTypes = string | number | boolean | Date;\r\n\r\n// This is me giving up on proper typing. If doing this in TypeScript is possible, I don't know how.\r\n// For the key \"meta\", the type should be a hash of strings.\r\n// For all other keys, the type is a CommerceValueType.\r\nexport type AttributesWithMetadata = {\r\n [key: string]: CommerceValueTypes | IDictionary\r\n};\r\n\r\n// Type to support both internal and friendly name for attributes\r\nexport type AttributesLocalized = {\r\n [key: string]: {\r\n friendlyName?: string,\r\n value?: CommerceValueTypes | IDictionary\r\n }\r\n};\r\n\r\n// Return type for getTypeInfo()\r\ntype TypeData = {\r\n source: keyof AttributeValue,\r\n type: string,\r\n\r\n customerSource?: keyof CommercePropertyValue,\r\n};\r\n\r\n//==============================================================================\r\n// FUNCTIONS\r\n//==============================================================================\r\n\r\n//----------------------------------------------------------\r\n// This version handles ExtensionProperties conversion.\r\n//\r\n// While these have a bunch of potential fields, the value\r\n// is always stored within StringValue.\r\n// There isn't a data type field, so if the content wasn't\r\n// in StringValue we wouldn't know where to find it.\r\n//----------------------------------------------------------\r\nexport function convertExtensionProperties(attributeList: CommerceProperty[]): IDictionary {\r\n const output = {};\r\n\r\n attributeList.forEach(entry => {\r\n if (entry.Key) {\r\n output[entry.Key] = entry.Value?.StringValue; // Ecommerce seems to always use strings.\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the Name is always the friendly\r\n// name.\r\n// KeyName and ExtensionProperties aren't defined.\r\n//\r\n// These results seem to be missing CurrencyValue,\r\n// FloatValue, DateTimeOffsetValue\r\n// I don't know if those data types aren't allowed here.\r\n//\r\n// Return value: Hash of key: property values with variable\r\n// types. There is also a \"meta\" key containing a hash of\r\n// all the attribute keys and their corresponding types.\r\n//\r\n// Example:\r\n// {\r\n// flavor: 'bland',\r\n// calories: 5300,\r\n// meta: {\r\n// flavor: 'string',\r\n// calories: 'number'\r\n// }\r\n// }\r\n//----------------------------------------------------------\r\nexport function convertProductAttributes(attributeList: AttributeValue[]): AttributesWithMetadata {\r\n const output = {\r\n meta: {}\r\n };\r\n\r\n attributeList.forEach(attribute => {\r\n // These should always be present, but TypeScript insists they can be undefined.\r\n if (attribute.Name && attribute.DataTypeValue) {\r\n const typeData = getTypeInfo(attribute.DataTypeValue);\r\n output[attribute.Name] = attribute[typeData.source]; // Ecommerce seems to require strings\r\n output.meta[attribute.Name] = typeData.type;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the Name is the friendly\r\n// name while KeyName is the internal name.\r\n//\r\n// This makes use of combined attributes containing both\r\n// internal and friendly name to support localization.\r\n//\r\n// Return value: Hash of internal name keys containing an object with both the\r\n// friendly name and attribute value There is also a \"meta\" key containing a\r\n// hash of all the attribute keys and their corresponding types.\r\n//\r\n// Example:\r\n// {\r\n// flavor: {\r\n// friendlyName: Flavor,\r\n// value: 'bland'\r\n// },\r\n// calories: {\r\n// friendlyName: Calories,\r\n// value: 5300\r\n// },\r\n// meta: {\r\n// flavor: 'string',\r\n// calories: 'number'\r\n// }\r\n// }\r\n//----------------------------------------------------------\r\nexport function convertProductAttributesLocalized(attributeList: AttributeValue[]): AttributesLocalized {\r\n const output = {\r\n meta: {}\r\n };\r\n\r\n attributeList.forEach(attribute => {\r\n if (attribute.KeyName && attribute.DataTypeValue) {\r\n const typeData = getTypeInfo(attribute.DataTypeValue);\r\n output[attribute.KeyName] = {\r\n friendlyName: attribute.Name,\r\n value: attribute[typeData.source]\r\n };\r\n output.meta[attribute.KeyName] = typeData.type;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the\r\n// Name/KeyName/ExtensionProperties is always the unfriendly\r\n// name.\r\n//\r\n// These results are only missing the Swatches field.\r\n//\r\n// Though the returned value is a bit different, at present\r\n// the implementation for convertProductAttributes works for\r\n// search results.\r\n// If they diverge in the future, extend this function.\r\n//----------------------------------------------------------\r\nexport function convertSearchAttributes(attributeList: AttributeValue[]): AttributesWithMetadata {\r\n return convertProductAttributes(attributeList);\r\n}\r\n\r\n//----------------------------------------------------------\r\n// For these attributes, the Name is always the friendly\r\n// name. Value is always Text, and DataTypeValue is not\r\n// present here.\r\n//----------------------------------------------------------\r\nexport function convertCartAttributes(attributeList: AttributeValue[]): AttributesWithMetadata {\r\n const output = {};\r\n\r\n attributeList.forEach(attribute => {\r\n if (attribute.Name) {\r\n output[attribute.Name] = attribute.TextValue;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n//----------------------------------------------------------\r\nexport function convertCustomerAttributes(attributeList: CustomerAttribute[] | undefined): AttributesWithMetadata {\r\n const output = {\r\n meta: {}\r\n };\r\n\r\n attributeList?.forEach(attribute => {\r\n // These should always be present, but TypeScript insists they can be undefined.\r\n if (attribute.Name && attribute.DataTypeValue) {\r\n const typeData = getTypeInfo(attribute.DataTypeValue);\r\n output[attribute.Name] = attribute.AttributeValue && typeData.customerSource && attribute.AttributeValue[typeData.customerSource];\r\n output.meta[attribute.Name] = typeData.type;\r\n }\r\n });\r\n\r\n return output;\r\n}\r\n\r\n//----------------------------------------------------------\r\n// Finds the source field and type for an attribute\r\n//\r\n// This should probably be extended to better support\r\n// currency, which seems to be two fields glued together.\r\n//----------------------------------------------------------\r\nfunction getTypeInfo(type: AttributeDataType): TypeData {\r\n\r\n // Awkward, but this helps TypeScript enforce strict type checking\r\n type TypeMapType = {\r\n [key in AttributeDataType]: TypeData\r\n };\r\n\r\n const typeMap: TypeMapType = {\r\n [AttributeDataType.None]: {source: 'TextValue', type: 'string'}, // We need to choose something\r\n [AttributeDataType.Currency]: {source: 'CurrencyValue', type: 'number'}, // Should also include CurrencyCode, which is a string?\r\n [AttributeDataType.DateTime]: {source: 'DateTimeOffsetValue', type: 'Date'},\r\n [AttributeDataType.Decimal]: {source: 'FloatValue', type: 'number'},\r\n [AttributeDataType.Integer]: {source: 'IntegerValue', type: 'number', customerSource: 'IntegerValue'},\r\n [AttributeDataType.Text]: {source: 'TextValue', type: 'string', customerSource: 'StringValue'},\r\n [AttributeDataType.TrueFalse]: {source: 'BooleanValue', type: 'boolean', customerSource: 'BooleanValue'},\r\n [AttributeDataType.Video]: {source: 'TextValue', type: 'string'},\r\n [AttributeDataType.Image]: {source: 'TextValue', type: 'string'}\r\n };\r\n\r\n return typeMap[type];\r\n}\r\n","//==============================================================================\r\n// Global Constants\r\n//\r\n// Consolidated list of constants reused across different modules and extensions\r\n//==============================================================================\r\n\r\n//----------------------------------------------------------\r\n// Attribute names list\r\n//----------------------------------------------------------\r\nexport const attrNames = {\r\n productType: 'Item Type',\r\n lineAttributes: 'LineAttributes',\r\n blacklistedShippingAreas: 'Embargoed shipping locations',\r\n kitConfigurator: 'KitConfigurator',\r\n kitContents: 'eCommBurstoutKitContents',\r\n kitFormats: 'eCommBurstoutKitFormats',\r\n kitElectives: 'eCommBurstoutKitElectives',\r\n kitSubstitutions: 'eCommBurstoutKitSubstitutions',\r\n kitLineSubstitutions: 'eCommBurstoutKitLineDetails',\r\n kitLineParentAssociation: 'eCommBurstoutKitOrderLineParentAssociation',\r\n kitLineChildAssociation: 'eCommBurstoutKitOrderLineChildAssociation',\r\n instructors: 'eCommInstructors',\r\n consultantCartAttribute: 'eCommConsultantId',\r\n isInstallmentEligible: 'eCommItemIsPPEligible',\r\n cashForCollege: 'eCommCash4College',\r\n dropShip: 'eCommDropShip',\r\n scoringType: 'TestScoring',\r\n studentId: 'eCommPTEStudentId',\r\n schoolIdPP: 'eCommPPSchoolId',\r\n testCoordinator: 'PTETestCoordinator',\r\n testEnrollment: 'PTESchoolEnrollment',\r\n testType: 'Test Type',\r\n testFormat: 'Test Format',\r\n testDate: 'eCommPTETestDate',\r\n testDateId: 'eCommPTETestDateId',\r\n testAdmin: 'eCommPTEAdminCustAccount',\r\n testProctorEmail: 'PTEProctorEmail',\r\n testProctorName: 'PTEProctorName',\r\n testProctorPhone: 'PTEProctorPhone',\r\n testProctorTimeZone: 'PTEProctorTimeZone',\r\n userAgreement: 'eCommUserAgreement',\r\n umbrellaGroup: 'UmbrellaGroupID',\r\n gradeLvl: 'Grade level',\r\n isNotTest: 'Other',\r\n onlineTest: 'Online test',\r\n purchaseItemType: 'TestBklt',\r\n notBuyable: 'Not Buyable',\r\n billingCountry: 'eCommBillingCountryCode',\r\n billingZipCode: 'eCommBillingZipPostalCode',\r\n paymentScheduleName: 'PaymentScheduleName',\r\n isDBOrder: 'IsDBOrder',\r\n troveAdminFirstName: \"TroveAdminFirstName\",\r\n troveAdminLastName: \"TroveAdminLastName\",\r\n troveAdminEmail: \"TroveAdminEmail\",\r\n troveAdminTelephone: \"TroveAdminTelephone\",\r\n troveAnnualLicense: \"TroveAnnualLicense\",\r\n troveProduct: \"Trove\",\r\n troveParticipant: \"TroveParticipant\",\r\n poNumber: \"CSPONumber\",\r\n publicSearchable: \"Publicly Searchable\"\r\n};\r\n\r\n//----------------------------------------------------------\r\n// Global label resources\r\n//----------------------------------------------------------\r\nexport const labelResources = {\r\n sku: 'SKU'\r\n};\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['buybox-kit-selector'] = {\n c: () => require('partner/modules/buybox-kit-selector/buybox-kit-selector.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/retail-actions/dist/lib/get-attributes-for-selected-variant', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'buybox-kit-selector',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/buybox-kit-selector'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-attributes-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/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 };","module.exports = React;","module.exports = ReactDOM;"],"names":["KitFormat","BASE_CLASS","cls","fragment","clsHelper","BuyboxKitSelector","React","constructor","productList","labelFormat","this","props","config","labelTextInclude","labelTextType","resources","optionsMap","format","text","id","onlineText","label","buyboxKitSelector_optionOnline","dvdText","buyboxKitSelector_optionDvd","buyboxKitSelector_optionTextbooks","noText","online","dvd","buyboxKitSelector_optionTextInclude","buyboxKitSelector_optionTextNoInclude","textbook","complete","buyboxKitSelector_optionComplete","student","buyboxKitSelector_optionStudent","teacher","buyboxKitSelector_optionTeacher","stepMap","options","_renderSteps","selectedFormat","map","step","index","key","_renderStep","className","_renderStepHeading","_renderStepOptions","buyboxKitSelector_stepLabel","String","option","_renderStepOption","optionId","optionItem","find","product","optionName","productName","optionPath","productPath","isActive","classnames","href","_findSelectedFormat","convertedData","itemId","_parseSelectorData","selectorData","split","property","splitData","length","_getConvertedAttributes","_data$productSpecific","data","productAttributes","productSpecificationData","result","convertProductAttributes","_getProductList","async","convertedAttributes","kitAttribute","attribute","parsedAttributes","productItemIds","item","_getProducts","productResult","ItemId","Name","_getProductPath","context","criteria","ItemIds","itemIds","Context","ChannelId","request","apiSettings","channelId","CatalogId","getCatalogId","searchByCriteriaAsync","callerContext","actionContext","error","telemetry","exception","debug","RecordId","componentDidMount","attrNames","kitFormats","render","_data$product$result","__decorate","observable","observer","baseClass","separator","arguments","undefined","attributeList","output","meta","forEach","DataTypeValue","typeData","getTypeInfo","source","type","convertCartAttributes","TextValue","convertCustomerAttributes","AttributeValue","customerSource","AttributeDataType","None","Currency","DateTime","Decimal","Integer","Text","TrueFalse","Video","Image","productType","lineAttributes","blacklistedShippingAreas","kitConfigurator","kitContents","kitElectives","kitSubstitutions","kitLineSubstitutions","kitLineParentAssociation","kitLineChildAssociation","instructors","consultantCartAttribute","isInstallmentEligible","cashForCollege","dropShip","scoringType","studentId","schoolIdPP","testCoordinator","testEnrollment","testType","testFormat","testDate","testDateId","testAdmin","testProctorEmail","testProctorName","testProctorPhone","testProctorTimeZone","userAgreement","umbrellaGroup","gradeLvl","isNotTest","onlineTest","purchaseItemType","notBuyable","billingCountry","billingZipCode","paymentScheduleName","isDBOrder","troveAdminFirstName","troveAdminLastName","troveAdminEmail","troveAdminTelephone","troveAnnualLicense","troveProduct","troveParticipant","poNumber","publicSearchable","labelResources","sku","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","module","exports","ReactDOM"],"sourceRoot":""}