{"version":3,"sources":["webpack:///src/modules/account-customer-balance-tile/components/account-customer-balance-tile-info.tsx?a91f","webpack:///src/modules/sign-in/sign-in.view.tsx?a753","webpack:///src/modules/sign-in/components/sign-in-loading-icon.tsx?3d5a","webpack:///src/modules/sign-in/components/sign-in-text.tsx?92d7","webpack:///src/modules/loyalty-sign-up/components/loyalty-sign-up-small-components.tsx?d781","webpack:///src/modules/loyalty-sign-up/loyalty-sign-up.tsx?f29d","webpack:///src/modules/sign-in/components/sign-in-button.tsx?a9cc","webpack:///src/modules/account-customer-balance-tile/account-customer-balance-tile.view.tsx?955a","webpack:///src/modules/sign-in/components/sign-in-label.tsx?d42c","webpack:///src/modules/account-customer-balance-tile/components/account-customer-balance-tile-links.tsx?5f47","webpack:///src/modules/sign-in/sign-in.tsx?44ed","webpack:///src/modules/account-customer-balance-tile/account-customer-balance-tile.tsx?9383","webpack:///src/modules/loyalty-sign-up/loyalty-sign-up.view.tsx?ed3f","webpack:///src/modules/loyalty-terms/components/loyalty-terms-modal.tsx?c84d","webpack:///src/modules/loyalty-terms/loyalty-terms.tsx?0629","webpack:///src/modules/sign-in/components/sign-in-input.tsx?eb41","webpack:///src/modules/account-loyalty/account-loyalty.tsx?82db","webpack:///src/modules/sign-in/components/sign-in-link.tsx?fc9f","webpack:///src/modules/sign-in/components/sign-in-error.tsx?2f11","webpack:///src/modules/loyalty-terms/loyalty-terms.view.tsx?5155","webpack:///src/modules/account-loyalty/components/account-loyalty-small-components.tsx?9694","webpack:///src/modules/sign-in/components/sign-in-description.tsx?196e","webpack:///src/modules/account-loyalty/account-loyalty.view.tsx?06f4","webpack:///src/modules/sign-in/components/sign-in-loading-message.tsx?7f4d"],"names":["ErrorComponent","_ref","error","React","className","CreditComponent","_ref2","verbagePrefix","verbagePostfix","value","SignInLoading","_ref4","modal","modalBody","icon","message","Node","Object","assign","SignInView","props","signIn","viewState","loading","defaultAADConainer","aadConainer","signInSection","signUpSection","signInSectionHeading","signInLocalAccount","signInSocialAccount","signUpSectionHeading","signInB2BAccount","signUpDescription","signUpLink","Module","isShowLoading","localAccount","items","forgetPassword","disclaimer","signInButton","map","item","key","wrapper","label","input","LocalAccount","socialAccounts","button","image","text","SocialAccount","_ref3","B2BAccount","SignInLoadingIcon","SignInText","SignUpText","createElement","LoyaltySignUp","constructor","super","handleHeadingChange","event","this","config","heading","target","handleMemberHeadingChange","memberHeading","_issueLoyalty","context","request","user","isAuthenticated","state","clicked","setState","IssueLoyaltyInput","apiSettings","issueLoyalty","actionContext","then","MsDyn365","isBrowser","window","location","Msdyn365","catch","telemetry","debug","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","payLoad","getPayloadObject","TelemetryConstant","SignIn","loyaltySignInAttributes","getTelemetryAttributes","contentAction","etext","SignUp","loyaltySignUpAttributes","LoyaltyDetailLink","loyaltyDetailsLinkAttributes","LoyaltyTermsLink","loyaltyTermsLinkAttributes","shouldComponentUpdate","nextProps","nextState","data","render","_data$customerInforma","_this$props$context$a","resources","signInUrl","termsUrl","loyaltyJoinUrl","origin","signInurl","completeClass","classname","loyaltyCard","hasLoyaltyAccount","result","undefined","CardTenderTypeValue","customerInformation","invalidAsyncCustomerState","app","canRenderAsyncCustomerDataAsUnmodifiable","IsAsyncCustomer","viewProps","_objectSpread","moduleProps","infoMessageBar","accountProcessingPendingInfoMessage","params","isEditor","status","tag","editProps","onEdit","requestContext","signInLink","Button","href","joinLoyaltyButtonText","signUpText","loyaltyProgramText","signUpButton","disabled","onClick","detailsLink","viewLoyaltyPageText","termsLink","loyaltyTermsLinkText","renderView","__decorate","observer","SignInButton","id","ariaLabel","attributes","AccountCustomerBalanceTileView","AccountCustomerBalanceTile","content","links","SignInLabel","forId","htmlFor","_mapEditableLinks","linkdata","length","editableLinks","forEach","link","index","linkText","editableLink","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","push","AccountCustomerBalanceTileLinks","onTextChange","moduleClassName","handleParagraphChange","signInDisclaimer","handleSignInHeadingChange","signInHeading","handleSignUpHeadingChange","signUpHeading","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","isInitialized","emailRegex","emailId","SA_FIELDS","AttributeFields","ID","errorMessages","requiredField_email","requriedEmailError","requiredField_password","requriedPasswordError","invalid_email","invalidEmailError","invalid_password","invalidPasswordError","unknown_error","unknownError","EmailRegex","defaultRegex","source","componentDidMount","componentDidUpdate","classnames","Modal","isOpen","ModalBody","SignInLoadingIconComponent","SignInLoadingMessageComponent","loadingMessage","style","display","_renderInput","emailAddressLabelText","emailAddressAriaLabel","passwordLabelText","SignInLinkComponent","forgotPasswordButtonAriaLabel","forgotPasswordButtonText","SignInErrorComponent","SignInButtonComponent","loginButtonAriaLabel","loginButtonText","_renderSocialAccount","facebookButtonText","facebookButtonAriaLabel","facebookIcon","microsoftButtonText","microsoftButtonAriaLabel","microsoftIcon","_renderB2BSocialAccount","b2bButtonText","b2bButtonAriaLabel","displayB2bAccountManagerSignin","SignInDescriptionComponent","description","signUpDescriptionText","signUpButtonAriaLabel","signUpButtonText","type","labelText","pattern","SignInLabelComponent","SignInInputComponent","iconImage","_createImageMarkup","SignInTextComponent","_displayB2bAccountManagerSignin","imageProps","gridSettings","imageSettings","pictureClassName","shouldSkipToMainImage","observable","_initState","reaction","hasError","apiGenericErrorMessage","get","customerResult","allowOnAccountPayment","AllowOnAccountPayment","isB2BSite","isChannelTypeB2B","enableCustomerAccountPayment","isCustomerAccountPaymentEnabled","Heading","headingTag","isDetailsLinkDisplayed","LinksComponent","account","Balance","CreditLimit","InvoiceAccountBalance","InvoiceAccountCreditLimit","noCreditErrorMessage","accountCreditVerbagePrefix","accountCreditVerbagePostfix","currencyCode","formatCurrency","customerCredit","customerCreditFormatted","toFixed","computed","LoyaltySignUpView","LoyaltyTermsModal","LoyaltyTermsCancel","loyaltyTermCancelAttributes","LoyaltyTermsSubmit","loyaltyTermSubmitAttributes","LoyaltyTermsAgree","loyaltyTermCheckboxAttributes","toggle","onToggle","applicationNode","returnFocusRef","returnRef","modalHeader","ModalHeader","modalFooter","ModalFooter","cancelButton","cancelLoyaltyTermsText","submitButton","onSubmit","checked","joinLoyaltyTermsText","loyaltyTermsHeading","terms","agreeSection","checkbox","onChange","onCheck","agreeText","loyaltyAgreeToTerms","LoyaltyTerms","_toggle","bind","_submit","_checkboxChecked","toggleRef","search","url","requestUrl","isJoining","substring","qsps","split","qsp","splitQsp","isModalOpen","hideToggle","slots","serviceTerms","modalToggle","innerRef","joinLoyaltytermsToggleText","CardNumber","card","redirectToLoyalty","getUrlSync","getLoyaltyCardAsync","callerContext","fullCard","update","GetLoyaltyCardInput","GetMaxLength","maxLength","parsedMaxLength","Number","parseInt","isNaN","SignInInput","AccountLoyalty","decimalPrecision","_populateModalData","focusRef","currentLoyaltyPoints","expiring","RewardPointId","currentModalData","isModalExpiring","modalID","currentFocus","getLoyaltyRewardPointsExpiringSoonAsync","queryResultSettings","points","pointsActivity","exception","getLoyaltyRewardPointActivityTimelineAsync","_closeModal","_onOpenModal","_this$state$currentFo","current","focus","_buttonAvailableRef","_buttonExpireRef","BackToShopping","_Msdyn365$getUrlSync","_heading$tag","loyaltyCardLabel","totalAvailablePointsLabel","backToShoppingText","backToShopAttributes","loyaltyCardData","rewardPoints","RewardPoints","homeLink","modalTransition","onEntered","node","isAppearing","childNode","firstChild","totalPoints","_getTotalPoints","_renderRewardPoints","pointsModal","_renderModal","onOpened","Info","Points","Breakdown","PointsBreakdown","infoLabel","AccountLoyaltyLabel","cardNumber","joinDate","_formatJoinDate","_parseDate","LoyaltyEnrollmentDateLocal","pointsLabel","homeButton","title","date","format","joinDateFormatted","Intl","DateTimeFormat","locale","month","day","year","Date","loyaltyPoints","availableId","expiringId","availablePointsLabel","availablePointsAriaLabel","expiringPointsFormatLabel","expiringPointsFormatAriaLabel","AvailablePoints","availablePointsAttributes","ExpiringPoints","expiringPointsAttributes","AccountLoyaltyModalLabel","Description","availableModalLabel","ActivePoints","labelFor","availableModalTrigger","color","expiringModalLabel","PointsExpiringSoon","expiringModalTrigger","_currentModalData$Des","loyaltyActivityDateLabel","loyaltyActivityBalanceLabel","horizontalPosition","verticalPosition","modalClassName","modalHeaderClassName","modalBodyClassName","ModalBodyTop","ModalBodyHeaders","rewardPointsActivity","_renderPointsActivity","pointsDescription","_getPoints","balanceLabel","onClose","total","_loyaltyPoints$Active","activity","_toFixed","Activity","activityType","_getTimelineType","activityDate","cultureFormatter","formatDate","ActivityDate","activityPoints","LoyaltyPoints","dateString","toString","replace","getUTCFullYear","getUTCMonth","getUTCDate","pointActivity","LoyaltyRewardPointTimelineEntryType","earnedPointsLabel","redeemedPointsLabel","adjustedPointsLabel","refundedPointsLabel","ExtensibleLoyaltyRewardPointActivityEntryTypeValue","SignInLink","SignInError","errorClassName","LoyaltyTermsView","SignInDescription","AccountLoyaltyView","autoFocus","fade","zIndex","onClosed","SignInLoadingMessage"],"mappings":";6FAAA,oFAgBO,MAAMA,EAA4DC,IAAA,IAAC,MAAEC,GAAOD,EAAA,OAC/EE,gBAAA,QAAMC,UAAU,2CAA2CF,IAGlDG,EAA6DC,IAAwD,IAAvD,cAAEC,EAAa,eAAEC,EAAc,MAAEC,EAAK,UAAEL,GAAWE,EAC1H,OACIH,gBAAA,OAAKC,UAAWA,GACXG,EACDJ,gBAAA,QAAMC,UAAU,2CAA2CK,GAC1DD,K,iFCNb,MAsDME,EAA0CC,IAAwC,IAAvC,MAAEC,EAAK,UAAEC,EAAS,KAAEC,EAAI,QAAEC,GAASJ,EAChF,OACIR,gBAACa,OAAIC,OAAAC,OAAA,GAAKN,GACNT,gBAACa,OAAIC,OAAAC,OAAA,GAAKL,GACLC,EACAC,KA6CFI,UAvCgCC,IAC3C,MAAM,OACFC,EAAM,UACNC,EAAS,QACTC,EAAO,mBACPC,EAAkB,YAClBC,EAAW,cACXC,EAAa,cACbC,EAAa,qBACbC,EAAoB,mBACpBC,EAAkB,oBAClBC,EAAmB,qBACnBC,EAAoB,iBACpBC,EAAgB,kBAChBC,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AAA,OAAKC,UAAcA,EAAH,qBAAkCW","file":"static/js/4.13e49df6ec20d7532a38.chunk.js","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountCustomerBalanceTileInfo {\n label?: string;\n value?: string;\n verbagePrefix?: string;\n verbagePostfix?: string;\n className?: string;\n error?: string;\n}\n\nexport const ErrorComponent: React.FC = ({ error }) => (\n {error}\n);\n\nexport const CreditComponent: React.FC = ({ verbagePrefix, verbagePostfix, value, className }) => {\n return (\n
\n {verbagePrefix}\n {value}\n {verbagePostfix}\n
\n );\n};\n\nexport const InfoComponent: React.FC = ({ label, value, className }) => (\n
\n {label}\n {value}\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ISignInItem,\n ISignInLoading,\n ISignInLocalAccount,\n ISignInSocialAccount,\n ISignInSocialItem,\n ISignInB2BAccount,\n ISignInB2BItem,\n ISignInViewProps\n} from './sign-in';\n\nconst LocalAccount: React.FC = ({ localAccount, items, forgetPassword, disclaimer, error, signInButton }) => {\n return (\n \n {items &&\n items.map((item: ISignInItem) => {\n return (\n \n {item.label}\n {item.error}\n {item.input}\n \n );\n })}\n {forgetPassword}\n {disclaimer}\n {error}\n {signInButton}\n \n );\n};\n\nconst SocialAccount: React.FC = ({ socialAccounts, items }) => {\n return (\n \n {items &&\n items.map((item: ISignInSocialItem) => {\n return (\n \n {item.image}\n {item.text}\n \n );\n })}\n \n );\n};\n\nconst B2BAccount: React.FC = ({ socialAccounts, items }) => {\n return (\n \n {items &&\n items.map((item: ISignInB2BItem) => {\n return (\n item && (\n \n {item.text}\n \n )\n );\n })}\n \n );\n};\n\nconst SignInLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst SignInView: React.FC = props => {\n const {\n signIn,\n viewState,\n loading,\n defaultAADConainer,\n aadConainer,\n signInSection,\n signUpSection,\n signInSectionHeading,\n signInLocalAccount,\n signInSocialAccount,\n signUpSectionHeading,\n signInB2BAccount,\n signUpDescription,\n signUpLink\n } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n \n {signInSectionHeading}\n {LocalAccount(signInLocalAccount)}\n {SocialAccount(signInSocialAccount)}\n {B2BAccount(signInB2BAccount)}\n \n \n {signUpSectionHeading}\n {signUpDescription}\n {signUpLink}\n \n \n \n );\n};\n\nexport default SignInView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInLoadingIcon {\n className: string;\n}\n\nconst SignInLoadingIcon: React.FC = ({ className }) =>
;\n\nexport default SignInLoadingIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInText {\n className: string;\n text: string;\n}\n\nconst SignInText: React.FC = ({ className, text }) => {text};\n\nexport default SignInText;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\n\nexport const SignUpText: React.FC<{ text: string }> = (props: { text: string }) => {\n return

{props.text}

;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { SignUpText } from './components/loyalty-sign-up-small-components';\nimport { ILoyaltySignUpData } from './loyalty-sign-up.data';\nimport { ILoyaltySignUpProps } from './loyalty-sign-up.props.autogenerated';\n\nexport interface IAccountLoyaltyJoinState {\n clicked: boolean;\n}\nexport interface ILoyaltySignUpViewProps extends ILoyaltySignUpProps {\n LoyaltySignUp: IModuleProps;\n heading: React.ReactNode;\n memberHeading: React.ReactNode;\n signInLink: React.ReactElement;\n signUpText: React.ReactElement;\n signUpButton: React.ReactElement;\n detailsLink: React.ReactElement;\n termsLink: React.ReactElement;\n loading: boolean;\n infoMessageBar?: React.ReactNode;\n}\n\n/**\n *\n * LoyaltySignUp component.\n * @extends {React.Component>}\n */\n@observer\nclass LoyaltySignUp extends React.Component, IAccountLoyaltyJoinState> {\n private readonly telemetryContent?: ITelemetryContent;\n private readonly loyaltySignInAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltySignUpAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltyDetailsLinkAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltyTermsLinkAttributes: Msdyn365.IDictionary | undefined;\n\n constructor(props: ILoyaltySignUpProps) {\n super(props);\n this.state = { clicked: false };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n this.loyaltySignInAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.SignUp;\n this.loyaltySignUpAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyDetailLink;\n this.loyaltyDetailsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsLink;\n this.loyaltyTermsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltySignUpProps, nextState: IAccountLoyaltyJoinState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, heading, memberHeading },\n resources,\n context: {\n actionContext,\n request: {\n user: { signInUrl, isAuthenticated }\n }\n },\n data\n } = this.props;\n\n const termsUrl = Msdyn365.getUrlSync('loyaltyTerms', actionContext);\n let loyaltyJoinUrl = `${Msdyn365.getUrlSync('loyaltyJoin', actionContext)}?joiningLoyalty=true`;\n if (MsDyn365.isBrowser) {\n loyaltyJoinUrl = `${window.location.origin}${loyaltyJoinUrl}`;\n }\n const signInurl = `${signInUrl}?ru=${loyaltyJoinUrl}`;\n const completeClass = classname('ms-loyalty-signup', className);\n const loyaltyCard = data.loyaltyCard;\n const hasLoyaltyAccount = loyaltyCard.result && loyaltyCard.result.CardTenderTypeValue !== undefined;\n const customerInformation = data.customerInformation?.result;\n\n const invalidAsyncCustomerState: boolean =\n (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (customerInformation?.IsAsyncCustomer || false);\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltySignUp: {\n moduleProps: this.props,\n className: completeClass\n },\n infoMessageBar: invalidAsyncCustomerState && (\n \n ),\n loading: !this.props.context.request.params.isEditor && loyaltyCard?.status === 'LOADING',\n heading: !hasLoyaltyAccount && heading && heading.text && (\n \n ),\n memberHeading: hasLoyaltyAccount && memberHeading && memberHeading.text && (\n \n ),\n signInLink: !isAuthenticated && (\n \n ),\n signUpText: !hasLoyaltyAccount && ,\n signUpButton: !hasLoyaltyAccount && isAuthenticated && (\n \n {this.props.resources.joinLoyaltyButtonText}\n \n ),\n detailsLink: hasLoyaltyAccount && (\n \n {this.props.resources.viewLoyaltyPageText}\n \n ),\n termsLink: !hasLoyaltyAccount && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public handleMemberHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.memberHeading!.text = event.target.value);\n\n private readonly _issueLoyalty = () => {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(() => {\n if (MsDyn365.isBrowser) {\n window.location.assign(Msdyn365.getUrlSync('loyalty', this.props.context.actionContext) || '');\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n };\n}\n\nexport default LoyaltySignUp;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst SignInButton: React.FC = ({ id, className, text, ariaLabel, telemetryContent, disabled, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default SignInButton;\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 { IAccountCustomerBalanceTileViewProps } from './account-customer-balance-tile';\n\nconst AccountCustomerBalanceTileView: React.FC = props => {\n const { AccountCustomerBalanceTile, heading, content, links } = props;\n\n return (\n \n {heading}\n {content}\n {links}\n \n );\n};\n\nexport default AccountCustomerBalanceTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst SignInLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignInLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface ILinksData {\n linkText?: string;\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n}\n\nexport interface IAccountCustomerBalanceTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountCustomerBalanceTileLinks: React.FC = ({\n links,\n telemetryContent,\n onTextChange,\n requestContext\n}) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-customer-balance-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountCustomerBalanceTileLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport SignInButtonComponent from './components/sign-in-button';\nimport SignInDescriptionComponent from './components/sign-in-description';\nimport SignInErrorComponent from './components/sign-in-error';\nimport SignInInputComponent from './components/sign-in-input';\nimport SignInLabelComponent from './components/sign-in-label';\nimport SignInLinkComponent from './components/sign-in-link';\nimport SignInLoadingIconComponent from './components/sign-in-loading-icon';\nimport SignInLoadingMessageComponent from './components/sign-in-loading-message';\nimport SignInTextComponent from './components/sign-in-text';\nimport { ISignInConfig, ISignInProps, ISignInResources } from './sign-in.props.autogenerated';\n\nexport interface ISignInViewState {\n isShowLoading: boolean;\n}\n\nexport interface ISignInItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n error: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface ISignInSocialItem {\n key: string;\n button: INodeProps;\n image: React.ReactNode;\n text: React.ReactNode;\n}\n\nexport interface ISignInB2BItem {\n key: string;\n button: INodeProps;\n text: React.ReactNode;\n}\n\nexport interface ISignInSocialAccount {\n socialAccounts: INodeProps;\n items: ISignInSocialItem[];\n}\n\nexport interface ISignInB2BAccount {\n socialAccounts: INodeProps;\n items: ISignInB2BItem[];\n}\nexport interface ISignInLocalAccount {\n localAccount: INodeProps;\n items: ISignInItem[];\n forgetPassword: React.ReactNode;\n disclaimer: React.ReactNode;\n error: React.ReactNode;\n signInButton: React.ReactNode;\n}\n\nexport interface ISignInLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ISignInViewProps {\n className: string;\n viewState: ISignInViewState;\n signIn: IModuleProps;\n loading: ISignInLoading;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n signInSection: INodeProps;\n signInSectionHeading: React.ReactNode;\n signInLocalAccount: ISignInLocalAccount;\n signInSocialAccount: ISignInSocialAccount;\n signInB2BAccount: ISignInB2BAccount;\n signUpSection: INodeProps;\n signUpSectionHeading: React.ReactNode;\n signUpDescription: React.ReactNode;\n signUpLink: React.ReactNode;\n}\n\n/**\n * SignIn component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component>}\n */\n@observer\nclass SignIn extends React.Component> {\n private readonly moduleClassName: string = 'ms-sign-in';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable private emailId: string;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: ISignInProps) {\n super(props);\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.emailId = 'logonIdentifier';\n }\n\n public componentDidMount(): void {\n this._prePopulateData();\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(nextProps: ISignInProps, nextState: ISignInViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const config: ISignInConfig = this.props.config || {};\n const resources: ISignInResources = this.props.resources || {};\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n signIn: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n signInSection: {\n className: `${this.moduleClassName}__sign-in-section`\n },\n signInSectionHeading: (\n \n ),\n signInLocalAccount: {\n localAccount: {\n className: `${this.moduleClassName}__account-items localAccount`\n },\n items: [\n this._renderInput(\n this.emailId,\n 'email',\n resources.emailAddressLabelText,\n resources.emailAddressAriaLabel,\n this.emailRegex\n ),\n this._renderInput('password', 'password', resources.passwordLabelText)\n ],\n forgetPassword: (\n \n ),\n disclaimer: config.signInDisclaimer && (\n \n ),\n error: ,\n signInButton: (\n \n )\n },\n signInSocialAccount: {\n socialAccounts: {\n className: `${this.moduleClassName}__social-accounts`\n },\n items: [\n this._renderSocialAccount(\n 'FacebookExchange',\n resources.facebookButtonText,\n resources.facebookButtonAriaLabel,\n config.facebookIcon\n ),\n this._renderSocialAccount(\n 'MicrosoftAccountExchange',\n resources.microsoftButtonText,\n resources.microsoftButtonAriaLabel,\n config.microsoftIcon\n )\n ]\n },\n signInB2BAccount: {\n socialAccounts: {\n className: `${this.moduleClassName}__b2b-social-accounts`\n },\n items: [\n this._renderB2BSocialAccount(\n 'StoreManagerB2BSignin',\n resources.b2bButtonText,\n resources.b2bButtonAriaLabel,\n config.displayB2bAccountManagerSignin\n )\n ]\n },\n signUpSection: {\n className: `${this.moduleClassName}__sign-up-section`\n },\n signUpSectionHeading: (\n \n ),\n signUpDescription: (\n \n ),\n signUpLink: (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.signInDisclaimer = event.target.value);\n\n public handleSignInHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.signInHeading.text = event.target.value);\n\n public handleSignUpHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.signUpHeading.text = event.target.value);\n\n private readonly _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['CONTENT'] && window['CONTENT']['email_pattern']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n this.emailRegex = window['CONTENT']['email_pattern'];\n }\n\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // @ts-expect-error\n this.emailId = (window.SA_FIELDS.AttributeFields || [])[0].ID || this.emailId;\n }\n };\n\n private readonly _updateErrorMessage = () => {\n const resources: ISignInResources = this.props.resources || {};\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const errorMessages = {\n requiredField_email: resources.requriedEmailError,\n requiredField_password: resources.requriedPasswordError,\n invalid_email: resources.invalidEmailError,\n invalid_password: resources.invalidPasswordError,\n unknown_error: resources.unknownError\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], errorMessages);\n }\n };\n\n private _renderInput(id: string, type: string, labelText: string, ariaLabel?: string, pattern?: string): ISignInItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n error: (\n \n ),\n input: (\n \n )\n };\n }\n\n private _renderSocialAccount(id: string, text: string, ariaLabel: string, iconImage?: Msdyn365.IImageData): ISignInSocialItem {\n return {\n key: id,\n button: {\n id,\n tag: 'button',\n className: classnames(\n `${this.moduleClassName}__social-account`,\n `${this.moduleClassName}__social-account-${id}`,\n 'accountButton',\n 'msc-btn'\n ),\n 'aria-label': ariaLabel\n },\n image: this._createImageMarkup(iconImage),\n text: \n };\n }\n\n private _renderB2BSocialAccount(\n id: string,\n text: string,\n ariaLabel: string,\n _displayB2bAccountManagerSignin: boolean | undefined\n ): ISignInB2BItem | null {\n if (_displayB2bAccountManagerSignin) {\n return {\n key: id,\n button: {\n id,\n tag: 'button',\n className: classnames(\n `${this.moduleClassName}__social-account`,\n `${this.moduleClassName}__social-account-${id}`,\n 'accountButton',\n 'msc-btn'\n ),\n 'aria-label': ariaLabel\n },\n text: \n };\n }\n return null;\n }\n\n private _createImageMarkup(iconImage?: Msdyn365.IImageData): React.ReactNode | null {\n if (iconImage) {\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings || {},\n imageSettings: iconImage && iconImage.imageSettings\n };\n const pictureClassName = `${this.moduleClassName}__social-account-picture`;\n return (\n
\n \n
\n );\n }\n return null;\n }\n}\n\nexport default SignIn;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { getTelemetryObject, Heading, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IAccountCustomerBalanceTileData } from './account-customer-balance-tile.data';\nimport { IAccountCustomerBalanceTileProps } from './account-customer-balance-tile.props.autogenerated';\nimport { CreditComponent, ErrorComponent } from './components/account-customer-balance-tile-info';\nimport LinksComponent from './components/account-customer-balance-tile-links';\n\nexport interface IAccountCustomerBalanceTileViewProps extends IAccountCustomerBalanceTileProps {\n AccountCustomerBalanceTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n content: React.ReactNode;\n links: React.ReactNode;\n}\n\nexport interface IAccountCustomerBalanceTileViewState {\n isDetailsLinkDisplayed: boolean;\n content: React.ReactNode;\n}\n\n/**\n *\n * AccountCustomerBalanceTile component.\n * @extends {React.Component>}\n */\nclass AccountCustomerBalanceTile extends React.Component<\n IAccountCustomerBalanceTileProps,\n IAccountCustomerBalanceTileViewState\n> {\n @computed get hasError(): boolean {\n return get(this.props, 'data.balance.status') !== 'SUCCESS';\n }\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountCustomerBalanceTileProps) {\n super(props);\n\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n this.state = { ...this._initState() };\n\n reaction(\n () => this.hasError,\n () => {\n this.props.context.telemetry.error('Error retrieving customer account balance');\n this.setState({\n content: \n });\n }\n );\n }\n\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerResult = get(this.props, 'data.customerInformation.result');\n\n const allowOnAccountPayment = customerResult ? customerResult.AllowOnAccountPayment : false;\n const isB2BSite = isChannelTypeB2B(this.props.context.request);\n const enableCustomerAccountPayment = get(this.props, 'context.request.app.platform.enableCustomerAccountPayment');\n\n return (\n allowOnAccountPayment &&\n (enableCustomerAccountPayment === 'all' ||\n (enableCustomerAccountPayment === 'b2b' && isB2BSite) ||\n (enableCustomerAccountPayment === 'b2c' && !isB2BSite))\n );\n }\n\n public shouldComponentUpdate(\n nextProps: IAccountCustomerBalanceTileProps,\n nextState: IAccountCustomerBalanceTileViewState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n if (!this.isCustomerAccountPaymentEnabled) {\n return <>;\n }\n\n const { className, heading, links } = this.props.config;\n const viewProps = {\n ...this.props,\n AccountCustomerBalanceTile: {\n moduleProps: this.props,\n className: classnames('ms-account-customer-balance-tile', className)\n },\n heading: heading && (\n \n ),\n content: this.state.content,\n links: this.state.isDetailsLinkDisplayed && (\n (event: Msdyn365.ContentEditableEvent) => void 0,\n requestContext: this.props.context.request,\n telemetryContent: this.telemetryContent\n }}\n />\n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _initState(): IAccountCustomerBalanceTileViewState {\n const account: CustomerBalances = get(this.props, 'data.balance.result');\n\n let content: React.ReactNode;\n let isDetailsLinkDisplayed = false;\n\n if (this.hasError) {\n this.props.telemetry.error('Error retrieving customer account balance');\n content = ;\n } else if (\n account.Balance === 0 &&\n account.CreditLimit === 0 &&\n account.InvoiceAccountBalance === 0 &&\n account.InvoiceAccountCreditLimit === 0\n ) {\n // Non-established credit\n content = ;\n } else {\n // Successfully retrieved balance\n const { accountCreditVerbagePrefix, accountCreditVerbagePostfix } = this.props.resources;\n const currencyCode = get(this.props, 'context.request.channel.Currency');\n const formatCurrency = get(this.props, 'context.cultureFormatter.formatCurrency');\n let customerCredit = 0;\n\n if (account.InvoiceAccountCreditLimit === 0) {\n customerCredit = account.CreditLimit - account.Balance;\n } else {\n customerCredit = account.InvoiceAccountCreditLimit - account.InvoiceAccountBalance;\n }\n\n const customerCreditFormatted = `${formatCurrency(customerCredit.toFixed(2), currencyCode)}`;\n\n isDetailsLinkDisplayed = true;\n content = (\n \n );\n }\n\n return { content, isDetailsLinkDisplayed };\n }\n}\n\nexport default AccountCustomerBalanceTile;\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 { ILoyaltySignUpViewProps } from './loyalty-sign-up';\n\nconst LoyaltySignUpView: React.FC = props => {\n const {\n LoyaltySignUp,\n heading,\n memberHeading,\n signInLink,\n signUpText,\n signUpButton,\n detailsLink,\n termsLink,\n loading,\n infoMessageBar\n } = props;\n\n if (loading) {\n props.context.telemetry.error('LoyaltySignUp data is empty, module wont render');\n return null;\n }\n\n return (\n \n {infoMessageBar}\n {memberHeading}\n {heading}\n {detailsLink}\n {signUpText}\n {termsLink}\n {signUpButton}\n {signInLink}\n \n );\n};\n\nexport default LoyaltySignUpView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ILoyaltyTermsModalProps {\n resources: ILoyaltyTermsModalResources;\n returnRef: React.RefObject | undefined;\n checked: boolean;\n isOpen: boolean;\n terms: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n onToggle(): void;\n onSubmit(): void;\n onCheck(): void;\n}\n\nexport interface ILoyaltyTermsModalResources {\n loyaltyTermsHeading: string;\n loyaltyAgreeToTerms: string;\n joinLoyaltyTermsText: string;\n cancelLoyaltyTermsText: string;\n}\n\nexport interface ILoyaltyTermsModalViewProps {\n modal: INodeProps;\n modalHeader: INodeProps;\n modalFooter: INodeProps;\n modalBody: INodeProps;\n heading: React.ReactElement;\n cancelButton: React.ReactElement;\n submitButton: React.ReactElement;\n terms: React.ReactNode;\n checkbox: React.ReactElement;\n agreeText: React.ReactElement;\n agreeSection: INodeProps;\n}\n\nexport const LoyaltyTermsModal = (props: ILoyaltyTermsModalProps): ILoyaltyTermsModalViewProps => {\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.LoyaltyTermsCancel);\n const loyaltyTermCancelAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsSubmit;\n const loyaltyTermSubmitAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsAgree;\n const loyaltyTermCheckboxAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return {\n modal: {\n tag: Modal,\n className: 'ms-loyalty-terms__modal',\n toggle: props.onToggle,\n applicationNode: 'renderPage',\n isOpen: props.isOpen,\n returnFocusRef: props.returnRef\n },\n modalHeader: { tag: ModalHeader, className: 'ms-loyalty-terms__modal-header', toggle: props.onToggle },\n modalFooter: { tag: ModalFooter, className: 'ms-loyalty-terms__modal-footer' },\n modalBody: { tag: ModalBody, className: 'ms-loyalty-terms__modal-body' },\n cancelButton: (\n \n ),\n submitButton: (\n \n {props.resources.joinLoyaltyTermsText}\n \n ),\n heading:

{props.resources.loyaltyTermsHeading}

,\n terms: props.terms,\n agreeSection: { className: 'ms-loyalty-terms__agree-section' },\n checkbox: (\n \n ),\n agreeText:

{props.resources.loyaltyAgreeToTerms}

\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { getLoyaltyCardAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { GetLoyaltyCardInput, issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport * as React from 'react';\n\nimport { ILoyaltyTermsModalViewProps, LoyaltyTermsModal } from './components/loyalty-terms-modal';\nimport { ILoyaltyTermsData } from './loyalty-terms.data';\nimport { ILoyaltyTermsProps } from './loyalty-terms.props.autogenerated';\n\nexport interface ILoyaltyTermsState {\n checked: boolean;\n clicked: boolean;\n isModalOpen: boolean;\n}\nexport interface ILoyaltyTermsViewProps extends ILoyaltyTermsProps {\n LoyaltyTerms: IModuleProps;\n modalToggle: React.ReactElement;\n modal: ILoyaltyTermsModalViewProps;\n loading: boolean;\n}\n\n/**\n *\n * LoyaltyTerms component.\n * @extends {React.Component>}\n */\nclass LoyaltyTerms extends React.Component, ILoyaltyTermsState> {\n private readonly toggleRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: ILoyaltyTermsProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this._submit = this._submit.bind(this);\n this._checkboxChecked = this._checkboxChecked.bind(this);\n this.toggleRef = React.createRef();\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n let search = this.props.context.request.url.requestUrl.search;\n let isJoining = false;\n if (search) {\n search = search.substring(1);\n const qsps = search.split('&');\n for (const qsp of qsps) {\n const splitQsp = qsp.split('=');\n isJoining = splitQsp[0] === 'joiningLoyalty' && splitQsp[1] === 'true';\n if (isJoining) {\n break;\n }\n }\n }\n\n this.state = {\n isModalOpen: isJoining,\n checked: false,\n clicked: false\n };\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltyTermsProps, nextState: ILoyaltyTermsState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, hideToggle },\n resources,\n slots: { serviceTerms },\n data: { loyaltyCard },\n context: {\n request: {\n user: { isAuthenticated }\n }\n }\n } = this.props;\n const completeClass = classname('ms-loyalty-terms', className);\n\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltyTerms: {\n moduleProps: this.props,\n className: completeClass\n },\n loading: loyaltyCard.status === 'LOADING',\n modalToggle: hideToggle !== true && (\n \n ),\n modal:\n isAuthenticated &&\n loyaltyCard.result &&\n loyaltyCard.result.CardNumber === undefined &&\n LoyaltyTermsModal({\n resources: { ...resources },\n returnRef: this.toggleRef,\n checked: this.state.checked,\n isOpen: this.state.isModalOpen,\n terms: serviceTerms,\n telemetryContent: this.telemetryContent,\n onToggle: this._toggle,\n onSubmit: this._submit,\n onCheck: this._checkboxChecked\n })\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _toggle(): void {\n this.setState({ isModalOpen: !this.state.isModalOpen, checked: false });\n }\n\n private _submit(): void {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(card => {\n if (this.props.config.redirectToLoyalty) {\n window.location.assign(getUrlSync('loyalty', this.props.context.actionContext) || '');\n } else {\n getLoyaltyCardAsync({ callerContext: this.props.context.actionContext }, card.CardNumber || '')\n .then(fullCard => {\n this.props.context.actionContext.update(\n new GetLoyaltyCardInput(this.props.context.request.apiSettings),\n fullCard\n );\n })\n .catch((error: Error) => {\n this.props.context.actionContext.update(\n new GetLoyaltyCardInput(this.props.context.request.apiSettings),\n card\n );\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to fetch loyalty card');\n });\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n }\n\n private _checkboxChecked(): void {\n this.setState({ checked: !this.state.checked });\n }\n}\n\nexport default LoyaltyTerms;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n ariaLabel?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface ISignInInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst SignInInput: React.FC = ({ id, type, value, pattern, className, maxLength, ariaLabel, onChange }) => (\n \n);\n\nexport default SignInInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { LoyaltyCard, LoyaltyRewardPoint, LoyaltyRewardPointActivity } from '@msdyn365-commerce/retail-proxy';\nimport {\n getLoyaltyRewardPointActivityTimelineAsync,\n getLoyaltyRewardPointsExpiringSoonAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IAccountLoyaltyData } from './account-loyalty.data';\nimport { IAccountLoyaltyProps } from './account-loyalty.props.autogenerated';\nimport { AccountLoyaltyLabel, AccountLoyaltyModalLabel } from './components';\n\nexport interface IAccountLoyaltyViewProps extends IAccountLoyaltyProps<{}> {\n AccountLoyalty: IModuleProps;\n className: string;\n totalPoints: number;\n heading?: React.ReactNode;\n Info: INodeProps;\n infoLabel: React.ReactNode;\n cardNumber: React.ReactNode;\n joinDate: React.ReactNode;\n Points: INodeProps;\n pointsLabel: React.ReactNode;\n points: React.ReactNode;\n Breakdown: INodeProps;\n RewardPoints: INodeProps;\n PointsBreakdown: INodeProps;\n rewardPoints?: IAccountLoyaltyRewardPointProps[];\n Button: INodeProps;\n homeButton: React.ReactNode;\n pointsModal: IAccountLoyaltyModalProps;\n}\n\nexport interface IAccountLoyaltyState {\n isModalOpen: boolean;\n currentModalData?: LoyaltyRewardPoint;\n isModalExpiring: boolean;\n modalID: string;\n currentFocus?: React.RefObject;\n pointsActivity: LoyaltyRewardPointActivity[] | undefined;\n}\n\nexport interface IAccountLoyaltyRewardPointProps {\n label: React.ReactNode;\n availableModalLabel: React.ReactNode;\n availableModalTrigger: React.ReactNode;\n expiringModalLabel: React.ReactNode;\n expiringModalTrigger: React.ReactNode;\n}\n\nexport type horizontalModalPosition = 'left' | 'center' | 'right';\nexport type verticalModalPosition = 'top' | 'center' | 'bottom';\n\nexport interface IAccountLoyaltyModalProps {\n isOpen: boolean;\n horizontalPosition?: horizontalModalPosition;\n verticalPosition?: verticalModalPosition;\n modalClassName?: string;\n modalHeaderClassName?: string;\n modalHeader?: string;\n modalBodyClassName?: string;\n ModalBodyTop: INodeProps;\n pointsDescription?: React.ReactNode;\n totalPoints?: React.ReactNode;\n ModalBodyHeaders: INodeProps;\n date?: React.ReactNode;\n balanceLabel?: React.ReactNode;\n rewardPointsActivity?: IAccountLoyaltyActivityProps[];\n returnFocusRef?: React.RefObject;\n onClose(): void;\n onOpened?(): void;\n}\n\nexport interface IAccountLoyaltyActivityProps {\n Activity: INodeProps;\n activityType: React.ReactNode;\n activityDate: React.ReactNode;\n activityPoints: React.ReactNode;\n}\n\nexport interface IProps extends IAccountLoyaltyProps {}\n\n/**\n *\n * AccountLoyalty component.\n * @extends {React.Component>}\n */\n@observer\nclass AccountLoyalty extends React.PureComponent {\n private readonly _buttonAvailableRef: React.RefObject;\n\n private readonly _buttonExpireRef: React.RefObject;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n private readonly decimalPrecision = 2;\n\n constructor(props: IAccountLoyaltyProps) {\n super(props);\n this._buttonAvailableRef = React.createRef();\n this._buttonExpireRef = React.createRef();\n this.state = {\n isModalOpen: false,\n currentModalData: undefined,\n isModalExpiring: false,\n modalID: '',\n pointsActivity: undefined\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n }\n\n public render(): JSX.Element | null {\n const { className, heading } = this.props.config;\n const { loyaltyCard } = this.props.data;\n const { loyaltyCardLabel, totalAvailablePointsLabel, backToShoppingText } = this.props.resources;\n const { actionContext } = this.props.context;\n const { isModalOpen } = this.state;\n const backToShopAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n\n if (!loyaltyCard || !loyaltyCard.result || !loyaltyCard.result.CardNumber) {\n this.props.context.telemetry.error('Loyalty card content is empty, module wont render');\n return null;\n }\n\n const loyaltyCardData = loyaltyCard.result;\n const rewardPoints = loyaltyCard && loyaltyCardData.RewardPoints;\n const homeLink = Msdyn365.getUrlSync('home', actionContext) ?? '';\n\n const viewProps = {\n ...this.props,\n AccountLoyalty: {\n moduleProps: this.props,\n className: classnames('ms-account-loyalty', className),\n modalTransition: {\n /**\n * On Entered in Modal function.\n * @param node - The current node element.\n * @param isAppearing - The Boolean value.\n */\n onEntered: (node: HTMLElement, isAppearing: boolean) => {\n const childNode = node.firstChild as HTMLElement;\n if (isAppearing) {\n childNode.focus();\n }\n }\n }\n },\n totalPoints: rewardPoints && this._getTotalPoints(),\n className: classnames('msc-account-loyalty', className),\n rewardPoints:\n loyaltyCardData.RewardPoints && loyaltyCardData.RewardPoints.length > 0 && this._renderRewardPoints(loyaltyCardData),\n pointsModal: (isModalOpen && this._renderModal()) || {\n isOpen: false,\n returnFocusRef: this.state.currentFocus,\n onOpened: this._onOpenModal\n },\n Info: { className: 'ms-account-loyalty__info' },\n Points: { className: 'ms-account-loyalty__points' },\n Breakdown: { className: 'ms-account-loyalty__breakdown' },\n RewardPoints: { className: 'ms-account-loyalty__reward-points' },\n PointsBreakdown: { className: 'ms-account-loyalty__point-breakdown' },\n Button: { className: 'ms-account-loyalty__link' },\n heading: heading && (\n \n ),\n\n // Account info\n infoLabel: ,\n cardNumber: ,\n joinDate: (\n \n ),\n\n // Points\n pointsLabel: ,\n points: rewardPoints && (\n \n ),\n\n homeButton: rewardPoints && (\n \n {backToShoppingText}\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n private _formatJoinDate(date: Date): string {\n return format(\n this.props.resources.joinDateFormatted,\n new Intl.DateTimeFormat(this.props.context.actionContext.requestContext.locale, {\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n }).format(new Date(date))\n );\n }\n\n private _renderRewardPoints(loyaltyCard: LoyaltyCard): IAccountLoyaltyRewardPointProps[] {\n return loyaltyCard.RewardPoints!.map((loyaltyPoints, index) => {\n const availableId = (loyaltyPoints.RewardPointId && `${loyaltyPoints.RewardPointId}-available-${index}`) || 'available-points';\n const expiringId = (loyaltyPoints.RewardPointId && `${loyaltyPoints.RewardPointId}-expiring-${index}`) || 'expiring-points';\n const {\n availablePointsLabel,\n availablePointsAriaLabel,\n expiringPointsFormatLabel,\n expiringPointsFormatAriaLabel\n } = this.props.resources;\n this.payLoad.contentAction.etext = TelemetryConstant.AvailablePoints;\n const availablePointsAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.ExpiringPoints;\n const expiringPointsAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n const expireDaysDefaultValue = 30;\n\n return {\n label: ,\n availableModalLabel: loyaltyPoints.ActivePoints !== undefined && (\n \n ),\n availableModalTrigger: loyaltyPoints.ActivePoints !== undefined && (\n \n {loyaltyPoints.ActivePoints.toFixed(this.decimalPrecision)}\n \n ),\n expiringModalLabel: loyaltyPoints.PointsExpiringSoon !== undefined && (\n \n ),\n expiringModalTrigger: loyaltyPoints.PointsExpiringSoon !== undefined && (\n \n {loyaltyPoints.PointsExpiringSoon.toFixed(this.decimalPrecision)}\n \n )\n };\n });\n }\n\n private _renderModal(): IAccountLoyaltyModalProps | null {\n const { totalAvailablePointsLabel, loyaltyActivityDateLabel, loyaltyActivityBalanceLabel } = this.props.resources;\n const { isModalOpen, currentModalData } = this.state;\n\n if (!isModalOpen || !currentModalData) {\n // Return empty modal\n this.props.context.telemetry.error('Account loyalty modal content is empty, module wont render');\n return null;\n }\n\n return {\n isOpen: isModalOpen,\n returnFocusRef: this.state.currentFocus,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n modalClassName: 'ms-account-loyalty__points-modal',\n modalHeaderClassName: 'ms-account-loyalty__points-modal-header',\n modalHeader: currentModalData.Description ?? '',\n modalBodyClassName: 'ms-account-loyalty__points-modal-body',\n ModalBodyTop: { className: 'ms-account-loyalty__points-modal-body-top' },\n ModalBodyHeaders: { className: 'ms-account-loyalty__points-modal-body-header' },\n rewardPointsActivity: this._renderPointsActivity(),\n pointsDescription: ,\n totalPoints: ,\n date: ,\n balanceLabel: ,\n onClose: this._closeModal,\n onOpened: this._onOpenModal\n };\n }\n\n private _getTotalPoints(): number {\n const rewardPoints = this.props.data.loyaltyCard.result && this.props.data.loyaltyCard.result.RewardPoints;\n\n let total = 0;\n rewardPoints &&\n rewardPoints.forEach(loyaltyPoints => {\n total += loyaltyPoints.ActivePoints ?? 0;\n });\n\n return total;\n }\n\n private _getPoints(): string {\n const { currentModalData, isModalExpiring } = this.state;\n const rewardPoints: number = (isModalExpiring ? currentModalData!.PointsExpiringSoon : currentModalData!.ActivePoints) ?? 0;\n\n return `${rewardPoints.toFixed(this.decimalPrecision)}`;\n }\n\n private _renderPointsActivity(): IAccountLoyaltyActivityProps[] | undefined {\n const { pointsActivity } = this.state;\n\n if (!pointsActivity) {\n this.props.context.telemetry.error('Points activity content is empty, module wont render');\n return undefined;\n }\n\n return pointsActivity.map(activity => {\n return {\n Activity: { className: 'ms-account-loyalty__points-modal-activity' },\n activityType: (\n \n ),\n activityDate: (\n \n ),\n activityPoints: (\n \n )\n };\n });\n }\n\n private _parseDate(date: Date | string): Date {\n /* Dates for loyalty are coming as formatted strings yyyy-mm-ddT:00:00.000z\n Javascript was interpreting this as an iso format, thus causing the wrong date to be rendered */\n if (typeof date === 'string') {\n let dateString = date.toString();\n dateString = dateString.replace(/-/g, '/');\n dateString = dateString.substring(0, 10);\n return new Date(dateString);\n }\n return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n }\n\n private _getTimelineType(pointActivity: LoyaltyRewardPointActivity): string {\n if (pointActivity.LoyaltyRewardPointTimelineEntryType) {\n return pointActivity.LoyaltyRewardPointTimelineEntryType;\n }\n\n const { earnedPointsLabel, redeemedPointsLabel, adjustedPointsLabel, refundedPointsLabel } = this.props.resources;\n switch (pointActivity.ExtensibleLoyaltyRewardPointActivityEntryTypeValue) {\n case 1:\n return earnedPointsLabel;\n case 2:\n return refundedPointsLabel;\n case 3:\n return redeemedPointsLabel;\n case 5:\n return adjustedPointsLabel;\n default:\n return '';\n }\n }\n\n private readonly _populateModalData = (\n focusRef: React.RefObject,\n loyaltyCard: LoyaltyCard,\n currentLoyaltyPoints: LoyaltyRewardPoint,\n expiring: boolean\n ) => () => {\n if (!loyaltyCard || !loyaltyCard.CardNumber || !currentLoyaltyPoints.RewardPointId) {\n this.props.context.telemetry.error('Modal data is empty, module wont render');\n return null;\n }\n\n const { actionContext } = this.props.context;\n\n // Open modal\n this.setState({\n isModalOpen: true,\n currentModalData: currentLoyaltyPoints,\n isModalExpiring: expiring,\n modalID: '',\n currentFocus: focusRef\n });\n\n if (expiring) {\n getLoyaltyRewardPointsExpiringSoonAsync(\n { callerContext: actionContext, queryResultSettings: {} },\n loyaltyCard.CardNumber,\n currentLoyaltyPoints.RewardPointId,\n 30\n )\n .then((points: LoyaltyRewardPointActivity[]) => {\n this.setState({ pointsActivity: points });\n })\n .catch((error: Error) => {\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Failed to get reward point activity');\n });\n } else {\n getLoyaltyRewardPointActivityTimelineAsync(\n { callerContext: actionContext, queryResultSettings: {} },\n loyaltyCard.CardNumber,\n currentLoyaltyPoints.RewardPointId\n )\n .then((points: LoyaltyRewardPointActivity[]) => {\n this.setState({ pointsActivity: points });\n })\n .catch((error: Error) => {\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Failed to get reward point activity');\n });\n }\n // eslint-disable-next-line no-useless-return, consistent-return -- Auto-suppressed.\n return;\n };\n\n private readonly _closeModal = () => {\n this.setState({\n isModalOpen: false,\n currentModalData: undefined,\n pointsActivity: undefined\n });\n };\n\n /**\n * On open modal function.\n */\n private readonly _onOpenModal = () => {\n if (this.state.currentFocus?.current) {\n this.state.currentFocus.current.focus();\n }\n };\n}\n\nexport default AccountLoyalty;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInLink {\n id?: string;\n className: string;\n href: string;\n ariaLabel: string;\n text: string;\n telemetryContent?: ITelemetryContent;\n}\n\nconst SignInLink: React.FC = ({ id, className, href, telemetryContent, ariaLabel, text }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignInLink;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface ISignInErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst SignInError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default SignInError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILoyaltyTermsViewProps } from './loyalty-terms';\n\nconst LoyaltyTermsView: React.FC = props => {\n const { LoyaltyTerms, modalToggle, modal, loading } = props;\n\n return !loading && modal ? (\n \n {modalToggle}\n \n {modal.heading}\n \n {modal.terms}\n \n {modal.checkbox}\n {modal.agreeText}\n \n \n \n {modal.submitButton}\n {modal.cancelButton}\n \n \n \n ) : null;\n};\n\nexport default LoyaltyTermsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAccountLoyaltyLabel {\n className?: string;\n text?: string | number;\n}\n\nexport const AccountLoyaltyLabel: React.FC = ({ className, text }) =>

{text}

;\n\nexport interface IAccountLoyaltyModalLabel {\n className?: string;\n text?: string | number;\n labelFor?: string;\n}\n\nexport const AccountLoyaltyModalLabel: React.FC = ({ className, text, labelFor }) => (\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInDescription {\n className: string;\n description: string;\n}\n\nconst SignInDescription: React.FC = ({ className, description }) =>

{description}

;\n\nexport default SignInDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Modal, ModalBody, ModalHeader, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountLoyaltyViewProps } from './account-loyalty';\n\nconst AccountLoyaltyView: React.FC = props => {\n const {\n AccountLoyalty,\n Info,\n Points,\n Breakdown,\n RewardPoints,\n PointsBreakdown,\n Button,\n heading,\n infoLabel,\n cardNumber,\n joinDate,\n pointsLabel,\n points,\n rewardPoints,\n homeButton,\n pointsModal\n } = props;\n const { ModalBodyTop, ModalBodyHeaders } = pointsModal;\n return (\n \n {heading}\n \n {infoLabel}\n {cardNumber}\n {joinDate}\n \n \n {pointsLabel}\n {points}\n\n \n {rewardPoints &&\n rewardPoints.map((activity, index) => {\n return (\n \n {activity.label}\n \n {activity.availableModalLabel}\n {activity.availableModalTrigger}\n \n\n \n {activity.expiringModalLabel}\n {activity.expiringModalTrigger}\n \n \n );\n })}\n \n \n\n {homeButton}\n\n {(!pointsModal.isOpen && ) || (\n \n \n {pointsModal.modalHeader}\n \n \n \n {pointsModal.pointsDescription}\n {pointsModal.totalPoints}\n \n \n {pointsModal.date}\n {pointsModal.balanceLabel}\n \n {pointsModal.rewardPointsActivity &&\n pointsModal.rewardPointsActivity.map((activity, index) => {\n const { Activity, activityType, activityDate, activityPoints } = activity;\n return (\n \n {activityType}\n {activityDate}\n {activityPoints}\n \n );\n })}\n \n \n )}\n \n );\n};\n\nexport default AccountLoyaltyView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInLoadingMessage {\n className: string;\n message: string;\n}\n\nconst SignInLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default SignInLoadingMessage;\n"],"sourceRoot":""}