{"version":3,"file":"ngx-custom-form-error.mjs","sources":["../../../projects/ngx-custom-form-error/src/lib/custom-form-label.directive.ts","../../../projects/ngx-custom-form-error/src/lib/helper.ts","../../../projects/ngx-custom-form-error/src/lib/injection-token.ts","../../../projects/ngx-custom-form-error/src/lib/component/ngx-custom-form-error.component.ts","../../../projects/ngx-custom-form-error/src/lib/component/ngx-custom-form-error.component.html","../../../projects/ngx-custom-form-error/src/lib/ngx-custom-form-error.module.ts","../../../projects/ngx-custom-form-error/src/public-api.ts","../../../projects/ngx-custom-form-error/src/ngx-custom-form-error.ts"],"sourcesContent":["import { Directive, ElementRef } from \"@angular/core\";\r\n\r\n@Directive({\r\n    selector: \"[cLabel]\"\r\n})\r\nexport class CustomFormControlLabelDirective {\r\n    constructor(public el: ElementRef) {\r\n    }\r\n}","export function hasTwoObjectsSameProps(x: Object, y: Object): boolean {\r\n    let xProp: string[], yProp: string[];\r\n    try {\r\n        xProp = Object.getOwnPropertyNames(x);\r\n    } catch {\r\n        xProp = [];\r\n    }\r\n    try {\r\n        yProp = Object.getOwnPropertyNames(y);\r\n    } catch {\r\n        yProp = [];\r\n    }\r\n    if (xProp.length !== yProp.length) return false;\r\n    return xProp.every((prop: string) => yProp.includes(prop));\r\n}","import { InjectionToken } from \"@angular/core\";\r\n\r\nexport const CUSTOM_FORM_CONFIG = new InjectionToken('Custom-Form-Config');","import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, Inject, Input, Optional } from '@angular/core';\nimport { FormControlName } from '@angular/forms';\nimport { combineLatest, Observable, of, Subject } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, tap, takeUntil } from 'rxjs/operators';\nimport { CustomFormControlLabelDirective } from '../custom-form-label.directive';\nimport { hasTwoObjectsSameProps } from '../helper';\nimport { CUSTOM_FORM_CONFIG } from '../injection-token';\nimport { IError, IErrorConfig } from '../ngx-custom-form-error.model';\n@Component({\n  selector: 'c-form-error',\n  templateUrl: 'ngx-custom-form-error.component.html',\n  styleUrls: ['ngx-custom-form-error.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgxCustomFormErrorComponent {\n  private _destroy$ = new Subject<void>();\n\n  private defaultConfig = {\n    errorClass: 'c-control-error',\n    errorTextColor: '#ee3e3e',\n    addErrorClassToElement: true,\n    onTouchedOnly: false\n  };\n\n  constructor(@Inject(CUSTOM_FORM_CONFIG) @Optional() public config: IErrorConfig) { }\n\n  @ContentChild(FormControlName) formControl!: FormControlName;\n  /** This input `controlElement` is just for adding errorClass to the native element if config has addErrorClassToElement set to true*/\n  @ContentChild(FormControlName, { read: ElementRef }) controlElement!: ElementRef;\n  /** This input labelRef, is used to grab label from innerText of the element that has `cLabel` directive. */\n  @ContentChild(CustomFormControlLabelDirective) labelRef!: CustomFormControlLabelDirective;\n\n  @Input() required?: string | null;\n  @Input('maxLength') maxlength?: string | null;\n  @Input('minLength') minlength?: string | null;\n  @Input() min?: string | null;\n  @Input() max?: string | null;\n  @Input() email?: string | null;\n  @Input() pattern?: string | null;\n\n  /** If onTouchedOnly flag is on, we only show errors after the form is touched and has errors */\n  @Input() onTouchedOnly!: boolean;\n  /** It adds error class to the form-control element which you can use to style the element */\n  @Input() addErrorClassToElement!: boolean;\n  /** Color of the error message */\n  @Input() errorTextColor!: string;\n  /**Max Length count is used to show remaining letters in right hand side of form error area eg. [5 / 10] */\n  @Input() maxLengthCount!: number;\n  /** `label` input can give label for the form error as input property in case `cLabel` directive is not used.  */\n  @Input() label?: string | null;\n\n  errors$!: Observable<null | string[]>;\n\n  private messages!: IError;\n  private errorClass!: string;\n\n  ngAfterContentInit() {\n    this.init();\n    this.errors$ = this.getErrors();\n  }\n\n  init() {\n    this.onTouchedOnly = this.onTouchedOnly ?? this.config?.onTouchedOnly ?? this.defaultConfig.onTouchedOnly;\n    this.addErrorClassToElement = this.addErrorClassToElement ?? this.config?.addErrorClassToElement ?? this.defaultConfig.addErrorClassToElement;\n    this.errorTextColor = this.errorTextColor ?? this.config?.errorTextColor ?? this.defaultConfig.errorTextColor;\n    this.errorClass = this.config?.errorClass ?? this.defaultConfig.errorClass;\n    this.label = this.label ?? this.labelRef?.el.nativeElement.innerText ?? undefined;\n    this.initmessages();\n  }\n\n  /*** We compose messages object from user inputs and global config here, which will use to show the error */\n  initmessages() {\n    // We are checking for undefined because input property can be null if user don't want to show error that is configured \n    // in the global config.\n    this.messages = {\n      required: this.required !== undefined ? this.required : this.config?.required,\n      min: this.min !== undefined ? this.min : this.config?.min,\n      max: this.max !== undefined ? this.max : this.config?.max,\n      minlength: this.minlength !== undefined ? this.minlength : this.config?.minLength,\n      maxlength: this.maxlength !== undefined ? this.maxlength : this.config?.maxLength,\n      email: this.email !== undefined ? this.email : this.config?.email,\n      pattern: this.pattern !== undefined ? this.pattern : this.config?.pattern\n    };\n  }\n\n  getErrors() {\n    const touched$ = new Observable<boolean>((subscribe => {\n      // If onTouchedOnly is `true` the observable emits `true` only after the element is touched\n      if (this.onTouchedOnly) {\n        // Thsee are use to trigger if the input is marked as touched\n        this.formControl.valueAccessor?.registerOnTouched(() => subscribe.next(true));\n        this.formControl.valueChanges?.pipe(takeUntil(this._destroy$)).subscribe(() => this.formControl.touched ? subscribe.next(true) : null);\n      } else {\n        // If onTouchedOnly is `false` the observable emits `true` so as to start looking for error rightaway\n        subscribe.next(true);\n      }\n    })).pipe(distinctUntilChanged());\n\n    return combineLatest([touched$, this.formControl.statusChanges!]).pipe(\n      switchMap(() => of(this.formControl.errors)),\n      tap(errors => {\n        if (!this.addErrorClassToElement) return;\n        // if config has addErrorClassToElement set to true, we set the errorClass to the element thas has `formControlName` directive.\n        if (errors) {\n          this.controlElement.nativeElement.classList.add(this.errorClass);\n        } else {\n          this.controlElement.nativeElement.classList.remove(this.errorClass);\n        }\n      }),\n      // This observable will emit everytime we input on the element. And a simple distinctUntilChanged will not work\n      // since it will emit either `null` or `error object` with same properties. But two objects cannot be same\n      // so I have used `hasTwoObjectsSameProps` to stop emitting if the error object has same properties (meaning it is same ) as previous one.\n      distinctUntilChanged((x, y) => hasTwoObjectsSameProps(x as Object, y as Object)),\n      map((errorObj: any) => {\n\n        if (!errorObj) return [];\n\n        let errors = Object.keys(errorObj).map(key => {\n\n          let errorKey = key as keyof IError;\n\n          if (!this.messages[errorKey]) return;\n\n          if (typeof this.messages[errorKey] == 'string') {\n            return this.messages[errorKey];\n          } else {\n            let errorFn = this.messages[errorKey] as Function;\n            return errorFn(this.label, errorObj[errorKey]);\n          }\n\n        });\n        // This to eliminate array of undefined and nulls\n        return errors.filter(error => error);\n      })\n    ) as Observable<string[]>;\n  }\n\n  ngOnDestroy() {\n    this._destroy$.next();\n  }\n\n}\n","<ng-content></ng-content>\r\n<div class=\"c-additions\">\r\n    <div class=\"c-error-container\" *ngIf=\"(errors$ | async) as errors;else emptyDiv\">\r\n        <ng-container *ngIf=\"errors.length\">\r\n            <ng-container *ngFor=\"let error of errors\">\r\n                <div [style.color]=\"errorTextColor\" class=\"c-error\">\r\n                    {{error}}\r\n                </div>\r\n            </ng-container>\r\n        </ng-container>\r\n    </div>\r\n    <div *ngIf=\"formControl && maxLengthCount\" class=\"c-counter\">\r\n        <span class=\"c-counter-left-bracket\">[</span>\r\n        <span class=\"c-counter-first-elem\">\r\n            {{(formControl.valueChanges | async)?.length || formControl.value?.length || 0}}\r\n        </span>\r\n        <span class=\"c-counter-divider\">\r\n            /\r\n        </span>\r\n        <span class=\"c-counter-last-elem\">\r\n            {{maxLengthCount}}\r\n        </span>\r\n        <span class=\"c-counter-right-bracket\">]</span>\r\n\r\n    </div>\r\n</div>\r\n<ng-template #emptyDiv>\r\n    <div></div>\r\n</ng-template>","import { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { NgxCustomFormErrorComponent } from \"./component/ngx-custom-form-error.component\";\nimport { CustomFormControlLabelDirective } from \"./custom-form-label.directive\";\nimport { CUSTOM_FORM_CONFIG } from \"./injection-token\";\nimport { IErrorConfig } from \"./ngx-custom-form-error.model\";\n\n@NgModule({\n  declarations: [\n    NgxCustomFormErrorComponent,\n    CustomFormControlLabelDirective\n  ],\n  imports: [\n    CommonModule,\n  ],\n  exports: [\n    NgxCustomFormErrorComponent,\n    CustomFormControlLabelDirective\n  ]\n})\nexport class NgxCustomFormErrorModule {\n  private static config: IErrorConfig;\n\n  static rootConfig(config: IErrorConfig): ModuleWithProviders<NgxCustomFormErrorModule> {\n    if (NgxCustomFormErrorModule.config) throw new Error(\"NgxCustomFormErrorModule.rootConfig() method cannot be called more than once in an application. Use NgxCustomFormErrorModule.childConfig() method if you want to pass extra configuration.\");\n    NgxCustomFormErrorModule.config = config;\n    return {\n      ngModule: NgxCustomFormErrorModule,\n      providers: [{\n        provide: CUSTOM_FORM_CONFIG,\n        useValue: config\n      }\n      ]\n    };\n  }\n\n  static childConfig(config: IErrorConfig): ModuleWithProviders<NgxCustomFormErrorModule> {\n    return {\n      ngModule: NgxCustomFormErrorModule,\n      providers: [{\n        provide: CUSTOM_FORM_CONFIG,\n        useValue: { ...NgxCustomFormErrorModule.config, ...config }\n      }\n      ]\n    };\n  }\n\n}","/*\n * Public API Surface of ngx-custom-form-error\n */\n\nexport * from './lib/component/ngx-custom-form-error.component';\nexport * from './lib/custom-form-label.directive';\nexport * from './lib/ngx-custom-form-error.module';\nexport * from './lib/ngx-custom-form-error.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAKa,+BAA+B,CAAA;AACxC,IAAA,WAAA,CAAmB,EAAc,EAAA;AAAd,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;KAChC;;4HAFQ,+BAA+B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;gHAA/B,+BAA+B,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAA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