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IC,YAAa,IAwCvCF,EAAQC,QAAQ,iBAAmB,CAChCE,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,kBACPC,GAAI,CAAC,CAACC,KAAK,OAASC,KAAK,+EAAgFC,MAAO,IAEhHC,KAAK,EACLC,GAAI,YACJC,EAAG,gBACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,6BAlC4BC,EAACC,EAAqBC,KAUlD,GADAlB,EAAQE,YAAYe,GAAuBC,GACtClB,EAAQE,YAAYe,GAAqBE,QAC1C,MAAM,IAAIC,MAAM,oBAAsBH,EAAsB,mCAEhEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUC,eAAiBL,EACxEjB,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUE,KAC3DvB,EAAQE,YAAYF,EAAQE,YAAYe,GAAqBE,QAAQE,UAAUE,IAAMN,IA0BzFD,CAF4B,+EACXZ,EAAQ,KAMjCzE,OAAO6F,aAAe7F,OAAO6F,cAAgB,GAC7C7F,OAAO6F,aAAavB,QAAOwB,EAAAA,EAAA,GACpB9F,OAAO6F,aAAavB,SAAW,IAC/BD,EAAQC,SAGXtE,OAAO6F,aAAatB,YAAWuB,EAAAA,EAAA,GAC5B9F,OAAO6F,aAAatB,aAAe,IACnCF,EAAQE,c,mBCzEnBwB,EAAOC,QAAU9K,O,oBCAjB6K,EAAOC,QAAUC,W","sources":["webpack://bju-press/./src/modules/cart-from-url/cart-from-url.tsx?15ee","webpack://bju-press/./src/utilities/class-name-helper.ts?dd10","webpack://bju-press/./src/utilities/global-constants.ts?5882","webpack://bju-press/./lib/cart-from-url/module-registration.js?70d1","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/external var \"ReactDOM\"?853b"],"sourcesContent":["import * as React from 'react';\r\nimport classnames from 'classnames';\r\n\r\nimport { clsHelper } from '../../utilities/class-name-helper';\r\n\r\nimport { getCatalogId, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { ICartFromUrlData } from './cart-from-url.data';\r\nimport { ICartFromUrlProps } from './cart-from-url.props.autogenerated';\r\n\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport { Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { addCartLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\n\r\nimport { attrNames } from '../../utilities/global-constants';\r\nimport { Cart } from '@msdyn365-commerce/retail-proxy';\r\n\r\n//==============================================================================\r\n// INTERFACES\r\n//==============================================================================\r\ninterface ProductAddRequest {\r\n recId: number\r\n quantity: number\r\n}\r\n\r\n//==============================================================================\r\n// CLASS NAME UTILITY\r\n//==============================================================================\r\nconst BASE_CLASS = 'cart-from-url';\r\nconst cls = (fragment: string) => clsHelper(BASE_CLASS, fragment);\r\n\r\n/**\r\n *\r\n * CartFromUrl component\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass CartFromUrl extends React.Component> {\r\n @observable private isModalOpen: boolean = false;\r\n @observable private isLoading: boolean = this.props.context.request.query && this.props.context.request.query['cart'] ? true : false;\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n constructor(props: ICartFromUrlProps) {\r\n super(props);\r\n this.toggleModal = this.toggleModal.bind(this);\r\n this.addUrlItemsToCart = this.addUrlItemsToCart.bind(this);\r\n }\r\n\r\n //------------------------------------------------------\r\n //------------------------------------------------------\r\n public componentDidMount(): void {\r\n const { context, data } = this.props;\r\n const query = context.request.query || {};\r\n\r\n if (query['cart']) {\r\n const cartData = data.cart.result;\r\n\r\n if (cartData?.cart.CartLines?.length) {\r\n this.isModalOpen = true;\r\n } else {\r\n this.addUrlItemsToCart();\r\n }\r\n }\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n public render(): JSX.Element | null {\r\n return (\r\n <>\r\n {this.renderLoadingPopup()}\r\n {this.renderModal()}\r\n \r\n );\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n public renderRemoveFromCart(): JSX.Element | null {\r\n if (!this.props.data.cart.result?.cart.CartLines?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n private async addUrlItemsToCart() {\r\n const cartData = this.props.data.cart.result;\r\n const query = this.props.context.request.query || {};\r\n const cartItems = query.cart;\r\n const cartOrg = query.organization;\r\n\r\n // Parse the request\r\n const cartRequest = this.parseCartRequest(cartItems);\r\n\r\n // Ensure there's at least a single product in the request\r\n if (cartRequest.length > 0) {\r\n\r\n const umbrellaGroup = query.umbrella;\r\n\r\n const newCart = cartData?.cart as Cart;\r\n\r\n if (!newCart?.AttributeValues?.length) {\r\n newCart.AttributeValues = [];\r\n }\r\n\r\n const schoolId = newCart?.AttributeValues?.find(atr => {\r\n atr.Name === attrNames.schoolIdPP;\r\n });\r\n\r\n if (schoolId) {\r\n schoolId['TextValue'] = cartOrg;\r\n } else {\r\n newCart.AttributeValues.push(\r\n {\r\n // @ts-expect-error\r\n \"@odata.type\": \"#Microsoft.Dynamics.Commerce.Runtime.DataModel.AttributeTextValue\",\r\n \"Name\": attrNames.schoolIdPP,\r\n \"TextValue\": cartOrg,\r\n \"TextValueTranslations\": [],\r\n \"ExtensionProperties\": []\r\n }\r\n );\r\n }\r\n\r\n await cartData?.updateCart({newCartObject: newCart});\r\n\r\n // Add items to the cart\r\n await addCartLinesAsync({ callerContext: this.props.context.actionContext}, cartData?.cart.Id || '', cartRequest.map(entry => ({\r\n CatalogId: getCatalogId(this.props.context.request),\r\n EntryMethodTypeValue: 3,\r\n ProductId: entry.recId,\r\n Quantity: entry.quantity,\r\n AttributeValues: [\r\n {\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.AttributeTextValue',\r\n Name: attrNames.umbrellaGroup,\r\n TextValue: umbrellaGroup,\r\n ExtensionProperties: [],\r\n TextValueTranslations: []\r\n }\r\n ]\r\n })));\r\n\r\n window.location.href = window.location.href.split('?')[0];\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n //==========================================================\r\n // Parse requests passed in via query parameter\r\n //\r\n // Format: recId:qty,recId:qty,...\r\n //==========================================================\r\n private parseCartRequest(request: string): ProductAddRequest[] {\r\n\r\n // Split the string into a series of item/quantity pairs and process each one\r\n return request.split(',').reduce(\r\n (output: ProductAddRequest[], entry) => {\r\n\r\n // Split item record ID and quantity\r\n const [recId, qty] = entry.split(':');\r\n\r\n // Add to the list if the rec ID and quantity are valid\r\n if (+recId && +qty) {\r\n output.push({\r\n recId: +recId,\r\n quantity: +qty,\r\n });\r\n }\r\n return output;\r\n },\r\n []\r\n );\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n private renderModal() {\r\n const hasSlots = !!this.props.slots?.modalContent?.length;\r\n // Render the modal\r\n return (\r\n \r\n \r\n {this.props.config.cartFromUrlModalHeader}\r\n \r\n \r\n
\r\n {hasSlots && this._renderSlotItems(this.props.slots.modalContent)}\r\n {this.renderRemoveFromCart()}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n //------------------------------------------------------\r\n //------------------------------------------------------\r\n private readonly _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n
\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n
\r\n );\r\n };\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n private toggleModal() {\r\n this.isModalOpen = !this.isModalOpen;\r\n }\r\n\r\n //----------------------------------------------------------\r\n //----------------------------------------------------------\r\n private renderLoadingPopup() {\r\n const { config, resources } = this.props;\r\n\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\r\nexport default CartFromUrl;\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// 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};\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['cart-from-url'] = {\n c: () => require('partner/modules/cart-from-url/cart-from-url.tsx'),\n $type: 'containerModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'cart-from-url',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/cart-from-url'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\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":["BASE_CLASS","cls","fragment","clsHelper","CartFromUrl","React","constructor","props","super","isModalOpen","isLoading","this","context","request","query","_renderSlotItems","items","className","map","slot","index","key","toggleModal","bind","addUrlItemsToCart","componentDidMount","data","_cartData$cart$CartLi","cartData","cart","result","CartLines","length","render","renderLoadingPopup","renderModal","renderRemoveFromCart","_this$props$data$cart","onClick","_this$props$data$cart2","_this$props$data$cart3","cartLineIds","line","LineId","removeCartLines","then","resources","emptyCartButtonLabel","cartItems","cartOrg","organization","cartRequest","parseCartRequest","_newCart$AttributeVal","_newCart$AttributeVal2","umbrellaGroup","umbrella","newCart","AttributeValues","schoolId","find","atr","Name","attrNames","schoolIdPP","push","updateCart","newCartObject","addCartLinesAsync","callerContext","actionContext","Id","entry","CatalogId","getCatalogId","EntryMethodTypeValue","ProductId","recId","Quantity","quantity","TextValue","ExtensionProperties","TextValueTranslations","window","location","href","split","reduce","output","qty","_this$props$slots","hasSlots","slots","modalContent","Modal","isOpen","ModalHeader","config","cartFromUrlModalHeader","ModalBody","classnames","cartFromUrlModalButton","RichTextComponent","text","loadingLabel","__decorate","observable","observer","baseClass","separator","arguments","undefined","productType","lineAttributes","blacklistedShippingAreas","kitConfigurator","kitContents","kitFormats","kitElectives","kitSubstitutions","kitLineSubstitutions","kitLineParentAssociation","kitLineChildAssociation","instructors","consultantCartAttribute","isInstallmentEligible","cashForCollege","dropShip","scoringType","studentId","testCoordinator","testEnrollment","testType","testFormat","testDate","testDateId","testAdmin","testProctorEmail","testProctorName","testProctorPhone","testProctorTimeZone","userAgreement","gradeLvl","isNotTest","onlineTest","purchaseItemType","notBuyable","billingCountry","billingZipCode","paymentScheduleName","labelResources","sku","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","__bindings__","_objectSpread","module","exports","ReactDOM"],"sourceRoot":""}