{"version":3,"file":"sm-ng-form-validation.mjs","sources":["../../../projects/sm-ng-form-validation/src/lib/components/control-error/control-error.component.ts","../../../projects/sm-ng-form-validation/src/lib/components/control-error/control-error.component.html","../../../projects/sm-ng-form-validation/src/lib/data/default-error.messages.ts","../../../projects/sm-ng-form-validation/src/lib/directives/control-error-container.directive.ts","../../../projects/sm-ng-form-validation/src/lib/directives/form-submit.directive.ts","../../../projects/sm-ng-form-validation/src/lib/directives/control-error.directive.ts","../../../projects/sm-ng-form-validation/src/lib/config/sm-form-validation.config.token.ts","../../../projects/sm-ng-form-validation/src/lib/sm-form-validation.module.ts","../../../projects/sm-ng-form-validation/src/public-api.ts","../../../projects/sm-ng-form-validation/src/sm-ng-form-validation.ts"],"sourcesContent":["import {ChangeDetectorRef, Component, Input, OnInit} from '@angular/core';\n\n@Component({\n  selector: 'app-control-error',\n  templateUrl: './control-error.component.html',\n  styleUrls: ['./control-error.component.scss'],\n})\nexport class ControlErrorComponent implements OnInit {\n\n  _text: string ='';\n  _hide = true;\n  @Input() set text(value: string) {\n    // eslint-disable-next-line no-underscore-dangle\n    if (value !== this._text) {\n      // eslint-disable-next-line no-underscore-dangle\n      this._text = value;\n      // eslint-disable-next-line no-underscore-dangle\n      this._hide = !value;\n      this.cdr.detectChanges();\n    }\n  }\n  constructor(private cdr: ChangeDetectorRef) { }\n\n  ngOnInit() {\n  }\n\n}\n","<ng-container style=\"width:100%\">\n<span class=\"sm-ng-error-message\" [class.hide]=\"_hide\">\n                                {{_text}}\n                            </span>\n</ng-container>\n","import {InjectionToken} from '@angular/core';\n\nexport const defaultErrors = {\n  required: () => 'This field is required',\n  min: (requiredLength: number) => `The input should not be less than ${requiredLength}`,\n  minlength: ({requiredLength, actualLength}:any) => `Expected ${requiredLength} but got ${actualLength}`,\n  maxlength: ({requiredLength, actualLength}:any) => `Expected ${requiredLength} but got ${actualLength}`,\n  email: () => 'Please enter a valid email',\n  pattern: () => 'Invalid input'\n};\n\n// creating injection token to inject the form errors in runtime\nexport const FORM_ERRORS = new InjectionToken('FORM_ERRORS');\n","import {Directive, ViewContainerRef} from '@angular/core';\n\n@Directive({\n  // eslint-disable-next-line @angular-eslint/directive-selector\n  selector: '[controlErrorContainer]'\n})\n\nexport class ControlErrorContainerDirective {\n  constructor(public vcr: ViewContainerRef) {\n  }\n}\n","import {Directive, ElementRef} from '@angular/core';\nimport {shareReplay, tap} from 'rxjs/operators';\nimport {fromEvent} from 'rxjs';\n\n@Directive({\n  // eslint-disable-next-line @angular-eslint/directive-selector\n  selector: 'form'\n})\n\nexport class FormSubmitDirective {\n  submit$ = fromEvent(this.element, 'submit').pipe(\n    tap(_ => {\n      if (this.element.classList.contains('sm-ng-submitted') === false) {\n        this.element.classList.add('sm-ng-submitted');\n      }\n    }),\n    shareReplay(1)\n  );\n  constructor(public host: ElementRef<HTMLFormElement>) {\n  }\n  get element() {\n    return this.host.nativeElement;\n  }\n}\n","import {\n  ComponentRef,\n  Directive,\n  Host,\n  Inject,\n  Input, OnDestroy, OnInit,\n  Optional,\n  ViewContainerRef\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {takeWhile} from 'rxjs/operators';\nimport {EMPTY, Observable, merge} from 'rxjs';\n\nimport {ControlErrorComponent} from '../components';\nimport {FORM_ERRORS} from '../data';\n\nimport {ControlErrorContainerDirective} from './control-error-container.directive';\nimport {FormSubmitDirective} from './form-submit.directive';\n\n\n@Directive({\n  // eslint-disable-next-line @angular-eslint/directive-selector\n  selector: '[formControl], [formControlName]'\n})\n\nexport class ControlErrorDirective implements OnInit, OnDestroy{\n  @Input() customErrors: any = {};\n  @Input() checkParent = false;\n  @Input() partialCheck = false;\n\n  // componentReference with  control-error-component type to inject the error message div to control error container\n  ref!: ComponentRef<ControlErrorComponent>;\n  container: ViewContainerRef;\n  submit$: Observable<Event>;\n  private subscriptionState = true;\n\n\n  constructor(private controlDir: NgControl,\n              @Optional() @Host() private form: FormSubmitDirective, // to catch the form events[submit event]\n              // @ts-ignore\n              @Inject(FORM_ERRORS) private errors, // to get the form errors (which is either default or provided by user)\n              private vcr: ViewContainerRef,\n              @Optional() controlErrorContainer: ControlErrorContainerDirective // gives reference of the div inside which the error message needs to be displayed\n  ) {\n    this.submit$ = this.form ? this.form.submit$ : EMPTY;\n    this.container = controlErrorContainer? controlErrorContainer.vcr: vcr;\n  }\n\n\n  ngOnInit(): void {\n    // conditional check is true when the validation depends on other  controls in the  parent (eg: sale price should be less than normal price)\n    const conditionalCheck = this.checkParent ? this.parentControl?.valueChanges: [];\n    // @ts-ignore\n    merge(this.submit$, this.control?.valueChanges, conditionalCheck).pipe(  // it listens to form submit event, control changes  and conditionally the changes in parent controls\n      takeWhile(() => this.subscriptionState)\n    ).subscribe(() => {\n      const controlErrors = this.control?.errors || (this.checkParent ? this.parentControl?.errors : null);\n      if (controlErrors) {\n        let errorText;\n        const keys = this.customErrors ? Object.keys(this.customErrors) : [];\n        if (keys.length > 0) {\n          for (let i = 0; i <  keys.length; i++) {\n            if (controlErrors.hasOwnProperty(keys[i])) {\n              errorText = this.customErrors[keys[i]];\n              break;\n            }\n          }\n        }\n        let text = errorText;\n        if (!errorText) {\n          const firstKey = Object.keys(controlErrors)[0];\n          const getError = this.errors[firstKey];\n          text = this.customErrors ? this.customErrors[firstKey] : (getError && getError(controlErrors[firstKey]));  // if custom error  is provided it shows that error or else looks into the default errors\n        }\n        this.setError(text);\n      } else if (this.ref) {\n        // if ref is  set and there is no error, we remove the error\n        // the ref is set once when registering the error for the  first time.\n        this.setError('');\n      }\n    });\n  }\n\n\n  ngOnDestroy(): void {\n    this.subscriptionState = false;\n  }\n\n  get control() {\n    return this.controlDir.control;\n  }\n\n  // we need parent control when we have to check the validation in the parent group\n  get parentControl() {\n    return this.controlDir?.control?.parent;\n  }\n\n\n  private setError(text: string): void {\n    const showError = this.form.host.nativeElement.classList.contains('sm-ng-submitted') || this.partialCheck;\n    this.setErrorBorder(text, showError);\n    if(!this.ref) { // if ref is not defined, we create the ref to the control error component\n      this.ref = this.vcr.createComponent(ControlErrorComponent);\n      const element = this.ref.location.nativeElement as HTMLElement;\n      element.style.width = '100%';\n    }\n    this.ref.instance['text'] = (text && showError) ? text : '';\n  }\n\n\n  private setErrorBorder(state: string | null, showError: boolean): void {\n   if(state && showError) {\n     this.container.element.nativeElement.classList.add('sm-ng-error');\n   } else {\n     this.container.element.nativeElement.classList.remove('sm-ng-error');\n   }\n  }\n\n}\n","import {InjectionToken} from '@angular/core';\n\nexport const SM_FORM_VALIDATION_CONFIG = new InjectionToken(\n  'SM_FORM_VALIDATION_CONFIG'\n);\n","import {ModuleWithProviders, NgModule} from '@angular/core';\nimport {ControlErrorComponent} from './components';\nimport {ControlErrorContainerDirective, ControlErrorDirective, FormSubmitDirective} from './directives';\nimport {SMFormValidationConfig} from './interface';\nimport {defaultErrors, FORM_ERRORS} from './data';\n\n@NgModule({\n  declarations: [\n    ControlErrorComponent,\n    ControlErrorDirective,\n    ControlErrorContainerDirective,\n    FormSubmitDirective\n\n  ],\n  imports: [\n  ],\n  exports: [\n    ControlErrorComponent,\n    ControlErrorDirective,\n    ControlErrorContainerDirective,\n    FormSubmitDirective\n  ]\n})\n// @ts-ignore\nexport class SmFormValidationModule {\n  static forRoot(config?: SMFormValidationConfig): ModuleWithProviders<SmFormValidationModule> {\n    if (config && config.hasOwnProperty('errorColor'))  {\n      const root = document.querySelector(':root');\n      // @ts-ignore\n      root.style.setProperty('--sm-validation-error-color', config.errorColor)\n    }\n    return {\n      ngModule: SmFormValidationModule,\n      // conditionally setting the error messages in runtime\n      providers:[{\n        provide: FORM_ERRORS,\n        useFactory:() => ({...defaultErrors, ...(config && hasErrorMessages(config.defaultErrors) && config.defaultErrors)})\n      }]\n    }\n  }\n}\n\nfunction hasErrorMessages(obj: object  | undefined): boolean  {\n  if (!obj)  {\n    return false;\n  }\n  if (isNotEmpty(obj)) {\n    return true\n  }\n  return false;\n}\n\nfunction isNotEmpty(object: Object): boolean {\n  // @ts-ignore\n  return Object.values(object).some(x => (x !== undefined && x !== null && x !== ''));\n}\n","/*\n * Public API Surface of sm-form-validation\n */\n\nexport * from './lib/components';\nexport * from './lib/data';\nexport * from './lib/directives';\nexport * from  './lib/interface';\nexport * from './lib/config';\nexport * from './lib/sm-form-validation.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i3.ControlErrorContainerDirective"],"mappings":";;;;;;MAOa,qBAAqB,CAAA;AAchC,IAAA,WAAA,CAAoB,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAZ1C,IAAK,CAAA,KAAA,GAAU,EAAE,CAAC;QAClB,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC;KAWkC;IAV/C,IAAa,IAAI,CAAC,KAAa,EAAA;;AAE7B,QAAA,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;;AAExB,YAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;AAEnB,YAAA,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;AACpB,YAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;AAC1B,SAAA;KACF;IAGD,QAAQ,GAAA;KACP;;kHAjBU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,mFCPlC,qMAKA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA,CAAA,CAAA;2FDEa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,SAAS;+BACE,mBAAmB,EAAA,QAAA,EAAA,qMAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAA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