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AM1GM,mBACJ,MAAM6D,EAAS9U,KAAKkR,yBACpBlR,KAAKmJ,SAAS,CAAEsI,IAAKqD,KArNDvE,EAAAmD,WAAqB,yBAyNjD,iHC9QO,MAAMqB,EAA+D9U,GACjEJ,EAAAA,cAACmV,EAAAA,OAAMxK,OAAAC,OAAA,GAAKxK,EAAM2T,WAAY3T,EAAM8T,mBAG/C","sources":["webpack://msdyn365.commerce.online/./src/modules/cart-affiliations-maintainer/cart-affiliations-maintainer.tsx?2b6a","webpack://msdyn365.commerce.online/./src/modules/cookbook-tagline/cookbook-tagline.tsx?306e","webpack://msdyn365.commerce.online/./src/modules/event-description/event-description.tsx?64c9","webpack://msdyn365.commerce.online/./src/modules/logo-14hands/logo-14hands.data-logo.ts?b9bc","webpack://msdyn365.commerce.online/./src/modules/logo-14hands/logo-14hands.tsx?03f4","webpack://msdyn365.commerce.online/./src/modules/mailing-list/mailing-input-group.tsx?343f","webpack://msdyn365.commerce.online/./src/modules/mailing-list/mailing-form.tsx?216a","webpack://msdyn365.commerce.online/./src/modules/mailing-list/mailing-list.tsx?314a","webpack://msdyn365.commerce.online/./src/dataActions/wine-club-upsell.ts?e69d","webpack://msdyn365.commerce.online/./src/modules/offer-option-container/offer-option-container.tsx?1c92","webpack://msdyn365.commerce.online/./src/modules/product-apellation/product-apellation.tsx?e3fe","webpack://msdyn365.commerce.online/./src/modules/product-link/product-link.tsx?6e4e","webpack://msdyn365.commerce.online/./src/modules/single-product-container/single-product-container.tsx?d7a3","webpack://msdyn365.commerce.online/./src/themes/fth/fth.tsx?7aff","webpack://msdyn365.commerce.online/./src/themes/wine-estates/wne.tsx?cbdd","webpack://msdyn365.commerce.online/./src/modules/default-page/default-page.tsx?b382","webpack://msdyn365.commerce.online/./src/modules/notifications-list/notifications-list.tsx?8377","webpack://msdyn365.commerce.online/./src/modules/notifications-list/notifications-list.view.tsx?d466"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\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 * as React from 'react';\r\n\r\nimport { ICartAffiliationsMaintainerData } from './cart-affiliations-maintainer.data';\r\nimport { ICartAffiliationsMaintainerProps } from './cart-affiliations-maintainer.props.autogenerated';\r\n\r\nimport { BaseCartState, GlobalStateInput, ICartState } from '@msdyn365-commerce/global-state';\r\n\r\nexport interface ICartAffiliationsMaintainerViewProps extends ICartAffiliationsMaintainerProps<ICartAffiliationsMaintainerData> {\r\n\r\n}\r\n\r\ntype AffiliationCache = number[];\r\n\r\n/**\r\n *\r\n * CartAffiliationsMaintainer component\r\n * @extends {React.PureComponent<ICartAffiliationsMaintainerProps<ICartAffiliationsMaintainerData>>}\r\n */\r\nclass CartAffiliationsMaintainer extends React.Component<ICartAffiliationsMaintainerProps<ICartAffiliationsMaintainerData>> {\r\n\r\n private static readonly AFFILIATION_LOCATION: string = 'CACHED_AFFIL';\r\n\r\n public componentDidMount(): void {\r\n var isLoggedIn = this.props.context.request.user.customerAccountNumber &&\r\n this.props.context.request.user.isAuthenticated;\r\n // tslint:disable-next-line: no-typeof-undefined\r\n if (typeof window !== 'undefined' && isLoggedIn) {\r\n void this._runAffiliationCheck();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n return <div />;\r\n }\r\n\r\n private async _runAffiliationCheck(): Promise<void> {\r\n const customer = await this.props.data.customer;\r\n const currentAffils = customer.CustomerAffiliations || [];\r\n\r\n const cachedAffils = this._cachedAffiliations;\r\n\r\n // check if affiliations\r\n if (currentAffils.length !== cachedAffils.length) {\r\n await this._cacheAffiliations();\r\n return this._updateCart();\r\n }\r\n\r\n for (const curAffil of currentAffils) {\r\n const isInCache = cachedAffils.find(cachedAffil => curAffil.RecordId === cachedAffil);\r\n if (!isInCache) {\r\n await this._cacheAffiliations();\r\n return this._updateCart();\r\n }\r\n }\r\n }\r\n\r\n private async _updateCart(): Promise<void> {\r\n const cart = await this.props.data.cart;\r\n\r\n // if no cart items, no point\r\n if (cart.totalItemsInCart === 0) { return; }\r\n\r\n const firstLine = cart.cart.CartLines?.find(line => !!line)!;\r\n await cart.updateCartLineQuantity({\r\n cartLineId: firstLine.LineId!,\r\n newQuantity: firstLine.Quantity!\r\n });\r\n\r\n // @ts-ignore\r\n cart.isInitialized = false;\r\n await cart.initialize();\r\n\r\n // taken from addtocart.component.tsx:updateCart()\r\n setTimeout(async () => {\r\n const context = this.props.context;\r\n const cartInput = new GlobalStateInput<ICartState>('CARTSTATE', BaseCartState, context.actionContext.requestContext.apiSettings);\r\n context.actionContext.update(cartInput, cart);\r\n await cart.refreshCart({});\r\n }, 10);\r\n }\r\n\r\n private async _cacheAffiliations(): Promise<void> {\r\n const customer = await this.props.data.customer;\r\n const affils = customer.CustomerAffiliations || [];\r\n\r\n const affilIds = affils.map(affil => affil.RecordId);\r\n\r\n window.localStorage.setItem(\r\n CartAffiliationsMaintainer.AFFILIATION_LOCATION,\r\n JSON.stringify(affilIds)\r\n );\r\n }\r\n\r\n private get _cachedAffiliations(): AffiliationCache {\r\n const affiliationStr = window.localStorage.getItem(\r\n CartAffiliationsMaintainer.AFFILIATION_LOCATION\r\n ) || '[]';\r\n\r\n return JSON.parse(affiliationStr) as AffiliationCache;\r\n }\r\n}\r\n\r\nexport default CartAffiliationsMaintainer;\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\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\nimport { ICookbookTaglineData } from './cookbook-tagline.data';\r\nimport { ICookbookTaglineProps } from './cookbook-tagline.props.autogenerated';\r\n\r\n/**\r\n *\r\n * CookbookTagline component\r\n * @extends {React.PureComponent<ICookbookTaglineProps<ICookbookTaglineData>>}\r\n */\r\nclass CookbookTagline extends React.PureComponent<\r\n ICookbookTaglineProps<ICookbookTaglineData>\r\n> {\r\n private _productCookbookTagLine: string = 'COOKBOOKTAGLINE';\r\n public render(): JSX.Element | null {\r\n const content: ICookbookTaglineData = this.props.data;\r\n if (\r\n !(\r\n content &&\r\n content.productSpecificationData &&\r\n content.productSpecificationData.result\r\n )\r\n ) {\r\n return null;\r\n }\r\n const productAttributes = content.productSpecificationData.result;\r\n const productAttribute = productAttributes.filter(\r\n attribute =>\r\n attribute.Name!.toUpperCase() === this._productCookbookTagLine\r\n );\r\n if (\r\n productAttribute &&\r\n productAttribute.length &&\r\n productAttribute[0].TextValue\r\n ) {\r\n return (\r\n <div className='product-attribute-nv'>\r\n <RichTextComponent\r\n className='product-attribute-nv-value'\r\n text={productAttribute[0].TextValue}\r\n />\r\n </div>\r\n );\r\n }\r\n return null;\r\n }\r\n}\r\n\r\nexport default CookbookTagline;\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\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { IEventDescriptionData } from './event-description.data';\r\nimport { IEventDescriptionProps } from './event-description.props.autogenerated';\r\n\r\n/**\r\n *\r\n * EventDescription component\r\n * @extends {React.PureComponent<IEventDescriptionProps<IEventDescriptionData>>}\r\n */\r\nclass EventDescription extends React.PureComponent<IEventDescriptionProps<IEventDescriptionData>> {\r\n public render(): JSX.Element | null {\r\n const { eventDescription } = this.props.data;\r\n if (eventDescription.result && (eventDescription.result.intro || eventDescription.result.body)) {\r\n return (\r\n <div className='product-attribute'>\r\n <div className='product-attribute-nv product-attribute-event-description'>\r\n {eventDescription.result.intro && this._renderEventDescription(eventDescription.result.intro, 'intro')}\r\n {eventDescription.result.body && this._renderEventDescription(eventDescription.result.body, 'body')}\r\n </div>\r\n </div>\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderEventDescription(eventDescription: string, className: string): JSX.Element {\r\n return (\r\n <RichTextComponent\r\n className={`product-attribute-nv-value product-attribute-event-description-${className}`}\r\n text={eventDescription}\r\n />\r\n );\r\n }\r\n}\r\n\r\nexport default EventDescription;\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\n/* tslint:disable:max-line-length */\r\n\r\nexport const dataSvg = {\r\n viewBox: '0 0 110 40',\r\n paths: [\r\n {\r\n hover: false,\r\n d: 'M52.809 14.858l1.939-4.156 2.035 4.156h-3.974zM74.347 8.13h1.862v7.458l-6.469-8.139h-5.097v0.681h1.862v11.758h-3.618l-6.373-12.938h-0.816l-6.037 12.938h-3.618v-11.758h1.862v-0.681h-7.093v0.681h1.862v5.413h-5.423v-5.413h1.862v-0.681h-7.093v0.681h1.862v11.758h-1.862v0.681h7.093v-0.681h-1.862v-5.663h5.423v5.663h-1.862v0.681h11.326v-0.681h-1.68l2.044-4.348h4.588l2.14 4.348h-1.756v0.681h11.642v-0.681h-1.862v-10.395l8.84 11.076h0.864v-12.439h1.862v-0.681h-4.482v0.681z'\r\n },\r\n {\r\n hover: false,\r\n d: 'M85.039 8.101c0.096-0.010 0.202-0.019 0.317-0.019 0.221 0 0.461-0.010 0.729-0.010 1.142 0 2.073 0.144 2.764 0.432 0.681 0.278 1.209 0.681 1.584 1.2 0.374 0.528 0.633 1.161 0.758 1.9 0.134 0.758 0.202 1.622 0.202 2.572 0 0.403-0.019 0.816-0.058 1.238s-0.115 0.864-0.24 1.296c-0.125 0.422-0.307 0.835-0.547 1.219-0.23 0.384-0.557 0.729-0.96 1.017-0.403 0.298-0.902 0.538-1.497 0.71s-1.334 0.269-2.188 0.269c-0.25 0-0.537-0.010-0.854-0.038v-11.786zM93.562 9.867c-0.47-0.489-1.027-0.902-1.632-1.219s-1.248-0.566-1.92-0.758c-0.681-0.192-1.373-0.317-2.044-0.394-1.401-0.144-2.697-0.115-4.012-0.077-0.691 0.019-1.373 0.019-2.064 0.019h-2.083v0.681h1.872v11.758h-1.862v0.681h2.083c0.768 0 1.536 0.010 2.294 0.019s1.526 0.019 2.304 0.019c0.537 0 1.123-0.038 1.737-0.106 0.624-0.067 1.267-0.202 1.9-0.394 0.633-0.182 1.257-0.442 1.852-0.749 0.605-0.317 1.142-0.729 1.603-1.219s0.845-1.085 1.123-1.756c0.278-0.672 0.422-1.469 0.422-2.361 0-0.902-0.144-1.699-0.422-2.38-0.288-0.681-0.672-1.277-1.152-1.766z'\r\n },\r\n {\r\n hover: false,\r\n d: 'M107.671 14.675c-0.269-0.422-0.614-0.797-1.037-1.094-0.413-0.288-0.893-0.537-1.44-0.729-0.509-0.182-1.056-0.355-1.612-0.509-0.547-0.154-1.085-0.307-1.603-0.441-0.509-0.144-0.96-0.307-1.344-0.489-0.374-0.182-0.691-0.403-0.921-0.653-0.211-0.23-0.317-0.528-0.317-0.893 0-0.24 0.067-0.47 0.192-0.701 0.134-0.23 0.326-0.451 0.595-0.643 0.259-0.202 0.585-0.355 0.979-0.489 0.384-0.125 0.845-0.182 1.363-0.182 0.624 0 1.142 0.096 1.545 0.278s0.739 0.432 0.998 0.739c0.269 0.307 0.49 0.662 0.672 1.046 0.182 0.403 0.346 0.806 0.509 1.219l0.058 0.134h0.624v-3.82h-0.672l-0.058 0.125c-0.077 0.163-0.125 0.211-0.134 0.221 0 0-0.048 0.029-0.24 0.029-0.144 0-0.298-0.029-0.47-0.096-0.202-0.067-0.432-0.144-0.691-0.23-0.259-0.077-0.566-0.154-0.902-0.23-0.355-0.077-0.749-0.115-1.219-0.115-0.72 0-1.401 0.106-2.025 0.326-0.614 0.211-1.161 0.499-1.612 0.854s-0.816 0.768-1.065 1.229c-0.259 0.47-0.394 0.969-0.394 1.478 0 0.672 0.125 1.248 0.384 1.708 0.25 0.451 0.595 0.845 1.008 1.142 0.413 0.307 0.883 0.557 1.392 0.739 0.49 0.182 1.017 0.346 1.555 0.489l1.536 0.403c0.47 0.125 0.912 0.278 1.296 0.461 0.365 0.182 0.653 0.403 0.864 0.662 0.202 0.25 0.307 0.566 0.307 0.95 0 0.211-0.048 0.461-0.154 0.758-0.096 0.288-0.269 0.566-0.509 0.825s-0.576 0.48-1.008 0.662c-0.432 0.182-0.998 0.278-1.68 0.278-0.202 0-0.422 0-0.653-0.010-0.221 0-0.451-0.038-0.701-0.096-0.25-0.067-0.509-0.163-0.787-0.298-0.269-0.125-0.547-0.317-0.854-0.595-0.269-0.221-0.499-0.47-0.681-0.729s-0.346-0.528-0.47-0.787c-0.125-0.25-0.211-0.489-0.278-0.72-0.067-0.221-0.115-0.403-0.134-0.538l-0.029-0.173h-0.701v4.386h0.681l0.058-0.134c0.067-0.173 0.134-0.221 0.134-0.221 0.019-0.010 0.096-0.048 0.288-0.048 0.086 0 0.25 0.019 0.566 0.096 0.278 0.067 0.595 0.144 0.96 0.221 0.355 0.077 0.749 0.144 1.161 0.221 0.442 0.077 0.854 0.115 1.277 0.115 0.854 0 1.651-0.125 2.342-0.355 0.701-0.24 1.315-0.566 1.833-0.969 0.509-0.403 0.912-0.893 1.2-1.44 0.278-0.557 0.432-1.142 0.432-1.756 0-0.633-0.144-1.171-0.413-1.612z'\r\n },\r\n {\r\n hover: false,\r\n d: 'M10.951 8.187l0.163-0.749h-7.592l-0.163 0.749h2.188l-2.467 11.268h-2.188l-0.163 0.758h7.592l0.163-0.758h-2.188l2.467-11.268z'\r\n },\r\n {\r\n hover: false,\r\n d: 'M28.852 0.489h-1.977c-0.912 0-1.305 0.451-1.718 1.027l-14.455 18.697h7.784l-1.181 5.385h3.772l1.181-5.385h5.193l0.288-1.315h-5.193l1.612-7.352h-0.566l-0.067 0.106c-0.442 0.768-1.373 2.38-3.551 2.524l-0.163 0.010-1.027 4.713h-6.152l16.614-17.008c0.278-0.298 0.413-0.451 0.47-0.72 0.048-0.221-0.019-0.355-0.086-0.442-0.192-0.24-0.557-0.24-0.777-0.24z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M29.773 29.658h-0.029c-0.259 0-0.461-0.211-0.461-0.47s0.211-0.47 0.461-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM31.482 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47s-0.211 0.47-0.461 0.47zM33.181 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM34.889 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47s-0.211 0.47-0.461 0.47zM36.588 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM38.296 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47s-0.202 0.47-0.461 0.47zM39.995 29.658h-0.029c-0.259 0-0.461-0.211-0.461-0.47s0.211-0.47 0.461-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM41.704 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47s-0.202 0.47-0.461 0.47zM43.403 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM45.111 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47-0.010 0.259-0.211 0.47-0.47 0.47zM46.81 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM48.518 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47zM50.227 29.658h-0.029c-0.259 0-0.461-0.211-0.461-0.47s0.211-0.47 0.461-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47-0.010 0.259-0.221 0.47-0.47 0.47zM51.926 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47 0.010 0.259-0.202 0.47-0.461 0.47zM53.634 29.658h-0.029c-0.259 0-0.461-0.211-0.461-0.47s0.211-0.47 0.461-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47-0.010 0.259-0.221 0.47-0.47 0.47zM55.333 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47 0.010 0.259-0.202 0.47-0.461 0.47zM57.041 29.658h-0.029c-0.259 0-0.461-0.211-0.461-0.47s0.211-0.47 0.461-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47-0.010 0.259-0.211 0.47-0.47 0.47zM58.74 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47 0.010 0.259-0.202 0.47-0.461 0.47zM60.449 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47-0.010 0.259-0.211 0.47-0.47 0.47zM62.148 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.461 0.211 0.461 0.47 0.010 0.259-0.202 0.47-0.461 0.47zM63.856 29.658h-0.029c-0.259 0-0.47-0.211-0.47-0.47s0.211-0.47 0.47-0.47h0.029c0.259 0 0.47 0.211 0.47 0.47s-0.211 0.47-0.47 0.47z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M66.515 26.846c-0.096-0.576-0.115-0.739-0.346-0.797l-0.269-0.048 0.038-0.221h2.304l-0.038 0.221-0.461 0.048c-0.115 0.019-0.24 0.048-0.24 0.221s0.029 0.346 0.048 0.509l0.442 3.311h0.019l1.929-4.223c0.125-0.058 0.259-0.096 0.422-0.096l0.825 4.31h0.019l1.181-2.755c0.24-0.566 0.403-1.027 0.403-1.142s-0.106-0.125-0.23-0.144l-0.413-0.048 0.038-0.221h1.92l-0.038 0.221-0.259 0.029c-0.355 0.038-0.557 0.614-0.873 1.305l-1.91 4.070c-0.173 0.086-0.317 0.115-0.518 0.134l-0.806-4.156h-0.019l-1.891 4.012c-0.192 0.106-0.278 0.115-0.509 0.134l-0.768-4.674z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M75.22 31.184l0.307-0.038c0.288-0.038 0.317-0.202 0.413-0.806l0.557-3.503c0.019-0.106 0.058-0.413 0.058-0.538 0-0.106 0-0.23-0.221-0.269l-0.307-0.038 0.038-0.221h2.217l-0.038 0.221-0.298 0.038c-0.298 0.038-0.317 0.211-0.413 0.806l-0.557 3.503c-0.038 0.221-0.067 0.422-0.067 0.538 0 0.096 0 0.24 0.221 0.269l0.307 0.038-0.038 0.221h-2.217l0.038-0.221z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M79.587 31.184l0.326-0.048c0.326-0.048 0.394-0.489 0.49-1.085l0.681-4.271c0.125-0.029 0.221-0.038 0.365-0.048l3.119 4.204 0.48-3.014c0.029-0.154 0.048-0.317 0.048-0.48 0-0.259-0.038-0.374-0.288-0.403l-0.365-0.038 0.038-0.221h1.872l-0.038 0.221-0.336 0.038c-0.326 0.038-0.384 0.413-0.451 0.883l-0.72 4.492c-0.144 0.048-0.202 0.048-0.374 0.067l-3.1-4.204-0.442 2.783c-0.038 0.269-0.067 0.538-0.067 0.701 0 0.24 0.086 0.365 0.25 0.384l0.413 0.048-0.038 0.221h-1.891l0.029-0.23z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M87.602 31.184l0.307-0.038c0.288-0.038 0.317-0.202 0.413-0.806l0.557-3.503c0.019-0.106 0.058-0.413 0.058-0.538 0-0.106 0-0.23-0.221-0.269l-0.307-0.038 0.038-0.221h3.887c0.010 0.106 0.010 0.25 0.010 0.346 0 0.269-0.096 0.902-0.125 1.065h-0.288c-0.038-0.864-0.154-1.113-0.931-1.113h-0.96l-0.355 2.256h0.797c0.547 0 0.71-0.029 0.797-0.326l0.106-0.346h0.269l-0.269 1.641h-0.269v-0.326c0-0.298-0.077-0.336-0.643-0.336h-0.835l-0.365 2.323c0.317 0.115 0.633 0.144 0.95 0.144 1.257 0 1.305-0.48 1.651-1.257l0.307 0.048c-0.058 0.403-0.288 1.113-0.49 1.497h-4.118l0.029-0.202z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M96.096 28.621h0.422c0.653 0 1.392-0.499 1.392-1.478 0-0.643-0.374-1.065-0.979-1.065-0.154 0-0.307 0.019-0.451 0.058l-0.384 2.486zM94.071 31.184l0.307-0.038c0.288-0.038 0.317-0.202 0.413-0.806l0.557-3.503c0.029-0.163 0.058-0.326 0.058-0.489 0-0.134 0-0.288-0.221-0.317l-0.307-0.038 0.038-0.221h2.275c1.094 0 1.872 0.317 1.872 1.334 0 0.969-1.037 1.43-1.373 1.536 0.067 0.259 0.346 1.075 0.653 1.718 0.355 0.758 0.49 0.825 0.749 0.825l-0.038 0.221h-0.758c-0.384 0-0.624-0.192-0.787-0.489-0.499-0.883-0.499-2.006-1.123-2.006h-0.336l-0.221 1.421c-0.038 0.221-0.067 0.422-0.067 0.538 0 0.096 0 0.24 0.221 0.269l0.307 0.038-0.038 0.221h-2.217l0.038-0.211z'\r\n },\r\n {\r\n hover: true,\r\n d: 'M101.346 31.184l0.461-0.048c0.336-0.038 0.346-0.202 0.413-0.624l0.134-0.864c0.019-0.106 0.019-0.192 0.019-0.278 0-0.067-0.038-0.346-0.077-0.47l-0.845-2.265c-0.163-0.432-0.278-0.557-0.432-0.585l-0.24-0.038 0.038-0.221h2.4l-0.038 0.221-0.48 0.048c-0.106 0.019-0.25 0.038-0.25 0.163 0 0.038 0.029 0.192 0.077 0.336l0.758 2.198 0.816-1.305c0.346-0.557 0.681-1.142 0.681-1.277 0-0.077-0.086-0.106-0.182-0.115l-0.442-0.048 0.038-0.221h1.92l-0.038 0.221-0.25 0.029c-0.115 0.019-0.307 0.115-0.528 0.422l-1.286 1.814c-0.336 0.48-0.547 0.893-0.624 1.363l-0.144 0.893c-0.019 0.115-0.038 0.24-0.038 0.355 0 0.192 0.096 0.24 0.259 0.259l0.442 0.048-0.038 0.221h-2.563l0.038-0.23z'\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 classname from 'classnames';\r\nimport * as React from 'react';\r\nimport { ILogo14HandsData } from './logo-14hands.data';\r\nimport { dataSvg } from './logo-14hands.data-logo';\r\nimport { ILogo14handsConfig, ILogo14handsProps } from './logo-14hands.props.autogenerated';\r\n\r\n// ==============================================================================\r\n// Interfaces\r\n// ==============================================================================\r\ninterface IDataSvgPath {\r\n hover: boolean;\r\n d: string;\r\n}\r\n\r\n// ==============================================================================\r\n/**\r\n * Logo14hands component\r\n * @extends {React.PureComponent<ILogo14handsProps<ILogo14handsData>>}\r\n */\r\n// ==============================================================================\r\nclass Logo14hands extends React.PureComponent<ILogo14handsProps<ILogo14HandsData>> {\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n public render(): JSX.Element {\r\n const { config } = this.props;\r\n\r\n return (\r\n <div className={classname('logo-14hands', config.className)} >\r\n {this._renderLogo(config)}\r\n </div>\r\n );\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n private _renderLogo(config: ILogo14handsConfig):JSX.Element {\r\n if (config.link && config.link.linkUrl.destinationUrl) {\r\n return (\r\n <a href={config.link.linkUrl.destinationUrl} aria-label={config.link.ariaLabel}>\r\n {this._renderSvg()}\r\n </a>\r\n );\r\n } else {\r\n return this._renderSvg();\r\n }\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n private _renderSvg():JSX.Element {\r\n return (\r\n <svg className='logo-14hands-svg' viewBox={dataSvg.viewBox}>\r\n {dataSvg.paths.map((path: IDataSvgPath, index: number) =>\r\n <path\r\n className={classname('logo-14hands-path', this._getActivePath(path.hover))}\r\n key={index}\r\n d={path.d}\r\n />\r\n )}\r\n </svg>\r\n );\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n private _getActivePath(hover: boolean): string | null {\r\n return hover ? 'logo-14hands-path-active' : null;\r\n }\r\n}\r\n\r\nexport default Logo14hands;","import { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\n// ==============================================================================\r\n// TYPE DEFINITIONS\r\n// ==============================================================================\r\n\r\ninterface IMailingInputGroupProps {\r\n label: string;\r\n isValid?: boolean;\r\n validationMessage?: string;\r\n initialValue: string;\r\n onValueChange(newValue: string): void;\r\n onLoseFirstFocus(labelBlurred: string): void;\r\n}\r\n\r\n// ==============================================================================\r\n// CLASS DEFINITIONS\r\n// ==============================================================================\r\n\r\n/**\r\n * class definition for a control group for mailing\r\n */\r\n@observer\r\nexport class MailingInputGroup extends React.Component<IMailingInputGroupProps> {\r\n\r\n // ==========================================================================\r\n // FIELDS\r\n // ==========================================================================\r\n\r\n @observable private _internalValue: string = '';\r\n\r\n // ==========================================================================\r\n // PUBLIC METHODS\r\n // ==========================================================================\r\n\r\n public constructor(props: IMailingInputGroupProps) {\r\n super(props);\r\n this._internalValue = props.initialValue;\r\n\r\n this._onInputChange = this._onInputChange.bind(this);\r\n this._onBlur = this._onBlur.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n <div>\r\n <label>{this.props.label}</label>\r\n <input\r\n type='text'\r\n value={this._internalValue}\r\n onChange={this._onInputChange}\r\n onBlur={this._onBlur}\r\n />\r\n {this._renderValidation()}\r\n </div>\r\n );\r\n }\r\n\r\n // ==========================================================================\r\n // COMPONENT EVENTS\r\n // ==========================================================================\r\n\r\n private _onBlur(): void {\r\n this.props.onLoseFirstFocus(this.props.label);\r\n }\r\n\r\n private _onInputChange(event: React.ChangeEvent<HTMLInputElement>): void {\r\n this._internalValue = event.target.value;\r\n this.props.onValueChange(event.target.value);\r\n }\r\n\r\n // ==========================================================================\r\n // PRIVATE METHODS\r\n // ==========================================================================\r\n\r\n private _renderValidation(): JSX.Element | void {\r\n if (!this.props.isValid && this.props.isValid !== undefined) {\r\n return (\r\n <p className='error'>\r\n {this._validationMessage}\r\n </p>\r\n );\r\n }\r\n }\r\n\r\n private get _validationMessage(): string {\r\n return (this.props.validationMessage) ? this.props.validationMessage : 'Field is required';\r\n }\r\n\r\n}","import { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { MailingInputGroup } from './mailing-input-group';\r\n\r\n// ==============================================================================\r\n// TYPE DEFINITIONS\r\n// ==============================================================================\r\n\r\nexport type mailingFormUserInfo = {\r\n firstName: string;\r\n zipCode: string;\r\n email: string;\r\n};\r\n\r\ntype validationField = {\r\n value: string;\r\n label: string;\r\n isValid?: boolean;\r\n errorMessage?: string;\r\n beenBlurred?: boolean;\r\n};\r\n\r\ninterface IMailingFormComponentProps {\r\n onSubmit(userInfo: mailingFormUserInfo): unknown;\r\n}\r\n\r\n// ==============================================================================\r\n// CLASS DEFINITIONS\r\n// ==============================================================================\r\n\r\n/**\r\n * component responsible for gathering user information for mailing\r\n */\r\n@observer\r\nexport class MailingFormComponent extends React.Component<IMailingFormComponentProps> {\r\n\r\n // ==========================================================================\r\n // FIELDS\r\n // ==========================================================================\r\n\r\n @observable private _firstName: validationField = {\r\n label: 'First Name*',\r\n value: ''\r\n };\r\n\r\n @observable private _zipCode: validationField = {\r\n label: 'Zip Code*',\r\n value: ''\r\n };\r\n @observable private _email: validationField = {\r\n label: 'Email*',\r\n value: ''\r\n };\r\n\r\n private _emailRegex: RegExp = /^[-a-z0-9!#$%&'*+/=?^_`{|}~]+(?:\\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*@(?:[a-z0-9]+(?:-+[a-z0-9]+)*\\.)+(?:xn--[a-z0-9]+|[a-z]{2,16})$/i;\r\n private _zipCodeRegex: RegExp = /^[0-9]{5}(?:-[0-9]{4})?$/;\r\n\r\n // ==========================================================================\r\n // PUBLIC METHODS\r\n // ==========================================================================\r\n\r\n public constructor(props: IMailingFormComponentProps) {\r\n super(props);\r\n\r\n this._onSubmitForm = this._onSubmitForm.bind(this);\r\n\r\n this._onFirstNameChange = this._onFirstNameChange.bind(this);\r\n this._onZipCodeChange = this._onZipCodeChange.bind(this);\r\n this._onEmailChange = this._onEmailChange.bind(this);\r\n this._lostFocus = this._lostFocus.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n\r\n return (\r\n <div>\r\n <MailingInputGroup\r\n initialValue={this._firstName.value}\r\n label={this._firstName.label}\r\n isValid={this._firstName.isValid}\r\n validationMessage={this._firstName.errorMessage}\r\n onValueChange={this._onFirstNameChange}\r\n onLoseFirstFocus={this._lostFocus}\r\n />\r\n <MailingInputGroup\r\n initialValue={this._zipCode.value}\r\n label={this._zipCode.label}\r\n isValid={this._zipCode.isValid}\r\n validationMessage={this._zipCode.errorMessage}\r\n onValueChange={this._onZipCodeChange}\r\n onLoseFirstFocus={this._lostFocus}\r\n />\r\n <MailingInputGroup\r\n initialValue={this._email.value}\r\n label={this._email.label}\r\n isValid={this._email.isValid}\r\n validationMessage={this._email.errorMessage}\r\n onValueChange={this._onEmailChange}\r\n onLoseFirstFocus={this._lostFocus}\r\n />\r\n <button\r\n className={\r\n `btn btn-primary ${this._isButtonDisabled() ? 'disabled' : ''}`\r\n }\r\n onClick={this._onSubmitForm}\r\n disabled={this._isButtonDisabled()}\r\n >\r\n SUBMIT\r\n </button>\r\n </div>\r\n );\r\n }\r\n\r\n // ==========================================================================\r\n // COMPONENT EVENTS\r\n //\r\n // ALL EVENTS ARE ALSO TIED TO THEIR RESPECTIVE VALIDATORS\r\n // ==========================================================================\r\n\r\n private _onFirstNameChange(name: string): void {\r\n this._firstName.value = name;\r\n if (!this._firstName.beenBlurred) { return; }\r\n this._testForRequirement(this._firstName, 'Please enter your first name.');\r\n }\r\n\r\n private _onZipCodeChange(code: string): void {\r\n this._zipCode.value = code;\r\n\r\n if (!this._zipCode.beenBlurred) { return; }\r\n this._testForRequirement(this._zipCode, 'Please enter your zip code.');\r\n if (this._zipCode.isValid) {\r\n this._testForRegex(this._zipCode, this._zipCodeRegex, 'Please enter a valid Zip Code.');\r\n }\r\n }\r\n private _onEmailChange(email: string): void {\r\n this._email.value = email;\r\n\r\n if (!this._email.beenBlurred) { return; }\r\n this._testForRequirement(this._email, 'Please enter your email address.');\r\n if (this._email.isValid) {\r\n this._testForRegex(this._email, this._emailRegex, 'Please enter a valid email address.');\r\n }\r\n }\r\n\r\n // ==========================================================================\r\n // PRIVATE METHODS\r\n // ==========================================================================\r\n\r\n /**\r\n * determines if the button is conditionally disabled currently\r\n */\r\n private _isButtonDisabled(): boolean {\r\n\r\n // button will only be disabled if all input fields are considered invalid\r\n // or undefined (meaning not filled out or touched)\r\n return !(this._firstName.isValid && this._zipCode.isValid && this._email.isValid);\r\n }\r\n\r\n /**\r\n * this method checks which field was blurred and sets the beenBlurred\r\n * boolean to true, meaning that it was noticed by the user and can now show\r\n * error messages\r\n *\r\n * @param label the label of the field that has lost its focus\r\n */\r\n private _lostFocus(label: string): unknown {\r\n\r\n // also run all change events related to the field so that the proper\r\n // errors propogate on blur\r\n switch (label) {\r\n case this._firstName.label:\r\n this._firstName.beenBlurred = true;\r\n return this._onFirstNameChange(this._firstName.value);\r\n case this._zipCode.label:\r\n this._zipCode.beenBlurred = true;\r\n return this._onZipCodeChange(this._zipCode.value);\r\n case this._email.label:\r\n this._email.beenBlurred = true;\r\n return this._onEmailChange(this._email.value);\r\n default:\r\n return console.warn('[mailing-form:MailingFormComponent._lostFocus] failed to link a field');\r\n }\r\n }\r\n\r\n /**\r\n * method responsible for sending all values submitted to the parent\r\n */\r\n private _onSubmitForm(): void {\r\n this.props.onSubmit({\r\n email: this._email.value,\r\n firstName: this._firstName.value,\r\n zipCode: this._zipCode.value\r\n });\r\n }\r\n\r\n // ==============================================================================\r\n // VALIDATION METHODS\r\n // ==============================================================================\r\n\r\n private _testForRequirement(field: validationField, errorMessage: string): void {\r\n if (field.value.length === 0) {\r\n field.isValid = false;\r\n field.errorMessage = errorMessage;\r\n } else {\r\n field.isValid = true;\r\n }\r\n\r\n // hack for not re-rendering field value for first time after blur for some\r\n // reason\r\n this.setState({});\r\n }\r\n\r\n private _testForRegex(field: validationField, regex: RegExp, errorMessage: string): void {\r\n if (regex.test(field.value)) {\r\n field.isValid = true;\r\n } else {\r\n field.isValid = false;\r\n field.errorMessage = errorMessage;\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 * as React from 'react';\r\n\r\nimport { getRichTextHtml, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { MailingFormComponent, mailingFormUserInfo } from './mailing-form';\r\nimport { IMailingListData } from './mailing-list.data';\r\nimport { IMailingListProps } from './mailing-list.props.autogenerated';\r\n\r\n// ==============================================================================\r\n// CLASS DEFINITIONS\r\n// ==============================================================================\r\n/**\r\n *\r\n * ColsolareMailingList component\r\n * @extends {React.Component<IMailingListProps<IMailingListData>>}\r\n */\r\nclass MailingList extends React.Component<IMailingListProps<IMailingListData>> {\r\n\r\n // ==========================================================================\r\n // PUBLIC METHODS\r\n // ==========================================================================\r\n\r\n public constructor(props: IMailingListProps<IMailingListData>) {\r\n super(props);\r\n\r\n this._onSubmit = this._onSubmit.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n <div className='row'>\r\n {this._formPage}\r\n {this._backgroundImage}\r\n </div>\r\n );\r\n }\r\n\r\n // ==========================================================================\r\n // COMPONENT EVENTS\r\n // ==========================================================================\r\n\r\n private _onSubmit(userInfo: mailingFormUserInfo): void {\r\n console.log(userInfo);\r\n\r\n // TODO: send info to add to contact form via data action then change\r\n // page state\r\n\r\n console.log('%cUser will be navigated away from this page and to a confirmation page', 'color: green; font-size:55px;');\r\n console.log(`%c${this.props.config.confirmationURL} <--- url to use`, 'color: green; font-size:25px;');\r\n\r\n }\r\n\r\n // ==========================================================================\r\n // COMPONENT PAGES\r\n // ==========================================================================\r\n\r\n private get _backgroundImage(): JSX.Element | null {\r\n const image = this.props.config.imageURL;\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=24&h=24&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=24&h=24&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n if (image) {\r\n return (\r\n <div className='col-8 mailing-list-image'>\r\n <Image\r\n {...image}\r\n gridSettings={this.props.context.request.gridSettings!}\r\n imageSettings={image.imageSettings || defaultImageSettings}\r\n />\r\n </div>\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private get _formPage(): JSX.Element {\r\n const {\r\n marketingContactSupport,\r\n marketingDescription\r\n } = this.props.config;\r\n return (\r\n <div className={`mailing-list ${this._mailingListColType}`}>\r\n <h1>Mailings</h1>\r\n {\r\n marketingDescription &&\r\n // tslint:disable-next-line:react-no-dangerous-html\r\n <p\r\n className='mailing-list-header-info'\r\n dangerouslySetInnerHTML={getRichTextHtml(marketingDescription)}\r\n />\r\n }\r\n <h2>Please Enter Your Information</h2>\r\n <MailingFormComponent\r\n onSubmit={this._onSubmit}\r\n />\r\n {\r\n marketingContactSupport &&\r\n // tslint:disable-next-line:react-no-dangerous-html\r\n <label\r\n className='mailing-list-contact'\r\n dangerouslySetInnerHTML={getRichTextHtml(marketingContactSupport)}\r\n />\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private get _mailingListColType(): string {\r\n return (this.props.config.imageURL) ? 'col-4' : 'col';\r\n }\r\n}\r\n\r\nexport default MailingList;\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\nimport { offerSelectionInput } from './DataActionExtension.g';\r\nimport { IrsmOfferSelectionsResponse } from './DataServiceEntities.g';\r\n\r\n/**\r\n * WineClubUpsell Input Action\r\n */\r\n\r\nexport class WineClubUpsellInput implements Msdyn365.IActionInput {\r\n public input: IDataServiceRequest;\r\n constructor(input: IDataServiceRequest) {\r\n this.input = input;\r\n }\r\n\r\n public shouldCacheOutput = () => { return false; };\r\n public getCacheKey = () => `IWineClubUpsell`;\r\n public getCacheObjectType = () => 'IWineClubUpsell';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nexport type wineClubUpsell = {\r\n customerId: string;\r\n wineClubId: string;\r\n offerId: string;\r\n};\r\n\r\nexport const createWineClubUpsellInput = (inputData: wineClubUpsell): WineClubUpsellInput => {\r\n return new WineClubUpsellInput(\r\n offerSelectionInput(\r\n inputData.customerId,\r\n inputData.wineClubId,\r\n inputData.offerId\r\n )\r\n );\r\n};\r\n\r\nexport async function wineClubUpsellAction(input: WineClubUpsellInput, ctx: Msdyn365.IActionContext): Promise<IrsmOfferSelectionsResponse> {\r\n return input.input.execute(ctx);\r\n}\r\n\r\nexport const IWineClubUpsellAction = Msdyn365.createObservableDataAction({\r\n action: <Msdyn365.IAction<IrsmOfferSelectionsResponse>>wineClubUpsellAction,\r\n input: createWineClubUpsellInput\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 { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { createWineClubUpsellInput, wineClubUpsellAction } from '../../dataActions/wine-club-upsell';\r\nimport { IWineClubOffersBusData, WineClubOffersBusInput } from './../../dataActions/wine-club-offers-bus';\r\nimport { IOfferOptionContainerData } from './offer-option-container.data';\r\nimport { IOfferOptionContainerProps } from './offer-option-container.props.autogenerated';\r\n/**\r\n *\r\n * OfferOptionContainer component\r\n * @extends {React.Component<IOfferOptionContainerProps<IOfferOptionContainerData>>}\r\n */\r\n@observer\r\nclass OfferOptionContainer extends React.Component<IOfferOptionContainerProps<IOfferOptionContainerData>> {\r\n\r\n @observable private _showError: { show: boolean; error: string } = {\r\n show: false,\r\n error: ''\r\n };\r\n\r\n constructor(props: IOfferOptionContainerProps<IOfferOptionContainerData>) {\r\n super(props);\r\n\r\n this._takeOffer = this._takeOffer.bind(this);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n offerTaken\r\n } = this.props.data.offerOptionBus as unknown as IWineClubOffersBusData;\r\n\r\n const { className, buttonText } = this.props.config;\r\n return (\r\n <section className={`${className || ''} offer-option-container`}>\r\n <div className='offer-option-container-items'>\r\n {this.props.slots.modules && this._renderSlotItems(this.props.slots.modules)}\r\n </div>\r\n {this._offerAcceptedText}\r\n {this._showError.show && <div className='offer-option-container-error'>{this._showError.error}</div>}\r\n <button onClick={this._takeOffer} disabled={offerTaken}>{buttonText}</button>\r\n </section>\r\n );\r\n }\r\n\r\n private _renderSlotItems(items: React.ReactNode[]): JSX.Element {\r\n return (\r\n <React.Fragment>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n <React.Fragment key={index}>\r\n {slot}\r\n </React.Fragment>\r\n ))}\r\n </React.Fragment>\r\n );\r\n }\r\n\r\n private get _offerAcceptedText(): JSX.Element | null {\r\n const {\r\n offerTaken,\r\n offerIdUsed,\r\n offerAcceptedText\r\n } = this.props.data.offerOptionBus as unknown as IWineClubOffersBusData;\r\n let text: RichText | undefined;\r\n if (offerTaken && offerIdUsed === this.props.config.offerId) {\r\n text = offerAcceptedText;\r\n }\r\n\r\n if (text) {\r\n return (\r\n <RichTextComponent text={text} className='offer-accepted-text' />\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _takeOffer(): void {\r\n const input = createWineClubUpsellInput({\r\n customerId: this.props.context.request.user.customerAccountNumber || '',\r\n offerId: this.props.config.offerId,\r\n wineClubId: (this.props.data.offerOptionBus as unknown as IWineClubOffersBusData).wineClubId\r\n });\r\n\r\n const {\r\n offerOptionContainer__alreadyAccepted,\r\n offerOptionContainer__genericError,\r\n offerOptionContainer__offerExpired,\r\n offerOptionContainer__customerNotClubMember\r\n } = this.props.resources;\r\n\r\n wineClubUpsellAction(input, this.props.context.actionContext)\r\n // the result type needs to be redefined when the proxy has it's update\r\n // to { Status: string, Result: WineClubUpsellResponse }\r\n // tslint:disable-next-line: no-any\r\n .then((result: any) => {\r\n\r\n result.Status = result.result;\r\n // any status that isn't OFFER_ACCEPTED will be treated as an\r\n // error occuring. OK is the default 200 status\r\n if (result.Status !== 'SUCCESS') {\r\n const codes = {\r\n ALREADY_ACCEPTED: offerOptionContainer__alreadyAccepted,\r\n OFFER_EXPIRED: offerOptionContainer__offerExpired,\r\n CUSTOMER_NOT_CLUBMEMBER: offerOptionContainer__customerNotClubMember\r\n };\r\n if (codes[result.Status]) {\r\n this._showError = {\r\n show: true,\r\n error: codes[result.Status]\r\n };\r\n } else {\r\n this._showError = {\r\n show: true,\r\n error: offerOptionContainer__genericError\r\n };\r\n }\r\n } else {\r\n // if Status is actually OFFER_ACCEPTED\r\n this._showError = { show: false, error: '' };\r\n const addedState = { offerTaken: true, offerIdUsed: this.props.config.offerId };\r\n this.props.context.actionContext.update(new WineClubOffersBusInput(), { ...this.props.data.offerOptionBus, ...addedState });\r\n }\r\n\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n this._showError = { show: true, error: offerOptionContainer__genericError };\r\n });\r\n }\r\n}\r\n\r\nexport default OfferOptionContainer;\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\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\n\r\nimport * as React from 'react';\r\n\r\nimport { IProductApellationData } from './product-apellation.data';\r\nimport { IProductApellationProps } from './product-apellation.props.autogenerated';\r\n\r\n/**\r\n *\r\n * ProductApellation component\r\n * @extends {React.PureComponent<IProductApellationProps<IProductApellationData>>}\r\n */\r\nclass ProductApellation extends React.PureComponent<\r\n IProductApellationProps<IProductApellationData>\r\n> {\r\n private _productAttributeApellation: string = 'SLR APPELLATION';\r\n public render(): JSX.Element | null {\r\n const content: IProductApellationData = this.props.data;\r\n if (\r\n !(\r\n content &&\r\n content.productSpecificationData &&\r\n content.productSpecificationData.result\r\n )\r\n ) {\r\n return null;\r\n }\r\n const productAttributes = content.productSpecificationData.result;\r\n const productAttribute = productAttributes.filter(\r\n attribute =>\r\n attribute.Name &&\r\n attribute.Name.toUpperCase() === this._productAttributeApellation\r\n );\r\n if (\r\n productAttribute &&\r\n productAttribute.length &&\r\n productAttribute[0].TextValue\r\n ) {\r\n return (\r\n <div className='product-attribute'>\r\n <div className='product-attribute-apellation'>\r\n <RichTextComponent\r\n className='product-attribute-apellation-value'\r\n text={productAttribute[0].TextValue}\r\n />\r\n </div>\r\n </div>\r\n );\r\n }\r\n return null;\r\n }\r\n}\r\n\r\nexport default ProductApellation;\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 { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\nimport { IProductLinkData } from './product-link.data';\r\nimport { IProductLinkProps } from './product-link.props.autogenerated';\r\n\r\n/**\r\n *\r\n * ProductLink component\r\n * @extends {React.PureComponent<IProductLinkProps<IProductLinkData>>}\r\n */\r\nclass ProductLink extends React.PureComponent<IProductLinkProps<IProductLinkData>> {\r\n public render(): JSX.Element {\r\n const { config, data } = this.props;\r\n let productUrl;\r\n if(data.product && data.product.status === 'SUCCESS') {\r\n const product = data.product.result;\r\n if(product) {\r\n productUrl = getProductUrlSync(product, this.props.context.actionContext, undefined);\r\n }\r\n }\r\n\r\n return (\r\n <div className='product-link'>\r\n {productUrl && <a className='product-link-cta' href={productUrl} aria-label={config.linkText} onClick={this._productLinkClick}>{config.linkText}</a>}\r\n </div>\r\n );\r\n }\r\n\r\n // tslint:disable-next-line: no-any\r\n private _productLinkClick = (e: any):void => {\r\n if(window.location !== window.parent.location && e && e.currentTarget && e.currentTarget.href) {\r\n window.parent.location.href = e.currentTarget.href;\r\n }\r\n\r\n return;\r\n };\r\n}\r\n\r\nexport default ProductLink;","import * as React from 'react';\r\n\r\nimport classname from 'classnames';\r\nimport { ISingleProductContainerData } from './single-product-container.data';\r\nimport { ISingleProductContainerProps } from './single-product-container.props.autogenerated';\r\n\r\n/**\r\n *\r\n * SingleProductContainer component\r\n * @extends {React.Component<ISingleProductContainerProps<ISingleProductContainerData>>}\r\n */\r\nclass SingleProductContainer extends React.Component<ISingleProductContainerProps<ISingleProductContainerData>> {\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n public render(): JSX.Element | null {\r\n if (!this.props.data.productAttributes.result) { return null; }\r\n\r\n const { slots } = this.props;\r\n const hasSlots = slots && slots.content && slots.content.length;\r\n return (\r\n <div className={classname('single-product-container', this.props.config.className)}>\r\n {hasSlots && slots.content}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default SingleProductContainer;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport * as React from 'react';\r\n\r\n/**\r\n * CoreComponent component\r\n * @extends {React.PureComponent<IScriptInjectorProps>}\r\n */\r\n\r\nclass Fth extends React.PureComponent {\r\n constructor(props: {}) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n return <script />;\r\n }\r\n}\r\n\r\nexport default Fth;\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 * as React from 'react';\r\n\r\n/**\r\n * CoreComponent component\r\n * @extends {React.PureComponent<IScriptInjectorProps>}\r\n */\r\n\r\nclass Wne extends React.PureComponent {\r\n constructor(props: {}) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n return <script />;\r\n }\r\n}\r\n\r\nexport default Wne;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { LogLevel } from '@msdyn365-commerce/telemetry-internal';\nimport * as React from 'react';\nimport { isEditorialMode } from '@msdyn365-commerce/core-internal';\nimport { IDefaultPageProps } from './default-page.props.autogenerated';\n\n/**\n *\n * CoreComponent component\n * @extends {React.PureComponent<IDefaultPageProps>}\n */\nclass DefaultPageContainer extends React.PureComponent<IDefaultPageProps<{}>> {\n constructor(props: IDefaultPageProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element {\n const { slots, telemetry, id, typeName } = this.props;\n\n let skipToMainText = this.props.config && this.props.config.skipToMainText;\n telemetry.log(LogLevel.Debug, \"DefaultPageContainer rendering for '{id}/{typeName}'\", { values: [id, typeName] });\n\n if (!skipToMainText) {\n skipToMainText =\n this.props.context.app && this.props.context.app.platform ? this.props.context.app.platform.skipToMainText : '';\n }\n\n const tabIndexSkipToMain = isEditorialMode(this.props.context.actionContext.requestContext) ? -1 : 0;\n\n return (\n <React.Fragment>\n <a className='skip-to-main' href='#main' tabIndex={tabIndexSkipToMain}>\n {skipToMainText}\n </a>\n <header>\n {slots &&\n slots.header &&\n slots.header.map((children: React.ReactNode) => {\n return children;\n })}\n </header>\n {slots && slots.subheader && (\n <div id='subheader'>\n {slots.subheader.map((children: React.ReactNode) => {\n return children;\n })}\n </div>\n )}\n <main id='main'>\n {slots &&\n slots.primary &&\n slots.primary.map((children: React.ReactNode) => {\n return children;\n })}\n </main>\n {slots && slots.subfooter && (\n <div id='subfooter'>\n {slots.subfooter.map((children: React.ReactNode) => {\n return children;\n })}\n </div>\n )}\n <footer>\n {slots &&\n slots.footer &&\n slots.footer.map((children: React.ReactNode) => {\n return children;\n })}\n </footer>\n </React.Fragment>\n );\n }\n}\n\nexport default DefaultPageContainer;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport {\n INotificationComponentsList,\n INotificationComponentsListState,\n INotificationComponentType,\n NotificationComponentsListsManager,\n NotificationEvents,\n NotificationFeedType\n} from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { INotificationsListProps } from './notifications-list.props.autogenerated';\n\n/**\n * View for the notifications list which specifies the container and notifications items.\n */\nexport interface INotificationsListViewProps extends INotificationsListProps<{}> {\n container: IModuleProps;\n notificationsList: React.ReactNode;\n}\n\n/**\n * Configuration to make the list stickable to the page without overlapping any content on top.\n */\nexport interface INotificationComponentStickyConfiguration {\n /**\n * Minimum offset for top (default for the page).\n */\n minTopOffset: number;\n\n /**\n * Maximum offset for top (to limit the top offset while scrolling).\n */\n maxTopOffset: number;\n}\n\n/**\n * Stickable notification list state which defines the top position of the list at the moment.\n */\nexport interface IStickableNotificationComponentsListState extends INotificationComponentsListState {\n /**\n * The top position of the list on the page.\n */\n top?: number;\n}\n\n/**\n * A notification list which is operated by notification manager.\n * It is responsible for rendering the received notifications.\n */\nexport class NotificationComponentsList extends React.Component<INotificationsListProps<{}>, IStickableNotificationComponentsListState>\n implements INotificationComponentsList {\n /**\n * The class name to use.\n */\n private static readonly _className: string = 'msc-notifications-list';\n\n /**\n * The feed which the list is responsible for displaying.\n */\n public readonly feed: NotificationFeedType;\n\n /**\n * Configuration which specifies if and how the list should be stickable.\n * If undefined, the configuration will not be used at all. And list will not be stickable.\n */\n private readonly _stickyConfiguration?: INotificationComponentStickyConfiguration;\n\n /**\n * The list of notification which should be shown in the list at the moment.\n * @remarks Should be used to retrieve the latest list of notifications\n * as the list from the state is updated only after rendering.\n */\n private _notificationsComponentList: INotificationComponentType[];\n\n /**\n * Unique identifier of the list.\n * Uses format 'NotificationComponentsList-GUID';.\n */\n private _instanceId?: string;\n\n /**\n * Initializes instance with the given props.\n * @param props - The configuration of the list.\n */\n public constructor(props: INotificationsListProps<{}>) {\n super(props);\n\n this.feed = props.config.feed;\n\n if (\n !ObjectExtensions.isNullOrUndefined(props.config.minTopOffset) &&\n !ObjectExtensions.isNullOrUndefined(props.config.maxTopOffset)\n ) {\n this._stickyConfiguration = {\n minTopOffset: props.config.minTopOffset,\n maxTopOffset: props.config.maxTopOffset\n };\n }\n\n this._notificationsComponentList = [];\n\n this.state = {\n notificationsComponentList: []\n };\n\n this._handleTopUpdate = this._handleTopUpdate.bind(this);\n this._getCurrentTopPosition = this._getCurrentTopPosition.bind(this);\n }\n\n /**\n * Specifies if the component should be re-rendered.\n * @param nextProps - The next configuration the component is receiving.\n * @param nextState - The next state the component is receiving.\n * @returns True if component should be re-rendered, false if component should not be changed.\n */\n public shouldComponentUpdate(\n nextProps: Readonly<INotificationsListProps<{}>>,\n nextState: Readonly<IStickableNotificationComponentsListState>\n ): boolean {\n const isPropsDifferent =\n this.feed !== nextProps.config.feed ||\n this.props.config.maxNotificationsCount !== nextProps.config.maxNotificationsCount ||\n this.props.config.maxTopOffset !== nextProps.config.maxTopOffset ||\n this.props.config.minTopOffset !== nextProps.config.minTopOffset ||\n this.props.config.className !== nextProps.config.className ||\n this.props.id !== nextProps.id;\n const isStateDifferent =\n this.state.top !== nextState.top ||\n this.state.notificationsComponentList.length !== nextState.notificationsComponentList.length ||\n this.state.notificationsComponentList.every(value =>\n nextState.notificationsComponentList.find(otherValue => otherValue.props.notification.id === value.props.notification.id)\n );\n return isPropsDifferent || isStateDifferent;\n }\n\n /**\n * Adds the current instance to the global list of instances so that it becomes available for the notification manager.\n * In case the list is specified to be stickable, also subscribes to the scroll event to update the offsets.\n */\n public componentDidMount(): void {\n NotificationComponentsListsManager.subscribe(this);\n\n this._instanceId = `NotificationComponentsList-${Random.Guid.generateGuid()}`;\n\n if (MsDyn365.isBrowser && this._stickyConfiguration !== undefined) {\n window.addEventListener('scroll', this._handleTopUpdate);\n }\n }\n\n /**\n * Remove the instance from the global list of instances so that it becomes unavailable for the notification manager.\n * Unsubscribes itself from the notification events and scroll event.\n */\n public componentWillUnmount(): void {\n NotificationComponentsListsManager.unsubscribe(this);\n\n this._notificationsComponentList.forEach(component =>\n component.props.notification.events.getValue(NotificationEvents.RemovedFromList)?.unsubscribe(this._instanceId!)\n );\n\n if (MsDyn365.isBrowser && this._stickyConfiguration !== undefined) {\n window.removeEventListener('scroll', this._handleTopUpdate);\n }\n }\n\n /**\n * Adds a new notification to the list.\n * @param {INotificationComponentType} notificationComponent Data required to render the notification. @see INotificationComponentType.\n */\n public addNotificationComponent(notificationComponent: INotificationComponentType): void {\n if (this._instanceId === undefined) {\n return;\n }\n\n if (\n !ObjectExtensions.isNullOrUndefined(this.props.config.maxNotificationsCount) &&\n this._notificationsComponentList.length >= this.props.config.maxNotificationsCount\n ) {\n throw new Error('Notifications limit reached, cannot show more notifications.');\n }\n\n // Subscribe to the remove event to filter the removed notifications out from the list.\n notificationComponent.props.notification.events.getValue(NotificationEvents.RemovedFromList)?.subscribe({\n instanceId: this._instanceId,\n handler: () => {\n notificationComponent.props.notification.events\n .getValue(NotificationEvents.RemovedFromList)\n ?.unsubscribe(this._instanceId!);\n const newList = this._notificationsComponentList.filter(component => component !== notificationComponent);\n this._notificationsComponentList = newList;\n this.setState({ notificationsComponentList: this._notificationsComponentList });\n }\n });\n\n // Prepend the notification as newest should come to the top.\n this._notificationsComponentList.unshift(notificationComponent);\n this.setState({ notificationsComponentList: this._notificationsComponentList });\n this._handleTopUpdate();\n }\n\n public render(): React.ReactNode {\n const className = classnames(\n NotificationComponentsList._className,\n `${NotificationComponentsList._className}__${this.feed}`,\n this.props.config.className\n );\n\n const viewProps: INotificationsListViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className,\n id: this._instanceId,\n style: { top: this.state.top }\n },\n notificationsList: this._renderNotificationsList()\n };\n\n return this.props.renderView(viewProps);\n }\n\n /**\n * Renders the list of notifications.\n * @returns React node with a list of notifications.\n */\n private _renderNotificationsList(): React.ReactNode {\n const hasNotifications = ArrayExtensions.hasElements(this.state.notificationsComponentList);\n const containerClassName = classnames(\n `${NotificationComponentsList._className}__scrollable`,\n hasNotifications\n ? `${NotificationComponentsList._className}__has-notifications`\n : `${NotificationComponentsList._className}__empty`\n );\n\n return (\n <div className={containerClassName} style={{ maxHeight: this.state.top && `calc(100vh - ${this.state.top}px)` }}>\n {this.state.notificationsComponentList.map(component => {\n const ComponentClass = component.componentClass;\n return <ComponentClass {...component.props} key={component.props.notification.id} />;\n })}\n </div>\n );\n }\n\n /**\n * Retrieves current top offset position by looking at scroll position and rounding it to the stickable limits.\n */\n private _getCurrentTopPosition(): number | undefined {\n const configuration = this._stickyConfiguration;\n\n if (configuration === undefined) {\n return undefined;\n }\n\n let pageYOffset = 0;\n if (MsDyn365.isBrowser) {\n pageYOffset = window.pageYOffset;\n }\n\n return Math.max(Math.min(configuration.maxTopOffset, configuration.maxTopOffset - pageYOffset), configuration.minTopOffset);\n }\n\n /**\n * Updates the top offset on scroll event to make the list stickable.\n */\n private _handleTopUpdate(): void {\n const newTop = this._getCurrentTopPosition();\n this.setState({ top: newTop });\n }\n}\n\nexport default NotificationComponentsList;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { INotificationsListViewProps } from './notifications-list';\n\nexport const NotificationsListView: React.FC<INotificationsListViewProps> = props => {\n return <Module {...props.container}>{props.notificationsList}</Module>;\n};\n\nexport default NotificationsListView;\n"],"names":["CartAffiliationsMaintainer","React","componentDidMount","isLoggedIn","this","props","context","request","user","customerAccountNumber","isAuthenticated","window","_runAffiliationCheck","render","currentAffils","data","customer","CustomerAffiliations","cachedAffils","_cachedAffiliations","length","_cacheAffiliations","_updateCart","curAffil","find","cachedAffil","RecordId","_cart$cart$CartLines","cart","totalItemsInCart","firstLine","CartLines","line","updateCartLineQuantity","cartLineId","LineId","newQuantity","Quantity","isInitialized","initialize","setTimeout","async","cartInput","GlobalStateInput","BaseCartState","actionContext","requestContext","apiSettings","update","refreshCart","affilIds","map","affil","localStorage","setItem","AFFILIATION_LOCATION","JSON","stringify","affiliationStr","getItem","parse","CookbookTagline","constructor","_productCookbookTagLine","content","productSpecificationData","result","productAttribute","filter","attribute","Name","toUpperCase","TextValue","className","RichTextComponent","text","EventDescription","eventDescription","intro","body","_renderEventDescription","dataSvg","viewBox","paths","hover","d","Logo14hands","config","classname","_renderLogo","link","linkUrl","destinationUrl","href","ariaLabel","_renderSvg","path","index","_getActivePath","key","MailingInputGroup","super","_internalValue","initialValue","_onInputChange","bind","_onBlur","label","type","value","onChange","onBlur","_renderValidation","onLoseFirstFocus","event","target","onValueChange","isValid","undefined","_validationMessage","validationMessage","__decorate","observable","observer","MailingFormComponent","_firstName","_zipCode","_email","_emailRegex","_zipCodeRegex","_onSubmitForm","_onFirstNameChange","_onZipCodeChange","_onEmailChange","_lostFocus","errorMessage","_isButtonDisabled","onClick","disabled","name","beenBlurred","_testForRequirement","code","_testForRegex","email","console","warn","onSubmit","firstName","zipCode","field","setState","regex","test","MailingList","_onSubmit","_formPage","_backgroundImage","userInfo","log","confirmationURL","image","imageURL","defaultImageSettings","viewports","xs","q","w","h","lg","lazyload","Image","Object","assign","gridSettings","imageSettings","marketingContactSupport","marketingDescription","_mailingListColType","dangerouslySetInnerHTML","getRichTextHtml","WineClubUpsellInput","input","shouldCacheOutput","getCacheKey","getCacheObjectType","dataCacheType","createWineClubUpsellInput","inputData","offerSelectionInput","customerId","wineClubId","offerId","wineClubUpsellAction","ctx","execute","Msdyn365","action","OfferOptionContainer","_showError","show","error","_takeOffer","offerTaken","offerOptionBus","buttonText","slots","modules","_renderSlotItems","_offerAcceptedText","items","slot","offerIdUsed","offerAcceptedText","offerOptionContainer__alreadyAccepted","offerOptionContainer__genericError","offerOptionContainer__offerExpired","offerOptionContainer__customerNotClubMember","resources","then","Status","codes","ALREADY_ACCEPTED","OFFER_EXPIRED","CUSTOMER_NOT_CLUBMEMBER","addedState","WineClubOffersBusInput","_objectSpread","catch","err","ProductApellation","_productAttributeApellation","ProductLink","_productLinkClick","e","location","parent","currentTarget","productUrl","product","status","getProductUrlSync","linkText","SingleProductContainer","productAttributes","hasSlots","Fth","Wne","DefaultPageContainer","telemetry","id","typeName","skipToMainText","LogLevel","Debug","values","app","platform","tabIndexSkipToMain","isEditorialMode","tabIndex","header","children","subheader","primary","subfooter","footer","NotificationComponentsList","feed","ObjectExtensions","isNullOrUndefined","minTopOffset","maxTopOffset","_stickyConfiguration","_notificationsComponentList","state","notificationsComponentList","_handleTopUpdate","_getCurrentTopPosition","shouldComponentUpdate","nextProps","nextState","isPropsDifferent","maxNotificationsCount","isStateDifferent","top","every","otherValue","notification","NotificationComponentsListsManager","subscribe","_instanceId","Random","Guid","generateGuid","MsDyn365","isBrowser","addEventListener","componentWillUnmount","unsubscribe","forEach","component","_component$props$noti","events","getValue","NotificationEvents","RemovedFromList","removeEventListener","addNotificationComponent","notificationComponent","_notificationComponen","Error","instanceId","handler","_notificationComponen2","newList","unshift","classnames","_className","viewProps","container","moduleProps","style","notificationsList","_renderNotificationsList","renderView","hasNotifications","ArrayExtensions","hasElements","containerClassName","maxHeight","ComponentClass","componentClass","configuration","pageYOffset","Math","max","min","newTop","NotificationsListView","Module"],"sourceRoot":""}