@testgorilla/tgo-ui 7.3.0 → 7.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/components/autocomplete-v2/autocomplete-overflow-detect.directive.d.ts +21 -0
  2. package/components/autocomplete-v2/autocomplete-v2-filter.service.d.ts +24 -0
  3. package/components/autocomplete-v2/autocomplete-v2-utils.d.ts +18 -0
  4. package/components/autocomplete-v2/autocomplete-v2-value-manager.d.ts +27 -0
  5. package/components/autocomplete-v2/autocomplete-v2.component.d.ts +119 -0
  6. package/components/autocomplete-v2/autocomplete-v2.model.d.ts +12 -0
  7. package/components/autocomplete-v2/index.d.ts +5 -0
  8. package/components/autocomplete-v2/infinite-scroll.directive.d.ts +21 -0
  9. package/components/autocomplete-v2/public-api.d.ts +7 -0
  10. package/components/core/directives/index.d.ts +2 -0
  11. package/components/core/directives/prevent-input.directive.d.ts +7 -0
  12. package/components/core/directives/select-text.directive.d.ts +10 -0
  13. package/components/core/pipes/includes.pipe.d.ts +7 -0
  14. package/components/core/pipes/index.d.ts +2 -0
  15. package/components/core/pipes/transform-item.pipe.d.ts +8 -0
  16. package/components/core/public-api.d.ts +2 -1
  17. package/components/validation-error/validation-error.component.d.ts +5 -1
  18. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +805 -0
  19. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -0
  20. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  22. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  24. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +123 -28
  25. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  26. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  28. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  30. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  32. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  34. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  36. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +21 -3
  37. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  38. package/mcp/catalog.json +1 -1
  39. package/package.json +21 -17
  40. package/components/core/select-text.directive.d.ts +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-multi-input.mjs","sources":["../../../components/multi-input/required-multi-input.validator.ts","../../../components/multi-input/multi-input.component.ts","../../../components/multi-input/multi-input.component.html","../../../components/multi-input/multi-input.component.module.ts","../../../components/multi-input/testgorilla-tgo-ui-components-multi-input.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/unbound-method */\nimport { AbstractControl, ValidationErrors, Validators } from '@angular/forms';\nimport { MultiInputValue } from './multi-input.model';\n\nexport const requiredMultiInput = (control: AbstractControl<MultiInputValue>): ValidationErrors | null => {\n const controlValue = control.value;\n\n const hasRequired = control.hasValidator(Validators.required);\n\n if (hasRequired && controlValue) {\n const anyFalsy = Object.values(controlValue).some(v => !v);\n if (anyFalsy) {\n return { required: true };\n }\n }\n return null;\n};\n","/* eslint-disable @typescript-eslint/no-inferrable-types */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n\nimport {\n booleanAttribute,\n Component,\n effect,\n EventEmitter,\n HostBinding,\n input,\n Input,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n NgControl,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { MultiInputValue } from './multi-input.model';\nimport { requiredMultiInput } from './required-multi-input.validator';\n\n@Component({\n selector: 'ui-multi-input',\n templateUrl: './multi-input.component.html',\n styleUrl: './multi-input.component.scss',\n standalone: false,\n})\nexport class MultiInputComponent implements ControlValueAccessor, OnInit {\n /**\n *\n * @description List of items to be displayed in the dropdown list\n * @type {Record<string, string | null | number>[]}\n * @memberof MultiInputComponent\n */\n itemsList = input.required<Record<string, string | null | number>[]>();\n\n /**\n *\n * @description The field to be displayed in the dropdown\n * @type {string}\n * @memberof MultiInputComponent\n */\n itemTextField = input.required<string>();\n\n /**\n *\n * @description The value to be displayed in the droddown\n * @type {string}\n * @memberof MultiInputComponent\n */\n itemValueField = input.required<string>();\n\n /**\n *\n * @description The Value of the multi input\n * @type {MultiInputValue}\n * @memberof MultiInputComponent\n */\n value = input<MultiInputValue>();\n\n /**\n *\n * @description Disables the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description Defines if the multi input is required\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n required = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description Defines the label of the multi input\n * @type {string}\n * @memberof MultiInputComponent\n */\n label = input('');\n\n /**\n *\n * @description Defines the placeholder of the multi input\n * @type {string}\n * @memberof MultiInputComponent\n */\n placeholder = input('');\n\n /**\n *\n * @description Allow decimal values in the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n allowDecimal = input(true, { transform: booleanAttribute });\n\n /**\n *\n * @description Allow negative values in the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n allowNegative = input(true, { transform: booleanAttribute });\n\n /**\n *\n * @description The errors of the multi input\n * @type {string[]}\n * @memberof MultiInputComponent\n */\n errors = input<string[]>([]);\n\n /**\n *\n * @description Hide built in errors for Reactive Forms\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n hideBuiltInErrors = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description Hide label in errors\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n hideLabelInErrors = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description The maximum characters allowed in the multi input\n * @type {number}\n * @memberof MultiInputComponent\n */\n maxCharacters = input(0);\n\n /**\n *\n * @description The validators to apply to input field\n * @type {Validators[]}\n * @memberof MultiInputComponent\n */\n validators = input<ValidatorFn[]>([]);\n\n /**\n *\n * @description The width of the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n @HostBinding('class.full-width')\n @Input()\n fullWidth: boolean = false;\n\n @Output() valueChange = new EventEmitter<MultiInputValue>();\n\n @HostBinding() class = 'ui-multi-input';\n\n /**\n * @description Indicates that custom errors are provided via content projection.\n * When true, the built-in error hints will be hidden.\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n hasCustomErrors = input(false, { transform: booleanAttribute });\n\n /**\n * @ignore\n */\n onChange = (_value: any): void => {};\n\n /**\n * @ignore\n */\n onTouch = (): void => {};\n\n protected readonly multiInputForm = this.fb.group<MultiInputValue>({\n value: null,\n });\n\n constructor(\n @Optional() @Self() protected ngControl: NgControl,\n private readonly fb: FormBuilder\n ) {\n effect(() => {\n this.updateDisableState(this.disabled());\n });\n\n effect(() => {\n const maxCharacters = this.maxCharacters();\n if (maxCharacters) {\n this.inputControl?.addValidators(Validators.maxLength(maxCharacters));\n this.inputControl?.updateValueAndValidity({ emitEvent: false });\n }\n });\n\n effect(() => {\n const inputValidators = this.validators();\n if (inputValidators?.length) {\n this.inputControl?.addValidators(inputValidators);\n this.inputControl?.updateValueAndValidity({ emitEvent: false });\n }\n });\n\n effect(() => {\n const value = this.value();\n // skip in the context of angular Forms\n if (!this.ngControl) {\n this.addDropdownControl();\n this.patchForm(value);\n }\n });\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n this.multiInputForm.valueChanges.pipe(takeUntilDestroyed()).subscribe(formValue => {\n this.valueChanged(formValue as MultiInputValue);\n });\n }\n\n ngOnInit(): void {\n this.addDropdownControl();\n if (this.ngControl) {\n this.ngControl.control?.addValidators(requiredMultiInput);\n }\n }\n\n writeValue(value: MultiInputValue): void {\n this.addDropdownControl();\n this.patchForm(value);\n }\n\n patchForm(value: MultiInputValue | undefined) {\n if (value) {\n this.multiInputForm.patchValue(value, { emitEvent: false });\n } else {\n this.multiInputForm.reset(undefined, { emitEvent: false });\n }\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.updateDisableState(isDisabled);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n protected valueChanged(value: MultiInputValue): void {\n this.valueChange.emit(value);\n this.onChange(value);\n }\n\n protected get dropdownControl(): AbstractControl<unknown> {\n return this.multiInputForm.controls[this.itemValueField()];\n }\n\n protected get inputControl(): AbstractControl<unknown> {\n return this.multiInputForm.controls.value;\n }\n\n protected markAsTouched(): void {\n this.onTouch();\n }\n\n protected addDropdownControl(): void {\n if (!this.multiInputForm.value[this.itemValueField()]) {\n this.multiInputForm.addControl(this.itemValueField(), new FormControl(null), { emitEvent: false });\n this.updateDisableState(this.disabled());\n }\n }\n\n protected get controlHasError(): boolean {\n if (this.ngControl) {\n return !!(this.ngControl.errors && this.ngControl.touched);\n } else {\n return this.errors()?.length > 0;\n }\n }\n\n protected getValueLength(): number {\n return this.inputControl?.value?.toString().length || 0;\n }\n\n private updateDisableState(state: boolean): void {\n if (state) {\n this.multiInputForm.disable({ emitEvent: false });\n } else {\n this.multiInputForm.enable({ emitEvent: false });\n }\n }\n}\n","<div [formGroup]=\"multiInputForm\">\n <div class=\"controls-wrapper\">\n <ui-dropdown\n [hasError]=\"controlHasError\"\n [formControlName]=\"itemValueField()\"\n [valueList]=\"itemsList()\"\n [textField]=\"itemTextField()\"\n [valueField]=\"itemValueField()\"\n [showBottomContent]=\"false\"\n [allowClear]=\"false\"\n (closed)=\"markAsTouched()\"\n ></ui-dropdown>\n\n <ui-field\n [hasError]=\"controlHasError\"\n formControlName=\"value\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [hideBuiltInErrors]=\"true\"\n [showBottomContent]=\"false\"\n [allowOnlyDigits]=\"true\"\n [fullWidth]=\"fullWidth\"\n [allowNegative]=\"allowNegative()\"\n (focusout)=\"markAsTouched()\"\n ></ui-field>\n </div>\n\n @if (!hasCustomErrors()) {\n <mat-hint class=\"info\" *ngIf=\"!controlHasError && maxCharacters() && !errors()?.length\"\n >{{ getValueLength() }} / {{ maxCharacters() }}</mat-hint\n >\n\n @if (errors()?.length || (ngControl?.errors | hasValidationError)) {\n <mat-hint class=\"error\">\n @for (error of errors(); track error) {\n <ui-icon name=\"Error-in-line\"></ui-icon>{{ error }}\n }\n @if ((ngControl?.errors | hasValidationError) && !hideBuiltInErrors()) {\n <ui-validation-error\n [touchedOn]=\"!controlHasError\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors() ? null : label()\"\n ></ui-validation-error>\n }\n </mat-hint>\n }\n }\n <ng-content select=\"[custom-errors]\"></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MultiInputComponent } from './multi-input.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { DividerComponentModule } from '@testgorilla/tgo-ui/components/divider';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { DropdownComponentModule } from '@testgorilla/tgo-ui/components/dropdown';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DigitsOnlyDirective, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { FieldComponentModule } from '@testgorilla/tgo-ui/components/field';\n\n@NgModule({\n declarations: [MultiInputComponent],\n imports: [\n CommonModule,\n MatInputModule,\n MatSelectModule,\n DividerComponentModule,\n IconComponentModule,\n DropdownComponentModule,\n ReactiveFormsModule,\n DigitsOnlyDirective,\n HasValidationErrorPipe,\n ValidationErrorModule,\n FieldComponentModule,\n ],\n exports: [MultiInputComponent],\n})\nexport class MultiInputComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAIO,MAAM,kBAAkB,GAAG,CAAC,OAAyC,KAA6B;AACvG,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK;IAElC,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC;AAE7D,IAAA,IAAI,WAAW,IAAI,YAAY,EAAE;AAC/B,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,IAAI,QAAQ,EAAE;AACZ,YAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3B;IACF;AACA,IAAA,OAAO,IAAI;AACb;;AChBA;AACA;MAkCa,mBAAmB,CAAA;IA6J9B,WAAA,CACgC,SAAoB,EACjC,EAAe,EAAA;QADF,IAAA,CAAA,SAAS,GAAT,SAAS;QACtB,IAAA,CAAA,EAAE,GAAF,EAAE;AA9JrB;;;;;AAKG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,EAA4C;AAEtE;;;;;AAKG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAU;AAExC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,EAAU;AAEzC;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EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAzB,yBAAyB,EAAA,YAAA,EAAA,CAhBrB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,YAAY;YACZ,cAAc;YACd,eAAe;YACf,sBAAsB;YACtB,mBAAmB;YACnB,uBAAuB;YACvB,mBAAmB;YACnB,mBAAmB;YACnB,sBAAsB;YACtB,qBAAqB;AACrB,YAAA,oBAAoB,aAEZ,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAdlC,YAAY;YACZ,cAAc;YACd,eAAe;YACf,sBAAsB;YACtB,mBAAmB;YACnB,uBAAuB;YACvB,mBAAmB;YAGnB,qBAAqB;YACrB,oBAAoB,CAAA,EAAA,CAAA,CAAA;;4FAIX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAjBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,eAAe;wBACf,sBAAsB;wBACtB,mBAAmB;wBACnB,uBAAuB;wBACvB,mBAAmB;wBACnB,mBAAmB;wBACnB,sBAAsB;wBACtB,qBAAqB;wBACrB,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA;;;AC7BD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-multi-input.mjs","sources":["../../../components/multi-input/required-multi-input.validator.ts","../../../components/multi-input/multi-input.component.ts","../../../components/multi-input/multi-input.component.html","../../../components/multi-input/multi-input.component.module.ts","../../../components/multi-input/testgorilla-tgo-ui-components-multi-input.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/unbound-method */\nimport { AbstractControl, ValidationErrors, Validators } from '@angular/forms';\nimport { MultiInputValue } from './multi-input.model';\n\nexport const requiredMultiInput = (control: AbstractControl<MultiInputValue>): ValidationErrors | null => {\n const controlValue = control.value;\n\n const hasRequired = control.hasValidator(Validators.required);\n\n if (hasRequired && controlValue) {\n const anyFalsy = Object.values(controlValue).some(v => !v);\n if (anyFalsy) {\n return { required: true };\n }\n }\n return null;\n};\n","/* eslint-disable @typescript-eslint/no-inferrable-types */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n\nimport {\n booleanAttribute,\n Component,\n effect,\n EventEmitter,\n HostBinding,\n input,\n Input,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n NgControl,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { MultiInputValue } from './multi-input.model';\nimport { requiredMultiInput } from './required-multi-input.validator';\n\n@Component({\n selector: 'ui-multi-input',\n templateUrl: './multi-input.component.html',\n styleUrl: './multi-input.component.scss',\n standalone: false,\n})\nexport class MultiInputComponent implements ControlValueAccessor, OnInit {\n /**\n *\n * @description List of items to be displayed in the dropdown list\n * @type {Record<string, string | null | number>[]}\n * @memberof MultiInputComponent\n */\n itemsList = input.required<Record<string, string | null | number>[]>();\n\n /**\n *\n * @description The field to be displayed in the dropdown\n * @type {string}\n * @memberof MultiInputComponent\n */\n itemTextField = input.required<string>();\n\n /**\n *\n * @description The value to be displayed in the droddown\n * @type {string}\n * @memberof MultiInputComponent\n */\n itemValueField = input.required<string>();\n\n /**\n *\n * @description The Value of the multi input\n * @type {MultiInputValue}\n * @memberof MultiInputComponent\n */\n value = input<MultiInputValue>();\n\n /**\n *\n * @description Disables the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description Defines if the multi input is required\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n required = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description Defines the label of the multi input\n * @type {string}\n * @memberof MultiInputComponent\n */\n label = input('');\n\n /**\n *\n * @description Defines the placeholder of the multi input\n * @type {string}\n * @memberof MultiInputComponent\n */\n placeholder = input('');\n\n /**\n *\n * @description Allow decimal values in the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n allowDecimal = input(true, { transform: booleanAttribute });\n\n /**\n *\n * @description Allow negative values in the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n allowNegative = input(true, { transform: booleanAttribute });\n\n /**\n *\n * @description The errors of the multi input\n * @type {string[]}\n * @memberof MultiInputComponent\n */\n errors = input<string[]>([]);\n\n /**\n *\n * @description Hide built in errors for Reactive Forms\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n hideBuiltInErrors = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description Hide label in errors\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n hideLabelInErrors = input(false, { transform: booleanAttribute });\n\n /**\n *\n * @description The maximum characters allowed in the multi input\n * @type {number}\n * @memberof MultiInputComponent\n */\n maxCharacters = input(0);\n\n /**\n *\n * @description The validators to apply to input field\n * @type {Validators[]}\n * @memberof MultiInputComponent\n */\n validators = input<ValidatorFn[]>([]);\n\n /**\n *\n * @description The width of the multi input\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n @HostBinding('class.full-width')\n @Input()\n fullWidth: boolean = false;\n\n @Output() valueChange = new EventEmitter<MultiInputValue>();\n\n @HostBinding() class = 'ui-multi-input';\n\n /**\n * @description Indicates that custom errors are provided via content projection.\n * When true, the built-in error hints will be hidden.\n * @type {boolean}\n * @memberof MultiInputComponent\n */\n hasCustomErrors = input(false, { transform: booleanAttribute });\n\n /**\n * @ignore\n */\n onChange = (_value: any): void => {};\n\n /**\n * @ignore\n */\n onTouch = (): void => {};\n\n protected readonly multiInputForm = this.fb.group<MultiInputValue>({\n value: null,\n });\n\n constructor(\n @Optional() @Self() protected ngControl: NgControl,\n private readonly fb: FormBuilder\n ) {\n effect(() => {\n this.updateDisableState(this.disabled());\n });\n\n effect(() => {\n const maxCharacters = this.maxCharacters();\n if (maxCharacters) {\n this.inputControl?.addValidators(Validators.maxLength(maxCharacters));\n this.inputControl?.updateValueAndValidity({ emitEvent: false });\n }\n });\n\n effect(() => {\n const inputValidators = this.validators();\n if (inputValidators?.length) {\n this.inputControl?.addValidators(inputValidators);\n this.inputControl?.updateValueAndValidity({ emitEvent: false });\n }\n });\n\n effect(() => {\n const value = this.value();\n // skip in the context of angular Forms\n if (!this.ngControl) {\n this.addDropdownControl();\n this.patchForm(value);\n }\n });\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n this.multiInputForm.valueChanges.pipe(takeUntilDestroyed()).subscribe(formValue => {\n this.valueChanged(formValue as MultiInputValue);\n });\n }\n\n ngOnInit(): void {\n this.addDropdownControl();\n if (this.ngControl) {\n this.ngControl.control?.addValidators(requiredMultiInput);\n }\n }\n\n writeValue(value: MultiInputValue): void {\n this.addDropdownControl();\n this.patchForm(value);\n }\n\n patchForm(value: MultiInputValue | undefined) {\n if (value) {\n this.multiInputForm.patchValue(value, { emitEvent: false });\n } else {\n this.multiInputForm.reset(undefined, { emitEvent: false });\n }\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.updateDisableState(isDisabled);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n protected valueChanged(value: MultiInputValue): void {\n this.valueChange.emit(value);\n this.onChange(value);\n }\n\n protected get dropdownControl(): AbstractControl<unknown> {\n return this.multiInputForm.controls[this.itemValueField()];\n }\n\n protected get inputControl(): AbstractControl<unknown> {\n return this.multiInputForm.controls.value;\n }\n\n protected markAsTouched(): void {\n this.onTouch();\n }\n\n protected addDropdownControl(): void {\n if (!this.multiInputForm.value[this.itemValueField()]) {\n this.multiInputForm.addControl(this.itemValueField(), new FormControl(null), { emitEvent: false });\n this.updateDisableState(this.disabled());\n }\n }\n\n protected get controlHasError(): boolean {\n if (this.ngControl) {\n return !!(this.ngControl.errors && this.ngControl.touched);\n } else {\n return this.errors()?.length > 0;\n }\n }\n\n protected getValueLength(): number {\n return this.inputControl?.value?.toString().length || 0;\n }\n\n private updateDisableState(state: boolean): void {\n if (state) {\n this.multiInputForm.disable({ emitEvent: false });\n } else {\n this.multiInputForm.enable({ emitEvent: false });\n }\n }\n}\n","<div [formGroup]=\"multiInputForm\">\n <div class=\"controls-wrapper\">\n <ui-dropdown\n [hasError]=\"controlHasError\"\n [formControlName]=\"itemValueField()\"\n [valueList]=\"itemsList()\"\n [textField]=\"itemTextField()\"\n [valueField]=\"itemValueField()\"\n [showBottomContent]=\"false\"\n [allowClear]=\"false\"\n (closed)=\"markAsTouched()\"\n ></ui-dropdown>\n\n <ui-field\n [hasError]=\"controlHasError\"\n formControlName=\"value\"\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [hideBuiltInErrors]=\"true\"\n [showBottomContent]=\"false\"\n [allowOnlyDigits]=\"true\"\n [fullWidth]=\"fullWidth\"\n [allowNegative]=\"allowNegative()\"\n (focusout)=\"markAsTouched()\"\n ></ui-field>\n </div>\n\n @if (!hasCustomErrors()) {\n <mat-hint class=\"info\" *ngIf=\"!controlHasError && maxCharacters() && !errors()?.length\"\n >{{ getValueLength() }} / {{ maxCharacters() }}</mat-hint\n >\n\n @if (errors()?.length || (ngControl?.errors | hasValidationError)) {\n <mat-hint class=\"error\">\n @for (error of errors(); track error) {\n <ui-icon name=\"Error-in-line\"></ui-icon>{{ error }}\n }\n @if ((ngControl?.errors | hasValidationError) && !hideBuiltInErrors()) {\n <ui-validation-error\n [touchedOn]=\"!controlHasError\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors() ? null : label()\"\n ></ui-validation-error>\n }\n </mat-hint>\n }\n }\n <ng-content select=\"[custom-errors]\"></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MultiInputComponent } from './multi-input.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { DividerComponentModule } from '@testgorilla/tgo-ui/components/divider';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { DropdownComponentModule } from '@testgorilla/tgo-ui/components/dropdown';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DigitsOnlyDirective, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { FieldComponentModule } from '@testgorilla/tgo-ui/components/field';\n\n@NgModule({\n declarations: [MultiInputComponent],\n imports: [\n CommonModule,\n MatInputModule,\n MatSelectModule,\n DividerComponentModule,\n IconComponentModule,\n DropdownComponentModule,\n ReactiveFormsModule,\n DigitsOnlyDirective,\n HasValidationErrorPipe,\n ValidationErrorModule,\n FieldComponentModule,\n ],\n exports: [MultiInputComponent],\n})\nexport class MultiInputComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAIO,MAAM,kBAAkB,GAAG,CAAC,OAAyC,KAA6B;AACvG,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK;IAElC,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC;AAE7D,IAAA,IAAI,WAAW,IAAI,YAAY,EAAE;AAC/B,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,IAAI,QAAQ,EAAE;AACZ,YAAA,OAAO,EAAE,QAAQ,EAAE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,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,eAAe;wBACf,sBAAsB;wBACtB,mBAAmB;wBACnB,uBAAuB;wBACvB,mBAAmB;wBACnB,mBAAmB;wBACnB,sBAAsB;wBACtB,qBAAqB;wBACrB,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA;;;AC7BD;;AAEG;;;;"}
@@ -310,7 +310,7 @@ class PhoneInputComponent {
310
310
  provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
311
311
  useValue: { overlayPanelClass: 'phone-number-autocomplete' },
312
312
  },
313
- ], viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true, read: ElementRef, static: true }, { propertyName: "select", first: true, predicate: MatSelect, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\"\n />\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\"\n />\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings: ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"\n ></ui-validation-error>\n </mat-hint>\n</mat-form-field>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;align-items:center}:host .selected-flag{display:flex;position:relative;margin-right:1rem;align-items:center}:host mat-spinner{padding:0 20px}:host .country{cursor:pointer!important;display:flex;align-items:center;margin:-8px 12px 0 16px}:host .country button{margin:0 8px 0 0;background:transparent;border:unset;padding:0}:host ::ng-deep .mat-mdc-select-trigger{display:flex;gap:8px}:host mat-select{flex:0}:host .mat-mdc-form-field{min-width:320px}:host .mat-mdc-form-field.full-width{width:100%}:host .mat-mdc-form-field.disabled ::ng-deep *{border-color:#d3d3d3;color:#d3d3d3;pointer-events:none}:host .mat-mdc-form-field.disabled ::ng-deep * .mat-mdc-select-arrow{opacity:.1}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 17.025L6 11.025L7.4 9.625L12 14.225L16.6 9.625L18 11.025L12 17.025Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow svg,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow svg{display:none}:host[theme=dark] mat-select.opened ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select.opened ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9.6249L18 15.6249L16.6 17.0249L12 12.4249L7.4 17.0249L6 15.6249L12 9.6249Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}::ng-deep .mat-form-field-appearance-outline mat-select .mat-select-arrow-wrapper{transform:none}::ng-deep .mat-select-panel.phone-number-select{margin-top:36px;margin-left:45px}::ng-deep .mat-select-search-inner{box-shadow:none!important;height:48px;background-color:#fff!important;border-bottom:none!important}::ng-deep .mat-select-search-inner .mat-select-search-inner-row{width:100%}::ng-deep .mat-select-search-inner button.mat-select-search-clear{right:35px}::ng-deep .mat-select-search-inner button.mat-select-search-clear mat-icon{font-size:20px}@media screen and (min-width: 599px){::ng-deep .mat-select-panel.phone-number-select{margin-left:-33px;min-width:510px}::ng-deep .mat-select-search-inner{min-width:calc(100% + 33px)!important}}ngx-mat-select-search ::ng-deep button .mat-mdc-button-persistent-ripple,ngx-mat-select-search ::ng-deep button .mat-ripple,ngx-mat-select-search ::ng-deep button .mat-mdc-button-ripple{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "directive", type: i7.MatSelectSearchClearDirective, selector: "[ngxMatSelectSearchClear]" }, { kind: "component", type: i8.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i9.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i10.HasValidationErrorPipe, name: "hasValidationError" }, { kind: "pipe", type: JoinStringsPipe, name: "joinStrings" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
313
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true, read: ElementRef, static: true }, { propertyName: "select", first: true, predicate: MatSelect, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\"\n />\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\"\n />\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings: ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"\n ></ui-validation-error>\n </mat-hint>\n</mat-form-field>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;align-items:center}:host .selected-flag{display:flex;position:relative;margin-right:1rem;align-items:center}:host mat-spinner{padding:0 20px}:host .country{cursor:pointer!important;display:flex;align-items:center;margin:-8px 12px 0 16px}:host .country button{margin:0 8px 0 0;background:transparent;border:unset;padding:0}:host ::ng-deep .mat-mdc-select-trigger{display:flex;gap:8px}:host mat-select{flex:0}:host .mat-mdc-form-field{min-width:320px}:host .mat-mdc-form-field.full-width{width:100%}:host .mat-mdc-form-field.disabled ::ng-deep *{border-color:#d3d3d3;color:#d3d3d3;pointer-events:none}:host .mat-mdc-form-field.disabled ::ng-deep * .mat-mdc-select-arrow{opacity:.1}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 17.025L6 11.025L7.4 9.625L12 14.225L16.6 9.625L18 11.025L12 17.025Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow svg,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow svg{display:none}:host[theme=dark] mat-select.opened ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select.opened ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9.6249L18 15.6249L16.6 17.0249L12 12.4249L7.4 17.0249L6 15.6249L12 9.6249Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}::ng-deep .mat-form-field-appearance-outline mat-select .mat-select-arrow-wrapper{transform:none}::ng-deep .mat-select-panel.phone-number-select{margin-top:36px;margin-left:45px}::ng-deep .mat-select-search-inner{box-shadow:none!important;height:48px;background-color:#fff!important;border-bottom:none!important}::ng-deep .mat-select-search-inner .mat-select-search-inner-row{width:100%}::ng-deep .mat-select-search-inner button.mat-select-search-clear{right:35px}::ng-deep .mat-select-search-inner button.mat-select-search-clear mat-icon{font-size:20px}@media screen and (min-width: 599px){::ng-deep .mat-select-panel.phone-number-select{margin-left:-33px;min-width:510px}::ng-deep .mat-select-search-inner{min-width:calc(100% + 33px)!important}}ngx-mat-select-search ::ng-deep button .mat-mdc-button-persistent-ripple,ngx-mat-select-search ::ng-deep button .mat-ripple,ngx-mat-select-search ::ng-deep button .mat-mdc-button-ripple{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "directive", type: i7.MatSelectSearchClearDirective, selector: "[ngxMatSelectSearchClear]" }, { kind: "component", type: i8.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i9.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme", "customErrors"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i10.HasValidationErrorPipe, name: "hasValidationError" }, { kind: "pipe", type: JoinStringsPipe, name: "joinStrings" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
314
314
  }
315
315
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PhoneInputComponent, decorators: [{
316
316
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-phone-input.mjs","sources":["../../../components/phone-input/join-strings.pipe.ts","../../../components/phone-input/phone-input.component.ts","../../../components/phone-input/phone-input.component.html","../../../components/phone-input/phone-input.component.module.ts","../../../components/phone-input/testgorilla-tgo-ui-components-phone-input.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'joinStrings',\n standalone: false,\n})\nexport class JoinStringsPipe implements PipeTransform {\n transform(value: string[], separator?: string): string {\n return value.filter(Boolean).join(separator ? separator : ' - ');\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n UntypedFormBuilder,\n UntypedFormControl,\n UntypedFormGroup,\n} from '@angular/forms';\nimport { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInput } from '@angular/material/input';\nimport { MatSelect } from '@angular/material/select';\nimport { parsePhoneNumber } from 'libphonenumber-js';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n delay,\n filter,\n first,\n map,\n Observable,\n startWith,\n Subject,\n take,\n tap,\n} from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { UICountry } from './phone-input.model';\n\n@Component({\n selector: 'ui-phone-input',\n templateUrl: './phone-input.component.html',\n styleUrls: ['./phone-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n useValue: { overlayPanelClass: 'phone-number-autocomplete' },\n },\n ],\n standalone: false,\n})\nexport class PhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {\n /**\n * Phone number\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input()\n set value(value: string) {\n this.initialValue = this.initialValue || value;\n try {\n const parsed = parsePhoneNumber(value);\n const formatted = parsed.formatInternational();\n this.selectedCountry = this.getCountryByAlpha2Code(parsed.country as string) || this.selectedCountry;\n this.form.patchValue({ phone_number: formatted.replace(this.selectedCountry.callingCode, '') });\n } catch {\n if (value?.length <= 4) {\n this.selectedCountry = this.getCountryByCallingCode(value) || this.selectedCountry;\n }\n this.form.patchValue({ phone_number: value?.replace(this.selectedCountry?.callingCode, '') });\n }\n this.stateChanges.next();\n }\n\n /**\n * Country list for select\n *\n * @type {UICountry[]}\n * @memberof PhoneInputComponent\n */\n @Input() set countryList(countryList: UICountry[]) {\n this.loadCountries$.next(countryList);\n this.selectedCountry = this.selectedCountry ?? countryList[0];\n }\n\n /**\n * Placeholder input\n *\n * @type {text}\n * @memberof PhoneInputComponent\n */\n @Input()\n set placeholder(value: string) {\n this.internalPlaceholder = value;\n this.stateChanges.next();\n }\n\n /**\n * Determines if input is disabled\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.disabled')\n @Input()\n disabled: boolean;\n\n /**\n * Input is required or not\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() required: boolean;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Indicator of the phone input width\n * @property fullWidth\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() fullWidth = false;\n\n _errors: string[];\n /**\n * Input field errors\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input() set errors(errors: string[]) {\n if (errors) {\n this._errors = errors?.filter(Boolean) ?? [];\n this.errorsLength = this.setErrorsLength();\n }\n }\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideLabelInErrors = false;\n\n static nextId = 0;\n\n private countries = new BehaviorSubject<UICountry[]>([]);\n protected countries$ = this.countries.asObservable();\n form: UntypedFormGroup = this.fb.group({\n phone_number: new UntypedFormControl(),\n });\n protected controlType = 'phone-number';\n protected userAriaDescribedBy?: string;\n protected loadCountries$ = new BehaviorSubject<UICountry[]>([]);\n protected countryCode = new BehaviorSubject<string>('US');\n protected stateChanges = new Subject<void>();\n protected focused: boolean;\n protected selectFilterCtrl = new UntypedFormControl('');\n protected errorsLength: boolean;\n protected readonly countryFlagSrc = 'assets/svg-country-flags/';\n\n @ViewChild(MatInput, { read: ElementRef, static: true })\n public input: ElementRef<HTMLElement>;\n @ViewChild(MatSelect, { read: ElementRef, static: true })\n public select: ElementRef<HTMLElement>;\n\n @HostBinding()\n id = `phone-number${PhoneInputComponent.nextId++}`;\n\n @HostBinding('class.floated')\n get shouldLabelFloat(): boolean {\n return true;\n }\n\n @HostBinding('attr.aria-describedby') describedBy = '';\n\n get empty(): boolean {\n return !!this.form.value;\n }\n\n get errorState(): boolean {\n return this.errorMatcher.isErrorState(this.ngControl.control as UntypedFormControl, null);\n }\n\n get value(): string {\n return this.getNumberWithCountryCode();\n }\n\n get placeholder() {\n return this.internalPlaceholder;\n }\n\n private initialValue: string;\n private readonly DEFAULT_COUNTRY_CODE = 'US';\n private internalPlaceholder: string;\n protected selectedCountry: UICountry;\n private unsubscribeAll$ = new Subject<void>();\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n private errorMatcher: ErrorStateMatcher,\n private fb: UntypedFormBuilder,\n private focusMonitor: FocusMonitor,\n private ref: ChangeDetectorRef,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.ref.markForCheck();\n }\n }\n\n ngOnInit(): void {\n this.loadCountries();\n this.preSelectCountry();\n this.subscribeToFocusEvents();\n }\n\n setErrorsLength(): boolean {\n if (this._errors) {\n return this._errors.filter(err => !!err).length > 0;\n }\n return false;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.userAriaDescribedBy = ids.join(' ');\n }\n\n onChange: (value: string) => void;\n onTouch: () => void;\n\n writeValue(phoneNumber: string): void {\n if (phoneNumber) {\n this.value = phoneNumber;\n }\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.form.disable();\n } else {\n this.form.enable();\n }\n this.disabled = isDisabled;\n this.stateChanges.next();\n this.ref.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.input);\n this.focusMonitor.stopMonitoring(this.select);\n this.stateChanges.complete();\n this.unsubscribeAll$.next();\n this.unsubscribeAll$.complete();\n }\n\n onOptionsSelected(value: UICountry) {\n this.setCountry(value);\n }\n\n onInput(value: string) {\n this.value = (this.selectedCountry?.callingCode ?? '') + value;\n this.onChange(this.value);\n }\n\n filteredCountryTrackByMethod(index: number, el: UICountry): string {\n return el.alpha2Code;\n }\n\n private setCountry(country: UICountry | null): void {\n if (country) {\n this.selectedCountry = country;\n }\n this.value = this.getNumberWithCountryCode();\n this.onChange(this.value);\n }\n\n private getNumberWithCountryCode() {\n const nationalNumber = this.form.value?.phone_number as string;\n return nationalNumber ? (this.selectedCountry?.callingCode ?? '') + nationalNumber : '';\n }\n\n private subscribeToFocusEvents() {\n const selectAndInputFocus$ = combineLatest([\n this.focusMonitor.monitor(this.select),\n this.focusMonitor.monitor(this.input),\n ]).pipe(takeUntil(this.unsubscribeAll$), debounceTime(10));\n\n selectAndInputFocus$.subscribe(([selectFocus, inputFocus]) => {\n this.focused = !!(selectFocus || inputFocus);\n this.stateChanges.next();\n });\n\n selectAndInputFocus$.pipe(take(1)).subscribe(() => {\n this.onTouch();\n });\n }\n\n private preSelectCountry() {\n this.setDisabledState(true);\n combineLatest([\n this.countries$.pipe(\n filter(countries => countries.length > 0),\n first()\n ),\n this.countryCode,\n ])\n .pipe(\n map(([_countries, selectedCountry]) => {\n if (!this.initialValue) {\n const country =\n this.getCountryByAlpha2Code(selectedCountry) || this.getCountryByAlpha2Code(this.DEFAULT_COUNTRY_CODE);\n this.setCountry(country as UICountry);\n } else {\n this.value = this.initialValue;\n }\n\n this.setDisabledState(false);\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n private getCountryByAlpha2Code(alpha2Code: string) {\n return this.countries.value.find(country => country.alpha2Code === alpha2Code);\n }\n\n private getCountryByCallingCode(callingCode: string) {\n return this.countries.value.find(country => country.callingCode === callingCode);\n }\n\n private loadCountries(): void {\n const searchText$: Observable<string> = this.selectFilterCtrl.valueChanges.pipe(debounceTime(100), startWith(''));\n\n combineLatest([this.loadCountries$, searchText$])\n .pipe(\n takeUntil(this.unsubscribeAll$),\n tap(([countries, searchText]) => {\n const searchTextLowerCase = searchText.toLowerCase();\n const filteredCountries = countries\n .filter(\n option =>\n option.name.toLowerCase().includes(searchTextLowerCase) ||\n option.alpha2Code.toLowerCase().includes(searchTextLowerCase) ||\n option.callingCode.toLowerCase().includes(searchTextLowerCase)\n )\n .sort((optionA, optionB) => (optionB.name.startsWith(searchText) ? 1 : -1));\n this.countries.next(filteredCountries);\n }),\n delay(1),\n tap(() => {\n const countryFound = this.getCountryByAlpha2Code(this.selectedCountry?.alpha2Code);\n this.selectedCountry = countryFound || this.selectedCountry;\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n disableClick(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n trackByFn = (index: number, value: string) => value;\n}\n","<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\"\n />\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\"\n />\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings: ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"\n ></ui-validation-error>\n </mat-hint>\n</mat-form-field>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PhoneInputComponent } from './phone-input.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\nimport { JoinStringsPipe } from './join-strings.pipe';\nimport { MatInputModule } from '@angular/material/input';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [PhoneInputComponent, JoinStringsPipe],\n exports: [PhoneInputComponent],\n imports: [\n CommonModule,\n MatProgressSpinnerModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatIconModule,\n MatInputModule,\n NgxMatSelectSearchModule,\n IconComponentModule,\n SpinnerComponentModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n ],\n})\nexport class PhoneInputComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i11.JoinStringsPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,eAAe,CAAA;IAC1B,SAAS,CAAC,KAAe,EAAE,SAAkB,EAAA;AAC3C,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;IAClE;+GAHW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA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Y;YACZ,wBAAwB;YACxB,mBAAmB;YACnB,eAAe;YACf,aAAa;YACb,cAAc;YACd,wBAAwB;YACxB,mBAAmB;YACnB,sBAAsB;YAEtB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAlBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC;oBACpD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,mBAAmB;wBACnB,eAAe;wBACf,aAAa;wBACb,cAAc;wBACd,wBAAwB;wBACxB,mBAAmB;wBACnB,sBAAsB;wBACtB,eAAe;wBACf,qBAAqB;wBACrB,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-phone-input.mjs","sources":["../../../components/phone-input/join-strings.pipe.ts","../../../components/phone-input/phone-input.component.ts","../../../components/phone-input/phone-input.component.html","../../../components/phone-input/phone-input.component.module.ts","../../../components/phone-input/testgorilla-tgo-ui-components-phone-input.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'joinStrings',\n standalone: false,\n})\nexport class JoinStringsPipe implements PipeTransform {\n transform(value: string[], separator?: string): string {\n return value.filter(Boolean).join(separator ? separator : ' - ');\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n UntypedFormBuilder,\n UntypedFormControl,\n UntypedFormGroup,\n} from '@angular/forms';\nimport { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInput } from '@angular/material/input';\nimport { MatSelect } from '@angular/material/select';\nimport { parsePhoneNumber } from 'libphonenumber-js';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n delay,\n filter,\n first,\n map,\n Observable,\n startWith,\n Subject,\n take,\n tap,\n} from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { UICountry } from './phone-input.model';\n\n@Component({\n selector: 'ui-phone-input',\n templateUrl: './phone-input.component.html',\n styleUrls: ['./phone-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n useValue: { overlayPanelClass: 'phone-number-autocomplete' },\n },\n ],\n standalone: false,\n})\nexport class PhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {\n /**\n * Phone number\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input()\n set value(value: string) {\n this.initialValue = this.initialValue || value;\n try {\n const parsed = parsePhoneNumber(value);\n const formatted = parsed.formatInternational();\n this.selectedCountry = this.getCountryByAlpha2Code(parsed.country as string) || this.selectedCountry;\n this.form.patchValue({ phone_number: formatted.replace(this.selectedCountry.callingCode, '') });\n } catch {\n if (value?.length <= 4) {\n this.selectedCountry = this.getCountryByCallingCode(value) || this.selectedCountry;\n }\n this.form.patchValue({ phone_number: value?.replace(this.selectedCountry?.callingCode, '') });\n }\n this.stateChanges.next();\n }\n\n /**\n * Country list for select\n *\n * @type {UICountry[]}\n * @memberof PhoneInputComponent\n */\n @Input() set countryList(countryList: UICountry[]) {\n this.loadCountries$.next(countryList);\n this.selectedCountry = this.selectedCountry ?? countryList[0];\n }\n\n /**\n * Placeholder input\n *\n * @type {text}\n * @memberof PhoneInputComponent\n */\n @Input()\n set placeholder(value: string) {\n this.internalPlaceholder = value;\n this.stateChanges.next();\n }\n\n /**\n * Determines if input is disabled\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.disabled')\n @Input()\n disabled: boolean;\n\n /**\n * Input is required or not\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() required: boolean;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Indicator of the phone input width\n * @property fullWidth\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() fullWidth = false;\n\n _errors: string[];\n /**\n * Input field errors\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input() set errors(errors: string[]) {\n if (errors) {\n this._errors = errors?.filter(Boolean) ?? [];\n this.errorsLength = this.setErrorsLength();\n }\n }\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideLabelInErrors = false;\n\n static nextId = 0;\n\n private countries = new BehaviorSubject<UICountry[]>([]);\n protected countries$ = this.countries.asObservable();\n form: UntypedFormGroup = this.fb.group({\n phone_number: new UntypedFormControl(),\n });\n protected controlType = 'phone-number';\n protected userAriaDescribedBy?: string;\n protected loadCountries$ = new BehaviorSubject<UICountry[]>([]);\n protected countryCode = new BehaviorSubject<string>('US');\n protected stateChanges = new Subject<void>();\n protected focused: boolean;\n protected selectFilterCtrl = new UntypedFormControl('');\n protected errorsLength: boolean;\n protected readonly countryFlagSrc = 'assets/svg-country-flags/';\n\n @ViewChild(MatInput, { read: ElementRef, static: true })\n public input: ElementRef<HTMLElement>;\n @ViewChild(MatSelect, { read: ElementRef, static: true })\n public select: ElementRef<HTMLElement>;\n\n @HostBinding()\n id = `phone-number${PhoneInputComponent.nextId++}`;\n\n @HostBinding('class.floated')\n get shouldLabelFloat(): boolean {\n return true;\n }\n\n @HostBinding('attr.aria-describedby') describedBy = '';\n\n get empty(): boolean {\n return !!this.form.value;\n }\n\n get errorState(): boolean {\n return this.errorMatcher.isErrorState(this.ngControl.control as UntypedFormControl, null);\n }\n\n get value(): string {\n return this.getNumberWithCountryCode();\n }\n\n get placeholder() {\n return this.internalPlaceholder;\n }\n\n private initialValue: string;\n private readonly DEFAULT_COUNTRY_CODE = 'US';\n private internalPlaceholder: string;\n protected selectedCountry: UICountry;\n private unsubscribeAll$ = new Subject<void>();\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n private errorMatcher: ErrorStateMatcher,\n private fb: UntypedFormBuilder,\n private focusMonitor: FocusMonitor,\n private ref: ChangeDetectorRef,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.ref.markForCheck();\n }\n }\n\n ngOnInit(): void {\n this.loadCountries();\n this.preSelectCountry();\n this.subscribeToFocusEvents();\n }\n\n setErrorsLength(): boolean {\n if (this._errors) {\n return this._errors.filter(err => !!err).length > 0;\n }\n return false;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.userAriaDescribedBy = ids.join(' ');\n }\n\n onChange: (value: string) => void;\n onTouch: () => void;\n\n writeValue(phoneNumber: string): void {\n if (phoneNumber) {\n this.value = phoneNumber;\n }\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.form.disable();\n } else {\n this.form.enable();\n }\n this.disabled = isDisabled;\n this.stateChanges.next();\n this.ref.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.input);\n this.focusMonitor.stopMonitoring(this.select);\n this.stateChanges.complete();\n this.unsubscribeAll$.next();\n this.unsubscribeAll$.complete();\n }\n\n onOptionsSelected(value: UICountry) {\n this.setCountry(value);\n }\n\n onInput(value: string) {\n this.value = (this.selectedCountry?.callingCode ?? '') + value;\n this.onChange(this.value);\n }\n\n filteredCountryTrackByMethod(index: number, el: UICountry): string {\n return el.alpha2Code;\n }\n\n private setCountry(country: UICountry | null): void {\n if (country) {\n this.selectedCountry = country;\n }\n this.value = this.getNumberWithCountryCode();\n this.onChange(this.value);\n }\n\n private getNumberWithCountryCode() {\n const nationalNumber = this.form.value?.phone_number as string;\n return nationalNumber ? (this.selectedCountry?.callingCode ?? '') + nationalNumber : '';\n }\n\n private subscribeToFocusEvents() {\n const selectAndInputFocus$ = combineLatest([\n this.focusMonitor.monitor(this.select),\n this.focusMonitor.monitor(this.input),\n ]).pipe(takeUntil(this.unsubscribeAll$), debounceTime(10));\n\n selectAndInputFocus$.subscribe(([selectFocus, inputFocus]) => {\n this.focused = !!(selectFocus || inputFocus);\n this.stateChanges.next();\n });\n\n selectAndInputFocus$.pipe(take(1)).subscribe(() => {\n this.onTouch();\n });\n }\n\n private preSelectCountry() {\n this.setDisabledState(true);\n combineLatest([\n this.countries$.pipe(\n filter(countries => countries.length > 0),\n first()\n ),\n this.countryCode,\n ])\n .pipe(\n map(([_countries, selectedCountry]) => {\n if (!this.initialValue) {\n const country =\n this.getCountryByAlpha2Code(selectedCountry) || this.getCountryByAlpha2Code(this.DEFAULT_COUNTRY_CODE);\n this.setCountry(country as UICountry);\n } else {\n this.value = this.initialValue;\n }\n\n this.setDisabledState(false);\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n private getCountryByAlpha2Code(alpha2Code: string) {\n return this.countries.value.find(country => country.alpha2Code === alpha2Code);\n }\n\n private getCountryByCallingCode(callingCode: string) {\n return this.countries.value.find(country => country.callingCode === callingCode);\n }\n\n private loadCountries(): void {\n const searchText$: Observable<string> = this.selectFilterCtrl.valueChanges.pipe(debounceTime(100), startWith(''));\n\n combineLatest([this.loadCountries$, searchText$])\n .pipe(\n takeUntil(this.unsubscribeAll$),\n tap(([countries, searchText]) => {\n const searchTextLowerCase = searchText.toLowerCase();\n const filteredCountries = countries\n .filter(\n option =>\n option.name.toLowerCase().includes(searchTextLowerCase) ||\n option.alpha2Code.toLowerCase().includes(searchTextLowerCase) ||\n option.callingCode.toLowerCase().includes(searchTextLowerCase)\n )\n .sort((optionA, optionB) => (optionB.name.startsWith(searchText) ? 1 : -1));\n this.countries.next(filteredCountries);\n }),\n delay(1),\n tap(() => {\n const countryFound = this.getCountryByAlpha2Code(this.selectedCountry?.alpha2Code);\n this.selectedCountry = countryFound || this.selectedCountry;\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n disableClick(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n trackByFn = (index: number, value: string) => value;\n}\n","<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\"\n />\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img\n [height]=\"20\"\n [width]=\"24\"\n [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\"\n />\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings: ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"\n ></ui-validation-error>\n </mat-hint>\n</mat-form-field>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PhoneInputComponent } from './phone-input.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\nimport { JoinStringsPipe } from './join-strings.pipe';\nimport { MatInputModule } from '@angular/material/input';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [PhoneInputComponent, JoinStringsPipe],\n exports: [PhoneInputComponent],\n imports: [\n CommonModule,\n MatProgressSpinnerModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatIconModule,\n MatInputModule,\n NgxMatSelectSearchModule,\n IconComponentModule,\n SpinnerComponentModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n ],\n})\nexport class PhoneInputComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i11.JoinStringsPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,eAAe,CAAA;IAC1B,SAAS,CAAC,KAAe,EAAE,SAAkB,EAAA;AAC3C,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;IAClE;+GAHW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAA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,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAdlC,YAAY;YACZ,wBAAwB;YACxB,mBAAmB;YACnB,eAAe;YACf,aAAa;YACb,cAAc;YACd,wBAAwB;YACxB,mBAAmB;YACnB,sBAAsB;YAEtB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAlBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC;oBACpD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,mBAAmB;wBACnB,eAAe;wBACf,aAAa;wBACb,cAAc;wBACd,wBAAwB;wBACxB,mBAAmB;wBACnB,sBAAsB;wBACtB,eAAe;wBACf,qBAAqB;wBACrB,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostBinding, Input, Component, NgModule } from '@angular/core';
2
+ import { Input, HostBinding, Component, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@testgorilla/tgo-ui/components/icon';
@@ -19,6 +19,8 @@ class ValidationErrorComponent {
19
19
  * @memberof ValidationErrorComponent
20
20
  */
21
21
  this.applicationTheme = 'light';
22
+ /** Maps validator error keys to display message templates. Supports {{placeholder}} interpolation. */
23
+ this.customErrors = {};
22
24
  this.translationContextErrors = 'ERRORS.';
23
25
  }
24
26
  getErrorValue(type) {
@@ -36,12 +38,26 @@ class ValidationErrorComponent {
36
38
  return 0;
37
39
  }
38
40
  }
41
+ get customErrorKeys() {
42
+ return Object.keys(this.customErrors);
43
+ }
44
+ resolveErrorMessage(key) {
45
+ const template = this.customErrors[key];
46
+ const errorData = this.ngControl?.errors?.[key];
47
+ if (!template)
48
+ return '';
49
+ if (typeof errorData === 'object' && errorData !== null) {
50
+ // Replace {{key}} placeholders with error data values
51
+ return template.replace(/\{\{(\w+)\}\}/g, (_, prop) => errorData[prop] ?? '');
52
+ }
53
+ return template;
54
+ }
39
55
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ValidationErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
40
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: ValidationErrorComponent, isStandalone: false, selector: "ui-validation-error", inputs: { ngControl: "ngControl", touchedOn: "touchedOn", errorMessage: "errorMessage", label: "label", applicationTheme: "applicationTheme" }, host: { properties: { "attr.theme": "this.applicationTheme" } }, ngImport: i0, template: "<div class=\"errors\" *ngIf=\"ngControl?.hasError('maxlength')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MAX_LENGTH' | uiTranslate: { maxlength: getErrorValue('maxlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('minlength')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MIN_LENGTH' | uiTranslate: { maxlength: getErrorValue('minlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('min')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MIN' | uiTranslate: { min: getErrorValue('min') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('max')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MAX' | uiTranslate: { max: getErrorValue('max') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('required') && (touchedOn ? ngControl?.touched : true)\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + (label ? 'REQUIRED_FIELD' : 'REQUIRED') | uiTranslate: { label } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('email')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'EMAIL_INCORRECT' | uiTranslate | async }}</span>\n</div>\n\n<div class=\"custom-errors\" *ngIf=\"errorMessage\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ errorMessage }}</span>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.UiTranslatePipe, name: "uiTranslate" }] }); }
56
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: ValidationErrorComponent, isStandalone: false, selector: "ui-validation-error", inputs: { ngControl: "ngControl", touchedOn: "touchedOn", errorMessage: "errorMessage", label: "label", applicationTheme: "applicationTheme", customErrors: "customErrors" }, host: { properties: { "attr.theme": "this.applicationTheme" } }, ngImport: i0, template: "<ng-container *ngFor=\"let key of customErrorKeys\">\n <div class=\"errors\" *ngIf=\"ngControl?.hasError(key) && (touchedOn ? ngControl?.touched : true)\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ resolveErrorMessage(key) }}</span>\n </div>\n</ng-container>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('maxlength') && !customErrors['maxlength']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MAX_LENGTH' | uiTranslate: { maxlength: getErrorValue('maxlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('minlength') && !customErrors['minlength']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MIN_LENGTH' | uiTranslate: { maxlength: getErrorValue('minlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('min') && !customErrors['min']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MIN' | uiTranslate: { min: getErrorValue('min') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('max') && !customErrors['max']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MAX' | uiTranslate: { max: getErrorValue('max') } | async }}</span>\n</div>\n\n<div\n class=\"errors\"\n *ngIf=\"ngControl?.hasError('required') && (touchedOn ? ngControl?.touched : true) && !customErrors['required']\"\n>\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + (label ? 'REQUIRED_FIELD' : 'REQUIRED') | uiTranslate: { label } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('email') && !customErrors['email']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'EMAIL_INCORRECT' | uiTranslate | async }}</span>\n</div>\n\n<div class=\"custom-errors\" *ngIf=\"errorMessage\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ errorMessage }}</span>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.UiTranslatePipe, name: "uiTranslate" }] }); }
41
57
  }
42
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ValidationErrorComponent, decorators: [{
43
59
  type: Component,
44
- args: [{ selector: 'ui-validation-error', standalone: false, template: "<div class=\"errors\" *ngIf=\"ngControl?.hasError('maxlength')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MAX_LENGTH' | uiTranslate: { maxlength: getErrorValue('maxlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('minlength')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MIN_LENGTH' | uiTranslate: { maxlength: getErrorValue('minlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('min')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MIN' | uiTranslate: { min: getErrorValue('min') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('max')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MAX' | uiTranslate: { max: getErrorValue('max') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('required') && (touchedOn ? ngControl?.touched : true)\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + (label ? 'REQUIRED_FIELD' : 'REQUIRED') | uiTranslate: { label } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('email')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'EMAIL_INCORRECT' | uiTranslate | async }}</span>\n</div>\n\n<div class=\"custom-errors\" *ngIf=\"errorMessage\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ errorMessage }}</span>\n</div>\n" }]
60
+ args: [{ selector: 'ui-validation-error', standalone: false, template: "<ng-container *ngFor=\"let key of customErrorKeys\">\n <div class=\"errors\" *ngIf=\"ngControl?.hasError(key) && (touchedOn ? ngControl?.touched : true)\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ resolveErrorMessage(key) }}</span>\n </div>\n</ng-container>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('maxlength') && !customErrors['maxlength']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MAX_LENGTH' | uiTranslate: { maxlength: getErrorValue('maxlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('minlength') && !customErrors['minlength']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MIN_LENGTH' | uiTranslate: { maxlength: getErrorValue('minlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('min') && !customErrors['min']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MIN' | uiTranslate: { min: getErrorValue('min') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('max') && !customErrors['max']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MAX' | uiTranslate: { max: getErrorValue('max') } | async }}</span>\n</div>\n\n<div\n class=\"errors\"\n *ngIf=\"ngControl?.hasError('required') && (touchedOn ? ngControl?.touched : true) && !customErrors['required']\"\n>\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + (label ? 'REQUIRED_FIELD' : 'REQUIRED') | uiTranslate: { label } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('email') && !customErrors['email']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'EMAIL_INCORRECT' | uiTranslate | async }}</span>\n</div>\n\n<div class=\"custom-errors\" *ngIf=\"errorMessage\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ errorMessage }}</span>\n</div>\n" }]
45
61
  }], propDecorators: { ngControl: [{
46
62
  type: Input
47
63
  }], touchedOn: [{
@@ -55,6 +71,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
55
71
  args: ['attr.theme']
56
72
  }, {
57
73
  type: Input
74
+ }], customErrors: [{
75
+ type: Input
58
76
  }] } });
59
77
 
60
78
  class ValidationErrorModule {
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-validation-error.mjs","sources":["../../../components/validation-error/validation-error.component.ts","../../../components/validation-error/validation-error.component.html","../../../components/validation-error/validation-error.module.ts","../../../components/validation-error/testgorilla-tgo-ui-components-validation-error.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core';\nimport { errorType } from './validation-error.model';\nimport { NgControl } from '@angular/forms';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-validation-error',\n templateUrl: './validation-error.component.html',\n styleUrls: ['./validation-error.component.scss'],\n standalone: false,\n})\nexport class ValidationErrorComponent {\n @Input() ngControl: NgControl;\n @Input() touchedOn = true;\n @Input() errorMessage = '';\n\n @Input() label: string | undefined | null;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ValidationErrorComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n getErrorValue(type: errorType): number {\n const ngControlErrors: any = this.ngControl.errors;\n switch (type) {\n case 'maxlength':\n return ngControlErrors.maxlength.requiredLength;\n case 'minlength':\n return ngControlErrors.minlength.requiredLength;\n case 'max':\n return ngControlErrors.max.max;\n case 'min':\n return ngControlErrors.min.min;\n default:\n return 0;\n }\n }\n\n translationContextErrors = 'ERRORS.';\n}\n","<div class=\"errors\" *ngIf=\"ngControl?.hasError('maxlength')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MAX_LENGTH' | uiTranslate: { maxlength: getErrorValue('maxlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('minlength')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MIN_LENGTH' | uiTranslate: { maxlength: getErrorValue('minlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('min')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MIN' | uiTranslate: { min: getErrorValue('min') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('max')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MAX' | uiTranslate: { max: getErrorValue('max') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('required') && (touchedOn ? ngControl?.touched : true)\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + (label ? 'REQUIRED_FIELD' : 'REQUIRED') | uiTranslate: { label } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('email')\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'EMAIL_INCORRECT' | uiTranslate | async }}</span>\n</div>\n\n<div class=\"custom-errors\" *ngIf=\"errorMessage\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ errorMessage }}</span>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ValidationErrorComponent } from './validation-error.component';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [ValidationErrorComponent],\n exports: [ValidationErrorComponent],\n imports: [CommonModule, IconComponentModule, UiTranslatePipe],\n})\nexport class ValidationErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAWa,wBAAwB,CAAA;AANrC,IAAA,WAAA,GAAA;QAQW,IAAA,CAAA,SAAS,GAAG,IAAI;QAChB,IAAA,CAAA,YAAY,GAAG,EAAE;AAI1B;;;;;;AAMG;QAGH,IAAA,CAAA,gBAAgB,GAAqB,OAAO;QAkB5C,IAAA,CAAA,wBAAwB,GAAG,SAAS;AACrC,IAAA;AAjBC,IAAA,aAAa,CAAC,IAAe,EAAA;AAC3B,QAAA,MAAM,eAAe,GAAQ,IAAI,CAAC,SAAS,CAAC,MAAM;QAClD,QAAQ,IAAI;AACV,YAAA,KAAK,WAAW;AACd,gBAAA,OA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A,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,cAGnB,KAAK,EAAA,QAAA,EAAA,k0DAAA,EAAA;8BAGR,SAAS,EAAA,CAAA;sBAAjB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBAEQ,KAAK,EAAA,CAAA;sBAAb;gBAWD,gBAAgB,EAAA,CAAA;sBAFf,WAAW;uBAAC,YAAY;;sBACxB;;;MEfU,qBAAqB,CAAA;+GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAArB,qBAAqB,EAAA,YAAA,EAAA,CAJjB,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAE7B,YAAY,EAAE,mBAAmB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CADlD,wBAAwB,CAAA,EAAA,CAAA,CAAA;gHAGvB,qBAAqB,EAAA,OAAA,EAAA,CAFtB,YAAY,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;4FAEhC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,eAAe,CAAC;AAC9D,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-validation-error.mjs","sources":["../../../components/validation-error/validation-error.component.ts","../../../components/validation-error/validation-error.component.html","../../../components/validation-error/validation-error.module.ts","../../../components/validation-error/testgorilla-tgo-ui-components-validation-error.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core';\nimport { errorType } from './validation-error.model';\nimport { NgControl } from '@angular/forms';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-validation-error',\n templateUrl: './validation-error.component.html',\n styleUrls: ['./validation-error.component.scss'],\n standalone: false,\n})\nexport class ValidationErrorComponent {\n @Input() ngControl: NgControl;\n @Input() touchedOn = true;\n @Input() errorMessage = '';\n\n @Input() label: string | undefined | null;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ValidationErrorComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /** Maps validator error keys to display message templates. Supports {{placeholder}} interpolation. */\n @Input() customErrors: Record<string, string> = {};\n\n getErrorValue(type: errorType): number {\n const ngControlErrors: any = this.ngControl.errors;\n switch (type) {\n case 'maxlength':\n return ngControlErrors.maxlength.requiredLength;\n case 'minlength':\n return ngControlErrors.minlength.requiredLength;\n case 'max':\n return ngControlErrors.max.max;\n case 'min':\n return ngControlErrors.min.min;\n default:\n return 0;\n }\n }\n\n get customErrorKeys(): string[] {\n return Object.keys(this.customErrors);\n }\n\n resolveErrorMessage(key: string): string {\n const template = this.customErrors[key];\n const errorData = this.ngControl?.errors?.[key];\n if (!template) return '';\n if (typeof errorData === 'object' && errorData !== null) {\n // Replace {{key}} placeholders with error data values\n return template.replace(/\\{\\{(\\w+)\\}\\}/g, (_, prop) => errorData[prop] ?? '');\n }\n return template;\n }\n\n translationContextErrors = 'ERRORS.';\n}\n","<ng-container *ngFor=\"let key of customErrorKeys\">\n <div class=\"errors\" *ngIf=\"ngControl?.hasError(key) && (touchedOn ? ngControl?.touched : true)\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ resolveErrorMessage(key) }}</span>\n </div>\n</ng-container>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('maxlength') && !customErrors['maxlength']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MAX_LENGTH' | uiTranslate: { maxlength: getErrorValue('maxlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('minlength') && !customErrors['minlength']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{\n translationContextErrors + 'MIN_LENGTH' | uiTranslate: { maxlength: getErrorValue('minlength') } | async\n }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('min') && !customErrors['min']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MIN' | uiTranslate: { min: getErrorValue('min') } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('max') && !customErrors['max']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'MAX' | uiTranslate: { max: getErrorValue('max') } | async }}</span>\n</div>\n\n<div\n class=\"errors\"\n *ngIf=\"ngControl?.hasError('required') && (touchedOn ? ngControl?.touched : true) && !customErrors['required']\"\n>\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + (label ? 'REQUIRED_FIELD' : 'REQUIRED') | uiTranslate: { label } | async }}</span>\n</div>\n\n<div class=\"errors\" *ngIf=\"ngControl?.hasError('email') && !customErrors['email']\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ translationContextErrors + 'EMAIL_INCORRECT' | uiTranslate | async }}</span>\n</div>\n\n<div class=\"custom-errors\" *ngIf=\"errorMessage\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span>{{ errorMessage }}</span>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ValidationErrorComponent } from './validation-error.component';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [ValidationErrorComponent],\n exports: [ValidationErrorComponent],\n imports: [CommonModule, IconComponentModule, UiTranslatePipe],\n})\nexport class ValidationErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAWa,wBAAwB,CAAA;AANrC,IAAA,WAAA,GAAA;QAQW,IAAA,CAAA,SAAS,GAAG,IAAI;QAChB,IAAA,CAAA,YAAY,GAAG,EAAE;AAI1B;;;;;;AAMG;QAGH,IAAA,CAAA,gBAAgB,GAAqB,OAAO;;QAGnC,IAAA,CAAA,YAAY,GAA2B,EAAE;QAiClD,IAAA,CAAA,wBAAwB,GAAG,SAAS;AACrC,IAAA;AAhCC,IAAA,aAAa,CAAC,IAAe,EAAA;AAC3B,QAAA,MAAM,eAAe,GAAQ,IAAI,CAAC,SAAS,CAAC,MAAM;QAClD,QAAQ,IAAI;AACV,YAAA,KAAK,WAAW;AACd,gBAAA,OAAO,eAAe,CAAC,SAAS,CAAC,cAAc;AACjD,YAAA,KAAK,WAAW;AACd,gBAAA,OAAO,eAAe,CAAC,SAAS,CAAC,cAAc;AACjD,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,eAAe,CAAC,GAAG,CAAC,GAAG;AAChC,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,eAAe,CAAC,GAAG,CAAC,GAAG;AAChC,YAAA;AACE,gBAAA,OAAO,CAAC;;IAEd;AAEA,IAAA,IAAI,eAAe,GAAA;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IACvC;AAEA,IAAA,mBAAmB,CAAC,GAAW,EAAA;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC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