{"version":3,"sources":["webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodRedirect/form-for-payment-method-redirect.shared.component.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodRedirect/form-for-payment-method-redirect.shared.component.html","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodFromProvider/form-for-payment-method-from-provider.shared.component.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodFromProvider/form-for-payment-method-from-provider.shared.component.html","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethod/form-for-payment-method.shared.module.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethod/index.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethod/form-for-payment-method.shared.component.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethod/form-for-payment-method.shared.component.html","webpack:///D:/a/1/s/src/app/core/validators/cell-phone-country.shared.validator.ts","webpack:///D:/a/1/s/src/app/core/validators/cell-phone.shared.validator.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsSubmit/forms-submit.shared.component.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsSubmit/forms-submit.shared.component.html","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsOffsetWrapper/forms-offset-wrapper.shared.component.html","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsOffsetWrapper/forms-offset-wrapper.shared.component.ts","webpack:///D:/a/1/s/src/app/core/validators/credit-cards.shared.validator.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/form-types.shared.component.ts","webpack:///D:/a/1/s/src/app/core/validators/email-taken.shared.validator.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsColumns/forms-columns.shared.module.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsColumns/index.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodRedirect/form-for-payment-method-redirect.shared.module.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodRedirect/index.ts","webpack:///D:/a/1/s/src/app/core/directives/collapse/collapse.shared.directive.ts","webpack:///D:/a/1/s/src/app/core/directives/collapse/collapse.directive.shared.module.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsColumns/forms-columns.shared.component.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/components/formsColumns/forms-columns.shared.component.html","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodFromProvider/form-for-payment-method-from-provider.shared.module.ts","webpack:///D:/a/1/s/src/app/core/modules/forms/formTypes/forPaymentMethodFromProvider/index.ts"],"names":["FormForPaymentMethodRedirectComponent","config","formBuilder","controllers","creditCardsService","super","allowCancel","this","formName","compact","labelSubmit","ngOnInit","formControl","group","CardHolderName","value","disabled","validators","compose","required","CardNumber","minLength","maxLength","ExpiryMonth","c","asyncValidators","composeAsync","ExpiryYear","Cvc2","saveCard","guest","isDefaultPaymentMethod","isMakingRequests$","creditCards","canCancelForm$","canCancelAddingNewCardsForm$","form","nativeElement","console","error","resetCreditCardErrors","addCreditCardWithRedirect","remapRedirectCardDetails","extractValues","then","redirectUrl","verificationToken","returnUrlAfterRedirect","demoMode","payments","baseProvider","v","customForm","document","createElement","method","action","replace","field","name","isHidden","_","type","appendChild","window","location","origin","body","submit","catch","ex","$event","preventDefault","onFormSubmit","emit","event","delay","_submit","setTimeout","bind","toggleCreditCardFormVisibilityWithCleanUp","handleFormSubmit","FormForPaymentMethodFromProviderComponent","changeDetectorRef","_staticLoader","_isValid","_adyenEncryptedPaymentData","hint","feel","size","vside","hside","fieldsStatus","encryptedCardNumber","encryptedExpiryDate","encryptedSecurityCode","touched","isAdyen","_initAdyen","isStripe","_initStripe","target","container","payment","initAdyenForm","onChange","state","reactComponent","isValid","Object","keys","data","paymentMethod","reduce","paymentData","key","detectChanges","onBinValue","onError","errorObj","_updateFieldStatus","fieldType","i18n","message","messageType","onFieldValid","validObj","controls","cardNumber","setValue","endDigits","initStripeForm","card","registry","stripe","_stripe","_stripeFieldsRegistry","handler","e","elemType","elementType","mappedField","complete","on","_setTouched","initAdyen","initStripe","adyenConfigState$","getAdyenConfig$","stripeConfigState$","getStripeConfig$","isMakingRequestsMapped$","_initProviders","destroyAdyenForm","finalize","hideAddCardForm","modal","smoothScrollTo","addCreditCard","expiryDate","get","adyenPaymentData","getStripeMemberBillingDetails$","pipe","subscribe","billing_details","createPaymentMethod","result","exp_month","exp_year","stripePaymentData","mapStripePaymentMethodResponse","hasSucceeded","FormForPaymentMethodModule","FormForPaymentMethodComponent","cvv","nextVal","next","length","previous","handleExpDateChange","cellPhoneCountryValidator","countryIdField","countries","fallbackMinLength","fallbackMaxLength","control","undefined","parent","fallback","maxlength","minlength","findRoot","countryIdControl","findControl","cellPhoneContryError","foundCountry","find","obj","Id","MinLength","requiredLength","actualLength","MaxLength","cellPhoneValidator","test","cellPhoneError","cellPhoneCommonValidators","countryPrefixField","FormsSubmitComponent","tabindex","badgeLeft","badgeRight","badgePosition","inverted","iconLeft","iconRight","title","role","loading","width","paddings","align","marginTop","marginBottom","offsetLeft","offsetRight","onClick","btn","innerText","handleClick","FormsOffsetWrapperComponent","topOffset","modalOffset","creditCardNumberValidator","preprocessString","validateCardNumber","processedValue","processCardNumber","expiryDateInSingleFieldValidator","match","yearAsNumber","split","monthAsNumber","now","Date","hours","toValidateMaxDays","getDaysInMonth","Number","getFullYear","getMonth","currEdgeDateStamp","getDay","getTime","creditCardYearValidator","currDate","isNaN","notANumber","pastYear","creditCardMonthValidator","no","notAMonth","creditCardExpDateValidator","monthField","yearField","timeout","Promise","resolve","month","year","currentControl","nextControl","nextCtrl","date","currMonth","currYear","currMaxDays","userMaxDays","currEdgeDate","status","updateValueAndValidity","onlySelf","creditCardCVVCIDValidator","ctrlPath","findMainParent","ctrl","cardControl","cLength","cardType","detectCardType","isInteger","FormTypesComponent","DOB_REGEXP","hasChanged","minimalDate","setFullYear","minAge","subtractYearsFromToday","minimumAgeToSignUp","startDate","emphasis","labelName","labelSurname","labelMobilePhone","placeholderMobilePhone","labelAccountNumber","signUpRewardsAccountLinking","cardNumberLabelText","labelEmail","placeholderEmail","labelReceivePromo","labelCardNumber","labelExpiryDate","labelExpiryMonth","labelExpiryYear","labelCVV","labelCardHolderName","labelSaveCard","labelSubmitResetPassword","labelPassword","labelPasswordCurrent","labelPasswordNew","labelPasswordAgain","labelDefaultPaymentMethod","labelMemberCard","labelDateOfBirth","labelBirthday","labelMonth","labelDay","labelYear","labelOptional","labelCancel","labelAddress","placeholderAddress","labelTableNumber","labelAddVoucher","placeholderAddVoucher","placeholderTableNumber","detachFormSubmitControls","alignActions","actionsMarginTop","actionsMarginBottom","onInit","warn","getFormValues","isMobile","emailTakenValidator","membersService","delayResponse","nextValue","asObservable","a","validateLogin","member","IsOnlineRegistered","emailTaken","emailSelfUpdateValidator","currentMember$","controlValue","Email","response","MemberId","emailUpdateTaken","FormsColumnsModule","FormForPaymentMethodRedirectModule","CollapseDirective","_elementRef","_renderer2","collapsed","_init","_isCollapsed","_isAnimating","_timeout","onCollapsed","_elem","setStyle","_handleChange","changes","shouldExpand","expandedHeight","clientHeight","CollapseDirectiveSharedModule","FormsColumnsComponent","itemsMargin","mobileFull","FormForPaymentMethodFromProviderModule"],"mappings":"8FACA,kM,wBCoCI,gC,oBAA4C,0BAAmB,2BAAnB,CAAmB,cAAnB,CAAmB,0B,uCASvD,iCAE8C,0E,gBAC1C,QAAe,O,wBAHE,+CAAsC,sBAAtC,CAAsC,qBAGvD,oC,yBAPR,kCACI,iC,gBACiE,QAAe,OAEhF,uC,gBAIJ,Q,oBARoC,uBACX,sDAAqC,sBAArC,CAAqC,oBAArC,CAAqC,2BAArC,CAAqC,+BACO,4BAG7D,gF,wBAMZ,yC,+BAA2C,qBAAmB,sBAAnB,CAAmB,Y,qBAI1D,Q,yBADJ,QACI,gCACJ,Q,6BADkB,oCDjCf,Y,M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,KAAK4W,eAC5B5W,KAAK8W,WACT,K,6CAvFFP,GAAiB,sB,uBAAjBA,EAAiB,8H,GAAvB,I,kCCJP,8DAcO,Y,MAAMgB,G,8BAAAA,I,oDAAAA,IAA6B,UAF3B,GAAE,SAJJ,CAAC,Q,GAMP,I,0KCPA,Y,MAAMC,EANb,cAOoB,KAAAjK,MAAsD,gBACtD,KAAAkK,aAAuB,EACvB,KAAAC,YAAsB,G,6CAH7BF,I,uBAAAA,EAAqB,yN,OCRlC,gBACI,gBAEI,QACJ,OACJ,Q,MAJS,yFACD,uD,8pBDMD,I,kJEuBA,Y,MAAMG,G,8BAAAA,I,oDAAAA,IAAsC,SAdtC,CACL,IACA,IACA,IACA,IACA,IACA,IACA,IACA,Q,GAMD,GC/BP","file":"x","sourcesContent":["import { Component, OnInit, Inject, Input, OnDestroy } from '@angular/core';\r\nimport { Validators, FormBuilder } from '@angular/forms';\r\n\r\nimport {\r\n creditCardNumberValidator,\r\n creditCardMonthValidator,\r\n creditCardCVVCIDValidator,\r\n creditCardExpDateValidator,\r\n creditCardYearValidator\r\n} from '@shared/core/validators/credit-cards.shared.validator';\r\nimport * as Utils from '@shared/core/utils';\r\nimport * as Services from '@shared/core/services';\r\nimport * as Tokens from '@shared/core/tokens';\r\nimport { Controllers } from '@shared/core/controllers';\r\n\r\nimport { FormTypesComponent } from '../form-types.shared.component';\r\n\r\nimport { Observable } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'shared-form-for-payment-method-redirect',\r\n templateUrl: './form-for-payment-method-redirect.shared.component.html',\r\n styleUrls: ['./form-for-payment-method-redirect.shared.component.scss']\r\n})\r\nexport class FormForPaymentMethodRedirectComponent extends FormTypesComponent implements OnInit, OnDestroy {\r\n @Input() public allowCancel: boolean = false;\r\n\r\n public isMakingRequests$: Observable;\r\n public canCancelForm$: Observable;\r\n\r\n constructor(\r\n @Inject(Tokens.CONFIG_TOKEN) public config: IConfig,\r\n public formBuilder: FormBuilder,\r\n public controllers: Controllers,\r\n public creditCardsService: Services.CreditCardsService,\r\n ) {\r\n super(config, formBuilder);\r\n this.formName = 'payment-method-redirect';\r\n\r\n this.compact = false;\r\n this.labelSubmit = 'Add payment method';\r\n }\r\n\r\n ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n\r\n this.formControl = this.formBuilder.group({\r\n CardHolderName: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n ]),\r\n },\r\n ],\r\n CardNumber: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n Validators.minLength(15),\r\n Validators.maxLength(19),\r\n creditCardNumberValidator(true),\r\n ]),\r\n },\r\n ],\r\n ExpiryMonth: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n Validators.minLength(2),\r\n Validators.maxLength(2),\r\n creditCardMonthValidator,\r\n ]),\r\n asyncValidators: Validators.composeAsync([\r\n creditCardExpDateValidator('ExpiryMonth', 'ExpiryYear'),\r\n ]),\r\n },\r\n ],\r\n ExpiryYear: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n Validators.minLength(2),\r\n Validators.maxLength(2),\r\n creditCardYearValidator,\r\n ]),\r\n asyncValidators: Validators.composeAsync([\r\n creditCardExpDateValidator('ExpiryMonth', 'ExpiryYear'),\r\n ]),\r\n },\r\n ],\r\n Cvc2: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n ]),\r\n asyncValidators: Validators.composeAsync([\r\n creditCardCVVCIDValidator('CardNumber'),\r\n ]),\r\n\r\n },\r\n ],\r\n saveCard: [\r\n { value: this.guest === false, disabled: false }\r\n ],\r\n isDefaultPaymentMethod: [\r\n { value: this.guest === false, disabled: false }\r\n ],\r\n });\r\n\r\n this.isMakingRequests$ = this.controllers.creditCards.isMakingRequests$();\r\n this.canCancelForm$ = this.controllers.creditCards.canCancelAddingNewCardsForm$();\r\n\r\n if (!this.form || !this.form.nativeElement) {\r\n console.error('Unable to find form ElementRef for paymentMethodRedirect form. Add local reference in html #form to form element in order to use redirect');\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.controllers.creditCards.resetCreditCardErrors();\r\n }\r\n\r\n private _submit(): void {\r\n this.creditCardsService.addCreditCardWithRedirect(\r\n Utils.CreditCards.remapRedirectCardDetails(\r\n Utils.Forms.extractValues(this.formControl) as OLO.CreditCards.ICreditCardRedirectDetails\r\n )\r\n ).then(({ redirectUrl, verificationToken, returnUrlAfterRedirect }) => {\r\n if (this.config.demoMode || !this.form?.nativeElement) {\r\n\r\n return;\r\n }\r\n\r\n if (this.config.payments.baseProvider === OLO.Enums.PAYMENT_PROVIDER.FAT_ZEBRA) {\r\n const v = Utils.Forms.extractValues(this.formControl) as OLO.CreditCards.ICreditCardRedirectDetails;\r\n const customForm: HTMLFormElement = document.createElement('form');\r\n customForm.method = 'GET';\r\n customForm.action = redirectUrl.replace('.json', '');\r\n\r\n const field = (name: string, value: any, isHidden: boolean = false): HTMLInputElement => {\r\n const _: HTMLInputElement = document.createElement('input');\r\n _.type = 'text';\r\n _.name = name;\r\n _.value = value;\r\n if (isHidden) {\r\n _.type = 'hidden';\r\n }\r\n customForm.appendChild(_);\r\n\r\n return _;\r\n };\r\n\r\n const nameField = field('card_holder', v.CardHolderName);\r\n const ccField = field('card_number', v.CardNumber);\r\n const expMonthField = field('expiry_month', +v.ExpiryMonth);\r\n const expYearhField = field('expiry_year', '20' + v.ExpiryYear);\r\n const cvvField = field('cvv', v.Cvc2);\r\n const verification = field('verification', verificationToken, true);\r\n\r\n const rtnPath = returnUrlAfterRedirect || (window.location.origin + '/payment-gateway');\r\n const retPathField = field('return_path', rtnPath, true);\r\n\r\n document.body.appendChild(customForm);\r\n\r\n return customForm.submit();\r\n }\r\n\r\n /* Payment express */\r\n this.form.nativeElement.action = redirectUrl;\r\n this.form.nativeElement.submit();\r\n this.form.nativeElement.action = null;\r\n\r\n })\r\n .catch(ex => {\r\n console.error('There was an error while generating card token:', ex);\r\n });\r\n }\r\n\r\n public handleFormSubmit($event: Event): void {\r\n $event.preventDefault();\r\n\r\n this.onFormSubmit.emit({\r\n event: $event,\r\n form: this.formControl,\r\n });\r\n\r\n if (this.delay !== null) {\r\n setTimeout(this._submit.bind(this), this.delay);\r\n\r\n return;\r\n }\r\n\r\n this._submit();\r\n }\r\n\r\n public handleFormCancel($event: Event): void {\r\n this.controllers.creditCards.toggleCreditCardFormVisibilityWithCleanUp(false);\r\n }\r\n}\r\n","
\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n {{labelSubmit}}\r\n\r\n \r\n {{labelCancel}}\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n\r\n
\r\n","import { Component, OnInit, Inject, OnDestroy, AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, ElementRef } from '@angular/core';\r\nimport { FormBuilder } from '@angular/forms';\r\nimport { ElementTypes, Stripe, StripeCardNumberElementChangeEvent, StripeHtmlElementsRegistry, PaymentMethod } from '@stripe/stripe-js';\r\n\r\nimport * as State from '@shared/state';\r\nimport * as Tokens from '@shared/core/tokens';\r\nimport * as Utils from '@shared/core/utils';\r\nimport { StripePaymentProviderMapper } from '@shared/core/mappers/paymentProviders/stripe.payment-provider.shared.mapper';\r\nimport { Controllers } from '@shared/core/controllers';\r\n\r\nimport { FormTypesComponent } from '../form-types.shared.component';\r\n\r\nimport { Observable, of } from 'rxjs';\r\nimport { map, take } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'shared-form-for-payment-method-from-provider',\r\n templateUrl: './form-for-payment-method-from-provider.shared.component.html',\r\n styleUrls: ['./form-for-payment-method-from-provider.shared.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormForPaymentMethodFromProviderComponent extends FormTypesComponent implements OnInit, OnDestroy, AfterViewInit {\r\n private _staticLoader: OLO.Components.LOADING_STATUS = null;\r\n private _stripe: Stripe;\r\n private _stripeFieldsRegistry: StripeHtmlElementsRegistry;\r\n private _isValid: boolean = false;\r\n private _adyenEncryptedPaymentData: Adyen.PaymentData = null;\r\n @ViewChild('formWrapper', { static: false }) public container!: ElementRef;\r\n\r\n public hint = {\r\n feel: 'danger',\r\n size: 'sm',\r\n vside: 'center',\r\n hside: 'right',\r\n };\r\n\r\n public fieldsStatus: Record = {\r\n encryptedCardNumber: null,\r\n encryptedExpiryDate: null,\r\n encryptedSecurityCode: null\r\n };\r\n\r\n public touched: Record = {\r\n encryptedCardNumber: false,\r\n encryptedExpiryDate: false,\r\n encryptedSecurityCode: false\r\n };\r\n\r\n public adyenConfigState$: Observable;\r\n public stripeConfigState$: Observable;\r\n public isMakingRequests$: Observable;\r\n\r\n constructor(\r\n @Inject(Tokens.CONFIG_TOKEN) public config: IConfig,\r\n public formBuilder: FormBuilder,\r\n public controllers: Controllers,\r\n public changeDetectorRef: ChangeDetectorRef,\r\n ) {\r\n super(config, formBuilder);\r\n this.formName = 'payment-method-from-provider';\r\n\r\n this.compact = false;\r\n this.labelSubmit = 'Add payment method';\r\n }\r\n\r\n protected _initProviders(): void {\r\n setTimeout(() => {\r\n if(this.isAdyen) this._initAdyen();\r\n if(this.isStripe) this._initStripe();\r\n }, 0);\r\n }\r\n\r\n protected _initAdyen(): void {\r\n const target = this.container?.nativeElement || `#${this.formName}`;\r\n\r\n this.controllers.payment.initAdyenForm(target, {\r\n onChange: (state, reactComponent) => {\r\n this._isValid = state.isValid;\r\n\r\n this._adyenEncryptedPaymentData = Object.keys(state.data.paymentMethod).reduce((paymentData, key) => {\r\n if(key === 'type') {\r\n return paymentData;\r\n }\r\n\r\n return {\r\n ...paymentData,\r\n [key]: state.data.paymentMethod[key]\r\n };\r\n }, {} as Adyen.PaymentData);\r\n\r\n this.changeDetectorRef.detectChanges();\r\n },\r\n onBinValue: ({ binValue }) => {\r\n\r\n },\r\n onError: (errorObj) => {\r\n this._updateFieldStatus(errorObj.fieldType, errorObj.error && {\r\n key: errorObj.i18n,\r\n message: errorObj.i18n,\r\n messageType: 'danger',\r\n } || null);\r\n },\r\n onFieldValid:(validObj) => {\r\n if(validObj.fieldType === 'encryptedCardNumber') {\r\n this.formControl.controls.cardNumber.setValue(validObj.endDigits);\r\n }\r\n\r\n this._updateFieldStatus(validObj.fieldType, null);\r\n }\r\n });\r\n }\r\n\r\n protected _initStripe(): void {\r\n this.controllers.payment.initStripeForm({\r\n card: '[data-cse=\"encryptedCardNumber\"]',\r\n // cardExpiry: '[data-cse=\"encryptedExpiryDate\"]',\r\n // cardCvc: '[data-cse=\"encryptedSecurityCode\"]',\r\n }, {\r\n card: {}\r\n }).then(({ registry, stripe }) => {\r\n this._stripe = stripe;\r\n this._stripeFieldsRegistry = registry;\r\n\r\n const handler = (field: ElementTypes) => (e: StripeCardNumberElementChangeEvent) => {\r\n const elemType = e.elementType as ElementTypes;\r\n let mappedField: Adyen.FieldInputTypes = 'encryptedCardNumber';\r\n if(elemType === 'cardExpiry') {\r\n mappedField = 'encryptedExpiryDate';\r\n }\r\n if(elemType === 'cardCvc') {\r\n mappedField = 'encryptedSecurityCode';\r\n }\r\n\r\n this._updateFieldStatus(mappedField, e.error && {\r\n key: e.error.message,\r\n message: e.error.message,\r\n messageType: 'danger'\r\n } || null);\r\n\r\n // let isValid = true;\r\n // for(const checkField in this.fieldsStatus) {\r\n // if(isValid) {\r\n // isValid = this.fieldsStatus[checkField] === null && this.touched[checkField] === true;\r\n // }\r\n // }\r\n\r\n this._isValid = e.complete;\r\n\r\n this.changeDetectorRef.detectChanges();\r\n };\r\n\r\n for(const field in registry) {\r\n registry[field].on('change', handler(field as ElementTypes));\r\n }\r\n\r\n });\r\n }\r\n\r\n protected _setTouched(fieldType: Adyen.FieldInputTypes): void {\r\n this.touched[fieldType] = true;\r\n }\r\n\r\n protected _updateFieldStatus(fieldType: Adyen.FieldInputTypes, error: OLO.Components.IMappedMessage): OLO.Components.IMappedMessage {\r\n this._setTouched(fieldType);\r\n\r\n for(const key in this.fieldsStatus) {\r\n if(key !== fieldType) {\r\n this.fieldsStatus[key] = null;\r\n }\r\n }\r\n\r\n this.fieldsStatus[fieldType] = error;\r\n this.changeDetectorRef.detectChanges();\r\n\r\n return error;\r\n }\r\n\r\n ngOnInit(): void {\r\n if(this.isAdyen) this.controllers.creditCards.initAdyen();\r\n if(this.isStripe) this.controllers.creditCards.initStripe();\r\n\r\n this.adyenConfigState$ = this.controllers.creditCards.getAdyenConfig$();\r\n this.stripeConfigState$ = this.controllers.creditCards.getStripeConfig$();\r\n this.isMakingRequests$ = this.controllers.creditCards.isMakingRequestsMapped$();\r\n\r\n this.formControl = this.formBuilder.group({\r\n cardNumber: [\r\n { value: '' }\r\n ],\r\n saveCard: [\r\n { value: this.guest === false, disabled: false }\r\n ],\r\n isDefaultPaymentMethod: [\r\n { value: this.guest === false, disabled: false }\r\n ],\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._initProviders();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.controllers.creditCards.resetCreditCardErrors();\r\n this.controllers.payment.destroyAdyenForm();\r\n }\r\n\r\n public handleFormSubmit($event: Event): void {\r\n $event.preventDefault();\r\n }\r\n\r\n public handleOnSubmit($event: Event): void {\r\n this._staticLoader = 'loading';\r\n\r\n const finalize = () => {\r\n this.controllers.creditCards.hideAddCardForm();\r\n this.onFormSubmit.emit({ event: $event, form: null });\r\n\r\n this._staticLoader = null;\r\n\r\n if(!this.modal) {\r\n Utils.Scroll.smoothScrollTo(0);\r\n }\r\n };\r\n\r\n if(this.isAdyen) {\r\n this.controllers.creditCards.addCreditCard({\r\n cardNumber: this.formControl.controls.cardNumber.value,\r\n expiryDate: null,\r\n saveCard: this.formControl.get('saveCard').value,\r\n isDefaultPaymentMethod: this.formControl.get('isDefaultPaymentMethod').value,\r\n adyenPaymentData: this._adyenEncryptedPaymentData\r\n });\r\n\r\n finalize();\r\n }\r\n\r\n if(this.isStripe) {\r\n this.controllers.creditCards.getStripeMemberBillingDetails$()\r\n .pipe(\r\n take(1)\r\n )\r\n .subscribe(billing_details => {\r\n this._stripe.createPaymentMethod({\r\n type: 'card',\r\n card: this._stripeFieldsRegistry.card,\r\n billing_details\r\n }).then((result) => {\r\n\r\n if(result.error) {\r\n this._staticLoader = null;\r\n\r\n return;\r\n }\r\n\r\n this.controllers.creditCards.addCreditCard({\r\n cardNumber: result.paymentMethod.card && (result.paymentMethod.card.last4),\r\n expiryDate: result.paymentMethod.card && (result.paymentMethod.card.exp_month + '/' + result.paymentMethod.card.exp_year),\r\n saveCard: this.formControl.get('saveCard').value,\r\n isDefaultPaymentMethod: this.formControl.get('isDefaultPaymentMethod').value,\r\n stripePaymentData: StripePaymentProviderMapper.mapStripePaymentMethodResponse(result.paymentMethod),\r\n });\r\n\r\n finalize();\r\n });\r\n });\r\n\r\n }\r\n }\r\n\r\n public get isLoading$(): Observable {\r\n if(this._staticLoader) {\r\n return of(this._staticLoader);\r\n }\r\n\r\n return this.isMakingRequests$;\r\n }\r\n\r\n public get isValid(): boolean {\r\n return this._isValid;\r\n }\r\n\r\n public get isAdyen(): boolean {\r\n return this.config.payments.baseProvider === OLO.Enums.PAYMENT_PROVIDER.ADYEN;\r\n }\r\n\r\n public get isStripe(): boolean {\r\n return this.config.payments.baseProvider === OLO.Enums.PAYMENT_PROVIDER.STRIPE;\r\n }\r\n\r\n public get isFormHidden$(): Observable {\r\n if(this.isAdyen) {\r\n return this.adyenConfigState$\r\n .pipe(\r\n map(config => config.hasSucceeded === false)\r\n );\r\n }\r\n if(this.isStripe) {\r\n return this.stripeConfigState$\r\n .pipe(\r\n map(config => config.hasSucceeded === false)\r\n );\r\n }\r\n }\r\n}\r\n","
\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n \r\n {{labelSubmit}}\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n\r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { FormsInputModule } from '../../components/formsInput';\r\nimport { FormsColumnsModule } from '../../components/formsColumns';\r\nimport { FormsOffsetWrapperModule } from '../../components/formsOffsetWrapper';\r\nimport { FormsSubmitModule } from '../../components/formsSubmit';\r\nimport { FormForPaymentMethodComponent } from './form-for-payment-method.shared.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormForPaymentMethodComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsInputModule,\r\n FormsColumnsModule,\r\n FormsOffsetWrapperModule,\r\n FormsSubmitModule,\r\n ],\r\n exports: [\r\n FormForPaymentMethodComponent\r\n ],\r\n providers: [],\r\n})\r\nexport class FormForPaymentMethodModule { }\r\n","export * from './form-for-payment-method.shared.module';\r\n","import { Component, OnInit, Inject, Input, OnDestroy } from '@angular/core';\r\nimport { Validators, FormBuilder } from '@angular/forms';\r\n\r\nimport {\r\n creditCardNumberValidator,\r\n creditCardCVVCIDValidator,\r\n expiryDateInSingleFieldValidator,\r\n} from '@shared/core/validators/credit-cards.shared.validator';\r\nimport * as Utils from '@shared/core/utils';\r\nimport * as Tokens from '@shared/core/tokens';\r\nimport { Controllers } from '@shared/core/controllers';\r\n\r\nimport { FormTypesComponent } from '../form-types.shared.component';\r\n\r\nimport { Observable } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'shared-form-for-payment-method',\r\n templateUrl: './form-for-payment-method.shared.component.html',\r\n styleUrls: ['./form-for-payment-method.shared.component.scss']\r\n})\r\nexport class FormForPaymentMethodComponent extends FormTypesComponent implements OnInit, OnDestroy {\r\n @Input() public allowCancel: boolean = false;\r\n\r\n public isMakingRequests$: Observable;\r\n public canCancelForm$: Observable;\r\n\r\n constructor(\r\n @Inject(Tokens.CONFIG_TOKEN) public config: IConfig,\r\n public formBuilder: FormBuilder,\r\n public controllers: Controllers,\r\n ) {\r\n super(config, formBuilder);\r\n this.formName = 'payment-method';\r\n\r\n this.compact = false;\r\n this.labelSubmit = 'Add payment method';\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n this.formControl = this.formBuilder.group({\r\n cardNumber: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n Validators.minLength(15),\r\n Validators.maxLength(16),\r\n creditCardNumberValidator(true),\r\n ]),\r\n },\r\n ],\r\n expiryDate: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n expiryDateInSingleFieldValidator()\r\n ]),\r\n },\r\n ],\r\n cvv: [\r\n { value: '', disabled: false },\r\n {\r\n validators: Validators.compose([\r\n Validators.required,\r\n ]),\r\n asyncValidators: Validators.composeAsync([\r\n\r\n creditCardCVVCIDValidator('cardNumber'),\r\n ])\r\n\r\n },\r\n ],\r\n saveCard: [\r\n { value: this.guest === false, disabled: false }\r\n ],\r\n isDefaultPaymentMethod: [\r\n { value: this.guest === false, disabled: false }\r\n ],\r\n });\r\n\r\n this.isMakingRequests$ = this.controllers.creditCards.isMakingRequests$();\r\n this.canCancelForm$ = this.controllers.creditCards.canCancelAddingNewCardsForm$();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.controllers.creditCards.resetCreditCardErrors();\r\n }\r\n\r\n private _submit(): void {\r\n this.controllers.creditCards.addCreditCard(Utils.Forms.extractValues(this.formControl) as OLO.CreditCards.ICreditCardDetails);\r\n }\r\n\r\n public handleFormSubmit($event: Event): void {\r\n this.onFormSubmit.emit({\r\n event: $event,\r\n form: this.formControl,\r\n });\r\n\r\n if (this.delay !== null) {\r\n setTimeout(this._submit.bind(this), this.delay);\r\n\r\n return;\r\n }\r\n\r\n return this._submit();\r\n }\r\n\r\n public handleFormCancel($event: Event): void {\r\n this.controllers.creditCards.toggleCreditCardFormVisibilityWithCleanUp(false);\r\n }\r\n\r\n public handleExpDateChange($event: OLO.Components.IPrevNextEvent): void {\r\n /* Add / on the fly */\r\n const nextVal: string = `${$event.next}`;\r\n const prevVal: string = `${$event.previous}`;\r\n\r\n if (nextVal && nextVal.length > prevVal.length && nextVal.length === 2) {\r\n this.formControl.controls.expiryDate.setValue(`${nextVal}/`);\r\n }\r\n\r\n }\r\n}\r\n","
\r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n {{labelSubmit}}\r\n\r\n \r\n {{labelCancel}}\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n","import { Validators, AbstractControl } from '@angular/forms';\r\nimport * as Utils from '@shared/core/utils';\r\nimport { ILoyaltyAppCountryAssignmentModel } from '@shared/state';\r\n\r\nexport const cellPhoneCountryValidator = (\r\n countryIdField: string,\r\n countries: ILoyaltyAppCountryAssignmentModel[] = [],\r\n fallbackMinLength: number = 10,\r\n fallbackMaxLength: number = 10\r\n) => (control: AbstractControl): OLO.Common.IValidators => {\r\n if (control.parent === undefined) return null;\r\n\r\n const fallback = (): OLO.Common.IValidators => {\r\n /* Fallback */\r\n const maxlength = Validators.maxLength(fallbackMaxLength)(control);\r\n const minlength = Validators.minLength(fallbackMinLength)(control);\r\n const form = Utils.ValidatorsUtils.findRoot(control);\r\n\r\n // console.warn(`countryIdField \"${countryIdField}\" is not defined in current control form or countries are not defined in config.js:`,\r\n // countries, form, `Fallback used with minlength ${fallbackMinLength} and maxlength ${fallbackMaxLength} validators`);\r\n return maxlength || minlength;\r\n };\r\n\r\n if (!countryIdField || !countries || countries.length === 0) {\r\n return fallback();\r\n }\r\n\r\n const countryIdControl: AbstractControl = Utils.ValidatorsUtils.findControl(countryIdField, control);\r\n if (!countryIdControl) {\r\n return fallback();\r\n }\r\n if (!countryIdControl.value) return { cellPhoneContryError: { message: 'Invalid country prefix', value: countryIdControl.value }, value: countryIdControl.value };\r\n\r\n const foundCountry: ILoyaltyAppCountryAssignmentModel = countries.find(obj => obj.Id === countryIdControl.value);\r\n if (!foundCountry) return { cellPhoneContryError: { message: 'Setup issue. Country is not defined', value: countryIdControl.value }, value: countryIdControl.value };\r\n\r\n /* Main checks */\r\n if (control.value.length < foundCountry.MinLength) return { minlength: { requiredLength: foundCountry.MinLength, actualLength: control.value.length } };\r\n if (control.value.length > foundCountry.MaxLength) return { maxlength: { requiredLength: foundCountry.MaxLength, actualLength: control.value.length } };\r\n\r\n return null;\r\n};\r\n","import { FormControl, Validators, ValidatorFn } from '@angular/forms';\r\nimport { cellPhoneCountryValidator } from './cell-phone-country.shared.validator';\r\nimport { ILoyaltyAppCountryAssignmentModel } from '@shared/state';\r\n\r\nexport const cellPhoneValidator = (control: FormControl): OLO.Common.IValidators => {\r\n if (!control.value) {\r\n return null;\r\n }\r\n // valid formats:\r\n // (123) 456-7890\r\n // (123)456-7890\r\n // 123-456-7890\r\n // 123.456.7890\r\n // 1234567890\r\n // +31636363634\r\n // 075-63546725\r\n // const REGEX = /^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$/im;\r\n\r\n const REGEX = /^[0-9]*$/im;\r\n\r\n return REGEX.test(control.value) ? null : { cellPhoneError: { message: 'Invalid cell phone format', value: null } };\r\n};\r\n\r\nexport const cellPhoneCommonValidators = (countries: ILoyaltyAppCountryAssignmentModel[], countryPrefixField: string = 'countryPrefix'): Array => ([\r\n Validators.required,\r\n cellPhoneValidator,\r\n cellPhoneCountryValidator(countryPrefixField, countries),\r\n]);\r\n","import { Component, OnInit, Input, TemplateRef, ViewChild, ElementRef, Output, EventEmitter } from '@angular/core';\r\nimport { FormGroup, AbstractControl } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'shared-forms-submit',\r\n templateUrl: './forms-submit.shared.component.html',\r\n styleUrls: ['./forms-submit.shared.component.scss']\r\n})\r\nexport class FormsSubmitComponent implements OnInit {\r\n @Input() public parentForm!: FormGroup;\r\n @Input() public formName: string = null;\r\n @Input() public tabindex: number = 0;\r\n @Input() public left!: TemplateRef;\r\n @Input() public right!: TemplateRef;\r\n @Input() public badgeLeft: string | number = null;\r\n @Input() public badgeRight: string | number = null;\r\n @Input() public badgePosition: 'tl' | 'tr' | 'bl' | 'br' = null;\r\n @Input() public badgeSize: OLO.Components.BUTTON_SIZE;\r\n @Input() public size: OLO.Components.BUTTON_SIZE = 'lg';\r\n @Input() public inverted: boolean = false;\r\n @Input() public feel: OLO.Components.BUTTON_FEEL | OLO.Components.BUTTON_CIRCLE_FEEL = 'primary';\r\n @Input() public iconLeft: string = null;\r\n @Input() public iconRight: string = null;\r\n @Input() public title: string = '';\r\n @Input() public role: string = 'button';\r\n @Input() public disabled: boolean = false;\r\n @Input() public loading: OLO.Components.LOADING_STATUS = null;\r\n @Input() public width: OLO.Components.BUTTON_WIDTH = 'extended';\r\n @Input() public paddings: boolean = true;\r\n @Input() public type: string = 'submit';\r\n @Input() public align: 'left' | 'right' | 'center' = 'left';\r\n @Input() public marginTop: OLO.Components.MARGIN_SIZE = 'md';\r\n @Input() public marginBottom: OLO.Components.MARGIN_SIZE = null;\r\n @Input() public offsetLeft: boolean = false;\r\n @Input() public offsetRight: boolean = false;\r\n\r\n @ViewChild('btn', { static: false, read: ElementRef }) public btn: ElementRef;\r\n\r\n @Output() public onClick: EventEmitter = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n if (this.btn && this.btn.nativeElement) {\r\n this.title = (this.btn.nativeElement as HTMLElement).innerText;\r\n }\r\n }\r\n\r\n public handleClick($event: Event): void {\r\n this.onClick.emit($event);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n","
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
","import { Component, OnInit, TemplateRef, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'shared-forms-offset-wrapper',\r\n templateUrl: './forms-offset-wrapper.shared.component.html',\r\n styleUrls: ['./forms-offset-wrapper.shared.component.scss']\r\n})\r\nexport class FormsOffsetWrapperComponent implements OnInit {\r\n @Input() public topOffset: boolean = false;\r\n @Input() public modalOffset: boolean = false;\r\n\r\n @Input() public left: TemplateRef;\r\n @Input() public right: TemplateRef;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","import { FormControl, FormGroup, Validators, AbstractControl, AbstractControlOptions } from '@angular/forms';\r\nimport * as Utils from '../utils';\r\nimport * as Services from '../services';\r\n\r\nexport const creditCardNumberValidator = (preprocessString: boolean = true) => {\r\n return (control: FormControl): OLO.Common.IValidators | null => {\r\n\r\n if (!control.value) { return null; }\r\n /* AMEX contain 15 digits! */\r\n const isValid: boolean = Utils.CreditCards.validateCardNumber(control.value, preprocessString);\r\n if (isValid) {\r\n return null;\r\n }\r\n const processedValue: string = Utils.CreditCards.processCardNumber(control.value);\r\n\r\n if (!isValid && processedValue.length === 16) {\r\n return { 'creditCardNumberFormat': 'invalid credit card number format' };\r\n }\r\n\r\n return { 'creditCardNumberFormatLength': 'invalid credit card length' };\r\n\r\n // return Helpers.validateCardNumber(control.value, preprocessString) ? null : { 'creditCardNumberFormat': 'invalid credit card number format' };\r\n };\r\n};\r\n\r\nexport const expiryDateInSingleFieldValidator = () => {\r\n return (control: FormControl): OLO.Common.IValidators | null => {\r\n\r\n if (!control.value) {\r\n return null;\r\n }\r\n\r\n let match = control.value.match(/^\\s*(0?[1-9]|1[0-2])\\/(\\d\\d|\\d{4})\\s*$/);\r\n if (!match) {\r\n return { 'expiryDateFormat': 'invalid expiry date format' };\r\n }\r\n\r\n let yearAsNumber = +(control.value.split('/')[1]);\r\n let monthAsNumber = +(control.value.split('/')[0]);\r\n\r\n const now = new Date();\r\n const hours: number[] = [23, 59, 59, 999];\r\n const toValidateMaxDays: number = Utils.Dates.getDaysInMonth(Number(now.getFullYear()), Number(now.getMonth() + 1));\r\n\r\n const currEdgeDateStamp: number = new Date(now.getFullYear(), now.getMonth() + 1, now.getDay(), ...hours).getTime();\r\n\r\n const toValidateEdgeDateStamp: number = new Date(Number(yearAsNumber) + 2000, Number(monthAsNumber), toValidateMaxDays, ...hours).getTime();\r\n\r\n if (toValidateEdgeDateStamp < currEdgeDateStamp) {\r\n return { 'expiryDateExpired': 'your card has expired' };\r\n }\r\n\r\n return null;\r\n\r\n };\r\n};\r\n\r\n\r\nexport const creditCardYearValidator = (control: FormControl): OLO.Common.IValidators | null => {\r\n if (!control.value) { return null; }\r\n\r\n const currDate: number = new Date().getFullYear() - 2000;\r\n\r\n switch (true) {\r\n case isNaN(control.value):\r\n return {\r\n notANumber: 'invalid year',\r\n };\r\n\r\n case Number(control.value) < Number(currDate):\r\n return {\r\n pastYear: 'year passed',\r\n };\r\n\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const creditCardMonthValidator = (control: FormControl): OLO.Common.IValidators | null => {\r\n if (!control.value) return null;\r\n\r\n const no: number = Number(control.value);\r\n\r\n switch (true) {\r\n case control.value.length > 2:\r\n case isNaN(control.value):\r\n case no < 1 || no > 12:\r\n return {\r\n notAMonth: 'invalid month',\r\n };\r\n\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const creditCardExpDateValidator = (monthField: string, yearField: string, timeout: number = 500) => {\r\n /* Validate exp date overall if it's not past */\r\n return (control: AbstractControl): Promise => {\r\n\r\n return new Promise(resolve => {\r\n setTimeout(() => {\r\n const month: AbstractControl = (control as FormGroup).parent.controls[monthField];\r\n const year: AbstractControl = (control as FormGroup).parent.controls[yearField];\r\n\r\n let currentControl: string = monthField;\r\n let nextControl: string = yearField;\r\n if (control === year) {\r\n currentControl = yearField;\r\n nextControl = monthField;\r\n }\r\n const nextCtrl: AbstractControl = ((control as FormGroup).parent.controls[nextControl] as AbstractControl);\r\n\r\n const date: Date = new Date();\r\n const currMonth: number = date.getMonth() + 1;\r\n const currYear: number = date.getFullYear();\r\n const currMaxDays: number = Utils.Dates.getDaysInMonth(currYear, currMonth);\r\n const userMaxDays: number = Utils.Dates.getDaysInMonth(month.value, year.value);\r\n\r\n const currEdgeDate = new Date(`${currYear}-${currMonth < 10 ? `0${currMonth}` : `${currMonth}`}-${currMaxDays}T23:59:59.999Z`);\r\n const userDate = new Date(`20${year.value}-${month.value}-${userMaxDays}T23:59:59.999Z`);\r\n\r\n if (userDate < currEdgeDate) {\r\n return resolve({\r\n 'expiredCard': `Your card has expired`\r\n });\r\n }\r\n if (nextCtrl.status === 'INVALID') {\r\n nextCtrl.updateValueAndValidity({ onlySelf: true });\r\n }\r\n return resolve(null);\r\n }, timeout);\r\n });\r\n };\r\n};\r\n\r\nexport const creditCardCVVCIDValidator = (ctrlPath: string, timeout: number = 500) => {\r\n return (control: AbstractControl): Promise => new Promise(resolve => {\r\n /* Use reccurency to find form root controller */\r\n const form: FormGroup = (function findMainParent(ctrl: AbstractControl | FormGroup | FormControl) {\r\n if (!ctrl.parent) {\r\n return ctrl as FormGroup;\r\n }\r\n return findMainParent(ctrl.parent);\r\n })(control);\r\n\r\n if (!form || form && typeof form.get === 'undefined') {\r\n resolve(null);\r\n }\r\n\r\n const cardControl: AbstractControl = form.get(ctrlPath);\r\n if (!cardControl) {\r\n resolve(null);\r\n }\r\n\r\n setTimeout(() => {\r\n if (!control || !control.value || !cardControl) {\r\n resolve(null);\r\n return;\r\n }\r\n const cLength = control.value.length;\r\n\r\n const cardType: OLO.Enums.CREDIT_CARD_TYPES = Utils.CreditCards.detectCardType(cardControl.value);\r\n\r\n if (!Number.isInteger(+control.value)) {\r\n resolve({ 'cvvValidationError': 'number is invalid' });\r\n }\r\n\r\n if (cardType === OLO.Enums.CREDIT_CARD_TYPES.AMERICAN_EXPRESS) {\r\n /* for amex CID */\r\n\r\n if (cLength > 4) {\r\n resolve({ 'cvvValidationError': 'CID number too long' });\r\n } else if (cLength < 3) {\r\n resolve({ 'cvvValidationError': 'CID number too short' });\r\n }\r\n\r\n resolve(null);\r\n }\r\n\r\n /* for regular check CVV */\r\n if (cLength > 3) {\r\n resolve({ 'cvvValidationError': 'CVV number too long' });\r\n } else if (cLength < 3) {\r\n resolve({ 'cvvValidationError': 'CVV number too short' });\r\n }\r\n\r\n resolve(null);\r\n\r\n }, timeout);\r\n });\r\n};\r\n","import { Component, OnInit, Inject, ViewChild, Input, Output, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';\r\n\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { MatDatepicker } from '@angular/material/datepicker';\r\n\r\nimport * as Utils from '@shared/core/utils';\r\nimport * as Tokens from '@shared/core/tokens';\r\n\r\nimport { Subscription, Observable } from 'rxjs';\r\n\r\n@Component({\r\n template: '
This component requires extending
',\r\n})\r\nexport class FormTypesComponent implements OnInit {\r\n public formControl: FormGroup;\r\n public DOB_REGEXP: RegExp = /([0-9]|\\/)+/;\r\n public hasChanged: boolean = false;\r\n public minimalDate: Date = new Date(new Date().setFullYear(1900));\r\n public minAge: Date = Utils.Dates.subtractYearsFromToday(this.config.minimumAgeToSignUp);\r\n public startDate: Date = Utils.Dates.subtractYearsFromToday(this.config.minimumAgeToSignUp + 10);\r\n\r\n @Input() public formName: string = 'form';\r\n @Input() public guest: boolean = false;\r\n @Input() public data: { [key: string]: any; } = null;\r\n @Input() public emphasis: boolean = false;\r\n @Input() public compact: boolean = true;\r\n @Input() public labelName: string = 'First Name';\r\n @Input() public labelSurname: string = 'Last Name';\r\n @Input() public labelMobilePhone: string = 'Mobile Number';\r\n @Input() public placeholderMobilePhone: string = 'Mobile number e.g. 0400-000-000';\r\n @Input() public labelAccountNumber: string = this.config.signUpRewardsAccountLinking?.cardNumberLabelText || 'Account number';\r\n @Input() public labelEmail: string = 'Email Address';\r\n @Input() public placeholderEmail: string = 'Your email e.g. John@email.com';\r\n @Input() public labelReceivePromo: string = 'Keep me up to date with new menu items & offers';\r\n @Input() public labelCardNumber: string = 'Card Number';\r\n @Input() public labelExpiryDate: string = 'Expiry Date (MM/YY)';\r\n @Input() public labelExpiryMonth: string = 'Expiry Month (MM)';\r\n @Input() public labelExpiryYear: string = 'Expiry Year (YY)';\r\n @Input() public labelCVV: string = 'CVV/CID';\r\n @Input() public labelCardHolderName: string = 'Card Holder Name';\r\n @Input() public labelSaveCard: string = 'Save this card for quick checkout';\r\n @Input() public labelSubmitResetPassword: string = 'Reset password';\r\n @Input() public labelPassword: string = 'Password';\r\n @Input() public labelPasswordCurrent: string = 'Current Password';\r\n @Input() public labelPasswordNew: string = 'New Password';\r\n @Input() public labelPasswordAgain: string = 'Retype New Password';\r\n @Input() public labelDefaultPaymentMethod: string = 'Make this card default payment method';\r\n @Input() public labelMemberCard: string = 'Card number';\r\n @Input() public labelDateOfBirth: string = 'Date of Birth';\r\n @Input() public labelBirthday: string = 'Birthday';\r\n @Input() public labelMonth: string = 'Month';\r\n @Input() public labelDay: string = 'Day';\r\n @Input() public labelYear: string = 'Year';\r\n @Input() public labelOptional: string = ' ( optional )'; /* TODO - implement this - pass this value to formInput component */\r\n @Input() public labelSubmit: string = 'Submit';\r\n @Input() public labelCancel: string = 'Cancel';\r\n @Input() public labelAddress: string = 'Address';\r\n @Input() public placeholderAddress: string = 'Enter your address';\r\n @Input() public labelTableNumber: string = 'Table number';\r\n @Input() public labelAddVoucher: string = 'Promotional code';\r\n @Input() public placeholderAddVoucher: string = 'e.g AAAs9928';\r\n @Input() public placeholderTableNumber: string = '';\r\n @Input() public delay: number = null; /* Will delay form submit event - this needs to be implemented separatley for each form */\r\n @Input() public disabled: boolean = false;\r\n\r\n @Input() public modal: boolean = false;\r\n @Input() public detachFormSubmitControls: boolean = false;\r\n\r\n /* Not used but form-submit can use that */\r\n @Input() public alignActions: 'left' | 'right' | 'center' = 'left';\r\n @Input() public actionsMarginTop: OLO.Components.MARGIN_SIZE = 'md';\r\n @Input() public actionsMarginBottom: OLO.Components.MARGIN_SIZE = null;\r\n\r\n @Output() public onInit: EventEmitter = new EventEmitter();\r\n @Output() public onChange: EventEmitter = new EventEmitter();\r\n @Output() public onFormSubmit: EventEmitter<{ event: Event; form: FormGroup; }> = new EventEmitter();\r\n\r\n @ViewChild('dobPicker', { static: true }) public dobPicker!: MatDatepicker;\r\n @ViewChild('form', { static: true }) public form: ElementRef;\r\n\r\n public formChangesListener$: Subscription;\r\n public loading$: Observable;\r\n\r\n constructor(\r\n @Inject(Tokens.CONFIG_TOKEN) public config: IConfig,\r\n public formBuilder: FormBuilder,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.onInit.emit(this.formControl);\r\n }\r\n\r\n public handleFormSubmit($event: Event): void {\r\n console.warn('HANDLE FORM SUBMIT', $event, this.getFormValues());\r\n }\r\n\r\n public getFormValues(): { [key: string]: any; } {\r\n return Utils.Forms.extractValues(this.formControl);\r\n }\r\n\r\n public get buttonWidth(): OLO.Components.BUTTON_WIDTH {\r\n return Utils.Devices.isMobile() ? 'extended' : 'normal';\r\n }\r\n\r\n\r\n public get buttonSize(): OLO.Components.BUTTON_SIZE {\r\n return Utils.Devices.isMobile() ? 'xlg' : 'lg';\r\n }\r\n}\r\n","import { FormControl } from '@angular/forms';\r\n\r\nimport * as Services from '@shared/core/services';\r\n\r\nimport { Observable, BehaviorSubject, of } from 'rxjs';\r\nimport { map, take, auditTime, switchMap, withLatestFrom } from 'rxjs/operators';\r\nimport { IMemberModel } from '@shared/state';\r\n\r\nexport const emailTakenValidator = (membersService: Services.MembersService, delayResponse: number = 0) => {\r\n const nextValue = new BehaviorSubject(null);\r\n\r\n return (control: FormControl): Observable | Promise => {\r\n if (!control.value) return Promise.resolve(null);\r\n\r\n nextValue.next(control.value);\r\n\r\n return nextValue.asObservable()\r\n .pipe(\r\n auditTime(delayResponse),\r\n take(1),\r\n switchMap(value => membersService\r\n .validateLogin(`${value}`, OLO.Enums.LOGIN_TYPE.EMAIL_BASED_LOGIN)\r\n .pipe(\r\n map(member => !member.IsOnlineRegistered ? null : { emailTaken: 'Email is taken' })\r\n ))\r\n );\r\n };\r\n};\r\n\r\n\r\nexport const emailSelfUpdateValidator = (membersService: Services.MembersService, currentMember$: Observable) => {\r\n const nextValue = new BehaviorSubject(null);\r\n\r\n return (control: FormControl): Observable | Promise => {\r\n if (!control.value) return Promise.resolve(null);\r\n\r\n nextValue.next(control.value);\r\n\r\n return nextValue.asObservable()\r\n .pipe(\r\n withLatestFrom(currentMember$),\r\n take(1),\r\n switchMap(([controlValue, member]) => {\r\n if (!member || member.Email === controlValue) return of(null);\r\n\r\n return membersService\r\n .validateLogin(controlValue, OLO.Enums.LOGIN_TYPE.EMAIL_BASED_LOGIN).pipe(\r\n map(response => !response?.MemberId ? null : { emailUpdateTaken: 'Email is taken' })\r\n );\r\n })\r\n );\r\n\r\n };\r\n\r\n};\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { FormsColumnsComponent } from './forms-columns.shared.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormsColumnsComponent\r\n ],\r\n imports: [CommonModule],\r\n exports: [\r\n FormsColumnsComponent\r\n ],\r\n providers: [],\r\n})\r\nexport class FormsColumnsModule { }\r\n","export * from './forms-columns.shared.module';\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { FormsInputModule } from '../../components/formsInput';\r\nimport { FormsColumnsModule } from '../../components/formsColumns';\r\nimport { FormsOffsetWrapperModule } from '../../components/formsOffsetWrapper';\r\nimport { FormsSubmitModule } from '../../components/formsSubmit';\r\nimport { FormForPaymentMethodRedirectComponent } from './form-for-payment-method-redirect.shared.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormForPaymentMethodRedirectComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsInputModule,\r\n FormsColumnsModule,\r\n FormsOffsetWrapperModule,\r\n FormsSubmitModule,\r\n ],\r\n exports: [\r\n FormForPaymentMethodRedirectComponent\r\n ],\r\n providers: [],\r\n})\r\nexport class FormForPaymentMethodRedirectModule { }\r\n","export * from './form-for-payment-method-redirect.shared.module';\r\n","import { Directive, Input, OnChanges, SimpleChanges, ElementRef, Renderer2, OnInit, Output, EventEmitter, AfterViewInit } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[directive-collapse]', /* [data-directive=\"collapse\"] */\r\n})\r\nexport class CollapseDirective implements OnChanges, OnInit, AfterViewInit {\r\n @Input() public collapsed: any = null;\r\n private _init: boolean = false;\r\n private _elem: HTMLElement;\r\n private _isCollapsed: boolean = false;\r\n private _isAnimating: boolean = false;\r\n private _timeout: number = 500;\r\n\r\n @Output() public onCollapsed: EventEmitter = new EventEmitter();\r\n\r\n constructor(\r\n private _elementRef: ElementRef,\r\n private _renderer2: Renderer2,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this._elem = this._elementRef.nativeElement;\r\n\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.collapsed) {\r\n this._renderer2.setStyle(this._elem, 'overflow', 'hidden');\r\n this._renderer2.setStyle(this._elem, 'height', '0px');\r\n this._isCollapsed = true;\r\n this._isAnimating = false;\r\n }\r\n\r\n setTimeout(() => {\r\n\r\n this._init = true;\r\n this._handleChange();\r\n }, 0);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this._handleChange();\r\n }\r\n\r\n private _handleChange(): void {\r\n if (!this._init) {\r\n return;\r\n }\r\n\r\n const shouldCollapse: boolean = !this._isCollapsed && this.collapsed && this._isAnimating === false;\r\n const shouldExpand: boolean = this._isCollapsed && !this.collapsed && this._isAnimating === false;\r\n\r\n let expandedHeight: number;\r\n if (shouldCollapse) {\r\n expandedHeight = this._elem.clientHeight;\r\n this._renderer2.setStyle(this._elem, 'height', `${expandedHeight}px`);\r\n this._renderer2.setStyle(this._elem, 'overflow', 'hidden');\r\n this._renderer2.setStyle(this._elem, 'opacity', '1');\r\n this._renderer2.setStyle(this._elem, 'transition', 'all .5s ease');\r\n\r\n this._isAnimating = true;\r\n\r\n setTimeout(() => {\r\n this._renderer2.setStyle(this._elem, 'opacity', '0');\r\n this._renderer2.setStyle(this._elem, 'height', '0px');\r\n setTimeout(() => {\r\n this._isCollapsed = true;\r\n this._isAnimating = false;\r\n this.onCollapsed.emit(this._isCollapsed);\r\n }, this._timeout);\r\n }, 0);\r\n }\r\n\r\n if (shouldExpand) {\r\n this._renderer2.setStyle(this._elem, 'transition', 'none');\r\n this._renderer2.setStyle(this._elem, 'height', 'auto');\r\n expandedHeight = this._elem.clientHeight;\r\n this._renderer2.setStyle(this._elem, 'height', '0px');\r\n this._renderer2.setStyle(this._elem, 'transition', 'all .5s ease');\r\n\r\n this._isAnimating = true;\r\n\r\n setTimeout(() => {\r\n this._renderer2.setStyle(this._elem, 'opacity', '1');\r\n this._renderer2.setStyle(this._elem, 'height', `${expandedHeight}px`);\r\n setTimeout(() => {\r\n this._renderer2.setStyle(this._elem, 'overflow', null);\r\n this._renderer2.setStyle(this._elem, 'height', null);\r\n this._isCollapsed = false;\r\n this._isAnimating = false;\r\n this.onCollapsed.emit(this._isCollapsed);\r\n }, this._timeout);\r\n }, 0);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { CollapseDirective } from './collapse.shared.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n CollapseDirective\r\n ],\r\n imports: [CommonModule],\r\n exports: [\r\n CollapseDirective\r\n ],\r\n providers: [],\r\n})\r\nexport class CollapseDirectiveSharedModule { }\r\n","import { Component, OnInit, ChangeDetectionStrategy, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'shared-forms-columns',\r\n templateUrl: './forms-columns.shared.component.html',\r\n styleUrls: ['./forms-columns.shared.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormsColumnsComponent {\r\n @Input() public align: 'space-between' | 'start' | 'end' | 'center' = 'space-between';\r\n @Input() public itemsMargin: boolean = false;\r\n @Input() public mobileFull: boolean = false;\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { LoadersForSpinnerModule } from '@shared/core/components/loaders/loadersTypes/forSpinner';\r\nimport { HintWithIndicatorModule } from '@shared/core/components/hints/hintTypes/indicator';\r\n\r\nimport { FormsInputModule } from '../../components/formsInput';\r\nimport { FormsOffsetWrapperModule } from '../../components/formsOffsetWrapper';\r\nimport { FormsColumnsModule } from '../../components/formsColumns';\r\nimport { FormsSubmitModule } from '../../components/formsSubmit';\r\nimport { FormForPaymentMethodFromProviderComponent } from './form-for-payment-method-from-provider.shared.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormForPaymentMethodFromProviderComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsInputModule,\r\n FormsOffsetWrapperModule,\r\n FormsColumnsModule,\r\n FormsSubmitModule,\r\n LoadersForSpinnerModule,\r\n HintWithIndicatorModule,\r\n ],\r\n exports: [\r\n FormForPaymentMethodFromProviderComponent\r\n ],\r\n})\r\nexport class FormForPaymentMethodFromProviderModule { }\r\n","export * from './form-for-payment-method-from-provider.shared.module';\r\n"]}