{"version":3,"sources":["webpack:///src/modules/fabrikam/views/components/promocode.component.tsx?7eef","webpack:///src/modules/fabrikam/views/components/cartlineitem.component.tsx?4b07","webpack:///./src/themes/dobbies/views/components/addtocart.component.tsx?2119","webpack:///src/connectors/msdyn365-exp-test/msdyn365-exp-test.provider.ts?22ac","webpack:///src/connectors/msdyn365-exp-test/msdyn365-exp-test.listener.ts?3fc6","webpack:///./src/themes/dobbies/utilities/quantity/index.ts?0cc0","webpack:///./lib/component-registration.js?266e","webpack:///./src/themes/dobbiesclub/views/components/cartlineitem.component.tsx?e7ee","webpack:///./src/themes/dobbies/utilities/quantity/Quantity.tsx?fcb6","webpack:///./src/themes/dobbies/views/components/carticon.component.tsx?709c","webpack:///./src/themes/dobbies/views/components/cartlineitem.component.tsx?0714","webpack:///./src/themes/dobbies/views/components/price.component.tsx?c608","webpack:///external \"React\"?c481","webpack:///external \"ReactDOM\"?4b2d","webpack:///./src/themes/dobbiesclub/utilities/quantity/Quantity.tsx?eed3","webpack:///./lib/connector-registration.js?87e5","webpack:///./src/themes/dobbiesclub/utilities/quantity/index.ts?823f","webpack:///./src/themes/dobbies/views/custom-components/dobbies-modal.tsx?663a","webpack:///./src/themes/dobbies/views/custom-components/custom-collapse.tsx?1ae1"],"names":["PromoCode","React","constructor","props","state","super","_onInputChangeHandler","e","error","target","value","this","setState","promoCodeInputValue","canApply","_applyPromotion","cartState","cart","appliedPromo","addPromoCode","promoCode","then","result","status","substatus","duplicatePromoCodeErrorText","invalidPromoCodeErrorText","catch","failedToAddPromoCodeErrorText","_onSubmitHandler","event","preventDefault","_applyPromotionHandler","_renderForm","promoPlaceholderText","promoCodeApplyButtonText","attributes","getTelemetryAttributes","telemetryContent","payLoad","onSubmit","className","onChange","placeholder","Button","Object","title","onClick","disabled","_removePromotion","code","currentTarget","getAttribute","removePromoCodes","promoCodes","failedToRemovePromoCodeErrorText","_calculateDiscount","CartLines","length","discountAmount","line","DiscountLines","discountLine","DiscountCode","DiscountCost","_renderAppliedPromoCode","Coupons","removePromotionHandler","promoCodTotalDiscount","reduce","count","coupon","Code","appliedPromoCodeHeadingText","PriceComponent","data","price","CustomerContextualPrice","context","id","typeName","map","ariaLabel","removePromoAriaLabelFormat","format","removePromoText","key","getPayloadObject","TelemetryConstant","ApplyPromoCode","isCollapseOpen","shouldComponentUpdate","nextProps","nextState","render","promoCodeHeadingText","CatalogLabelComponent","catalogId","cartLine","CatalogId","request","user","isB2b","ArrayExtensions","hasElements","catalogs","catalog","find","item","RecordId","Name","CartLineItemFunctions","Product","DimensionStrings","Dimensions","productDimension","DimensionTypeValue","colorString","DimensionValue","Value","configString","sizeString","IsGiftCard","amountString","styleString","index","OfferId","OfferName","resources","discountStringText","isSalesLine","PeriodicDiscount","EffectiveAmount","BasePrice","undefined","EffectivePercentage","inventoryInformationLabel","inventoryCssName","inventoryLabelClassName","IsInvoiceLine","app","config","unitOfMeasureDisplayType","product","DefaultUnitOfMeasure","pickupDeliveryModeCode","channel","PickupDeliveryModeCode","channelDeliveryOptionConfig","cartline","hasShippingMethod","DeliveryMode","PickupDeliveryModeCodes","some","deliveryMode","shippingChargeLines","ChargeLines","filter","chargeLine","IsShipping","freightFee","chargeTotal","CalculatedAmount","priceComponent","freePriceText","shippingChargesText","otherCharges","chargeline","otherCharge","Description","CartLine","productUrl","destructDimensionStrings","fallbackImageUrl","getFallbackImageUrl","ItemId","actionContext","requestContext","apiSettings","productDimensions","imageSettings","cropFocalRegion","renderDisountLines","renderInventoryLabel","renderUnitOfMeasure","renderShippingLabel","renderOtherCharges","toString","productAttribute","productName","imgeClassName","newValue","quantityOnChange","lineIndex","Image","src","primaryImageUrl","fallBackSrc","altText","gridSettings","loadFailureBehavior","MsDyn365","isBrowser","href","NetAmount","Price","NetAmountWithoutTax","NetPrice","showShippingChargesForLineItems","nodes","isOutOfStock","isQuantityEditable","push","quantityDisplayString","IncrementalQuantity","LineId","max","maxQuantity","currentCount","currentQuantity","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","isCartStateReady","isGiftCard","classNames","Quantity","originalPriceText","currentPriceText","DiscountAmount","DiscountAmountWithoutTax","_generateQuantityandPrice","priceEditorResources","CartLinePriceEditor","errorMessage","AddToCartComponentActions","async","_event","setDisabled","openModal","firstCase","toggleFirstCase","setAddtoCartModal","setChecked","isAgeRestricted","cartError","addToCartError","productToAdd","propogateError","getSelectedProduct","getCartState","behavior","addToCartBehavior","addProductToCart","quantity","availableQuantity","productAvailability","AvailableQuantity","additionalProperties","orderQuantityLimitsFeatureIsEnabled","isOrderQuantityLimitsFeatureEnabled","enableStockCheck","isPriceKeyedIn","customPrice","customPriceAmount","isAddEmailDeliveryItemToCart","dialogStrings","navigationUrl","propogateResult","failureReason","cartActionResult","_getAddtoBasketButton","_disabled","onClickHandler","popupAttributes","label","getLinkText","payload","TelemetryEvent","AddToCart","_popupAttributes","classnames","isIntermediateState","shouldShowOutOfStock","useState","modalOpen","setModalOpen","isAddToCartModalOpen","checked","SetIsAgeRestricted","useEffect","_isAgeRestrictedProduct","err","popupProps","productQuantity","renderModalPopup","Popup","DobbiesModal","isOpen","modalTitle","addToCartModalTitle","modalBodyElement","addToCartModalBody","modalFooter","addToCartModalFooter","_props","channelId","callerContext","customAttributes","getAttributeValuesAsync","queryResultSettings","ageRestrictedAttribute","customAttribute","trim","toLowerCase","TextValue","ageRestrictionPopupHeading","role","ageRestrictionNote","type","ageConfirmation","ageVerificationDetails","cancelButtonLabel","defaultProps","outOfStockText","addToCartText","isCustomPriceSelected","maximumKeyInPrice","minimumKeyInPrice","defaultMaximumKeyInPrice","defaultMinimumKeyInPrice","missingDimensions","dimension","stockLeft","Math","includeCurrentQuantity","isLoading","isUpdatingDimension","isAddServiceItemToCart","isLoadingDeliveryOptions","isUpdatingDeliveryOptions","includedQuantityNumber","onAdd","onError","connector","variantSet1","variantId","experimentId","variantSet2","variantSet3","variantSet4","getConfigForClientSideInit","Promise","resolve","initializeClientSide","console","log","getExperiments","name","experiments","friendlyName","description","State","Running","link","variations","Active","weight","Draft","createdDate","lastModifiedDate","lastModifiedBy","Paused","Archived","getVariantsForUser","userId","match","activateExperiment","JSON","stringify","initialize","secretManager","connectorListener","logEvent","eventName","componentDictionary","c","require","cn","Percentage","isOrderConfirmation","_generateQuantityAndPrice","disabledInput","hideQuantityControls","displayMode","reducedDimensions","str","inputRef","_validateMin","minValue","min","isNaN","currentInput","_onIncrement","bind","_onDecrement","_handleChange","componentDidUpdate","reaction","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","incDisabled","currentValue","extraClass","extraClassInc","tabIndex","color","pattern","onBlur","ref","invokeCallback","currQuantity","updatedQuantity","parseInt","inputElement","current","HTMLInputElement","debounce","setAttribute","observer","CartIcon","cartLabel","cartLink","getUrlSync","cartItem","hasInvoiceLine","totalItemsInCart","Number","onTelemetryClick","CartIconComponent","msdyn365Commerce","createComponentOverride","component","ObjectExtensions","isNullOrUndefined","prodAttribute","showStrikethroughPricing","originalPrice","getOriginalPrice","TradeAgreementPrice","AdjustedPrice","renderCurrentPrice","initialPrice","formatCurrency","itemProp","cultureFormatter","renderCurrentPriceWithOriginalPrice","savingsText","module","exports","ReactDOM","handleMissingImplementationDetails","functionName","connectorName","connectorType","Error","connectorDictionary","connectorProviderImpl","connectorListenerImpl","connectorDomainsList","default","provider","listener","connectorDomains","validateConnectorRegistration","connectorImpl","__proto__","verifyExperimentationReigstration","Modal","zIndex","applicationNode","autoFocus","toggle","onModalToggle","ModalHeader","modalBodySlots","ModalBody","ModalFooter","CustomCollapse","activeItem","SetActiveItem","Node","tag","child","attribute","isActive","selectedItem","Collapse","timeout","Msdyn365","text"],"mappings":";kNA6CA,MAAMA,UAAkBC,YAIpBC,YAAYC,EAAwBC,GAChCC,MAAMF,GAgCO,KAAAG,sBAAyBC,IACtC,MAAMC,EAA2B,KAAnBD,EAAEE,OAAOC,MAAe,GAAKC,KAAKP,MAAMI,MACtDG,KAAKC,SAAS,CACVC,oBAAqBN,EAAEE,OAAO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A,EAAUtN,gBAAkBsN,EAAUtN,eAAeC,aAM1GpH,EAAM6U,WAAc7U,EAAM8U,qBAEvB9U,EAAMgV,0BAA6BhV,EAAMiV,2BAQ/CxE,EAAkB,CAACzQ,EAAiCmB,KAClDnB,EAAMmV,OACNnV,EAAMmV,MAAMhU,IAIdkO,EAAiB,CAACrP,EAAiCmB,KACjDnB,EAAMoV,SACNpV,EAAMoV,QAAQjU,IASPiQ,a,yFCiXf,MAAMiE,EAAY,IAj0BlB,MAAAtV,cACY,KAAAuV,YAA2B,CAC/B,CACIC,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,YAId,KAAAC,YAA2B,CAC/B,CACIF,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,YAId,KAAAE,YAA2B,CAC/B,CACIH,UAAW,OACXC,aAAc,UAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAAW,OACXC,aAAc,WAElB,CACID,UAA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Ae9W,EACjC,OACI5H,kBAAC4e,OAAI,CAACpc,UAAU,mBAAmBqc,IAAI,KAAKxZ,IAAKuC,GAC7C5H,kBAAC4e,OAAI,CACDpc,UACIwc,EAAW,4BAA8B,6BAE7Clc,SAfCmc,EAewBrX,EAfC,KAChB+W,EAA9BM,IAAiBP,EAA2BO,GAA+B,KAcxB,gBAChBD,EACfH,IAAI,MACJxZ,IAAKuC,GAEL5H,gCAAS+e,EAAUlY,OAEvB7G,kBAACkf,WAAQ,CAAC1c,UAAW,mBAAoBiQ,OAAQuM,EAAUG,QAAS,KAChEnf,kBAACof,IAA0B,CAACC,KAAMN,EAAUrL,cAvB3CuL,U","file":"static/js/66.d5c4b1b1d207c5610e92.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Coupon } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Button, format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPromoCodeProps extends IComponentProps<{}> {\n cart: ICartState | undefined;\n promoCodeHeadingText: string;\n appliedPromoCodeHeadingText: string;\n removePromoAriaLabelFormat: string;\n promoPlaceholderText: string;\n promoCodeApplyButtonText: string;\n collapseTimeOut: number;\n removePromoText: string;\n invalidPromoCodeErrorText: string;\n failedToAddPromoCodeErrorText: string;\n duplicatePromoCodeErrorText: string;\n failedToRemovePromoCodeErrorText: string;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n promoCodeApplyCallback?(): void;\n}\n\ninterface IPromoCodeState {\n isCollapseOpen: boolean;\n promoCodeInputValue: string;\n error: string;\n canApply: boolean;\n}\n\n/**\n *\n * The PromoCode component renders the promocode section.\n * @extends {React.PureComponent}\n */\nclass PromoCode extends React.Component {\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: IPromoCodeProps, state: IPromoCodeState) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, TelemetryConstant.ApplyPromoCode);\n this.state = {\n isCollapseOpen: false,\n promoCodeInputValue: '',\n error: '',\n canApply: false\n };\n }\n\n public shouldComponentUpdate(nextProps: IPromoCodeProps, nextState: IPromoCodeState): 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 {\n return (\n
\n
\n {this.props.promoCodeHeadingText}\n
\n {this._renderForm(this.props.promoPlaceholderText, this.props.promoCodeApplyButtonText, this.props.cart)}\n

\n {this.state.error}\n

\n {this._renderAppliedPromoCode(this.props)}\n
\n );\n }\n\n private readonly _onInputChangeHandler = (e: React.ChangeEvent) => {\n const error = e.target.value === '' ? '' : this.state.error;\n this.setState({\n promoCodeInputValue: e.target.value, error,\n canApply: !!e.target.value\n });\n };\n\n private readonly _applyPromotion = (cartState: ICartState | undefined) => {\n if (!cartState || !cartState.cart) {\n return;\n }\n const appliedPromo = this.state.promoCodeInputValue;\n\n cartState.addPromoCode({ promoCode: appliedPromo })\n .then(result => {\n if (result.status === 'SUCCESS') {\n // Show success text\n this.setState({ promoCodeInputValue: '', error: '', canApply: false });\n } else if (result.substatus === 'ALREADYADDED') {\n this.setState({ error: this.props.duplicatePromoCodeErrorText });\n } else {\n this.setState({ error: this.props.invalidPromoCodeErrorText });\n }\n })\n .catch(error => {\n this.setState({ error: this.props.failedToAddPromoCodeErrorText });\n });\n };\n\n /**\n * On Submit function.\n * @param cartState -Cartstate.\n * @returns Apply promotion.\n */\n private readonly _onSubmitHandler = (cartState: ICartState | undefined) => (event: React.FormEvent) => {\n event.preventDefault();\n this._applyPromotionHandler(cartState);\n };\n\n /**\n * On apply promotion function.\n * @param cartState -Cartstate.\n * @returns Apply promotion.\n */\n private readonly _applyPromotionHandler = (cartState: ICartState | undefined) => () => {\n this._applyPromotion(cartState);\n };\n\n private readonly _renderForm = (promoPlaceholderText: string, promoCodeApplyButtonText: string, cartState: ICartState | undefined) => {\n\n const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
\n
\n \n \n {promoCodeApplyButtonText}\n \n
\n
\n );\n };\n\n private readonly _removePromotion = (cartState: ICartState | undefined, event: React.MouseEvent) => {\n if (!cartState) {\n return;\n }\n const code = event.currentTarget.getAttribute('data-value') || '';\n cartState.removePromoCodes({\n promoCodes: [code]\n })\n .then(result => {\n if (result.status === 'SUCCESS') {\n this.setState({ error: '' });\n }\n })\n .catch(() => {\n this.setState({ error: this.props.failedToRemovePromoCodeErrorText });\n });\n\n };\n\n private readonly _calculateDiscount = (code: string, cartState: ICartState | undefined) => {\n if (!cartState || !cartState.cart || !cartState.cart.CartLines || cartState.cart.CartLines.length === 0 || !code) {\n return;\n }\n let discountAmount = 0;\n for (const line of cartState.cart.CartLines) {\n if (line.DiscountLines) {\n for (const discountLine of line.DiscountLines) {\n if (discountLine.DiscountCode === code) {\n discountAmount += discountLine.DiscountCost!;\n }\n }\n }\n }\n return discountAmount * -1;\n };\n\n private readonly _renderAppliedPromoCode = (props: IPromoCodeProps) => {\n if (!props.cart || !props.cart.cart || !props.cart.cart.Coupons || props.cart.cart.Coupons.length === 0) {\n return;\n }\n\n const removePromotionHandler = (event: React.MouseEvent) => {\n this._removePromotion(props.cart, event);\n };\n\n const promoCodTotalDiscount = props.cart.cart.Coupons.reduce(\n (count: number, coupon: Coupon) => {\n return count + (this._calculateDiscount(coupon.Code || '', props.cart) || 0);\n },\n 0);\n\n return (\n <>\n
\n
\n {this.props.appliedPromoCodeHeadingText}\n
\n \n
\n {\n props.cart.cart.Coupons.map((coupon: Coupon) => {\n const ariaLabel = props.removePromoAriaLabelFormat ? format(props.removePromoAriaLabelFormat, props.removePromoText, coupon.Code) : '';\n\n return (\n
\n
\n {coupon.Code}\n {' '}\n (\n \n )\n
\n \n {props.removePromoText}\n \n
\n );\n })\n }\n \n );\n };\n}\n\nexport default PromoCode;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CartLinePriceEditor, ICartLinePriceEditorResources, PriceComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, { IComponentProps, IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { ChannelDeliveryOptionConfiguration, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { CartLine, ProductCatalog, SalesLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions, getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, IncrementalQuantity, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classNames from 'classnames';\nimport * as React from 'react';\n\n/**\n * ICartlineResourceString: Interface for specifying the\n * resource strings that the component needs.\n */\nexport interface ICartlineResourceString {\n\n /**\n * Display string for discount label\n */\n discountStringText: string;\n\n /**\n * String for size key\n */\n sizeString: string;\n\n /**\n * String for color key\n */\n colorString: string;\n\n /**\n * String associated with the configuration product dimension\n */\n configString: string;\n\n /**\n * String for style key\n */\n styleString: string;\n\n /**\n * String for amount key\n */\n amountString?: string;\n\n /**\n * Display string for quantity label\n */\n quantityDisplayString: string;\n\n /**\n * Display string for quantity label\n */\n inputQuantityAriaLabel: string;\n\n /**\n * Aria label for the decrement button in quantity component\n */\n decrementButtonAriaLabel: string;\n\n /**\n * Aria label for the increment button in quantity component\n */\n incrementButtonAriaLabel: string;\n\n /**\n * Original text screenreader\n */\n originalPriceText: string;\n\n /**\n * Current text screenreader\n */\n currentPriceText: string;\n\n /**\n * Shipping Charges Text\n */\n shippingChargesText: string;\n\n priceEditorResources?: ICartLinePriceEditorResources;\n}\n\ninterface ICartLineData {\n cartLine: CartLine | SalesLine;\n cartState?: ICartState;\n product?: SimpleProduct;\n catalogs?: ProductCatalog[];\n}\n\n/**\n * ICartLineProps: The props required to render cartLineitem.\n */\nexport interface ICartLineProps extends IComponentProps {\n\n /**\n * The flag to change the quantity component from intractable to static.\n */\n disableQuantityInteractivity?: boolean;\n\n /**\n * The primary image url.\n */\n primaryImageUrl?: string;\n\n /**\n * The product url.\n */\n productUrl?: string;\n\n /**\n * GridSettings for the product image in cartLine.\n */\n gridSettings: IGridSettings;\n\n /**\n * ImageSettings for the product image in cartLine.\n */\n imageSettings: IImageSettings;\n\n /**\n * Boolean flag to indicate if the item is out of stock.\n */\n isOutOfStock?: boolean;\n\n /**\n * Flag to make quantity section editable.\n */\n isQuantityEditable?: boolean;\n\n /**\n * Max quantity for line item.\n */\n maxQuantity?: number;\n\n /**\n * Current quantity for line item.\n */\n currentQuantity?: number;\n\n /**\n * Resource string for the component.\n */\n resources: ICartlineResourceString;\n\n /**\n * SalesLine flag.\n */\n isSalesLine?: boolean;\n\n /**\n * Error message to show in place of quantity.\n */\n errorMessage?: string;\n\n /**\n * Inventory information label.\n */\n inventoryInformationLabel?: string;\n\n /**\n * Inventory information class name.\n */\n inventoryLabelClassName?: string;\n\n /**\n * Flag to show/hide shipping charges for line items.\n */\n showShippingChargesForLineItems?: boolean;\n\n /**\n * Boolean flag to indicate if cart state status is ready.\n */\n isCartStateReady?: boolean;\n\n /**\n * Chanel Delivery Option configuration is from api.\n */\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n\n /**\n * The cart line index.\n */\n lineIndex?: number;\n\n /**\n * Quantity onChange callback.\n */\n quantityOnChange?(cartLine: CartLine, newQuantity: number, lineIndex?: number): boolean;\n}\n\ninterface IDimensionStrings {\n\n /**\n * String for size key.\n */\n sizeString: string;\n\n /**\n * String for color key.\n */\n colorString: string;\n\n /**\n * String associated with the configuration product dimension.\n */\n configString: string;\n\n /**\n * String for style key.\n */\n styleString: string;\n\n /**\n * String for amount key.\n */\n amountString?: string;\n}\n\n/**\n * Renders catalog label for the cart line.\n * @param props - Cart line props.\n * @returns Catalog label.\n */\nconst CatalogLabelComponent: React.FC = (props: ICartLineProps) => {\n const catalogId = props.data.cartLine.CatalogId;\n\n if (!props.context.request.user.isB2b || !catalogId || !ArrayExtensions.hasElements(props.data.catalogs)) {\n return null;\n }\n\n const catalog = props.data.catalogs.find(item => item.RecordId === catalogId);\n\n if (!catalog || !catalog.Name) {\n return null;\n }\n\n return (\n
\n {catalog.Name}\n
\n );\n};\n\nconst CartLineItemFunctions = {\n renderProductDimensions: (Product: SimpleProduct, DimensionStrings: IDimensionStrings) => {\n if (!Product || !Product.Dimensions) {\n return [];\n }\n\n return Product.Dimensions.map(productDimension => {\n\n if (productDimension.DimensionTypeValue === 1) {\n return (\n
\n \n {DimensionStrings.colorString}\n :\n \n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n \n
\n );\n }\n\n if (productDimension.DimensionTypeValue === 2) {\n return (\n
\n \n {DimensionStrings.configString}\n :\n \n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n \n
\n );\n }\n\n if (productDimension.DimensionTypeValue === 3) {\n return (\n
\n \n {DimensionStrings.sizeString}\n :\n \n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n \n
\n );\n }\n\n if (productDimension.DimensionTypeValue === 4) {\n return (\n
\n \n {Product.IsGiftCard ? DimensionStrings.amountString : DimensionStrings.styleString}\n :\n \n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n \n
\n );\n }\n return null;\n });\n },\n\n renderDiscountLines: (props: ICartLineProps) => {\n\n if (!props.data.cartLine.DiscountLines || props.data.cartLine.DiscountLines.length === 0) {\n return null;\n }\n\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\n return (\n
\n \n {discountLine.OfferName ? discountLine.OfferName : ''}\n :\n {` ${props.resources.discountStringText || 'Discount'} `}\n \n \n \n \n \n {` (${discountLine.EffectivePercentage !== undefined ? discountLine.EffectivePercentage : ''}%)`}\n \n
\n );\n });\n },\n renderInventoryLabel: (props: ICartLineProps) => {\n if (!props.inventoryInformationLabel) {\n return null;\n }\n const inventoryCssName = props.inventoryLabelClassName ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}` : 'msc-cart-line__product-inventory-label';\n return (\n \n {props.inventoryInformationLabel}\n \n );\n },\n\n /**\n * Gets the react node for product unit of measure display.\n * @param props - Icartline props.\n * @returns The node representing markup for unit of measure component.\n */\n renderUnitOfMeasure: (props: ICartLineProps) => {\n\n if (props.data.cartLine.IsInvoiceLine) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\n if (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none') {\n return undefined;\n }\n\n const product = props.data.product;\n if (!product || !product.DefaultUnitOfMeasure) {\n return undefined;\n }\n\n return (\n
\n \n {product.DefaultUnitOfMeasure}\n \n
\n );\n },\n renderShippingLabel: (props: ICartLineProps) => {\n const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\n const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\n const cartline = props.data.cartLine;\n let hasShippingMethod = false;\n if (channelDeliveryOptionConfig !== undefined) {\n hasShippingMethod = !!(cartline.DeliveryMode &&\n channelDeliveryOptionConfig.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode));\n } else {\n hasShippingMethod = !!(cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode);\n }\n if (!hasShippingMethod) {\n return undefined;\n }\n\n const shippingChargeLines = (cartline.ChargeLines || []).filter(chargeLine => chargeLine.IsShipping);\n\n if (shippingChargeLines.length === 0) {\n return undefined;\n }\n\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\n return chargeTotal + (chargeLine.CalculatedAmount || 0);\n }, 0);\n\n const priceComponent = (\n \n );\n return (\n <>\n \n \n {priceComponent}\n \n \n );\n },\n renderOtherCharges: (props: ICartLineProps) => {\n const cartline = props.data.cartLine;\n const otherCharges = cartline.ChargeLines?.filter((chargeline) => !chargeline.IsShipping);\n\n return otherCharges && otherCharges.map((otherCharge, key) => {\n return otherCharge && otherCharge.CalculatedAmount ? (\n
\n \n \n \n \n
\n ) : '';\n }) || undefined;\n }\n};\n\nconst CartLine: React.FC = (props: ICartLineProps) => {\n const { isSalesLine, productUrl, resources } = props;\n const { product, cartLine } = props.data;\n\n const destructDimensionStrings = {\n sizeString: resources.sizeString,\n colorString: resources.colorString,\n styleString: resources.styleString,\n configString: resources.configString,\n amountString: resources.amountString\n };\n\n const fallbackImageUrl = product && getFallbackImageUrl(product.ItemId, props.context.actionContext.requestContext.apiSettings);\n const productDimensions = product && CartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\n const imageSettings = props.imageSettings;\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n const renderDisountLines = CartLineItemFunctions.renderDiscountLines(props);\n const renderInventoryLabel = CartLineItemFunctions.renderInventoryLabel(props);\n const renderUnitOfMeasure = CartLineItemFunctions.renderUnitOfMeasure(props);\n const renderShippingLabel = CartLineItemFunctions.renderShippingLabel(props);\n const renderOtherCharges = CartLineItemFunctions.renderOtherCharges(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\n const productAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n const productName = product?.Name || cartLine.Description;\n const imgeClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-image' : 'msc-cart-line__product-image';\n\n const onChange = (newValue: number): boolean => {\n if (props.quantityOnChange) {\n return props.quantityOnChange(props.data.cartLine, newValue, props.lineIndex);\n }\n return true;\n };\n\n const _generateErrorMessage = (): JSX.Element | null => {\n if (props.errorMessage) {\n return (\n
\n \n \n {props.errorMessage}\n \n
\n );\n }\n\n return null;\n };\n\n const _generateQuantityandPrice = (): JSX.Element[] | null => {\n const nodes = [];\n if (props.isOutOfStock) {\n return null;\n }\n\n // No quantity selector for invoice line\n if (!props.data.cartLine.IsInvoiceLine) {\n if (props.data.product && props.isQuantityEditable) {\n nodes.push(\n
\n
\n {resources.quantityDisplayString}\n
\n \n
\n );\n } else {\n nodes.push(\n
\n \n \n {props.data.cartLine.Quantity}\n \n
\n );\n }\n }\n\n nodes.push(\n
\n \n {\n props.data.cartLine.DiscountAmount && props.data.cartLine.DiscountAmount > 0 &&\n <>\n \n {` ${props.resources.discountStringText || 'Discount'} `}\n \n \n ||\n null\n }\n
\n );\n\n return nodes;\n };\n\n return (\n <>\n
\n
\n \n
\n
\n
\n \n {\n MsDyn365.isBrowser ? \n {productName}\n : null\n }\n {ArrayExtensions.hasElements(productDimensions) ?
\n {productDimensions}\n
: ''}\n {renderUnitOfMeasure}\n
\n \n
\n {renderDisountLines}\n {renderInventoryLabel}\n {props.showShippingChargesForLineItems &&
\n {renderShippingLabel}\n
}\n {renderOtherCharges}\n
\n {\n _generateQuantityandPrice()\n }\n {\n props.data.cartLine.IsInvoiceLine && props.data.cartState && props.resources.priceEditorResources && \n }\n
\n
\n { _generateErrorMessage() }\n \n );\n};\n\nexport default CartLine;\n","import classnames from 'classnames';\r\nimport React, { useEffect, useState } from 'react';\r\n\r\nimport { getPayloadObject, getTelemetryAttributes, IPopupProps, ITelemetryContent, Popup } from '@msdyn365-commerce-modules/utilities';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IComponent, IComponentProps, IGridSettings, IImageSettings, TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { getCartState, ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport {\r\n ProductAvailableQuantity, ProductDimension, ProductPrice, SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { DobbiesModal } from '../custom-components';\r\n\r\nexport interface IAddToCartComponentProps extends IComponentProps<{ product: SimpleProduct; price?: ProductPrice }> {\r\n className?: string;\r\n addToCartText: string;\r\n outOfStockText: string;\r\n disabled?: boolean;\r\n quantity?: number;\r\n navigationUrl?: string;\r\n productAvailability?: ProductAvailableQuantity;\r\n getSelectedProduct?: Promise;\r\n\r\n imageSettings?: IImageSettings;\r\n gridSettings?: IGridSettings;\r\n\r\n isLoading?: boolean;\r\n isUpdatingDimension?: boolean;\r\n isAddServiceItemToCart?: boolean;\r\n /* Upgraded to 10.0.16 - START */\r\n isLoadingDeliveryOptions?: boolean;\r\n isUpdatingDeliveryOptions?: boolean;\r\n isAddEmailDeliveryItemToCart?: boolean;\r\n isPriceKeyedIn?: boolean;\r\n customPriceAmount?: number;\r\n isOrderQuantityLimitsFeatureEnabled?: boolean;\r\n /* Upgraded to 10.0.16 - END */\r\n dialogStrings?: {\r\n goToCartText: string;\r\n continueShoppingText: string; // popupHeading\r\n headerItemOneText: string; // ageConfirmationHeaderText\r\n headerItemFormatText: string; // ageConfirmationText\r\n headerMessageText: string; // ageConfirmationFooterText\r\n freePriceText: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n ageRestrictionPopupHeading: string;\r\n ageRestrictionNote: string;\r\n ageConfirmation: string;\r\n ageVerificationDetails: string;\r\n cancelButtonLabel: string;\r\n buyBoxHeaderMessageText: string;\r\n buyBoxGoToCartText: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n /* Upgraded to 10.0.16 - START */\r\n isCustomPriceSelected?: boolean;\r\n maximumKeyInPrice?: number;\r\n minimumKeyInPrice?: number;\r\n defaultMaximumKeyInPrice?: number;\r\n defaultMinimumKeyInPrice?: number;\r\n /* Upgraded to 10.0.16 - END */\r\n onAdd?(result: ICartActionResult): void;\r\n onError?(result: IAddToCartFailureResult): void;\r\n changeUpdatingDimension?(isUpdatingDimension: boolean): void;\r\n /* Upgraded to 10.0.16 - START */\r\n changeUpdatingDeliveryOptions?(isUpdatingDeliveryOptions: boolean): void;\r\n /* Upgraded to 10.0.16 - END */\r\n}\r\n\r\nexport declare type ICartActionFailureReason = 'EMPTYINPUT' | 'MISSINGDIMENSION' | 'OUTOFSTOCK' | 'CARTACTIONFAILED' | 'INVALIDCUSTOMAMOUNT'; /* Upgraded to 10.0.16 - INVALIDCUSTOMAMOUNT added */\r\nexport interface IAddToCartFailureResult {\r\n failureReason: ICartActionFailureReason;\r\n\r\n stockLeft?: number;\r\n cartActionResult?: ICartActionResult;\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\nexport interface IAddtoCartComponent extends IComponent {\r\n onClick(): (event: React.MouseEvent, props: IAddToCartComponentProps) => void;\r\n}\r\n\r\nconst onClick = async (\r\n _event: React.MouseEvent,\r\n props: IAddToCartComponentProps,\r\n setDisabled: (disabled: boolean) => void,\r\n openModal: (opened: boolean) => void,\r\n firstCase: boolean,\r\n toggleFirstCase: (firstCase: boolean) => void,\r\n setAddtoCartModal: (disabled: boolean) => void,\r\n setChecked: (checked: boolean) => void,\r\n isAgeRestricted: boolean\r\n): Promise => {\r\n const cartError = addToCartError(props);\r\n let productToAdd = props.data.product;\r\n\r\n if (cartError) {\r\n propogateError(props, cartError);\r\n return;\r\n }\r\n setDisabled(true);\r\n\r\n if (!(props.getSelectedProduct === undefined)) {\r\n productToAdd = (await props.getSelectedProduct) || props.data.product;\r\n }\r\n /* VSI Customization - START - 05/11/20 */\r\n /* If condition checks if product has age restriciton and 'Addtobasket' is clicked for the first time, open age restrcition popup */\r\n if (firstCase === true && isAgeRestricted === true) {\r\n toggleFirstCase(false);\r\n setAddtoCartModal(true);\r\n setDisabled(false);\r\n setChecked(false);\r\n /* VSI Customization - END */\r\n } else {\r\n const cartState = await getCartState(props.context.actionContext);\r\n const { context: { app: { config } } } = props;\r\n const behavior = config && config.addToCartBehavior;\r\n await cartState.addProductToCart({\r\n product: productToAdd,\r\n count: props.quantity,\r\n availableQuantity: props.productAvailability && props.productAvailability.AvailableQuantity,\r\n additionalProperties: { orderQuantityLimitsFeatureIsEnabled: props.isOrderQuantityLimitsFeatureEnabled }, /* Upgraded to 10.0.16 */\r\n enableStockCheck: props.context.app.config.enableStockCheck,\r\n /* Upgraded to 10.0.16 - START */\r\n isPriceKeyedIn: props.isPriceKeyedIn,\r\n customPrice: props.customPriceAmount,\r\n isAddEmailDeliveryItemToCart: props.isAddEmailDeliveryItemToCart\r\n /* Upgraded to 10.0.16 - END */\r\n })\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n if (props.dialogStrings && behavior === 'showModal') {\r\n setDisabled(false);\r\n openModal(true);\r\n } else if (props.navigationUrl && (behavior === undefined || behavior === 'nothing' || behavior === 'goToCart')) {\r\n /* VSI Customization - START - 26/10/20 */\r\n // Added addToCartBehavior === 'nothing' in if condition do the same when this settings are selected\r\n /* When user clicks on 'ADD TO BAG' button,\r\n - It would just ADD Product to CART and will not route to CART page.\r\n - 'ADD TO BAG' button will not be disabled */\r\n // window && window.location.assign(props.navigationUrl);\r\n setDisabled(false);\r\n setAddtoCartModal(false);\r\n /* VSI Customization - END */\r\n }\r\n propogateResult(props, result);\r\n } else {\r\n propogateError(props, { failureReason: 'CARTACTIONFAILED', cartActionResult: result });\r\n setDisabled(false);\r\n }\r\n });\r\n }\r\n};\r\n\r\nconst AddToCartComponentActions = {\r\n onClick: onClick\r\n};\r\n\r\n/* VSI Customization - START - 06/11/20 */\r\n/* This function renders 'Add to Basket' button.\r\npopupAttributes decided whether to render it on PDP or on popup\r\nif rendered on popup, it has additional attributes */\r\nconst _getAddtoBasketButton = (\r\n props: IAddToCartComponentProps,\r\n _disabled: boolean,\r\n onClickHandler: (event: React.MouseEvent) => Promise,\r\n popupAttributes?: {\r\n disabled: boolean;\r\n onClick(event: React.MouseEvent): Promise;\r\n } | {\r\n disabled: boolean;\r\n onClick?: undefined;\r\n }\r\n) => {\r\n const label = getLinkText(props);\r\n const payload = getPayloadObject(TelemetryEvent.AddToCart, props.telemetryContent!, label, '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\r\n const _popupAttributes = popupAttributes ? popupAttributes : undefined;\r\n return (\r\n \r\n {getLinkText(props)}\r\n \r\n );\r\n};\r\n/* VSI Customization - START - 05/11/20 */\r\n\r\nconst AddToCart: React.FC = (props: IAddToCartComponentProps) => {\r\n const [disabled, setDisabled] = useState(false);\r\n const [modalOpen, setModalOpen] = useState(false);\r\n /* VSI Customization - START - 26/10/20\r\n /* Following hook is used for age restriction popup.\r\n By default its value is true to handle first click and When user clicks 'Add to Cart' button for first time it sets to false for rest of the clicks */\r\n const [firstCase, toggleFirstCase] = useState(true);\r\n /* Following hook is used to open age restriction popup */\r\n const [isAddToCartModalOpen, setAddtoCartModal] = useState(false);\r\n /* Following hook is used to toggle checkbox on age restriction popup */\r\n const [checked, setChecked] = useState(false);\r\n const [isAgeRestricted, SetIsAgeRestricted] = useState(false);\r\n useEffect(() => {\r\n _isAgeRestrictedProduct(props, SetIsAgeRestricted).catch((err) => { return; });\r\n });\r\n /* Added one more parameter 'setAddedtoCart' to onClick method*/\r\n const onClickHandler = async (event: React.MouseEvent) => {\r\n await AddToCartComponentActions.onClick(event, props, setDisabled, setModalOpen, firstCase, toggleFirstCase, setAddtoCartModal, setChecked, isAgeRestricted);\r\n };\r\n /* VSI Customization - END */\r\n\r\n const priceComponent = props.data.price ? (\r\n ) : '';\r\n\r\n const popupProps: IPopupProps = {\r\n context: props.context,\r\n className: 'msc-add-to-cart',\r\n id: props.id,\r\n typeName: props.typeName,\r\n data: { product: props.data.product, price: props.data.price },\r\n dialogStrings: props.dialogStrings,\r\n imageSettings: props.imageSettings,\r\n gridSettings: props.context.request.gridSettings,\r\n productQuantity: props.quantity !== undefined ? props.quantity : 1,\r\n priceComponent: priceComponent,\r\n navigationUrl: props.navigationUrl,\r\n modalOpen: modalOpen,\r\n setModalOpen: setModalOpen\r\n };\r\n\r\n const renderModalPopup = ;\r\n return (\r\n <>\r\n {renderModalPopup}\r\n {/* VSI Customization - START - 26/10/20 */}\r\n {/* Moved AddtoBasket button into a function as it is used twice one on PDP page, second on age restriction popup */}\r\n {_getAddtoBasketButton(props, disabled, onClickHandler)}\r\n {/* DobbiesModal is used for popups i.e. age restriction popup */}\r\n {props.dialogStrings &&\r\n \r\n }\r\n \r\n );\r\n};\r\n/* VSI Customization - START - 05/11/20 */\r\n/* Following function returns attributes of current product */\r\nconst _isAgeRestrictedProduct = async (_props: IAddToCartComponentProps, SetIsAgeRestricted: (isAgeRestricted: boolean) => void) => {\r\n const {\r\n data: { product: { RecordId } },\r\n context: { actionContext: { requestContext: { apiSettings: { channelId, catalogId } } } },\r\n } = _props;\r\n if (RecordId) {\r\n const callerContext = _props.context.actionContext;\r\n const customAttributes = await getAttributeValuesAsync({ callerContext, queryResultSettings: {} }, RecordId, channelId, catalogId);\r\n const ageRestrictedAttribute = customAttributes && customAttributes.find(customAttribute => {\r\n const attributeName = customAttribute.Name && customAttribute.Name.trim().toLowerCase();\r\n return attributeName === 'agerestriction';\r\n });\r\n // check if product has age restriction\r\n ageRestrictedAttribute && ageRestrictedAttribute.TextValue && ageRestrictedAttribute.TextValue.trim().toLowerCase() === 'true' && SetIsAgeRestricted(true);\r\n }\r\n};\r\n// Following function renders popup header\r\nconst addToCartModalTitle = (\r\n setAddtoCartModal: (disabled: boolean) => void,\r\n toggleFirstCase: (firstCase: boolean) => void,\r\n setChecked: (checked: boolean) => void,\r\n props: IAddToCartComponentProps): JSX.Element => {\r\n\r\n const closeModal = () => {\r\n setAddtoCartModal(false);\r\n toggleFirstCase(true);\r\n setChecked(false);\r\n };\r\n\r\n const { dialogStrings } = props;\r\n\r\n return (\r\n
\r\n {dialogStrings &&

{dialogStrings.ageRestrictionPopupHeading}

}\r\n \r\n
\r\n );\r\n};\r\n// Following function renders popup body including checkbox\r\nconst addToCartModalBody = (\r\n checked: boolean,\r\n setChecked: (checked: boolean) => void,\r\n props: IAddToCartComponentProps\r\n): JSX.Element => {\r\n\r\n function toggleCheckBox(): void {\r\n setChecked(!checked);\r\n }\r\n\r\n const { dialogStrings } = props;\r\n\r\n return (\r\n <>\r\n {dialogStrings ?
\r\n

{dialogStrings.ageRestrictionNote}

\r\n \r\n

{dialogStrings.ageVerificationDetails}

\r\n
: undefined}\r\n \r\n );\r\n\r\n};\r\n// Following function renders popup footer including 'Add to Basket' button\r\nconst addToCartModalFooter = (\r\n checked: boolean,\r\n setChecked: (checked: boolean) => void,\r\n onClickHandler: (event: React.MouseEvent) => Promise,\r\n setAddtoCartModal: (disabled: boolean) => void,\r\n toggleFirstCase: (firstCase: boolean) => void,\r\n props: IAddToCartComponentProps,\r\n disabled: boolean\r\n): JSX.Element => {\r\n\r\n const closeModal = () => {\r\n setAddtoCartModal(false);\r\n toggleFirstCase(true);\r\n setChecked(false);\r\n };\r\n // if checkbox is checked, only then 'Add to Basket' button will be enabled\r\n const popupAttributes = checked ? { disabled: false, onClick: onClickHandler } : { disabled: true };\r\n return (\r\n
\r\n \r\n {_getAddtoBasketButton(props, disabled, onClickHandler, popupAttributes)}\r\n
\r\n );\r\n};\r\n/* VSI Customization - END - 06/11/20 */\r\n// Set default props\r\nAddToCart.defaultProps = {\r\n quantity: 1\r\n};\r\n\r\nconst getLinkText = (props: IAddToCartComponentProps): string => {\r\n return shouldShowOutOfStock(props, false) ? props.outOfStockText : props.addToCartText;\r\n};\r\n\r\nconst addToCartError = (props: IAddToCartComponentProps): IAddToCartFailureResult | undefined => {\r\n /* Upgraded to 10.0.16 - START */\r\n const { data, productAvailability, isCustomPriceSelected, customPriceAmount,\r\n maximumKeyInPrice, minimumKeyInPrice, defaultMaximumKeyInPrice = 100, defaultMinimumKeyInPrice = 10 } = props;\r\n /* Upgraded to 10.0.16 - END */\r\n if (!data || !data.product.RecordId) {\r\n // No product exists, won't be able to add to cart\r\n return { failureReason: 'EMPTYINPUT' };\r\n }\r\n\r\n if (data.product.Dimensions) {\r\n const missingDimensions = data.product.Dimensions.filter(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value));\r\n\r\n if (missingDimensions.length > 0) {\r\n // At least one dimension with no value exists on the product, won't be able to add to cart\r\n return { failureReason: 'MISSINGDIMENSION', missingDimensions: missingDimensions };\r\n }\r\n }\r\n\r\n if (shouldShowOutOfStock(props, true)) {\r\n const availableQuantity = (productAvailability && productAvailability.AvailableQuantity) || 0;\r\n const stockLeft = Math.max(availableQuantity, 0);\r\n\r\n return { failureReason: 'OUTOFSTOCK', stockLeft: stockLeft };\r\n }\r\n /* Upgraded to 10.0.16 - START */\r\n // When Custom price is selected, if there is no keyed-in price or keyed-in price is out of limit, should return error.\r\n if (isCustomPriceSelected && (\r\n !customPriceAmount || customPriceAmount > (maximumKeyInPrice || defaultMaximumKeyInPrice) || customPriceAmount < (minimumKeyInPrice || defaultMinimumKeyInPrice))) {\r\n return { failureReason: 'INVALIDCUSTOMAMOUNT' };\r\n }\r\n /* Upgraded to 10.0.16 - END */\r\n // Only allow adding to cart if not showing out of stock\r\n return undefined;\r\n};\r\n\r\nconst shouldShowOutOfStock = (props: IAddToCartComponentProps, includeCurrentQuantity: boolean): boolean => {\r\n if (props.context.app.config.enableStockCheck === undefined || props.context.app.config.enableStockCheck === false\r\n || props.isLoading || props.isUpdatingDimension\r\n || props.isAddServiceItemToCart\r\n /* Upgraded to 10.0.16 - START */\r\n || props.isLoadingDeliveryOptions || props.isUpdatingDeliveryOptions\r\n /* Upgraded to 10.0.16 - END */\r\n ) {\r\n // Out of stock turn off, don't bother showing out of stock\r\n return false;\r\n }\r\n\r\n if (!props.data || !props.data.product.RecordId) {\r\n // No product exists, don't bother showing out of stock\r\n return false;\r\n }\r\n\r\n if (props.data.product.Dimensions) {\r\n if (props.data.product.Dimensions.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\r\n // At least one dimension with no value exists on the product, so also don't show out of stock\r\n return false;\r\n }\r\n }\r\n const includedQuantityNumber = includeCurrentQuantity && props.quantity ? props.quantity : 1;\r\n\r\n return (props.productAvailability\r\n && props.productAvailability.AvailableQuantity !== undefined\r\n && props.productAvailability.AvailableQuantity >= includedQuantityNumber)\r\n ? false : true;\r\n};\r\n\r\nconst isIntermediateState = (props: IAddToCartComponentProps): boolean => {\r\n if (props.data.product.Dimensions) {\r\n if (props.data.product.Dimensions.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\r\n // At least one dimension with no value exists on the product, so also not in intermediate state\r\n return false;\r\n }\r\n }\r\n\r\n if (!props.isLoading && !props.isUpdatingDimension\r\n /* Upgraded to 10.0.16 - START */\r\n && !props.isLoadingDeliveryOptions && !props.isUpdatingDeliveryOptions\r\n /* Upgraded to 10.0.16 - END */) {\r\n return false;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst propogateResult = (props: IAddToCartComponentProps, result: ICartActionResult): void => {\r\n if (props.onAdd) {\r\n props.onAdd(result);\r\n }\r\n};\r\n\r\nconst propogateError = (props: IAddToCartComponentProps, result: IAddToCartFailureResult): void => {\r\n if (props.onError) {\r\n props.onError(result);\r\n }\r\n};\r\n\r\n/* export const AddToCartComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'AddToCart',\r\n { component: AddToCart, ...AddToCartComponentActions }\r\n); */\r\n\r\nexport default AddToCart;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any, max-lines */\nimport { IExperimentationProvider, IExperimentsResult, ISecretManager, IVariants, State } from '@msdyn365-commerce/core';\n/**\n * A basic implementation of the ExperimentationProvider interface used for testing\n */\nclass MsDyn365ExpTestConnector implements IExperimentationProvider {\n private variantSet1: IVariants[] = [\n {\n variantId: 'var1',\n experimentId: 'expid1'\n },\n {\n variantId: 'var1',\n experimentId: 'expid4'\n },\n {\n variantId: 'var1',\n experimentId: 'expid6'\n },\n {\n variantId: 'var1',\n experimentId: 'expid7'\n },\n {\n variantId: 'var1',\n experimentId: 'expid8'\n },\n {\n variantId: 'var1',\n experimentId: 'expid9'\n },\n {\n variantId: 'var1',\n experimentId: 'expid10'\n },\n {\n variantId: 'var1',\n experimentId: 'expid11'\n },\n {\n variantId: 'var1',\n experimentId: 'expid12'\n }\n ];\n\n private variantSet2: IVariants[] = [\n {\n variantId: 'var2',\n experimentId: 'expid1'\n },\n {\n variantId: 'var2',\n experimentId: 'expid5'\n },\n {\n variantId: 'var2',\n experimentId: 'expid7'\n },\n {\n variantId: 'var2',\n experimentId: 'expid8'\n },\n {\n variantId: 'var2',\n experimentId: 'expid9'\n },\n {\n variantId: 'var2',\n experimentId: 'expid10'\n },\n {\n variantId: 'var2',\n experimentId: 'expid11'\n },\n {\n variantId: 'var2',\n experimentId: 'expid12'\n }\n ];\n\n private variantSet3: IVariants[] = [\n {\n variantId: 'var1',\n experimentId: 'expid5'\n },\n {\n variantId: 'var2',\n experimentId: 'expid13'\n },\n {\n variantId: 'var2',\n experimentId: 'expid14'\n },\n {\n variantId: 'var2',\n experimentId: 'expid15'\n },\n {\n variantId: 'var2',\n experimentId: 'expid16'\n },\n {\n variantId: 'var2',\n experimentId: 'expid17'\n },\n {\n variantId: 'var2',\n experimentId: 'expid18'\n },\n {\n variantId: 'var2',\n experimentId: 'expid19'\n },\n {\n variantId: 'var2',\n experimentId: 'expid20'\n },\n {\n variantId: 'var2',\n experimentId: 'expid21'\n },\n {\n variantId: 'var2',\n experimentId: 'expid22'\n },\n {\n variantId: 'var2',\n experimentId: 'expid23'\n },\n {\n variantId: 'var2',\n experimentId: 'expid24'\n },\n {\n variantId: 'var2',\n experimentId: 'expid25'\n }\n ];\n\n private variantSet4: IVariants[] = [\n {\n variantId: 'var1',\n experimentId: 'expid5'\n },\n {\n variantId: 'var1',\n experimentId: 'expid1'\n },\n {\n variantId: 'var1',\n experimentId: 'expid13'\n },\n {\n variantId: 'var1',\n experimentId: 'expid14'\n },\n {\n variantId: 'var1',\n experimentId: 'expid15'\n },\n {\n variantId: 'var1',\n experimentId: 'expid16'\n },\n {\n variantId: 'var1',\n experimentId: 'expid17'\n },\n {\n variantId: 'var1',\n experimentId: 'expid18'\n },\n {\n variantId: 'var1',\n experimentId: 'expid19'\n },\n {\n variantId: 'var1',\n experimentId: 'expid20'\n },\n {\n variantId: 'var1',\n experimentId: 'expid21'\n },\n {\n variantId: 'var1',\n experimentId: 'expid22'\n },\n {\n variantId: 'var1',\n experimentId: 'expid23'\n },\n {\n variantId: 'var1',\n experimentId: 'expid24'\n },\n {\n variantId: 'var1',\n experimentId: 'expid25'\n }\n ];\n\n public getConfigForClientSideInit(): Promise {\n return Promise.resolve({});\n }\n public initializeClientSide(config: any): boolean {\n console.log(`Initialize client side called on MsDyn365ExpTestConnector with config ${config}`);\n return true;\n }\n\n public getExperiments(): Promise {\n return Promise.resolve({\n name: 'msdyn365-exp-test-2',\n experiments: [\n {\n id: 'expid1',\n friendlyName: 'experiment-1',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n link: 'www.msdyn365-exp-test-connector/expid1',\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var3',\n friendlyName: 'variant-3',\n status: State.Draft,\n weight: '0.2'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid2',\n friendlyName: 'experiment-2',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Paused,\n link: 'www.msdyn365-exp-test-connector/expid2',\n variations: [\n {\n id: 'var3',\n friendlyName: 'variant-3',\n status: State.Paused,\n weight: '1.0'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid3',\n friendlyName: 'experiment-3',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Archived,\n variations: [\n {\n id: 'var4',\n friendlyName: 'variant-4',\n status: State.Archived,\n weight: '1.0'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid4',\n friendlyName: 'experiment-4',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid5',\n friendlyName: 'experiment-5',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid6',\n friendlyName: 'experiment-6',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid7',\n friendlyName: 'experiment-7',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid8',\n friendlyName: 'experiment-8',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid9',\n friendlyName: 'experiment-9',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid10',\n friendlyName: 'experiment-10',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid11',\n friendlyName: 'experiment-11',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid12',\n friendlyName: 'experiment-12',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid13',\n friendlyName: 'experiment-13',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid14',\n friendlyName: 'experiment-14',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid15',\n friendlyName: 'experiment-15',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid16',\n friendlyName: 'experiment-16',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid17',\n friendlyName: 'experiment-17',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid18',\n friendlyName: 'experiment-18',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid19',\n friendlyName: 'experiment-19',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid20',\n friendlyName: 'experiment-20',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid21',\n friendlyName: 'experiment-21',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid22',\n friendlyName: 'experiment-22',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid23',\n friendlyName: 'experiment-23',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid24',\n friendlyName: 'experiment-24',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n },\n {\n id: 'expid25',\n friendlyName: 'experiment-25',\n description: 'This is a msdyn365-exp test experiment',\n type: 'A/B Test',\n status: State.Running,\n variations: [\n {\n id: 'var1',\n friendlyName: 'variant-1',\n status: State.Active,\n weight: '0.4'\n },\n {\n id: 'var2',\n friendlyName: 'variant-2',\n status: State.Active,\n weight: '0.6'\n }\n ],\n createdDate: '05/01/2020',\n lastModifiedDate: '05/01/2020',\n lastModifiedBy: 'User 1'\n }\n ]\n });\n }\n public getVariantsForUser(userId: string, attributes?: { [index: string]: string } | undefined): IVariants[] {\n if (userId.match(/^[0-3].*$/)) {\n return this.variantSet1;\n } else if (userId.match(/^[4-7].*$/)) {\n return this.variantSet2;\n } else if (userId.match(/^[8-9|a-b].*$/)) {\n return this.variantSet3;\n } else {\n return this.variantSet4;\n }\n }\n public activateExperiment(userId: string, experiments: IVariants[], attributes?: { [index: string]: string } | undefined): boolean {\n console.log(\n `Active experiment called on MsDyn365ExpTestConnector with userId: ${userId}, experiments: ${JSON.stringify(\n experiments\n )}, attributes: ${JSON.stringify(attributes)}`\n );\n return true;\n }\n public initialize(config: any, secretManager?: ISecretManager): Promise {\n console.log(`MsDyn365 Exp Test Connector called with config: ${JSON.stringify(config)}`);\n return Promise.resolve(true);\n }\n}\n\nconst connector = new MsDyn365ExpTestConnector();\nexport default connector;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { IExpLogger } from '@msdyn365-commerce/telemetry-internal';\n\n/**\n * A basic implementation of the ExperimentationProvider interface used for testing\n */\nclass MsDyn365ExpTestConnectorListener implements IExpLogger {\n private userId: string = '';\n public initializeClientSide(config: any, userId: string): boolean {\n this.userId = userId;\n console.log(`Listener initialize called with config ${JSON.stringify(config)} and userId ${userId}`);\n return true;\n }\n public logEvent(eventName: string, payload: any, attributes?: any): void {\n console.log(`tracking events with event type - ${eventName}, payload - ${payload}, user id - ${this.userId}`);\n }\n}\n\nconst connectorListener = new MsDyn365ExpTestConnectorListener();\nexport default connectorListener;\n","import Quantity from './Quantity';\r\n\r\nexport * from './Quantity.props';\r\n\r\nexport {\r\n Quantity\r\n};\r\n","/**\n* Copyright (c) 2018 Microsoft Corporation\n* Modules Registration\n* THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\n*/\n\nexport const componentDictionary = {};\n\ncomponentDictionary['__local__|__local__|themes|dobbies|views|components|addtocart'] = {\n c: () => require('partner/themes/dobbies/views/components/addtocart.component.tsx'),\n cn: '__local__-__local__-addtocart'\n };\ncomponentDictionary['__local__|__local__|themes|dobbies|views|components|carticon'] = {\n c: () => require('partner/themes/dobbies/views/components/carticon.component.tsx'),\n cn: '__local__-__local__-carticon'\n };\ncomponentDictionary['__local__|__local__|themes|dobbies|views|components|cartlineitem'] = {\n c: () => require('partner/themes/dobbies/views/components/cartlineitem.component.tsx'),\n cn: '__local__-__local__-cartlineitem'\n };\ncomponentDictionary['__local__|__local__|themes|dobbies|views|components|price'] = {\n c: () => require('partner/themes/dobbies/views/components/price.component.tsx'),\n cn: '__local__-__local__-price'\n };\ncomponentDictionary['__local__|__local__|themes|dobbies|views|components|product'] = {\n c: () => require('partner/themes/dobbies/views/components/product.component.tsx'),\n cn: '__local__-__local__-product'\n };\ncomponentDictionary['__local__|__local__|themes|dobbiesclub|views|components|cartlineitem'] = {\n c: () => require('partner/themes/dobbiesclub/views/components/cartlineitem.component.tsx'),\n cn: '__local__-__local__-cartlineitem'\n };\ncomponentDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|components|cartlineitem'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/components/cartlineitem.component.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-cartlineitem'\n };\ncomponentDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|components|promocode'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/components/promocode.component.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-promocode'\n };","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IComponentProps, IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { CartLine, SalesLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { Quantity } from '../../utilities/quantity';\r\n\r\n/**\r\n * ICartlineResourceString: Interface for specifying the\r\n * resource strings that the component needs\r\n */\r\nexport interface ICartlineResourceString {\r\n /** Display string for discount label */\r\n discountStringText: string;\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** Display string for quantity label */\r\n quantityDisplayString: string;\r\n /** Display string for quantity label */\r\n inputQuantityAriaLabel: string;\r\n /** Aria label for the decrement button in quanitity component */\r\n decrementButtonAriaLabel?: string;\r\n /** Aria label for the increment button in quanitity component */\r\n incrementButtonAriaLabel?: string;\r\n /** original text screenreader */\r\n originalPriceText: string;\r\n /** current text screenreader */\r\n currentPriceText: string;\r\n /** shipping Charges Text */\r\n shippingChargesText: string;\r\n}\r\n\r\ninterface ICartLineData {\r\n cartLine: CartLine | SalesLine;\r\n product: SimpleProduct;\r\n}\r\n\r\nexport type CartLineDisplayMode = 'DEFAULT' | 'COMPACT';\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /** The flag to change the quantity component from interactible to static */\r\n disableQuantityInteractivity?: boolean;\r\n /** The primary image url */\r\n primaryImageUrl?: string;\r\n /** The product url */\r\n productUrl?: string;\r\n /** GridSettings for the product image in cartLine */\r\n gridSettings: IGridSettings;\r\n /** ImageSettings for the product image in cartLine */\r\n imageSettings: IImageSettings | undefined;\r\n /** Boolean flag to indicate if the item is out of stock */\r\n isOutOfStock?: boolean;\r\n /** Flag to make quantity section editable */\r\n isQuantityEditable?: boolean;\r\n /** Max quantity for line item */\r\n maxQuantity?: number;\r\n /** Current quantity for line item */\r\n currentQuantity?: number;\r\n /** Resource string for the component */\r\n resources: ICartlineResourceString;\r\n /** SalesLine flag */\r\n isSalesLine?: boolean;\r\n /** Error message to show in place of quantity */\r\n errorMessage?: string;\r\n /** Display mode to use */\r\n displayMode?: CartLineDisplayMode;\r\n /** Inventory information label */\r\n inventoryInformationLabel?: string;\r\n /** Inventory information class name */\r\n inventoryLabelClassName?: string;\r\n /** Flag to show/hide shipping charges for line items */\r\n showShippingChargesForLineItems?: boolean;\r\n /** Boolean flag to indicate if cart state status is ready */\r\n isCartStateReady?: boolean;\r\n /* VSI Customization - START - 23/11/20 */\r\n /* Flag to hide quantity controls */\r\n hideQuantityControls?: boolean;\r\n isOrderConfirmation?: boolean;\r\n /* VSI Customization - END */\r\n /** Quantity onChange callback */\r\n quantityOnChange?(cartLine: CartLine, newQuantity: number): void;\r\n}\r\n\r\ninterface IDimensionStrings {\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n}\r\n\r\nconst CartLineItemFunctions = {\r\n renderProductDimensions: (Product: SimpleProduct, DimensionStrings: IDimensionStrings) => {\r\n if (!Product || !Product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return Product.Dimensions.map(productDimension => {\r\n\r\n if (productDimension.DimensionTypeValue === 1) {\r\n return (\r\n
\r\n {DimensionStrings.colorString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 2) {\r\n return (\r\n
\r\n {DimensionStrings.configString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 3) {\r\n return (\r\n
\r\n {DimensionStrings.sizeString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 4) {\r\n return (\r\n
\r\n {DimensionStrings.styleString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n renderDiscountLines: (props: ICartLineProps) => {\r\n\r\n if (!props.data.cartLine.DiscountLines || props.data.cartLine.DiscountLines.length === 0) {\r\n return null;\r\n }\r\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\r\n return (\r\n
\r\n \r\n {discountLine.OfferName ? discountLine.OfferName : ''}:\r\n {` ${props.resources.discountStringText || 'Discount'} `}\r\n \r\n \r\n {discountLine.DiscountCost && (\r\n <>\r\n \r\n \r\n )}\r\n \r\n \r\n {` (${discountLine.Percentage !== undefined ? discountLine.Percentage : ''}%)`}\r\n \r\n
\r\n );\r\n });\r\n },\r\n renderInventoryLabel: (props: ICartLineProps) => {\r\n if (!props.inventoryInformationLabel) {\r\n return null;\r\n }\r\n const inventoryCssName = props.inventoryLabelClassName ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}` : 'msc-cart-line__product-inventory-label';\r\n return (\r\n {props.inventoryInformationLabel}\r\n );\r\n },\r\n renderShippingLabel: (props: ICartLineProps) => {\r\n const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\r\n const cartline = props.data.cartLine;\r\n const hasShippingMethod = !!cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode ? true : false;\r\n if (!hasShippingMethod) {\r\n return undefined;\r\n }\r\n\r\n const shippingChargeLines = (cartline.ChargeLines || []).filter(chargeLine => chargeLine.IsShipping);\r\n\r\n if (shippingChargeLines.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n return chargeTotal + (chargeLine.CalculatedAmount || 0);\r\n }, 0);\r\n\r\n const priceComponent = (\r\n \r\n );\r\n return (\r\n <>\r\n \r\n \r\n {priceComponent}\r\n \r\n \r\n );\r\n },\r\n renderOtherCharges: (props: ICartLineProps) => {\r\n const cartline = props.data.cartLine;\r\n const otherCharges = cartline.ChargeLines?.filter((chargeline) => !chargeline.IsShipping);\r\n\r\n return otherCharges && otherCharges.map((otherCharge, key) => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }) || undefined;\r\n }\r\n};\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { productUrl, resources, isCartStateReady, isSalesLine, isOrderConfirmation } = props;\r\n const { product } = props.data;\r\n\r\n const destructDimensionStrings = {\r\n sizeString: resources.sizeString,\r\n colorString: resources.colorString,\r\n styleString: resources.styleString,\r\n configString: resources.configString\r\n };\r\n const fallbackImageUrl = getFallbackImageUrl(product.ItemId, props.context.actionContext.requestContext.apiSettings);\r\n\r\n const productDimensions = CartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\r\n const renderDisountLines = CartLineItemFunctions.renderDiscountLines(props);\r\n const renderInventoryLabel = CartLineItemFunctions.renderInventoryLabel(props);\r\n const renderShippingLabel = CartLineItemFunctions.renderShippingLabel(props);\r\n const renderOtherCharges = CartLineItemFunctions.renderOtherCharges(props);\r\n\r\n const _generateErrorMessage = (): JSX.Element | null => {\r\n if (props.errorMessage) {\r\n return (\r\n
\r\n \r\n {props.errorMessage}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n /* VSI Customization - START - 16/11/20 */\r\n const onChange = (newValue: number) => {\r\n if (props.quantityOnChange) {\r\n props.quantityOnChange(props.data.cartLine, newValue);\r\n }\r\n };\r\n /* VSI Customization - END */\r\n const _generateQuantityAndPrice = (): JSX.Element[] | null => {\r\n const nodes = [];\r\n\r\n const errorMessage = _generateErrorMessage();\r\n\r\n if (props.isOutOfStock) {\r\n if (errorMessage) {\r\n return [errorMessage];\r\n }\r\n\r\n return null;\r\n }\r\n /* VSI Customization - START - 17/10/20 */\r\n (isCartStateReady !== true || isOrderConfirmation !== true) && nodes.push(\r\n
\r\n \r\n
\r\n );\r\n /* VSI Customization - END */\r\n if (props.isQuantityEditable) {\r\n if (errorMessage) {\r\n nodes.push(errorMessage);\r\n }\r\n nodes.push(\r\n /* VSI Customization - START - 16/11/20 */\r\n
\r\n \r\n \r\n
\r\n /* VSI Customization - END */\r\n );\r\n } else {\r\n nodes.push(\r\n
\r\n \r\n {errorMessage}\r\n {props.data.cartLine.Quantity}\r\n
\r\n );\r\n }\r\n\r\n return nodes;\r\n };\r\n\r\n if (props.displayMode === 'COMPACT') {\r\n const reducedDimensions: string = product.Dimensions ? product.Dimensions.reduce(\r\n (str, productDimension) => {\r\n if (productDimension.DimensionValue && productDimension.DimensionValue.Value) {\r\n if (str) {\r\n return `${str}, ${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return `${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return str;\r\n },\r\n '') : '';\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {product.Name}\r\n {reducedDimensions !== '' ?\r\n
{reducedDimensions}
:\r\n ''\r\n }\r\n {\r\n _generateQuantityAndPrice()\r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {product.Name}\r\n {productDimensions.length > 0 ?\r\n
{productDimensions}
:\r\n ''\r\n }\r\n {renderDisountLines}\r\n {renderInventoryLabel}\r\n {props.showShippingChargesForLineItems &&
\r\n {renderShippingLabel}\r\n
}\r\n {renderOtherCharges}\r\n
\r\n {\r\n _generateQuantityAndPrice()\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\n// @ts-ignore\r\n/* export const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'CartLineItem',\r\n { component: CartLine, ...CartLineItemFunctions }\r\n); */\r\nexport default CartLine;","import debounce from 'lodash/debounce';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IQuantityProps } from './Quantity.props';\r\n\r\ninterface IQuantityState {\r\n currentInput: number;\r\n}\r\n/**\r\n * Quantity Component - This component is used to add or remove quantity\r\n */\r\n@observer\r\nexport default class Quantity extends React.PureComponent {\r\n public static defaultProps: Partial = {\r\n min: 1,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private inputRef: React.RefObject = React.createRef();\r\n\r\n constructor(props: IQuantityProps) {\r\n super(props);\r\n this.state = { currentInput: props.currentCount || 1 };\r\n this._onIncrement = this._onIncrement.bind(this);\r\n this._onDecrement = this._onDecrement.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n reaction(\r\n () => this.props.currentCount,\r\n () => {\r\n this.setState({ currentInput: this.props.currentCount || 1 });\r\n }\r\n );\r\n }\r\n\r\n public render(): JSX.Element {\r\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\r\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\r\n const disabled = this.state.currentInput === this.props.min;\r\n const incDisabled = this.state.currentInput === this.props.max;\r\n const currentValue = this.state.currentInput;\r\n let extraClass = '';\r\n if (disabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClass = 'disabled';\r\n\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClass = 'transition';\r\n }\r\n let extraClassInc = '';\r\n if (incDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassInc = 'disabled';\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClassInc = 'transition';\r\n }\r\n return (\r\n <>\r\n
\r\n {this.props.hideQuantityControls !== true &&\r\n \r\n \r\n \r\n }\r\n \r\n {this.props.hideQuantityControls !== true &&\r\n \r\n \r\n \r\n }\r\n
\r\n \r\n );\r\n }\r\n\r\n private _onIncrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity < this.props.max) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity + 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = this.props.max;\r\n }\r\n\r\n invokeCallback && this.props.onChange && this.props.onChange(updatedQuantity);\r\n }\r\n\r\n private _onDecrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity > 1) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity - 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = 1;\r\n }\r\n\r\n invokeCallback && this.props.onChange && this.props.onChange(updatedQuantity);\r\n }\r\n\r\n private _handleChange(e: React.ChangeEvent): void {\r\n const currentValue = parseInt((e.target.value), 10);\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n const inputElement = this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\r\n\r\n if (currentValue > this.props.max) {\r\n this.setState(\r\n { currentInput: this.props.max },\r\n () => {\r\n debounce(\r\n () => {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n },\r\n 200)();\r\n }\r\n );\r\n } else {\r\n this.setState(\r\n { currentInput: currentValue },\r\n () => {\r\n debounce(\r\n () => {\r\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue)) {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n\r\n if (inputElement) {\r\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\r\n inputElement.setAttribute('value', currentValue.toString());\r\n }\r\n }\r\n },\r\n 200)();\r\n }\r\n );\r\n }\r\n }\r\n\r\n private _validateMin = (): void => {\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n if (isNaN(this.state.currentInput) || (this.state.currentInput < minValue)) {\r\n this.props.onChange && this.props.onChange(minValue);\r\n } else {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }\r\n }\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { format, getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart?: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n cartQtyLabel: string; /* Upgraded to 10.0.16 */\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\nconst CartIconComponentActions = {\r\n};\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, data: { cart } } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n\r\n /* VSI Customization - Start - 22/10/2020*/\r\n /* '()' small brackets for cart qunatity are removed */\r\n const cartItem = cart ? cart.hasInvoiceLine ? 0 : `${cart.totalItemsInCart}` : 0; /* Upgraded to 10.0.16 */\r\n /* VSI Customization - End */\r\n\r\n const label = format(cartLabel, cartItem) || `Shopping bag, ${cartItem} items`;\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, 'cart-icon', '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n return (\r\n 0 ? 'ms-header__icon-cart fill' : 'ms-header__icon-cart'} href={cartLink} aria-label={label} {...attributes} onClick={onTelemetryClick(props.telemetryContent!, payLoad, 'cart-icon')}>\r\n {/* VSI Customization - Start - 22/10/2020 */}\r\n {/* Custom css classes added for cart qunatity shown inside bag icon */}\r\n {Number(cartItem) > 0 ? cartItem : ''}\r\n Cart\r\n {/* VSI Customization - End */}\r\n \r\n );\r\n});\r\n\r\n// @ts-ignore\r\nexport const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'CartIcon',\r\n { component: CartIcon, ...CartIconComponentActions }\r\n);\r\n\r\nexport default CartIconComponent;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { ArrayExtensions, getFallbackImageUrl, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IComponentProps, IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { ChannelDeliveryOptionConfiguration, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { CartLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { Quantity } from '../../utilities/quantity';\r\n/**\r\n * ICartlineResourceString: Interface for specifying the\r\n * resource strings that the component needs\r\n */\r\nexport interface ICartlineResourceString {\r\n /** Display string for discount label */\r\n discountStringText: string;\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** String for amount key */\r\n amountString?: string;\r\n /** Display string for quantity label */\r\n quantityDisplayString: string;\r\n /** Display string for quantity label */\r\n inputQuantityAriaLabel: string;\r\n /** Aria label for the decrement button in quanitity component */\r\n decrementButtonAriaLabel?: string;\r\n /** Aria label for the increment button in quanitity component */\r\n incrementButtonAriaLabel?: string;\r\n /** original text screenreader */\r\n originalPriceText: string;\r\n /** current text screenreader */\r\n currentPriceText: string;\r\n /** shipping Charges Text */\r\n shippingChargesText: string;\r\n}\r\n\r\ninterface ICartLineData {\r\n cartLine: CartLine;\r\n product?: SimpleProduct;\r\n}\r\n\r\nexport type CartLineDisplayMode = 'DEFAULT' | 'COMPACT';\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /** The flag to change the quantity component from interactible to static */\r\n disableQuantityInteractivity?: boolean;\r\n /** The primary image url */\r\n primaryImageUrl?: string;\r\n /** The product url */\r\n productUrl?: string;\r\n /** GridSettings for the product image in cartLine */\r\n gridSettings: IGridSettings;\r\n /** ImageSettings for the product image in cartLine */\r\n imageSettings: IImageSettings;\r\n /** Boolean flag to indicate if the item is out of stock */\r\n isOutOfStock?: boolean;\r\n /** Flag to make quantity section editable */\r\n isQuantityEditable?: boolean;\r\n /** Max quantity for line item */\r\n maxQuantity?: number;\r\n /** Current quantity for line item */\r\n currentQuantity?: number;\r\n /** Resource string for the component */\r\n resources: ICartlineResourceString;\r\n /** SalesLine flag */\r\n isSalesLine?: boolean;\r\n /** Error message to show in place of quantity */\r\n errorMessage?: string;\r\n /** Display mode to use */\r\n displayMode?: CartLineDisplayMode;\r\n /** Inventory information label */\r\n inventoryInformationLabel?: string;\r\n /** Inventory information class name */\r\n inventoryLabelClassName?: string;\r\n /** Flag to show/hide shipping charges for line items */\r\n showShippingChargesForLineItems?: boolean;\r\n /** Boolean flag to indicate if cart state status is ready */\r\n isCartStateReady?: boolean;\r\n /** Chanel Delivery Option configuration is from api. */\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n /* VSI Customization - START - 23/11/20 */\r\n /* Flag to hide quantity controls */\r\n hideQuantityControls?: boolean;\r\n isOrderConfirmation?: boolean;\r\n /* VSI Customization - END */\r\n /** Quantity onChange callback */\r\n quantityOnChange?(cartLine: CartLine, newQuantity: number): void;\r\n}\r\n\r\ninterface IDimensionStrings {\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** String for amount key */\r\n amountString?: string;\r\n}\r\n\r\nconst CartLineItemFunctions = {\r\n renderProductDimensions: (Product: SimpleProduct, DimensionStrings: IDimensionStrings) => {\r\n if (!Product || !Product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return Product.Dimensions.map(productDimension => {\r\n if (productDimension.DimensionTypeValue === 1) {\r\n return (\r\n
\r\n \r\n {DimensionStrings.colorString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n // if (productDimension.DimensionTypeValue === 2) {\r\n // \treturn (\r\n // \t\t
\r\n // \t\t\t\r\n // \t\t\t\t{DimensionStrings.configString}\r\n // \t\t\t\t{productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n // \t\t\t\r\n // \t\t
\r\n // \t);\r\n // }\r\n\r\n if (productDimension.DimensionTypeValue === 3) {\r\n return (\r\n
\r\n \r\n {DimensionStrings.sizeString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 4) {\r\n return (\r\n
\r\n \r\n {Product.IsGiftCard ? DimensionStrings.amountString : DimensionStrings.styleString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n renderDiscountLines: (props: ICartLineProps) => {\r\n if (!props.data.cartLine.DiscountLines || props.data.cartLine.DiscountLines.length === 0) {\r\n return null;\r\n }\r\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\r\n return (\r\n
\r\n \r\n {discountLine.OfferName ? discountLine.OfferName : ''}:{` ${props.resources.discountStringText || 'Discount'} `}\r\n \r\n \r\n {discountLine.DiscountCost && (\r\n <>\r\n \r\n \r\n )}\r\n \r\n {discountLine && discountLine.Percentage !== undefined && discountLine.Percentage !== 0 && (\r\n {` (${discountLine.Percentage}%)`}\r\n )}\r\n
\r\n );\r\n });\r\n },\r\n renderInventoryLabel: (props: ICartLineProps) => {\r\n if (!props.inventoryInformationLabel) {\r\n return null;\r\n }\r\n const inventoryCssName = props.inventoryLabelClassName\r\n ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}`\r\n : 'msc-cart-line__product-inventory-label';\r\n return {props.inventoryInformationLabel};\r\n },\r\n renderShippingLabel: (props: ICartLineProps) => {\r\n const pickupDeliveryModeCode = props.context.request.channel && props.context.request.channel.PickupDeliveryModeCode;\r\n const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\r\n const cartline = props.data.cartLine;\r\n let hasShippingMethod = false;\r\n if (channelDeliveryOptionConfig !== undefined) {\r\n hasShippingMethod =\r\n !!cartline.DeliveryMode &&\r\n channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode)\r\n ? true\r\n : false;\r\n } else {\r\n hasShippingMethod = !!cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode ? true : false;\r\n }\r\n if (!hasShippingMethod) {\r\n return undefined;\r\n }\r\n\r\n const shippingChargeLines = (cartline.ChargeLines || []).filter(chargeLine => chargeLine.IsShipping);\r\n\r\n if (shippingChargeLines.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n return chargeTotal + (chargeLine.CalculatedAmount || 0);\r\n }, 0);\r\n\r\n const priceComponent = (\r\n \r\n );\r\n return (\r\n <>\r\n \r\n {priceComponent}\r\n \r\n );\r\n },\r\n renderOtherCharges: (props: ICartLineProps) => {\r\n const cartline = props.data.cartLine;\r\n const otherCharges = cartline.ChargeLines && cartline.ChargeLines.filter(chargeline => !chargeline.IsShipping);\r\n\r\n return (\r\n (otherCharges &&\r\n otherCharges.map((otherCharge, key) => {\r\n return otherCharge && otherCharge.CalculatedAmount ? (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n ) : (\r\n ''\r\n );\r\n })) ||\r\n undefined\r\n );\r\n }\r\n};\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { productUrl, resources, isCartStateReady, isOrderConfirmation } = props;\r\n const { product, cartLine } = props.data;\r\n\r\n const destructDimensionStrings = {\r\n sizeString: resources.sizeString,\r\n colorString: resources.colorString,\r\n styleString: resources.styleString,\r\n configString: resources.configString,\r\n amountString: resources.amountString\r\n };\r\n const fallbackImageUrl = product && getFallbackImageUrl(cartLine.ItemId, props.context.actionContext.requestContext.apiSettings);\r\n const imageSettings = props.imageSettings;\r\n imageSettings.cropFocalRegion = !ObjectExtensions.isNullOrUndefined(imageSettings);\r\n\r\n const productDimensions = product && CartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\r\n const renderDisountLines = CartLineItemFunctions.renderDiscountLines(props);\r\n // const renderInventoryLabel = CartLineItemFunctions.renderInventoryLabel(props);\r\n const renderShippingLabel = CartLineItemFunctions.renderShippingLabel(props);\r\n // const renderOtherCharges = CartLineItemFunctions.renderOtherCharges(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\r\n const prodAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productName = product?.Name || cartLine.Description;\r\n\r\n const _generateErrorMessage = (): JSX.Element | null => {\r\n if (props.errorMessage) {\r\n return (\r\n
\r\n \r\n {props.errorMessage}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n /* VSI Customization - START - 16/11/20 */\r\n const onChange = (newValue: number) => {\r\n if (props.quantityOnChange) {\r\n props.quantityOnChange(props.data.cartLine, newValue);\r\n }\r\n };\r\n /* VSI Customization - END */\r\n const _generateQuantityAndPrice = (): JSX.Element[] | null => {\r\n const nodes = [];\r\n\r\n const errorMessage = _generateErrorMessage();\r\n\r\n if (props.isOutOfStock) {\r\n if (errorMessage) {\r\n return [errorMessage];\r\n }\r\n\r\n return null;\r\n }\r\n /* VSI Customization - START - 17/10/20 */\r\n (isCartStateReady !== true || isOrderConfirmation !== true) &&\r\n nodes.push(\r\n
\r\n {/* */}\r\n
\r\n );\r\n /* VSI Customization - END */\r\n if (props.isQuantityEditable && !props.data.product?.IsGiftCard) {\r\n if (errorMessage) {\r\n nodes.push(errorMessage);\r\n }\r\n nodes.push(\r\n /* VSI Customization - START - 16/11/20 */\r\n
\r\n \r\n \r\n
\r\n /* VSI Customization - END */\r\n );\r\n } else {\r\n nodes.push(\r\n
\r\n \r\n {errorMessage}\r\n {props.data.cartLine.Quantity}\r\n
\r\n );\r\n }\r\n\r\n return nodes;\r\n };\r\n\r\n if (props.displayMode === 'COMPACT') {\r\n const reducedDimensions: string = product?.Dimensions\r\n ? product.Dimensions.reduce((str, productDimension) => {\r\n if (productDimension.DimensionValue && productDimension.DimensionValue.Value) {\r\n if (str) {\r\n return `${str}, ${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return `${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return str;\r\n }, '')\r\n : '';\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {productName}\r\n \r\n {reducedDimensions !== '' ?
{reducedDimensions}
: ''}\r\n {_generateQuantityAndPrice()}\r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n {productName}\r\n \r\n {ArrayExtensions.hasElements(productDimensions) ? (\r\n
{productDimensions}
\r\n ) : (\r\n ''\r\n )}\r\n {!props.isOrderConfirmation && renderDisountLines}\r\n {/* renderInventoryLabel */}\r\n {props.showShippingChargesForLineItems &&
{renderShippingLabel}
}\r\n {/* renderOtherCharges */}\r\n
\r\n {_generateQuantityAndPrice()}\r\n
\r\n
\r\n );\r\n};\r\n\r\n// @ts-ignore\r\n/* export const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'CartLineItem',\r\n { component: CartLine, ...CartLineItemFunctions }\r\n); */\r\nexport default CartLine;\r\n","import classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ProductPrice } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport interface IPriceComponentProps extends IComponentProps<{price: ProductPrice}> {\r\n className?: string;\r\n savingsText?: string;\r\n freePriceText?: string;\r\n originalPriceText?: string;\r\n currentPriceText?: string;\r\n}\r\nexport interface IPriceComponent extends IComponent {\r\n}\r\n\r\nconst PriceComponentActions = {\r\n};\r\n\r\nconst Price: React.FC = (props: IPriceComponentProps) => {\r\n // CustomerContextualPrice could be 0\r\n if (props.data.price.CustomerContextualPrice === undefined) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {showStrikethroughPricing(props) ? renderCurrentPriceWithOriginalPrice(props) : renderCurrentPrice(props)}\r\n \r\n );\r\n};\r\n\r\nconst showStrikethroughPricing = (props: IPriceComponentProps) => {\r\n const originalPrice = getOriginalPrice(props);\r\n\r\n if (originalPrice && props.data.price.CustomerContextualPrice) {\r\n return originalPrice > props.data.price.CustomerContextualPrice;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst getOriginalPrice = (props: IPriceComponentProps) => {\r\n return Math.max(props.data.price.BasePrice || 0, props.data.price.TradeAgreementPrice || 0, props.data.price.AdjustedPrice || 0);\r\n};\r\n\r\nconst renderCurrentPrice = (props: IPriceComponentProps): JSX.Element | undefined => {\r\n const initialPrice = formatCurrency(props, props.data.price.CustomerContextualPrice);\r\n return {initialPrice};\r\n};\r\n\r\nconst formatCurrency = (props: IPriceComponentProps, price: number | undefined): string | undefined => {\r\n if (price === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (price === 0 && props.freePriceText) {\r\n return props.freePriceText;\r\n }\r\n\r\n return props.context.cultureFormatter.formatCurrency(price);\r\n};\r\n\r\nconst renderCurrentPriceWithOriginalPrice = (props: IPriceComponentProps): JSX.Element | null => {\r\n const originalPrice = getOriginalPrice(props);\r\n const initialPrice = formatCurrency(props, originalPrice);\r\n\r\n return (\r\n <>\r\n {props.originalPriceText} {initialPrice} {props.currentPriceText} {renderCurrentPrice(props)}\r\n {/* VSI Customization - Start - 23/10/2020 */}\r\n {/* Displayed discounted price on the left, Actual price on the right */}\r\n \r\n \r\n {/* VSI - Customization - End */}\r\n {props.savingsText && {props.savingsText}}\r\n \r\n );\r\n};\r\n\r\n// @ts-ignore\r\nexport const PriceComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'Price',\r\n { component: Price, ...PriceComponentActions }\r\n);\r\n\r\nexport default PriceComponent;","module.exports = React;","module.exports = ReactDOM;","import { debounce } from 'lodash';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IQuantityProps } from './Quantity.props';\r\n\r\ninterface IQuantityState {\r\n currentInput: number;\r\n}\r\n/**\r\n * Quantity Component - This component is used to add or remove quantity\r\n */\r\n@observer\r\nexport default class Quantity extends React.PureComponent {\r\n public static defaultProps: Partial = {\r\n min: 1,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private inputRef: React.RefObject = React.createRef();\r\n\r\n constructor(props: IQuantityProps) {\r\n super(props);\r\n this.state = { currentInput: props.currentCount || 1 };\r\n this._onIncrement = this._onIncrement.bind(this);\r\n this._onDecrement = this._onDecrement.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n reaction(\r\n () => this.props.currentCount,\r\n () => {\r\n this.setState({ currentInput: this.props.currentCount || 1 });\r\n }\r\n );\r\n }\r\n\r\n public render(): JSX.Element {\r\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\r\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\r\n const disabled = this.state.currentInput === this.props.min;\r\n const incDisabled = this.state.currentInput === this.props.max;\r\n const currentValue = this.state.currentInput;\r\n let extraClass = '';\r\n if (disabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClass = 'disabled';\r\n\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClass = 'transition';\r\n }\r\n let extraClassInc = '';\r\n if (incDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassInc = 'disabled';\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClassInc = 'transition';\r\n }\r\n return (\r\n <>\r\n
\r\n {this.props.hideQuantityControls !== true &&\r\n \r\n \r\n \r\n }\r\n \r\n {this.props.hideQuantityControls !== true &&\r\n \r\n \r\n \r\n }\r\n
\r\n \r\n );\r\n }\r\n\r\n private _onIncrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity < this.props.max) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity + 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = this.props.max;\r\n }\r\n\r\n invokeCallback && this.props.onChange && this.props.onChange(updatedQuantity);\r\n }\r\n\r\n private _onDecrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity > 1) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity - 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = 1;\r\n }\r\n\r\n invokeCallback && this.props.onChange && this.props.onChange(updatedQuantity);\r\n }\r\n\r\n private _handleChange(e: React.ChangeEvent): void {\r\n const currentValue = parseInt((e.target.value), 10);\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n const inputElement = this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\r\n\r\n if (currentValue > this.props.max) {\r\n this.setState(\r\n { currentInput: this.props.max },\r\n () => {\r\n debounce(\r\n () => {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n },\r\n 200)();\r\n }\r\n );\r\n } else {\r\n this.setState(\r\n { currentInput: currentValue },\r\n () => {\r\n debounce(\r\n () => {\r\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue)) {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n\r\n if (inputElement) {\r\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\r\n inputElement.setAttribute('value', currentValue.toString());\r\n }\r\n }\r\n },\r\n 200)();\r\n }\r\n );\r\n }\r\n }\r\n\r\n private _validateMin = (): void => {\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n if (isNaN(this.state.currentInput) || (this.state.currentInput < minValue)) {\r\n this.props.onChange && this.props.onChange(minValue);\r\n } else {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }\r\n }\r\n}","/**\n* Copyright (c) 2018 Microsoft Corporation\n* Modules Registration\n* THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\n*/\nconst { log, error } = console;\nconst detailedWebpackError = (msg, errorObject) => { error(msg); error(errorObject); process.env.NODE_ENV !== 'development' && error('Run in dev mode to see full list of errors'); process.exit(50); }\nconst handleError = (modPath, errObject) => {\n detailedWebpackError('Error with path: ' + modPath, errObject);\n}\n\nconst handleMissingImplementationDetails = (functionName, connectorName, connectorType) => {\n error('----ERROR: CONNECTOR MISSING IMPLEMENTATION DETAILS-----');\n error('Missing function ' + functionName + ' from ' + connectorType + ' implementation for experimentation connector ' + connectorName);\n throw new Error('Connector missing implementation details');\n}\n\nconst verifySegmentationRegistration = (connectorName) => {\n const segmentationProvider = connectorDictionary[connectorName].provider;\n try {\n if (!segmentationProvider.__proto__.initialize) {\n handleMissingImplementationDetails('initialize', connectorName, 'provider');\n }\n if (!segmentationProvider.__proto__.getSegmentations) {\n handleMissingImplementationDetails('getSegmentations', connectorName, 'provider');\n }\n } catch (e) {\n // Connector has not implemented all the required methods, setting registration as undefined\n connectorDictionary[connectorName] = undefined;\n throw e;\n }\n}\n\nconst isServer = ()=>{\n return ! (typeof window != 'undefined' && window.document);\n}\n\nconst verifyGeoLookupRegistration = (connectorName) => {\n const geoLookupProvider = connectorDictionary[connectorName].provider;\n try {\n if (!geoLookupProvider.__proto__.initialize) {\n handleMissingImplementationDetails('initialize', connectorName, 'provider');\n }\n if (!geoLookupProvider.__proto__.getGeoInformation) {\n handleMissingImplementationDetails('getGeoInformation', connectorName, 'provider');\n }\n } catch (e) {\n // Connector has not implemented all the required methods, setting registration as undefined\n connectorDictionary[connectorName] = undefined;\n throw e;\n }\n}\n\nconst verifyExperimentationReigstration = (connectorName) => {\n const connectorImpl = connectorDictionary[connectorName].provider;\n const connectorListenerImpl = connectorDictionary[connectorName].listener;\n try {\n if (!connectorImpl.__proto__.initialize) {\n handleMissingImplementationDetails('initialize', connectorName, 'provider');\n }\n if (!connectorImpl.__proto__.getConfigForClientSideInit) {\n handleMissingImplementationDetails('getConfigForClientSideInit', connectorName, 'provider');\n }\n if (!connectorImpl.__proto__.initializeClientSide) {\n handleMissingImplementationDetails('initializeClientSide', connectorName, 'provider');\n }\n if (!connectorImpl.__proto__.getExperiments) {\n handleMissingImplementationDetails('getExperiments', connectorName, 'provider');\n }\n if (!connectorImpl.__proto__.getVariantsForUser) {\n handleMissingImplementationDetails('getVariantsForUser', connectorName, 'provider');\n }\n if (!connectorImpl.__proto__.activateExperiment) {\n handleMissingImplementationDetails('activateExperiment', connectorName, 'provider');\n }\n if (!connectorListenerImpl.__proto__.initializeClientSide) {\n handleMissingImplementationDetails('initializeClientSide', connectorName, 'listener');\n }\n if (!connectorListenerImpl.__proto__.logEvent) {\n handleMissingImplementationDetails('logEvent', connectorName, 'listener');\n }\n } catch (e) {\n // Connector has not implemented all the required methods, setting registration as undefined\n connectorDictionary[connectorName] = undefined;\n throw e;\n }\n}\n\nexport const connectorDictionary = {};\n\n\n {\n const connectorName = 'msdyn365-exp-test';\n \n let connectorProviderImpl = require('@msdyn365-commerce-modules/msdyn365-exp-test-connector/dist/lib/connectors/msdyn365-exp-test/msdyn365-exp-test.provider');\n let connectorListenerImpl = require('@msdyn365-commerce-modules/msdyn365-exp-test-connector/dist/lib/connectors/msdyn365-exp-test/msdyn365-exp-test.listener');\n let connectorDomainsList = 'https://msdyn365-exp-test.com ';\n if (!connectorProviderImpl.default) {\n throw new Error('Exp Connector provider msdyn365-exp-test does not have a default export. Check the provider file of the connector for a default export.');\n }\n if (!connectorListenerImpl.default) {\n throw new Error('Exp Connector listener msdyn365-exp-test does not have a default export. Check the listener file of the connector for a default export.');\n }\n connectorDictionary[connectorName] = {provider: connectorProviderImpl.default, listener: connectorListenerImpl.default, connectorDomains: connectorDomainsList};\n }\n\nexport const validateConnectorRegistration = () => {\n \n verifyExperimentationReigstration('msdyn365-exp-test');\n};","import Quantity from './Quantity';\r\n\r\nexport * from './Quantity.props';\r\n\r\nexport {\r\n Quantity\r\n};\r\n","import { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IDobbiesModalProps {\r\n modalBodySlots?: React.ReactNode[];\r\n modalBodyElement?:JSX.Element;\r\n isOpen: boolean;\r\n className: string;\r\n modalTitle: JSX.Element;\r\n modalFooter: JSX.Element;\r\n onModalToggle?(): void;\r\n}\r\n\r\nconst DobbiesModal: React.FC = (props: IDobbiesModalProps) => {\r\nreturn (\r\n \r\n {props.modalTitle && {props.modalTitle}}\r\n {props.modalBodySlots && {props.modalBodySlots}}\r\n {props.modalBodyElement && {props.modalBodyElement}}\r\n {props.modalFooter && {props.modalFooter}}\r\n \r\n );\r\n};\r\n\r\nexport default DobbiesModal;","import { Collapse, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport React, { useState } from 'react';\r\n\r\ninterface ICustomCollapseProps {\r\n child: AttributeValue[];\r\n}\r\n/**\r\n * VSI Customization\r\n * The CustomCollapse component renders collapse text along with collapse name. For each item, this collapse is called separately.\r\n * That's why multiple collapse can be expanded at a time.\r\n * @extends {React.PureComponent}\r\n */\r\n\r\nconst CustomCollapse: React.FC = props => {\r\n const [activeItem, SetActiveItem] = useState(0);\r\n const _toggleCollapse = (selectedItem: number) => () => {\r\n selectedItem !== activeItem ? SetActiveItem(selectedItem) : SetActiveItem(-1);\r\n };\r\n return (\r\n \r\n {props.child && props.child.filter((attribute: AttributeValue) => {\r\n return attribute.TextValue;\r\n }).map((attribute: AttributeValue, index: number) => {\r\n const isActive = (activeItem === index);\r\n return (\r\n \r\n \r\n {attribute.Name}\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 CustomCollapse;\r\n"],"sourceRoot":""}