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CAKRC,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAab,QAAOrD,EAAAA,EAAA,GACpBiE,OAAOC,aAAab,SAAW,IAC/BD,EAAQC,SAGXY,OAAOC,aAAaZ,YAAWtD,EAAAA,EAAA,GAC5BiE,OAAOC,aAAaZ,aAAe,IACnCF,EAAQE,aAEY,MAAMa,EAAiB,GAC9BA,EAAe,mFAAqF,CAC5GZ,EAAGA,IAAMC,EAAQ,MACjBY,GAAI,iDAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAcnE,EAAAA,EAAA,GACPiE,OAAOC,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAU7K,cCAjB4K,EAAOC,QAAUC","sources":["webpack://Dobbies.Commerce/./src/dotdigital-extension/DataServiceEntities.g.ts?cecd","webpack://Dobbies.Commerce/./src/dotdigital-extension/DataActionExtension.g.ts?36a7","webpack://Dobbies.Commerce/./src/modules/dobbies-footer-newsletter/components/dobbies-modal.tsx?9e69","webpack://Dobbies.Commerce/./src/modules/dobbies-footer-newsletter/dobbies-footer-newsletter.tsx?4e45","webpack://Dobbies.Commerce/./src/modules/dobbies-footer-newsletter/dobbies-footer-newsletter.view.tsx?110a","webpack://Dobbies.Commerce/./lib/dobbies-footer-newsletter/module-registration.js?c557","webpack://Dobbies.Commerce/external var \"React\"?0d3b","webpack://Dobbies.Commerce/external var \"ReactDOM\"?853b"],"sourcesContent":["// tslint:disable\r\n/* eslint-disable security/detect-object-injection */\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/**\r\n * VSIRestAPIHandler entity interface.\r\n */\r\nexport interface IVSIRestAPIHandler {\r\n Id: number;\r\n result?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * VSIRestAPIHandler entity class.\r\n */\r\nexport class VSIRestAPIHandlerExtensionClass implements IVSIRestAPIHandler {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public result: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.result = odataObject.result;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\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 * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n// tslint:disable\r\nimport { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './DataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction vSIGetAPIResponseQuery(id?: number): DataServiceQuery {\r\n const key = id ? { Id: id } : null;\r\n return new DataServiceQuery('VSIGetRestAPIResponse', 'VSIRestAPIHandler', DataServiceEntities.VSIRestAPIHandlerExtensionClass, key);\r\n}\r\n\r\nexport function createVSIInitiateRestCallInput(\r\n targetSystem: string,\r\n methodType: string,\r\n requestHeader: string,\r\n requestBody: string,\r\n urlParams: string,\r\n servicePath: string\r\n): IDataServiceRequest {\r\n const query = vSIGetAPIResponseQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'VSI_CallGenericRestAPIHandler',\r\n true,\r\n DataServiceEntities.VSIRestAPIHandlerExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IVSIRestAPIHandler' },\r\n {\r\n targetSystem: targetSystem,\r\n methodType: methodType,\r\n requestHeader: requestHeader,\r\n requestBody: requestBody,\r\n urlParams: urlParams,\r\n servicePath: servicePath\r\n }\r\n );\r\n}\r\n\r\nexport function vSIInitiateRestCallAsync(\r\n context: IContext,\r\n targetSystem: string,\r\n methodType: string,\r\n requestHeader: string,\r\n requestBody: string,\r\n urlParams: string,\r\n servicePath: string\r\n): AsyncResult {\r\n const request = createVSIInitiateRestCallInput(targetSystem, methodType, requestHeader, requestBody, urlParams, servicePath);\r\n return callActionOrExecute(request, context.callerContext);\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}\r\n\r\nconst DobbiesModal: React.FC = (props: IDobbiesModalProps) => {\r\n return (\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;\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/* eslint-disable security/detect-unsafe-regex */\r\nimport * as React from 'react';\r\n\r\nimport { IDobbiesFooterNewsletterProps, INewsletterheadingData } from './dobbies-footer-newsletter.props.autogenerated';\r\n\r\nimport { Button, IModuleProps, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport { vSIInitiateRestCallAsync } from '../../dotdigital-extension/DataActionExtension.g';\r\nimport DobbiesModal from './components/dobbies-modal';\r\n\r\nexport interface IDobbiesFooterNewsletterViewProps extends IDobbiesFooterNewsletterProps<{}> {\r\n moduleProps: IModuleProps;\r\n contentProps: INodeProps;\r\n newsletterheading: React.ReactNode;\r\n newsletterDescription: React.ReactNode;\r\n joinNow: React.ReactNode;\r\n subscribeForm: React.ReactNode | undefined;\r\n}\r\nexport interface IDobbiesFooterNewsletterState {\r\n isPopupOpen: boolean;\r\n firstName: string;\r\n lastName: string;\r\n emailAddress: string;\r\n privacyPolicyChecked: boolean;\r\n firstNameError: boolean;\r\n lastNameError: boolean;\r\n emailError: boolean;\r\n requiredError: boolean;\r\n emailValidationError: boolean;\r\n privacyPolicyError: boolean;\r\n recaptchaError: boolean;\r\n responseReceived: boolean;\r\n responseError: boolean;\r\n reCaptchaChecked: boolean;\r\n}\r\nexport interface ISubscribeNewsletterForm {\r\n FormWrapper: INodeProps;\r\n FormContainer: INodeProps;\r\n nameInput: React.ReactNode;\r\n emailInput: React.ReactNode;\r\n checkboxPrivacyPolicy: React.ReactNode;\r\n subscribeButtton: React.ReactNode;\r\n}\r\nexport interface IErrorMessage {\r\n message: string;\r\n}\r\ninterface IDataField {\r\n key: string;\r\n value: string;\r\n}\r\n// Contact created Result\r\nexport interface IContactCreatedResponse {\r\n id: number;\r\n email: string;\r\n optInType: string;\r\n emailType: string;\r\n dataFields: IDataField[];\r\n status: string;\r\n}\r\n// To add contact in program\r\ninterface IPreferenceProgram {\r\n programId: number;\r\n contacts: number[];\r\n}\r\n/**\r\n *\r\n * DobbiesFooterNewsletter component\r\n * @extends {React.PureComponent, IDobbiesFooterNewsletterState>}\r\n */\r\nclass DobbiesFooterNewsletter extends React.PureComponent, IDobbiesFooterNewsletterState> {\r\n private _FirstNameInputRef: React.RefObject;\r\n private _LastNameInputRef: React.RefObject;\r\n private _EmailAddressInputRef: React.RefObject;\r\n private _PrivacyPolicyRef: React.RefObject;\r\n private hasFirstNameValue: boolean = false;\r\n private hasLastNameValue: boolean = false;\r\n private hasEmailAddressValue: boolean = false;\r\n private hasFormContainValues: boolean = false;\r\n private requiredErrorMessage: string | undefined;\r\n private emailValidationErrorMessage: string | undefined;\r\n private privacyPolicyErrorMessage: string | undefined;\r\n private responseMessage: string | undefined;\r\n\r\n constructor(props: IDobbiesFooterNewsletterProps<{}>, state: IDobbiesFooterNewsletterState) {\r\n super(props);\r\n this._FirstNameInputRef = React.createRef();\r\n this._LastNameInputRef = React.createRef();\r\n this._EmailAddressInputRef = React.createRef();\r\n this._PrivacyPolicyRef = React.createRef();\r\n this._handleSubscribe = this._handleSubscribe.bind(this);\r\n\r\n this.state = {\r\n isPopupOpen: false,\r\n firstName: '',\r\n lastName: '',\r\n emailAddress: '',\r\n privacyPolicyChecked: false,\r\n firstNameError: false,\r\n lastNameError: false,\r\n emailError: false,\r\n requiredError: false,\r\n emailValidationError: false,\r\n privacyPolicyError: false,\r\n recaptchaError: false,\r\n responseReceived: false,\r\n responseError: false,\r\n reCaptchaChecked: false\r\n };\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n config: { newsletterheading, newsletterDescription, className },\r\n resources: { joinNowLabel, joinNowButtonAriaLabel }\r\n } = this.props;\r\n const viewProps = {\r\n ...this.props,\r\n moduleProps: { className: classnames('ms-dobbies-footer-newsletter', className), moduleProps: this.props, tag: 'div' },\r\n contentProps: { className: 'ms-dobbies-footer-newsletter__content', tag: 'div' },\r\n newsletterheading: this._getHeading(newsletterheading, className),\r\n newsletterDescription: this._getNewsLetterText(newsletterDescription, className),\r\n joinNow: this._getJoinNowButton(joinNowLabel, joinNowButtonAriaLabel, className),\r\n subscribeForm: this.state.isPopupOpen && this._renderPopUp()\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /* Following function renders heading of newsletter */\r\n private _getHeading = (newsletterheading: INewsletterheadingData | undefined, className: string | undefined): React.ReactNode => {\r\n return (\r\n \r\n {newsletterheading && (\r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n /* Following function renders description of newsletter */\r\n private _getNewsLetterText = (newsletterDescription: Msdyn365.RichText | undefined, className: string | undefined): React.ReactNode => {\r\n return (\r\n
\r\n {newsletterDescription && }\r\n
\r\n );\r\n };\r\n\r\n /* Following function renders Join Now Button */\r\n private _getJoinNowButton = (\r\n joinNowLabel: string | undefined,\r\n joinNowAriaLabel: string | undefined,\r\n className: string | undefined\r\n ): React.ReactNode => {\r\n return (\r\n
\r\n this.setState({ emailAddress: e.target.value })}\r\n className='newslatter-signup-email'\r\n placeholder='Enter your email address…'\r\n />\r\n \r\n {joinNowLabel}\r\n \r\n
\r\n );\r\n };\r\n // Open popup\r\n private _togglePopup = (event: React.MouseEvent) => {\r\n this.setState({ isPopupOpen: true });\r\n };\r\n // Open popup by clicking on join now button\r\n private _renderPopUp = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n // Render Popup title\r\n private _renderPopupTitle = () => {\r\n const { popUpHeading } = this.props.config;\r\n return (\r\n \r\n \r\n {popUpHeading && (\r\n \r\n )}\r\n \r\n );\r\n };\r\n // Render popup footer\r\n private _renderPopupFooter = () => {\r\n return <>;\r\n };\r\n // Render popup body to show input fields\r\n private _renderPopupBody = () => {\r\n const subscribeResponse = this._getSubscribeResponse();\r\n const subscribeForm = this._renderForm();\r\n const { FormWrapper, FormContainer, nameInput, emailInput, checkboxPrivacyPolicy, subscribeButtton } = subscribeForm;\r\n return (\r\n \r\n {subscribeResponse}\r\n \r\n

Please enter your details

\r\n {nameInput}\r\n {emailInput}\r\n {checkboxPrivacyPolicy}\r\n {subscribeButtton}\r\n \r\n
\r\n
\r\n );\r\n };\r\n // Close popup and reset state\r\n private _closePopup = () => {\r\n this.setState({\r\n isPopupOpen: false,\r\n firstName: '',\r\n lastName: '',\r\n emailAddress: '',\r\n privacyPolicyChecked: false,\r\n firstNameError: false,\r\n lastNameError: false,\r\n emailError: false,\r\n requiredError: false,\r\n emailValidationError: false,\r\n privacyPolicyError: false,\r\n recaptchaError: false,\r\n responseReceived: false,\r\n responseError: false,\r\n reCaptchaChecked: false\r\n });\r\n };\r\n\r\n // Get all input fields and return as form fields\r\n private _renderForm(): ISubscribeNewsletterForm {\r\n return {\r\n FormWrapper: {\r\n className: 'newsletter-subscription',\r\n tag: 'div'\r\n },\r\n FormContainer: {\r\n className: 'newsletter-subscription-div',\r\n tag: 'div'\r\n },\r\n nameInput: this._renderFirstAndLastNameInput(),\r\n emailInput: this._renderEmailInput(),\r\n checkboxPrivacyPolicy: this._renderCheckboxPrivacyPolicy(),\r\n subscribeButtton: this._renderSubscribeButton()\r\n };\r\n }\r\n\r\n private _renderFirstAndLastNameInput(): React.ReactNode {\r\n return (\r\n
\r\n
\r\n {this.state.firstNameError ? this._renderAlert('first-name-input') : ''}\r\n {this.state.lastNameError ? this._renderAlert('last-name-input') : ''}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderEmailInput(): React.ReactNode {\r\n return (\r\n
\r\n {this.state.emailError || this.state.emailValidationError ? this._renderAlert('email-address-input') : ''}\r\n \r\n
\r\n );\r\n }\r\n\r\n private _isEmailValid = (email: string): boolean => {\r\n const regex = /^(([^<>()\\[\\]\\\\.,;:\\s@']+(\\.[^<>()\\[\\]\\\\.,;:\\s@']+)*)|('.+'))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return regex.test(email);\r\n };\r\n\r\n private _renderCheckboxPrivacyPolicy(): React.ReactNode {\r\n return (\r\n
\r\n {this.state.privacyPolicyError ? this._renderAlert('checkbox-privacy-policy') : ''}\r\n
\r\n \r\n \r\n

\r\n I accept the Privacy Policy\r\n

\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _isDisabled(): boolean {\r\n return this.state.firstName && this.state.lastName && this.state.emailAddress && this.state.privacyPolicyChecked ? false : true;\r\n }\r\n private _renderSubscribeButton(): React.ReactNode {\r\n return (\r\n
\r\n \r\n {this.props.resources.subscribeButtonLabel}\r\n \r\n
\r\n );\r\n }\r\n // Store input fields value to state\r\n private _handleChange = (name: string) => (e: React.ChangeEvent) => {\r\n const value = e.target.value;\r\n switch (name) {\r\n case 'firstName': {\r\n this.setState({\r\n firstName: value,\r\n firstNameError: false,\r\n requiredError: false,\r\n emailValidationError: false,\r\n privacyPolicyError: false\r\n });\r\n break;\r\n }\r\n case 'lastName': {\r\n this.setState({\r\n lastName: value,\r\n lastNameError: false,\r\n requiredError: false,\r\n emailValidationError: false,\r\n privacyPolicyError: false\r\n });\r\n break;\r\n }\r\n case 'emailAddress': {\r\n this.setState({\r\n emailAddress: value,\r\n emailError: false,\r\n requiredError: false,\r\n emailValidationError: false,\r\n privacyPolicyError: false\r\n });\r\n break;\r\n }\r\n case 'privacyPolicy': {\r\n const isChecked =\r\n this._PrivacyPolicyRef.current && this._PrivacyPolicyRef.current.checked\r\n ? this._PrivacyPolicyRef.current.checked\r\n : false;\r\n this.setState({\r\n privacyPolicyChecked: isChecked,\r\n requiredError: false,\r\n emailValidationError: false,\r\n privacyPolicyError: false\r\n });\r\n break;\r\n }\r\n default: {\r\n this.setState({ requiredError: false, emailValidationError: false, privacyPolicyError: false });\r\n }\r\n }\r\n };\r\n // Show error message on invalid email or if checkbox is not checked\r\n private _renderAlert(className: string): JSX.Element {\r\n const inputBoxErrors = this.state.firstNameError || this.state.lastNameError || this.state.emailError;\r\n if (inputBoxErrors) {\r\n this.requiredErrorMessage = this.props.resources.requiredTextErrorMessage;\r\n }\r\n if (this.state.emailAddress !== '' && this.state.emailValidationError) {\r\n this.emailValidationErrorMessage = this.props.resources.emailValidationErrorMessage;\r\n }\r\n if (!this.state.privacyPolicyChecked) {\r\n this.privacyPolicyErrorMessage = this.props.resources.privacyPolicyErrorMessage;\r\n }\r\n const requiredError = this.state.requiredError;\r\n const emailValidationError = this.state.emailValidationError;\r\n const privacyPolicyError = this.state.privacyPolicyError;\r\n return (\r\n <>\r\n {requiredError && (\r\n \r\n {this.requiredErrorMessage && (\r\n <>\r\n \r\n )}\r\n {emailValidationError && (\r\n \r\n {this.emailValidationErrorMessage && (\r\n <>\r\n \r\n )}\r\n {privacyPolicyError && (\r\n \r\n {this.privacyPolicyErrorMessage && (\r\n <>\r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n // Get API response\r\n private _getSubscribeResponse(): React.ReactNode {\r\n return this.state.responseReceived && this.responseMessage ? (\r\n
\r\n

\r\n {this.responseMessage}\r\n

\r\n
\r\n ) : null;\r\n }\r\n\r\n private _hasFirstNameValue = () => {\r\n return this._FirstNameInputRef && this._FirstNameInputRef.current && this._FirstNameInputRef.current.value ? true : false;\r\n };\r\n\r\n private _hasLastNameValue = () => {\r\n return this._LastNameInputRef && this._LastNameInputRef.current && this._LastNameInputRef.current.value ? true : false;\r\n };\r\n\r\n private _hasEmailAddressValue = () => {\r\n return this._EmailAddressInputRef && this._EmailAddressInputRef.current && this._EmailAddressInputRef.current.value ? true : false;\r\n };\r\n\r\n private _hasFormContainValues = () => {\r\n return this.hasFirstNameValue && this.hasLastNameValue && this.hasEmailAddressValue ? true : false;\r\n };\r\n\r\n private async _handleSubscribe(\r\n e: React.MouseEvent | React.KeyboardEvent | React.FormEvent\r\n ): Promise {\r\n this.hasFirstNameValue = this._hasFirstNameValue();\r\n this.hasLastNameValue = this._hasLastNameValue();\r\n this.hasEmailAddressValue = this._hasEmailAddressValue();\r\n const email = this.hasEmailAddressValue ? this._EmailAddressInputRef.current!.value : '';\r\n if (!this.hasFirstNameValue) {\r\n this.setState({\r\n firstNameError: true,\r\n requiredError: true\r\n });\r\n } else if (!this.hasLastNameValue) {\r\n this.setState({ lastNameError: true, requiredError: true });\r\n } else if (!this.hasEmailAddressValue) {\r\n this.setState({ emailError: true, requiredError: true });\r\n } else if (!this._isEmailValid(email)) {\r\n this.setState({ emailValidationError: true });\r\n } else if (!this._PrivacyPolicyRef.current!.checked) {\r\n this.setState({ privacyPolicyChecked: false, privacyPolicyError: true });\r\n } else {\r\n this.hasFormContainValues = this._hasFormContainValues();\r\n if (this.hasFormContainValues && this.state.privacyPolicyChecked && !this.state.emailValidationError) {\r\n try {\r\n // Make subscribe newsletter data-action call here with user data\r\n const contact = {\r\n email: this.state.emailAddress,\r\n emailType: 'Html',\r\n dataFields: [\r\n { key: 'FIRSTNAME', value: this.state.firstName },\r\n { key: 'LASTNAME', value: this.state.lastName }\r\n ],\r\n status: 'Subscribed'\r\n };\r\n const {\r\n context: { actionContext },\r\n config: { programID },\r\n resources: { programErrorMessage, programSuccessMessage }\r\n } = this.props;\r\n let isError = false;\r\n if (programID) {\r\n // call api here to create contact\r\n const response = await vSIInitiateRestCallAsync(\r\n { callerContext: actionContext },\r\n 'DotDigital',\r\n 'post',\r\n \"{'cache-control':'no-cache' , 'Accept':'application/json'}\",\r\n JSON.stringify(contact),\r\n '',\r\n `v2/contacts`\r\n );\r\n if (response.result) {\r\n const responseResult = JSON.parse(response.result);\r\n const errorMessage: IErrorMessage = responseResult;\r\n if (errorMessage.message && errorMessage.message.length > 0) {\r\n // Address book isn't found or any other issue So set error message\r\n isError = true;\r\n } else {\r\n // Contact created so now add contact in program\r\n // Get contact id\r\n const contactCreated: IContactCreatedResponse = responseResult;\r\n if (contactCreated.id) {\r\n // add this id in given programId\r\n const program: IPreferenceProgram = {\r\n contacts: [contactCreated.id],\r\n programId: programID\r\n };\r\n const programResponse = await vSIInitiateRestCallAsync(\r\n { callerContext: actionContext },\r\n 'DotDigital',\r\n 'post',\r\n \"{'cache-control':'no-cache' , 'Accept':'application/json'}\",\r\n JSON.stringify(program),\r\n '',\r\n `v2/programs/enrolments`\r\n );\r\n if (programResponse.result) {\r\n const programResponseResult = JSON.parse(programResponse.result);\r\n const error: IErrorMessage = programResponseResult;\r\n if (error.message && error.message.length > 0) {\r\n // Error in adding contact in Program\r\n // display error alert\r\n isError = true;\r\n } else {\r\n this.responseMessage = programSuccessMessage;\r\n // Contact has been added to address book\r\n this.setState({\r\n responseReceived: true,\r\n responseError: false,\r\n firstName: '',\r\n lastName: '',\r\n emailAddress: '',\r\n privacyPolicyChecked: false,\r\n requiredError: false,\r\n emailValidationError: false,\r\n recaptchaError: false\r\n });\r\n this._clearValues();\r\n }\r\n } else {\r\n isError = true;\r\n }\r\n } else {\r\n isError = true;\r\n }\r\n }\r\n }\r\n } else {\r\n // display error alert\r\n isError = true;\r\n }\r\n if (isError) {\r\n this.responseMessage = programErrorMessage;\r\n this.setState({ responseReceived: true, responseError: true });\r\n }\r\n } catch (e) {\r\n // @ts-ignore\r\n this.props.telemetry.error(e);\r\n this.responseMessage = this.props.resources.programErrorMessage;\r\n this.setState({ responseReceived: true, responseError: true });\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _clearValues(): void {\r\n if (this._PrivacyPolicyRef.current) {\r\n this._PrivacyPolicyRef.current.checked = false;\r\n }\r\n }\r\n}\r\n\r\nexport default DobbiesFooterNewsletter;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IDobbiesFooterNewsletterViewProps } from './dobbies-footer-newsletter';\r\n\r\nexport default (props: IDobbiesFooterNewsletterViewProps) => {\r\n const { moduleProps, contentProps, newsletterheading, newsletterDescription, joinNow, subscribeForm } = props;\r\n\r\n /* VSI Customization - START */\r\n /* condition either to show or hide the footer newsletter */\r\n\r\n if (props.context.request.query!.onlyBody && props.context.request.query!.onlyBody === 'true') {\r\n return null;\r\n }\r\n /* VSI Customization - END */\r\n\r\n return (\r\n \r\n \r\n {newsletterheading}\r\n {newsletterDescription}\r\n {joinNow}\r\n \r\n {subscribeForm}\r\n \r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['dobbies-footer-newsletter'] = {\n c: () => require('partner/modules/dobbies-footer-newsletter/dobbies-footer-newsletter.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'dobbies-footer-newsletter',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/dobbies-footer-newsletter'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|dobbies-footer-newsletter|dobbies-footer-newsletter'] = {\n c: () => require('partner/modules/dobbies-footer-newsletter/dobbies-footer-newsletter.view.tsx'),\n cn: '__local__-__local__-dobbies-footer-newsletter'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["VSIRestAPIHandlerExtensionClass","constructor","odataObject","this","Id","result","ExtensionProperties","undefined","i","length","className","substr","lastIndexOf","concat","EntityClasses","createVSIInitiateRestCallInput","targetSystem","methodType","requestHeader","requestBody","urlParams","servicePath","id","key","DataServiceQuery","DataServiceEntities","vSIGetAPIResponseQuery","createDataServiceRequestForOperation","bypassCache","returnEntity","vSIInitiateRestCallAsync","context","request","callActionOrExecute","callerContext","props","React","Modal","isOpen","applicationNode","autoFocus","modalTitle","ModalHeader","modalBodySlots","ModalBody","modalBodyElement","modalFooter","ModalFooter","DobbiesFooterNewsletter","state","super","hasFirstNameValue","hasLastNameValue","hasEmailAddressValue","hasFormContainValues","_getHeading","newsletterheading","Msdyn365","Object","assign","tag","classnames","text","_getNewsLetterText","newsletterDescription","_getJoinNowButton","joinNowLabel","joinNowAriaLabel","type","onChange","e","setState","emailAddress","target","value","placeholder","Button","title","color","onClick","_togglePopup","event","isPopupOpen","_renderPopUp","DobbiesModal","_renderPopupTitle","_renderPopupBody","_renderPopupFooter","popUpHeading","config","Node","role","_closePopup","subscribeResponse","_getSubscribeResponse","subscribeForm","_renderForm","FormWrapper","FormContainer","nameInput","emailInput","checkboxPrivacyPolicy","subscribeButtton","resources","cancelButtonTitle","firstName","lastName","privacyPolicyChecked","firstNameError","lastNameError","emailError","requiredError","emailValidationError","privacyPolicyError","recaptchaError","responseReceived","responseError","reCaptchaChecked","_isEmailValid","email","test","_handleChange","name","isChecked","_PrivacyPolicyRef","current","checked","_hasFirstNameValue","_FirstNameInputRef","_hasLastNameValue","_LastNameInputRef","_hasEmailAddressValue","_EmailAddressInputRef","_hasFormContainValues","_handleSubscribe","bind","render","joinNowButtonAriaLabel","viewProps","_objectSpread","moduleProps","contentProps","joinNow","renderView","_renderFirstAndLastNameInput","_renderEmailInput","_renderCheckboxPrivacyPolicy","_renderSubscribeButton","_renderAlert","ref","firstNamePlaceholderText","required","lastNamePlaceholderText","emailAddressPlaceholderText","href","privacyPolicyLink","_isDisabled","subscribeButtonLabel","disabled","requiredErrorMessage","requiredTextErrorMessage","emailValidationErrorMessage","privacyPolicyErrorMessage","responseMessage","contact","emailType","dataFields","status","actionContext","programID","programErrorMessage","programSuccessMessage","isError","response","JSON","stringify","responseResult","parse","errorMessage","message","contactCreated","program","contacts","programId","programResponse","error","_clearValues","telemetry","query","onlyBody","Module","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}