@guajiritos/general-autocomplete 19.0.0 → 20.0.0

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.
@@ -46,10 +46,10 @@ class UtilsService {
46
46
  return prev ? prev[curr] : null;
47
47
  }, obj || self);
48
48
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
50
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: UtilsService, providedIn: 'root' }); }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
50
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: UtilsService, providedIn: 'root' }); }
51
51
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: UtilsService, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: UtilsService, decorators: [{
53
53
  type: Injectable,
54
54
  args: [{
55
55
  providedIn: 'root'
@@ -78,10 +78,10 @@ class ResolvePropertyPath {
78
78
  });
79
79
  return result;
80
80
  }
81
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ResolvePropertyPath, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
82
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.12", ngImport: i0, type: ResolvePropertyPath, isStandalone: true, name: "resolvePropertyPath" }); }
81
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ResolvePropertyPath, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
82
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: ResolvePropertyPath, isStandalone: true, name: "resolvePropertyPath" }); }
83
83
  }
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ResolvePropertyPath, decorators: [{
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ResolvePropertyPath, decorators: [{
85
85
  type: Pipe,
86
86
  args: [{
87
87
  name: 'resolvePropertyPath',
@@ -409,16 +409,16 @@ class GuajiritosGeneralAutocomplete {
409
409
  this.propagateChange($event.option.value);
410
410
  }
411
411
  }
412
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GuajiritosGeneralAutocomplete, deps: [{ token: i1.AutocompleteService }, { token: i0.NgZone }, { token: i0.DestroyRef }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
413
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: GuajiritosGeneralAutocomplete, isStandalone: true, selector: "guajiritos-general-autocomplete", inputs: { floatLabel: "floatLabel", color: "color", appearance: "appearance", subscriptSizing: "subscriptSizing", bodyRequest: "bodyRequest", debounceTimeValue: "debounceTimeValue", detailsTemplate: "detailsTemplate", label: "label", showLabel: "showLabel", placeholder: "placeholder", field: "field", filterString: "filterString", displayOptions: "displayOptions", withoutPaddingBottom: "withoutPaddingBottom", valueId: "valueId", showSuffix: "showSuffix", requireSelection: "requireSelection", order: "order", serviceConfig: "serviceConfig", suffixIcon: "suffixIcon", removeProperties: "removeProperties", modifyResultFn: "modifyResultFn", url: "url", clearData: "clearData", initialValue: "initialValue", restrictions: "restrictions", isRequired: "isRequired", doFocus: "doFocus", notAllowedElements: "notAllowedElements" }, outputs: { SelectElement: "SelectElement", clearElement: "clearElement" }, providers: [
412
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GuajiritosGeneralAutocomplete, deps: [{ token: i1.AutocompleteService }, { token: i0.NgZone }, { token: i0.DestroyRef }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
413
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: GuajiritosGeneralAutocomplete, isStandalone: true, selector: "guajiritos-general-autocomplete", inputs: { floatLabel: "floatLabel", color: "color", appearance: "appearance", subscriptSizing: "subscriptSizing", bodyRequest: "bodyRequest", debounceTimeValue: "debounceTimeValue", detailsTemplate: "detailsTemplate", label: "label", showLabel: "showLabel", placeholder: "placeholder", field: "field", filterString: "filterString", displayOptions: "displayOptions", withoutPaddingBottom: "withoutPaddingBottom", valueId: "valueId", showSuffix: "showSuffix", requireSelection: "requireSelection", order: "order", serviceConfig: "serviceConfig", suffixIcon: "suffixIcon", removeProperties: "removeProperties", modifyResultFn: "modifyResultFn", url: "url", clearData: "clearData", initialValue: "initialValue", restrictions: "restrictions", isRequired: "isRequired", doFocus: "doFocus", notAllowedElements: "notAllowedElements" }, outputs: { SelectElement: "SelectElement", clearElement: "clearElement" }, providers: [
414
414
  {
415
415
  provide: NG_VALUE_ACCESSOR,
416
416
  useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),
417
417
  multi: true
418
418
  }
419
- ], viewQueries: [{ propertyName: "inputText", first: true, predicate: ["inputText"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" class=\"w-100\" [appearance]=\"appearance\" [color]=\"color\"\n [subscriptSizing]=\"subscriptSizing\">\n\n @if (showLabel) {\n <mat-label>{{ label | translate }}</mat-label>\n }\n @if (showSuffix) {\n <mat-icon matSuffix>{{ suffixIcon ?? \"search\" }}</mat-icon>\n }\n <input #inputText #trigger=\"matAutocompleteTrigger\" (focus)=\"onFocus()\" [formControl]=\"component\" type=\"text\"\n [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\" aria-label=\"autocomplete\"\n autocomplete=\"off\" matInput [required]=\"required()\">\n @if (!loading() && component.value) {\n <button (click)=\"clear(trigger)\" [disabled]=\"disabled()\"\n aria-label=\"Clear\" mat-icon-button matSuffix>\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (loading()) {\n <button aria-label=\"search\" mat-icon-button matSuffix>\n <mat-spinner [value]=\"90\" color=\"accent\" diameter=\"25\"></mat-spinner>\n </button>\n }\n <mat-autocomplete #autocomplete=\"matAutocomplete\" [displayWith]=\"displayFn\" [requireSelection]=\"requireSelection\"\n (optionSelected)=\"optionSelected($event)\">\n @for (option of filteredOptions(); track option) {\n <mat-option [value]=\"option\">\n @if (!displayOptions && !detailsTemplate) {\n {{ option?.name | i18n: translateService.currentLang }}\n }\n @if (!detailsTemplate) {\n <div class=\"display-options\">\n <span [ngStyle]=\"{'line-height': displayOptions?.secondLabel ? '16px' : ''}\">\n {{ option | resolvePropertyPath:displayOptions.firthLabel | i18n: translateService.currentLang }}\n </span>\n @if (displayOptions?.secondLabel) {\n <span class=\"mat-caption\">\n {{ option | resolvePropertyPath: displayOptions.secondLabel | i18n: translateService.currentLang }}\n </span>\n }\n </div>\n }\n @if (detailsTemplate) {\n <ng-container *ngTemplateOutlet=\"detailsTemplate;context:{$implicit: option }\"></ng-container>\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (component.invalid) {\n <mat-error>\n {{ 'Este campo es requerido.' | translate }}\n </mat-error>\n }\n</mat-form-field>\n", styles: [".w-100{width:100%}.display-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i10.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i10.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResolvePropertyPath, name: "resolvePropertyPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
419
+ ], viewQueries: [{ propertyName: "inputText", first: true, predicate: ["inputText"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" class=\"w-100\" [appearance]=\"appearance\" [color]=\"color\"\n [subscriptSizing]=\"subscriptSizing\">\n\n @if (showLabel) {\n <mat-label>{{ label | translate }}</mat-label>\n }\n @if (showSuffix) {\n <mat-icon matSuffix>{{ suffixIcon ?? \"search\" }}</mat-icon>\n }\n <input #inputText #trigger=\"matAutocompleteTrigger\" (focus)=\"onFocus()\" [formControl]=\"component\" type=\"text\"\n [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\" aria-label=\"autocomplete\"\n autocomplete=\"off\" matInput [required]=\"required()\">\n @if (!loading() && component.value) {\n <button (click)=\"clear(trigger)\" [disabled]=\"disabled()\"\n aria-label=\"Clear\" mat-icon-button matSuffix>\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (loading()) {\n <button aria-label=\"search\" mat-icon-button matSuffix>\n <mat-spinner [value]=\"90\" color=\"accent\" diameter=\"25\"></mat-spinner>\n </button>\n }\n <mat-autocomplete #autocomplete=\"matAutocomplete\" [displayWith]=\"displayFn\" [requireSelection]=\"requireSelection\"\n (optionSelected)=\"optionSelected($event)\">\n @for (option of filteredOptions(); track option) {\n <mat-option [value]=\"option\">\n @if (!displayOptions && !detailsTemplate) {\n {{ option?.name | i18n: translateService.currentLang }}\n }\n @if (!detailsTemplate) {\n <div class=\"display-options\">\n <span [ngStyle]=\"{'line-height': displayOptions?.secondLabel ? '16px' : ''}\">\n {{ option | resolvePropertyPath:displayOptions.firthLabel | i18n: translateService.currentLang }}\n </span>\n @if (displayOptions?.secondLabel) {\n <span class=\"mat-caption\">\n {{ option | resolvePropertyPath: displayOptions.secondLabel | i18n: translateService.currentLang }}\n </span>\n }\n </div>\n }\n @if (detailsTemplate) {\n <ng-container *ngTemplateOutlet=\"detailsTemplate;context:{$implicit: option }\"></ng-container>\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (component.invalid) {\n <mat-error>\n {{ 'Este campo es requerido.' | translate }}\n </mat-error>\n }\n</mat-form-field>\n", styles: [".w-100{width:100%}.display-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i10.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i10.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i10.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResolvePropertyPath, name: "resolvePropertyPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
420
420
  }
421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: GuajiritosGeneralAutocomplete, decorators: [{
421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GuajiritosGeneralAutocomplete, decorators: [{
422
422
  type: Component,
423
423
  args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
424
424
  CommonModule,
@@ -1 +1 @@
1
- {"version":3,"file":"guajiritos-general-autocomplete.mjs","sources":["../../../projects/guachos-general-autocomplete/src/utils/constants/constants.ts","../../../projects/guachos-general-autocomplete/src/utils/services/utils.service.ts","../../../projects/guachos-general-autocomplete/src/utils/pipes/resolve-property-path.pipe.ts","../../../projects/guachos-general-autocomplete/src/lib/guachos-general-autocomplete.component.ts","../../../projects/guachos-general-autocomplete/src/lib/guachos-general-autocomplete.component.html","../../../projects/guachos-general-autocomplete/src/public-api.ts","../../../projects/guachos-general-autocomplete/src/guajiritos-general-autocomplete.ts"],"sourcesContent":["import { DisplayOption, DisplayOptionItemType } from '@guajiritos/services';\nimport {DisplayOptionItem} from \"@guajiritos/services/lib/interfaces/interfaces\";\n\n\nexport const GENERAL_DISPLAY_OPTIONS: DisplayOption = {\n firthLabel: [\n {\n type: DisplayOptionItemType.PATH,\n path: ['name']\n }\n ],\n applyTranslate: true\n};\n\nexport interface ServiceConfig {\n service: any;\n method: string;\n postBody: any;\n searchProperty: string;\n}\n","import {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UtilsService {\n /**\n * Resolves the value of a property in an object by providing a path.\n *\n * @param {any} obj - The object to traverse.\n * @param {string[]} path - An array of strings representing the path to the desired property.\n * @return {any} The value of the property at the given path, or null if the path is invalid.\n */\n public static resolvePropertyByPath(obj: any, path: string[]): any {\n return path.reduce((prev, curr: string) => {\n return prev ? prev[curr] : null;\n }, obj || self);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { DisplayOptionItem, DisplayOptionItemType } from '@guajiritos/services';\n\nimport { UtilsService } from '../services/utils.service';\n\n@Pipe({\n name: 'resolvePropertyPath',\n standalone: true\n})\nexport class ResolvePropertyPath implements PipeTransform {\n /**\n * Transforms the given object based on the provided path and returns the transformed string.\n *\n * @param {any} obj - The object to be transformed.\n * @param {DisplayOptionItem[]} path - The array of display option items used for transformation.\n * @return {string} The transformed string.\n */\n transform(obj: any, path: DisplayOptionItem[]): string {\n let result: string = '';\n\n path?.forEach((item: DisplayOptionItem): void => {\n if (item?.type === DisplayOptionItemType.DIVIDER) {\n result += item?.divider;\n } else {\n if (item?.path) {\n result += UtilsService.resolvePropertyByPath(obj, item.path);\n }\n }\n });\n\n return result;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component, DestroyRef,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n NgZone,\n Output,\n signal,\n TemplateRef,\n ViewChild,\n WritableSignal\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n UntypedFormControl, ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport {MatAutocompleteModule, MatAutocompleteTrigger} from '@angular/material/autocomplete';\nimport {MatButtonModule} from '@angular/material/button';\nimport {ThemePalette} from '@angular/material/core';\nimport {\n FloatLabelType,\n MatFormFieldAppearance,\n MatFormFieldModule,\n SubscriptSizing\n} from '@angular/material/form-field';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatProgressSpinnerModule} from '@angular/material/progress-spinner';\nimport {TranslateModule, TranslateService} from '@ngx-translate/core';\nimport {debounceTime, distinctUntilChanged, finalize, Observable, Subject} from 'rxjs';\nimport {takeUntilDestroyed} from \"@angular/core/rxjs-interop\";\n\nimport {\n ApiFormData,\n AutocompleteService,\n DisplayOption,\n DisplayOptionItemType,\n I18nPipe,\n RestrictionFilter\n} from '@guajiritos/services';\n\nimport {GENERAL_DISPLAY_OPTIONS, ServiceConfig} from '../utils/constants/constants';\nimport {ResolvePropertyPath} from '../utils/pipes/resolve-property-path.pipe';\nimport {UtilsService} from '../utils/services/utils.service';\n\n@Component({\n selector: 'guajiritos-general-autocomplete',\n templateUrl: './guachos-general-autocomplete.component.html',\n styleUrls: ['./guachos-general-autocomplete.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n MatFormFieldModule,\n TranslateModule,\n MatIconModule,\n ReactiveFormsModule,\n MatInputModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n MatAutocompleteModule,\n I18nPipe,\n ResolvePropertyPath\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),\n multi: true\n }\n ]\n})\nexport class GuajiritosGeneralAutocomplete implements ControlValueAccessor {\n\n constructor(\n private _autocompleteService: AutocompleteService,\n private _zone: NgZone,\n private _destroyRef: DestroyRef,\n public translateService: TranslateService\n ) {\n }\n\n private wasSelected: boolean = false;\n private firstCall: boolean = true;\n private clearData$: Subject<void>;\n private doFocusSubject$: Subject<void>;\n private selectedElement: any = null;\n private _url: string = null;\n private restrictionsFilters: RestrictionFilter[] = [];\n\n public disabled: WritableSignal<boolean> = signal(false);\n public loading: WritableSignal<boolean> = signal(false);\n public required: WritableSignal<boolean> = signal(false);\n public filteredOptions: WritableSignal<any[]> = signal([]);\n public originalOptions: WritableSignal<any[]> = signal([]);\n public notAllowedOption: WritableSignal<any> = signal(null);\n public component: UntypedFormControl = new UntypedFormControl({value: null, disabled: false});\n\n @ViewChild('inputText', {static: true}) inputText: ElementRef;\n /**\n * Possible values 'never', 'auto' or 'always'\n */\n @Input() floatLabel: FloatLabelType = 'auto';\n @Input() color: ThemePalette = 'accent';\n @Input() appearance: MatFormFieldAppearance = 'outline';\n @Input() subscriptSizing: SubscriptSizing = 'dynamic';\n @Input() bodyRequest: ApiFormData;\n @Input() debounceTimeValue: number = 300;\n @Input() detailsTemplate: TemplateRef<any>;\n @Input() label: string = 'Seleccione';\n @Input() showLabel: boolean = true;\n @Input() placeholder: string = 'Seleccione un elemento';\n @Input() field: string[] = ['name'];\n @Input() filterString: string[] | string = 'filter[$and][name][$like]';\n @Input() displayOptions: DisplayOption = GENERAL_DISPLAY_OPTIONS;\n @Input() withoutPaddingBottom: boolean = true;\n @Input() valueId: boolean = false;\n @Input() showSuffix: boolean = false;\n @Input() requireSelection: boolean = false;\n @Input() order: string;\n @Input() serviceConfig: ServiceConfig;\n @Input() suffixIcon: string = 'search';\n @Input() removeProperties: string[] = [];\n @Input() modifyResultFn: (options: any) => any = () => null;\n\n @Output() SelectElement: EventEmitter<any> = new EventEmitter<any>();\n @Output() clearElement: EventEmitter<any> = new EventEmitter<any>();\n\n @Input() set url(data: string) {\n if (data) {\n this._url = data;\n this.subscribeComponentChanges();\n }\n }\n\n @Input() set clearData(value: Subject<void>) {\n this.clearData$ = value;\n if (this.clearData$) {\n this.clearData$\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe({\n next: (): void => {\n this.component.setValue(null, {emitEvent: false});\n this.selectedElement = null;\n this.SelectElement.emit(null);\n this.filteredOptions.set([]);\n this.propagateChange(null);\n }\n });\n }\n }\n\n @Input() set initialValue(value: any) {\n this.component.setValue(value);\n }\n\n /**\n * Añade o elimina restricciones para la búsqueda\n *\n * @param restrictions - Restricciones para la búsqueda\n */\n @Input() set restrictions(restrictions: RestrictionFilter[]) {\n if (restrictions?.length) {\n this.restrictionsFilters = [...restrictions];\n } else {\n this.restrictionsFilters = [];\n }\n }\n\n /**\n * Añade o elimina la validación de que el campo sea requerido\n *\n * @param required - Define si es requerido o no\n */\n @Input() set isRequired(required: boolean) {\n this.required.set(required);\n if (required) {\n this.component.setValidators([Validators.required, autocompleteValidator]);\n } else {\n this.component.clearValidators();\n this.component.setValidators([autocompleteValidator]);\n }\n\n this.component.updateValueAndValidity();\n }\n\n /**\n * Define si vamos a realizar una búsqueda al elemento estar en el focus de la aplicación\n *\n * @param focusSubject - Observable para la subscripción al evento Focus\n */\n @Input() set doFocus(focusSubject: Subject<void>) {\n this.doFocusSubject$ = focusSubject;\n\n if (this.doFocusSubject$) {\n this.doFocusSubject$\n .pipe(debounceTime(this.debounceTimeValue), takeUntilDestroyed(this._destroyRef))\n .subscribe({\n next: (): void => {\n this._zone.run((): void => {\n setTimeout((): void => {\n this.inputText?.nativeElement?.focus();\n }, 500);\n });\n }\n });\n }\n }\n\n @Input() set notAllowedElements(element: any) {\n if (element) {\n this.notAllowedOption.set(element);\n\n if (this.originalOptions()?.length) {\n this.filteredOptions.set(this.originalOptions()?.filter((option: any): any => JSON.stringify(option) !== JSON.stringify(this.notAllowedOption())));\n }\n }\n }\n\n /**\n * Subscripción a los cambios del input de búsqueda\n */\n private subscribeComponentChanges(): void {\n this.component.valueChanges\n .pipe(debounceTime(this.debounceTimeValue), takeUntilDestroyed(this._destroyRef))\n .subscribe({\n next: (): void => {\n if (!this.firstCall && !this.wasSelected) {\n this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());\n }\n\n this.firstCall = false;\n this.wasSelected = false;\n }\n });\n }\n\n /**\n * Búsqueda de los elementos a mostrar en el componente de auto-completamiento\n *\n * @param text - Texto a buscar\n */\n private getAutocompleteByTextHandler(text?: string): void {\n this.loading.set(true);\n this.propagateChange(null);\n this.selectedElement = null;\n this.SelectElement.emit(null);\n if (!this.serviceConfig) {\n this._autocompleteService\n .getAutocompleteByText(this._url, text, this.filterString, this.restrictionsFilters, this.removeProperties, this.order, this.bodyRequest)\n .then((resp: Observable<any>): void => {\n resp?.pipe(finalize((): void => this.loading.set(false))).subscribe({\n next: (result: any): void => {\n this.originalOptions.set(result?.payload?.data ?? result?.data);\n\n // Modifica los options con una función que se le pase como parámetro\n const modifiedOptions = this.modifyResultFn(this.originalOptions());\n if (modifiedOptions) this.filteredOptions.set(modifiedOptions);\n\n if (this.notAllowedOption()) {\n this.filteredOptions.set(this.originalOptions()?.filter((option: any): any => JSON.stringify(option) !== JSON.stringify(this.notAllowedOption())));\n } else {\n this.filteredOptions.set(this.originalOptions());\n }\n }\n });\n });\n } else {\n let body: any = this.serviceConfig;\n body[this.serviceConfig.searchProperty] = text;\n this.serviceConfig\n .service[this.serviceConfig.method](body)\n .pipe(takeUntilDestroyed(this._destroyRef), debounceTime(this.debounceTimeValue || 300), finalize((): void => this.loading.set(false)))\n .subscribe({\n next: (result: any): void => {\n this.originalOptions.set(result?.payload?.data ?? result?.data);\n\n // Modifica los options con una función que se le pase como parámetro\n const modifiedOptions = this.modifyResultFn(this.originalOptions());\n if (modifiedOptions) this.filteredOptions.set(modifiedOptions);\n\n if (this.notAllowedOption()) {\n this.filteredOptions.set(this.originalOptions()?.filter((option: any): any => JSON.stringify(option) !== JSON.stringify(this.notAllowedOption())));\n } else {\n this.filteredOptions.set(this.originalOptions());\n }\n }\n });\n }\n }\n\n /**\n * Define el texto por el que se va a realizar la búsqueda\n *\n * @return {string} Texto de la búsqueda\n */\n private getAutocompleteSearchText(): string {\n let text: string = '';\n\n if (this.component.value) {\n if (typeof this.component.value === 'object') {\n const componentValue = this.component.value?.[this.field?.[0]];\n if (typeof componentValue === 'object') {\n let lang: string = 'es';\n if (this.field?.[1]) {\n lang = this.field?.[1];\n }\n\n text = componentValue?.[lang];\n }\n } else if (typeof this.component.value === 'string') {\n text = this.component.value;\n }\n }\n\n return text;\n }\n\n propagateChange = (_: any): void => {\n };\n\n registerOnChange(fn: (_: any) => void): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {\n }\n\n /**\n * Recibe el valor del FormControl\n *\n * @param value - Valor entrado por FormControl\n */\n writeValue(value: any): void {\n if (value) {\n this.component.setValue(value, {emitEvent: false});\n\n if (typeof value === 'object' && this.valueId) {\n this.selectedElement = value?.id;\n } else {\n this.selectedElement = value;\n }\n } else {\n this.selectedElement = null;\n }\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n\n if (this.disabled()) {\n this.component.disable();\n } else {\n this.component.enable();\n }\n }\n\n /**\n * Función para mostrar los elementos a seleccionar\n *\n * @param value - Valor a mostrar\n */\n public displayFn = (value: any): string => {\n if (value) {\n if (typeof value === 'string') {\n return value;\n }\n\n let displayText: string = '';\n if (!this.displayOptions) {\n this.displayOptions = GENERAL_DISPLAY_OPTIONS;\n }\n\n this.displayOptions?.firthLabel?.forEach((field: any): void => {\n if (field?.type === DisplayOptionItemType.PATH) {\n displayText += UtilsService.resolvePropertyByPath(value, field?.path);\n } else {\n displayText += field?.divider;\n }\n });\n\n return displayText;\n }\n };\n\n /**\n * Acción al limpiar el valor del input\n *\n * @param trigger\n */\n public clear(trigger: MatAutocompleteTrigger): void {\n this.clearElement.emit(this.component.value);\n this.component.setValue(null);\n this.selectedElement = null;\n this.SelectElement.emit(null);\n this.propagateChange(null);\n\n this._zone.run((): void => {\n setTimeout((): void => {\n trigger.openPanel();\n }, 100);\n });\n }\n\n /**\n * Acción en el Focus del elemento\n */\n public onFocus(): void {\n if (!this.selectedElement) {\n this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());\n }\n }\n\n public optionSelected($event: any): void {\n if ($event?.option?.value) {\n this.wasSelected = true;\n this.selectedElement = $event.option.value;\n this.SelectElement.emit($event.option.value);\n\n if (this.valueId) {\n this.propagateChange(typeof $event.option.value === 'object' ? $event.option.value?.id : $event.option.value);\n } else {\n this.propagateChange($event.option.value);\n }\n } else {\n this.propagateChange($event.option.value);\n }\n }\n}\n\n/**\n * Validación customizada para la selección de elementos\n */\nexport function autocompleteValidator(control: AbstractControl): ValidationErrors | null {\n if (control?.value?.constructor !== Object || !control?.value?.id) {\n return {invalidSelection: true};\n }\n return null;\n}\n","<mat-form-field [floatLabel]=\"floatLabel\" class=\"w-100\" [appearance]=\"appearance\" [color]=\"color\"\n [subscriptSizing]=\"subscriptSizing\">\n\n @if (showLabel) {\n <mat-label>{{ label | translate }}</mat-label>\n }\n @if (showSuffix) {\n <mat-icon matSuffix>{{ suffixIcon ?? \"search\" }}</mat-icon>\n }\n <input #inputText #trigger=\"matAutocompleteTrigger\" (focus)=\"onFocus()\" [formControl]=\"component\" type=\"text\"\n [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\" aria-label=\"autocomplete\"\n autocomplete=\"off\" matInput [required]=\"required()\">\n @if (!loading() && component.value) {\n <button (click)=\"clear(trigger)\" [disabled]=\"disabled()\"\n aria-label=\"Clear\" mat-icon-button matSuffix>\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (loading()) {\n <button aria-label=\"search\" mat-icon-button matSuffix>\n <mat-spinner [value]=\"90\" color=\"accent\" diameter=\"25\"></mat-spinner>\n </button>\n }\n <mat-autocomplete #autocomplete=\"matAutocomplete\" [displayWith]=\"displayFn\" [requireSelection]=\"requireSelection\"\n (optionSelected)=\"optionSelected($event)\">\n @for (option of filteredOptions(); track option) {\n <mat-option [value]=\"option\">\n @if (!displayOptions && !detailsTemplate) {\n {{ option?.name | i18n: translateService.currentLang }}\n }\n @if (!detailsTemplate) {\n <div class=\"display-options\">\n <span [ngStyle]=\"{'line-height': displayOptions?.secondLabel ? '16px' : ''}\">\n {{ option | resolvePropertyPath:displayOptions.firthLabel | i18n: translateService.currentLang }}\n </span>\n @if (displayOptions?.secondLabel) {\n <span class=\"mat-caption\">\n {{ option | resolvePropertyPath: displayOptions.secondLabel | i18n: translateService.currentLang }}\n </span>\n }\n </div>\n }\n @if (detailsTemplate) {\n <ng-container *ngTemplateOutlet=\"detailsTemplate;context:{$implicit: option }\"></ng-container>\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (component.invalid) {\n <mat-error>\n {{ 'Este campo es requerido.' | translate }}\n </mat-error>\n }\n</mat-form-field>\n","/*\n * Public API Surface of guachos-general-autocomplete\n */\n\nexport * from './utils/constants/constants';\nexport * from './lib/guachos-general-autocomplete.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,uBAAuB,GAAkB;AAClD,IAAA,UAAU,EAAE;AACR,QAAA;YACI,IAAI,EAAE,qBAAqB,CAAC,IAAI;YAChC,IAAI,EAAE,CAAC,MAAM;AAChB;AACJ,KAAA;AACD,IAAA,cAAc,EAAE;;;MCNP,YAAY,CAAA;AACrB;;;;;;AAMG;AACI,IAAA,OAAO,qBAAqB,CAAC,GAAQ,EAAE,IAAc,EAAA;QACxD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAY,KAAI;AACtC,YAAA,OAAO,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI;AACnC,SAAC,EAAE,GAAG,IAAI,IAAI,CAAC;;+GAXV,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,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AAA,OAAO,IAAI;AACf;;AE7bA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"guajiritos-general-autocomplete.mjs","sources":["../../../projects/guachos-general-autocomplete/src/utils/constants/constants.ts","../../../projects/guachos-general-autocomplete/src/utils/services/utils.service.ts","../../../projects/guachos-general-autocomplete/src/utils/pipes/resolve-property-path.pipe.ts","../../../projects/guachos-general-autocomplete/src/lib/guachos-general-autocomplete.component.ts","../../../projects/guachos-general-autocomplete/src/lib/guachos-general-autocomplete.component.html","../../../projects/guachos-general-autocomplete/src/public-api.ts","../../../projects/guachos-general-autocomplete/src/guajiritos-general-autocomplete.ts"],"sourcesContent":["import { DisplayOption, DisplayOptionItemType } from '@guajiritos/services';\n\n\nexport const GENERAL_DISPLAY_OPTIONS: DisplayOption = {\n firthLabel: [\n {\n type: DisplayOptionItemType.PATH,\n path: ['name']\n }\n ],\n applyTranslate: true\n};\n\nexport interface ServiceConfig {\n service: any;\n method: string;\n postBody: any;\n searchProperty: string;\n}\n","import {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UtilsService {\n /**\n * Resolves the value of a property in an object by providing a path.\n *\n * @param {any} obj - The object to traverse.\n * @param {string[]} path - An array of strings representing the path to the desired property.\n * @return {any} The value of the property at the given path, or null if the path is invalid.\n */\n public static resolvePropertyByPath(obj: any, path: string[]): any {\n return path.reduce((prev, curr: string) => {\n return prev ? prev[curr] : null;\n }, obj || self);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { DisplayOptionItem, DisplayOptionItemType } from '@guajiritos/services';\n\nimport { UtilsService } from '../services/utils.service';\n\n@Pipe({\n name: 'resolvePropertyPath',\n standalone: true\n})\nexport class ResolvePropertyPath implements PipeTransform {\n /**\n * Transforms the given object based on the provided path and returns the transformed string.\n *\n * @param {any} obj - The object to be transformed.\n * @param {DisplayOptionItem[]} path - The array of display option items used for transformation.\n * @return {string} The transformed string.\n */\n transform(obj: any, path: DisplayOptionItem[]): string {\n let result: string = '';\n\n path?.forEach((item: DisplayOptionItem): void => {\n if (item?.type === DisplayOptionItemType.DIVIDER) {\n result += item?.divider;\n } else {\n if (item?.path) {\n result += UtilsService.resolvePropertyByPath(obj, item.path);\n }\n }\n });\n\n return result;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component, DestroyRef,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n NgZone,\n Output,\n signal,\n TemplateRef,\n ViewChild,\n WritableSignal\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n UntypedFormControl, ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport {MatAutocompleteModule, MatAutocompleteTrigger} from '@angular/material/autocomplete';\nimport {MatButtonModule} from '@angular/material/button';\nimport {ThemePalette} from '@angular/material/core';\nimport {\n FloatLabelType,\n MatFormFieldAppearance,\n MatFormFieldModule,\n SubscriptSizing\n} from '@angular/material/form-field';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatProgressSpinnerModule} from '@angular/material/progress-spinner';\nimport {TranslateModule, TranslateService} from '@ngx-translate/core';\nimport {debounceTime, distinctUntilChanged, finalize, Observable, Subject} from 'rxjs';\nimport {takeUntilDestroyed} from \"@angular/core/rxjs-interop\";\n\nimport {\n ApiFormData,\n AutocompleteService,\n DisplayOption,\n DisplayOptionItemType,\n I18nPipe,\n RestrictionFilter\n} from '@guajiritos/services';\n\nimport {GENERAL_DISPLAY_OPTIONS, ServiceConfig} from '../utils/constants/constants';\nimport {ResolvePropertyPath} from '../utils/pipes/resolve-property-path.pipe';\nimport {UtilsService} from '../utils/services/utils.service';\n\n@Component({\n selector: 'guajiritos-general-autocomplete',\n templateUrl: './guachos-general-autocomplete.component.html',\n styleUrls: ['./guachos-general-autocomplete.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n MatFormFieldModule,\n TranslateModule,\n MatIconModule,\n ReactiveFormsModule,\n MatInputModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n MatAutocompleteModule,\n I18nPipe,\n ResolvePropertyPath\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),\n multi: true\n }\n ]\n})\nexport class GuajiritosGeneralAutocomplete implements ControlValueAccessor {\n\n constructor(\n private _autocompleteService: AutocompleteService,\n private _zone: NgZone,\n private _destroyRef: DestroyRef,\n public translateService: TranslateService\n ) {\n }\n\n private wasSelected: boolean = false;\n private firstCall: boolean = true;\n private clearData$: Subject<void>;\n private doFocusSubject$: Subject<void>;\n private selectedElement: any = null;\n private _url: string = null;\n private restrictionsFilters: RestrictionFilter[] = [];\n\n public disabled: WritableSignal<boolean> = signal(false);\n public loading: WritableSignal<boolean> = signal(false);\n public required: WritableSignal<boolean> = signal(false);\n public filteredOptions: WritableSignal<any[]> = signal([]);\n public originalOptions: WritableSignal<any[]> = signal([]);\n public notAllowedOption: WritableSignal<any> = signal(null);\n public component: UntypedFormControl = new UntypedFormControl({value: null, disabled: false});\n\n @ViewChild('inputText', {static: true}) inputText: ElementRef;\n /**\n * Possible values 'never', 'auto' or 'always'\n */\n @Input() floatLabel: FloatLabelType = 'auto';\n @Input() color: ThemePalette = 'accent';\n @Input() appearance: MatFormFieldAppearance = 'outline';\n @Input() subscriptSizing: SubscriptSizing = 'dynamic';\n @Input() bodyRequest: ApiFormData;\n @Input() debounceTimeValue: number = 300;\n @Input() detailsTemplate: TemplateRef<any>;\n @Input() label: string = 'Seleccione';\n @Input() showLabel: boolean = true;\n @Input() placeholder: string = 'Seleccione un elemento';\n @Input() field: string[] = ['name'];\n @Input() filterString: string[] | string = 'filter[$and][name][$like]';\n @Input() displayOptions: DisplayOption = GENERAL_DISPLAY_OPTIONS;\n @Input() withoutPaddingBottom: boolean = true;\n @Input() valueId: boolean = false;\n @Input() showSuffix: boolean = false;\n @Input() requireSelection: boolean = false;\n @Input() order: string;\n @Input() serviceConfig: ServiceConfig;\n @Input() suffixIcon: string = 'search';\n @Input() removeProperties: string[] = [];\n @Input() modifyResultFn: (options: any) => any = () => null;\n\n @Output() SelectElement: EventEmitter<any> = new EventEmitter<any>();\n @Output() clearElement: EventEmitter<any> = new EventEmitter<any>();\n\n @Input() set url(data: string) {\n if (data) {\n this._url = data;\n this.subscribeComponentChanges();\n }\n }\n\n @Input() set clearData(value: Subject<void>) {\n this.clearData$ = value;\n if (this.clearData$) {\n this.clearData$\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe({\n next: (): void => {\n this.component.setValue(null, {emitEvent: false});\n this.selectedElement = null;\n this.SelectElement.emit(null);\n this.filteredOptions.set([]);\n this.propagateChange(null);\n }\n });\n }\n }\n\n @Input() set initialValue(value: any) {\n this.component.setValue(value);\n }\n\n /**\n * Añade o elimina restricciones para la búsqueda\n *\n * @param restrictions - Restricciones para la búsqueda\n */\n @Input() set restrictions(restrictions: RestrictionFilter[]) {\n if (restrictions?.length) {\n this.restrictionsFilters = [...restrictions];\n } else {\n this.restrictionsFilters = [];\n }\n }\n\n /**\n * Añade o elimina la validación de que el campo sea requerido\n *\n * @param required - Define si es requerido o no\n */\n @Input() set isRequired(required: boolean) {\n this.required.set(required);\n if (required) {\n this.component.setValidators([Validators.required, autocompleteValidator]);\n } else {\n this.component.clearValidators();\n this.component.setValidators([autocompleteValidator]);\n }\n\n this.component.updateValueAndValidity();\n }\n\n /**\n * Define si vamos a realizar una búsqueda al elemento estar en el focus de la aplicación\n *\n * @param focusSubject - Observable para la subscripción al evento Focus\n */\n @Input() set doFocus(focusSubject: Subject<void>) {\n this.doFocusSubject$ = focusSubject;\n\n if (this.doFocusSubject$) {\n this.doFocusSubject$\n .pipe(debounceTime(this.debounceTimeValue), takeUntilDestroyed(this._destroyRef))\n .subscribe({\n next: (): void => {\n this._zone.run((): void => {\n setTimeout((): void => {\n this.inputText?.nativeElement?.focus();\n }, 500);\n });\n }\n });\n }\n }\n\n @Input() set notAllowedElements(element: any) {\n if (element) {\n this.notAllowedOption.set(element);\n\n if (this.originalOptions()?.length) {\n this.filteredOptions.set(this.originalOptions()?.filter((option: any): any => JSON.stringify(option) !== JSON.stringify(this.notAllowedOption())));\n }\n }\n }\n\n /**\n * Subscripción a los cambios del input de búsqueda\n */\n private subscribeComponentChanges(): void {\n this.component.valueChanges\n .pipe(debounceTime(this.debounceTimeValue), takeUntilDestroyed(this._destroyRef))\n .subscribe({\n next: (): void => {\n if (!this.firstCall && !this.wasSelected) {\n this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());\n }\n\n this.firstCall = false;\n this.wasSelected = false;\n }\n });\n }\n\n /**\n * Búsqueda de los elementos a mostrar en el componente de auto-completamiento\n *\n * @param text - Texto a buscar\n */\n private getAutocompleteByTextHandler(text?: string): void {\n this.loading.set(true);\n this.propagateChange(null);\n this.selectedElement = null;\n this.SelectElement.emit(null);\n if (!this.serviceConfig) {\n this._autocompleteService\n .getAutocompleteByText(this._url, text, this.filterString, this.restrictionsFilters, this.removeProperties, this.order, this.bodyRequest)\n .then((resp: Observable<any>): void => {\n resp?.pipe(finalize((): void => this.loading.set(false))).subscribe({\n next: (result: any): void => {\n this.originalOptions.set(result?.payload?.data ?? result?.data);\n\n // Modifica los options con una función que se le pase como parámetro\n const modifiedOptions = this.modifyResultFn(this.originalOptions());\n if (modifiedOptions) this.filteredOptions.set(modifiedOptions);\n\n if (this.notAllowedOption()) {\n this.filteredOptions.set(this.originalOptions()?.filter((option: any): any => JSON.stringify(option) !== JSON.stringify(this.notAllowedOption())));\n } else {\n this.filteredOptions.set(this.originalOptions());\n }\n }\n });\n });\n } else {\n let body: any = this.serviceConfig;\n body[this.serviceConfig.searchProperty] = text;\n this.serviceConfig\n .service[this.serviceConfig.method](body)\n .pipe(takeUntilDestroyed(this._destroyRef), debounceTime(this.debounceTimeValue || 300), finalize((): void => this.loading.set(false)))\n .subscribe({\n next: (result: any): void => {\n this.originalOptions.set(result?.payload?.data ?? result?.data);\n\n // Modifica los options con una función que se le pase como parámetro\n const modifiedOptions = this.modifyResultFn(this.originalOptions());\n if (modifiedOptions) this.filteredOptions.set(modifiedOptions);\n\n if (this.notAllowedOption()) {\n this.filteredOptions.set(this.originalOptions()?.filter((option: any): any => JSON.stringify(option) !== JSON.stringify(this.notAllowedOption())));\n } else {\n this.filteredOptions.set(this.originalOptions());\n }\n }\n });\n }\n }\n\n /**\n * Define el texto por el que se va a realizar la búsqueda\n *\n * @return {string} Texto de la búsqueda\n */\n private getAutocompleteSearchText(): string {\n let text: string = '';\n\n if (this.component.value) {\n if (typeof this.component.value === 'object') {\n const componentValue = this.component.value?.[this.field?.[0]];\n if (typeof componentValue === 'object') {\n let lang: string = 'es';\n if (this.field?.[1]) {\n lang = this.field?.[1];\n }\n\n text = componentValue?.[lang];\n }\n } else if (typeof this.component.value === 'string') {\n text = this.component.value;\n }\n }\n\n return text;\n }\n\n propagateChange = (_: any): void => {\n };\n\n registerOnChange(fn: (_: any) => void): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {\n }\n\n /**\n * Recibe el valor del FormControl\n *\n * @param value - Valor entrado por FormControl\n */\n writeValue(value: any): void {\n if (value) {\n this.component.setValue(value, {emitEvent: false});\n\n if (typeof value === 'object' && this.valueId) {\n this.selectedElement = value?.id;\n } else {\n this.selectedElement = value;\n }\n } else {\n this.selectedElement = null;\n }\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n\n if (this.disabled()) {\n this.component.disable();\n } else {\n this.component.enable();\n }\n }\n\n /**\n * Función para mostrar los elementos a seleccionar\n *\n * @param value - Valor a mostrar\n */\n public displayFn = (value: any): string => {\n if (value) {\n if (typeof value === 'string') {\n return value;\n }\n\n let displayText: string = '';\n if (!this.displayOptions) {\n this.displayOptions = GENERAL_DISPLAY_OPTIONS;\n }\n\n this.displayOptions?.firthLabel?.forEach((field: any): void => {\n if (field?.type === DisplayOptionItemType.PATH) {\n displayText += UtilsService.resolvePropertyByPath(value, field?.path);\n } else {\n displayText += field?.divider;\n }\n });\n\n return displayText;\n }\n };\n\n /**\n * Acción al limpiar el valor del input\n *\n * @param trigger\n */\n public clear(trigger: MatAutocompleteTrigger): void {\n this.clearElement.emit(this.component.value);\n this.component.setValue(null);\n this.selectedElement = null;\n this.SelectElement.emit(null);\n this.propagateChange(null);\n\n this._zone.run((): void => {\n setTimeout((): void => {\n trigger.openPanel();\n }, 100);\n });\n }\n\n /**\n * Acción en el Focus del elemento\n */\n public onFocus(): void {\n if (!this.selectedElement) {\n this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());\n }\n }\n\n public optionSelected($event: any): void {\n if ($event?.option?.value) {\n this.wasSelected = true;\n this.selectedElement = $event.option.value;\n this.SelectElement.emit($event.option.value);\n\n if (this.valueId) {\n this.propagateChange(typeof $event.option.value === 'object' ? $event.option.value?.id : $event.option.value);\n } else {\n this.propagateChange($event.option.value);\n }\n } else {\n this.propagateChange($event.option.value);\n }\n }\n}\n\n/**\n * Validación customizada para la selección de elementos\n */\nexport function autocompleteValidator(control: AbstractControl): ValidationErrors | null {\n if (control?.value?.constructor !== Object || !control?.value?.id) {\n return {invalidSelection: true};\n }\n return null;\n}\n","<mat-form-field [floatLabel]=\"floatLabel\" class=\"w-100\" [appearance]=\"appearance\" [color]=\"color\"\n [subscriptSizing]=\"subscriptSizing\">\n\n @if (showLabel) {\n <mat-label>{{ label | translate }}</mat-label>\n }\n @if (showSuffix) {\n <mat-icon matSuffix>{{ suffixIcon ?? \"search\" }}</mat-icon>\n }\n <input #inputText #trigger=\"matAutocompleteTrigger\" (focus)=\"onFocus()\" [formControl]=\"component\" type=\"text\"\n [matAutocomplete]=\"autocomplete\" [placeholder]=\"placeholder | translate\" aria-label=\"autocomplete\"\n autocomplete=\"off\" matInput [required]=\"required()\">\n @if (!loading() && component.value) {\n <button (click)=\"clear(trigger)\" [disabled]=\"disabled()\"\n aria-label=\"Clear\" mat-icon-button matSuffix>\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (loading()) {\n <button aria-label=\"search\" mat-icon-button matSuffix>\n <mat-spinner [value]=\"90\" color=\"accent\" diameter=\"25\"></mat-spinner>\n </button>\n }\n <mat-autocomplete #autocomplete=\"matAutocomplete\" [displayWith]=\"displayFn\" [requireSelection]=\"requireSelection\"\n (optionSelected)=\"optionSelected($event)\">\n @for (option of filteredOptions(); track option) {\n <mat-option [value]=\"option\">\n @if (!displayOptions && !detailsTemplate) {\n {{ option?.name | i18n: translateService.currentLang }}\n }\n @if (!detailsTemplate) {\n <div class=\"display-options\">\n <span [ngStyle]=\"{'line-height': displayOptions?.secondLabel ? '16px' : ''}\">\n {{ option | resolvePropertyPath:displayOptions.firthLabel | i18n: translateService.currentLang }}\n </span>\n @if (displayOptions?.secondLabel) {\n <span class=\"mat-caption\">\n {{ option | resolvePropertyPath: displayOptions.secondLabel | i18n: translateService.currentLang }}\n </span>\n }\n </div>\n }\n @if (detailsTemplate) {\n <ng-container *ngTemplateOutlet=\"detailsTemplate;context:{$implicit: option }\"></ng-container>\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (component.invalid) {\n <mat-error>\n {{ 'Este campo es requerido.' | translate }}\n </mat-error>\n }\n</mat-form-field>\n","/*\n * Public API Surface of guachos-general-autocomplete\n */\n\nexport * from './utils/constants/constants';\nexport * from './lib/guachos-general-autocomplete.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,uBAAuB,GAAkB;AAClD,IAAA,UAAU,EAAE;AACR,QAAA;YACI,IAAI,EAAE,qBAAqB,CAAC,IAAI;YAChC,IAAI,EAAE,CAAC,MAAM;AAChB;AACJ,KAAA;AACD,IAAA,cAAc,EAAE;;;MCLP,YAAY,CAAA;AACrB;;;;;;AAMG;AACI,IAAA,OAAO,qBAAqB,CAAC,GAAQ,EAAE,IAA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;gBAaY,UAAU,EAAA,CAAA;sBAAtB;gBAiBY,OAAO,EAAA,CAAA;sBAAnB;gBAkBY,kBAAkB,EAAA,CAAA;sBAA9B;;AA6NH;;AAEG;AACG,SAAU,qBAAqB,CAAC,OAAwB,EAAA;AAC1D,IAAA,IAAI,OAAO,EAAE,KAAK,EAAE,WAAW,KAAK,MAAM,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;AACjE,QAAA,OAAO,EAAC,gBAAgB,EAAE,IAAI,EAAC;;AAEjC,IAAA,OAAO,IAAI;AACf;;AE7bA;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,5 +1,141 @@
1
+ import { DisplayOption, AutocompleteService, ApiFormData, RestrictionFilter } from '@guajiritos/services';
2
+ import * as i0 from '@angular/core';
3
+ import { NgZone, DestroyRef, WritableSignal, ElementRef, TemplateRef, EventEmitter } from '@angular/core';
4
+ import { ControlValueAccessor, UntypedFormControl, AbstractControl, ValidationErrors } from '@angular/forms';
5
+ import { MatAutocompleteTrigger } from '@angular/material/autocomplete';
6
+ import { ThemePalette } from '@angular/material/core';
7
+ import { FloatLabelType, MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
8
+ import { TranslateService } from '@ngx-translate/core';
9
+ import { Subject } from 'rxjs';
10
+
11
+ declare const GENERAL_DISPLAY_OPTIONS: DisplayOption;
12
+ interface ServiceConfig {
13
+ service: any;
14
+ method: string;
15
+ postBody: any;
16
+ searchProperty: string;
17
+ }
18
+
19
+ declare class GuajiritosGeneralAutocomplete implements ControlValueAccessor {
20
+ private _autocompleteService;
21
+ private _zone;
22
+ private _destroyRef;
23
+ translateService: TranslateService;
24
+ constructor(_autocompleteService: AutocompleteService, _zone: NgZone, _destroyRef: DestroyRef, translateService: TranslateService);
25
+ private wasSelected;
26
+ private firstCall;
27
+ private clearData$;
28
+ private doFocusSubject$;
29
+ private selectedElement;
30
+ private _url;
31
+ private restrictionsFilters;
32
+ disabled: WritableSignal<boolean>;
33
+ loading: WritableSignal<boolean>;
34
+ required: WritableSignal<boolean>;
35
+ filteredOptions: WritableSignal<any[]>;
36
+ originalOptions: WritableSignal<any[]>;
37
+ notAllowedOption: WritableSignal<any>;
38
+ component: UntypedFormControl;
39
+ inputText: ElementRef;
40
+ /**
41
+ * Possible values 'never', 'auto' or 'always'
42
+ */
43
+ floatLabel: FloatLabelType;
44
+ color: ThemePalette;
45
+ appearance: MatFormFieldAppearance;
46
+ subscriptSizing: SubscriptSizing;
47
+ bodyRequest: ApiFormData;
48
+ debounceTimeValue: number;
49
+ detailsTemplate: TemplateRef<any>;
50
+ label: string;
51
+ showLabel: boolean;
52
+ placeholder: string;
53
+ field: string[];
54
+ filterString: string[] | string;
55
+ displayOptions: DisplayOption;
56
+ withoutPaddingBottom: boolean;
57
+ valueId: boolean;
58
+ showSuffix: boolean;
59
+ requireSelection: boolean;
60
+ order: string;
61
+ serviceConfig: ServiceConfig;
62
+ suffixIcon: string;
63
+ removeProperties: string[];
64
+ modifyResultFn: (options: any) => any;
65
+ SelectElement: EventEmitter<any>;
66
+ clearElement: EventEmitter<any>;
67
+ set url(data: string);
68
+ set clearData(value: Subject<void>);
69
+ set initialValue(value: any);
70
+ /**
71
+ * Añade o elimina restricciones para la búsqueda
72
+ *
73
+ * @param restrictions - Restricciones para la búsqueda
74
+ */
75
+ set restrictions(restrictions: RestrictionFilter[]);
76
+ /**
77
+ * Añade o elimina la validación de que el campo sea requerido
78
+ *
79
+ * @param required - Define si es requerido o no
80
+ */
81
+ set isRequired(required: boolean);
82
+ /**
83
+ * Define si vamos a realizar una búsqueda al elemento estar en el focus de la aplicación
84
+ *
85
+ * @param focusSubject - Observable para la subscripción al evento Focus
86
+ */
87
+ set doFocus(focusSubject: Subject<void>);
88
+ set notAllowedElements(element: any);
89
+ /**
90
+ * Subscripción a los cambios del input de búsqueda
91
+ */
92
+ private subscribeComponentChanges;
93
+ /**
94
+ * Búsqueda de los elementos a mostrar en el componente de auto-completamiento
95
+ *
96
+ * @param text - Texto a buscar
97
+ */
98
+ private getAutocompleteByTextHandler;
99
+ /**
100
+ * Define el texto por el que se va a realizar la búsqueda
101
+ *
102
+ * @return {string} Texto de la búsqueda
103
+ */
104
+ private getAutocompleteSearchText;
105
+ propagateChange: (_: any) => void;
106
+ registerOnChange(fn: (_: any) => void): void;
107
+ registerOnTouched(): void;
108
+ /**
109
+ * Recibe el valor del FormControl
110
+ *
111
+ * @param value - Valor entrado por FormControl
112
+ */
113
+ writeValue(value: any): void;
114
+ setDisabledState(isDisabled: boolean): void;
115
+ /**
116
+ * Función para mostrar los elementos a seleccionar
117
+ *
118
+ * @param value - Valor a mostrar
119
+ */
120
+ displayFn: (value: any) => string;
121
+ /**
122
+ * Acción al limpiar el valor del input
123
+ *
124
+ * @param trigger
125
+ */
126
+ clear(trigger: MatAutocompleteTrigger): void;
127
+ /**
128
+ * Acción en el Focus del elemento
129
+ */
130
+ onFocus(): void;
131
+ optionSelected($event: any): void;
132
+ static ɵfac: i0.ɵɵFactoryDeclaration<GuajiritosGeneralAutocomplete, never>;
133
+ static ɵcmp: i0.ɵɵComponentDeclaration<GuajiritosGeneralAutocomplete, "guajiritos-general-autocomplete", never, { "floatLabel": { "alias": "floatLabel"; "required": false; }; "color": { "alias": "color"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "bodyRequest": { "alias": "bodyRequest"; "required": false; }; "debounceTimeValue": { "alias": "debounceTimeValue"; "required": false; }; "detailsTemplate": { "alias": "detailsTemplate"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "field": { "alias": "field"; "required": false; }; "filterString": { "alias": "filterString"; "required": false; }; "displayOptions": { "alias": "displayOptions"; "required": false; }; "withoutPaddingBottom": { "alias": "withoutPaddingBottom"; "required": false; }; "valueId": { "alias": "valueId"; "required": false; }; "showSuffix": { "alias": "showSuffix"; "required": false; }; "requireSelection": { "alias": "requireSelection"; "required": false; }; "order": { "alias": "order"; "required": false; }; "serviceConfig": { "alias": "serviceConfig"; "required": false; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; }; "removeProperties": { "alias": "removeProperties"; "required": false; }; "modifyResultFn": { "alias": "modifyResultFn"; "required": false; }; "url": { "alias": "url"; "required": false; }; "clearData": { "alias": "clearData"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "restrictions": { "alias": "restrictions"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "doFocus": { "alias": "doFocus"; "required": false; }; "notAllowedElements": { "alias": "notAllowedElements"; "required": false; }; }, { "SelectElement": "SelectElement"; "clearElement": "clearElement"; }, never, never, true, never>;
134
+ }
1
135
  /**
2
- * Generated bundle index. Do not edit.
136
+ * Validación customizada para la selección de elementos
3
137
  */
4
- /// <amd-module name="@guajiritos/general-autocomplete" />
5
- export * from './public-api';
138
+ declare function autocompleteValidator(control: AbstractControl): ValidationErrors | null;
139
+
140
+ export { GENERAL_DISPLAY_OPTIONS, GuajiritosGeneralAutocomplete, autocompleteValidator };
141
+ export type { ServiceConfig };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@guajiritos/general-autocomplete",
3
- "version": "19.0.0",
3
+ "version": "20.0.0",
4
4
  "peerDependencies": {
5
- "@angular/cdk": "^19.2.17",
6
- "@angular/common": "^19.2.12",
7
- "@angular/core": "^19.2.12",
8
- "@angular/material": "19.2.17",
5
+ "@angular/cdk": "^20.0.1",
6
+ "@angular/common": "^20.0.0",
7
+ "@angular/core": "^20.0.0",
8
+ "@angular/material": "20.0.1",
9
9
  "@ngx-translate/core": "^15.0.0",
10
- "@guajiritos/services": "^19.0.1",
10
+ "@guajiritos/services": "20.0.0",
11
11
  "lodash.merge": "~4.6.2"
12
12
  },
13
13
  "maintainers": [
@@ -1,130 +0,0 @@
1
- import { DestroyRef, ElementRef, EventEmitter, NgZone, TemplateRef, WritableSignal } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, UntypedFormControl, ValidationErrors } from '@angular/forms';
3
- import { MatAutocompleteTrigger } from '@angular/material/autocomplete';
4
- import { ThemePalette } from '@angular/material/core';
5
- import { FloatLabelType, MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
6
- import { TranslateService } from '@ngx-translate/core';
7
- import { Subject } from 'rxjs';
8
- import { ApiFormData, AutocompleteService, DisplayOption, RestrictionFilter } from '@guajiritos/services';
9
- import { ServiceConfig } from '../utils/constants/constants';
10
- import * as i0 from "@angular/core";
11
- export declare class GuajiritosGeneralAutocomplete implements ControlValueAccessor {
12
- private _autocompleteService;
13
- private _zone;
14
- private _destroyRef;
15
- translateService: TranslateService;
16
- constructor(_autocompleteService: AutocompleteService, _zone: NgZone, _destroyRef: DestroyRef, translateService: TranslateService);
17
- private wasSelected;
18
- private firstCall;
19
- private clearData$;
20
- private doFocusSubject$;
21
- private selectedElement;
22
- private _url;
23
- private restrictionsFilters;
24
- disabled: WritableSignal<boolean>;
25
- loading: WritableSignal<boolean>;
26
- required: WritableSignal<boolean>;
27
- filteredOptions: WritableSignal<any[]>;
28
- originalOptions: WritableSignal<any[]>;
29
- notAllowedOption: WritableSignal<any>;
30
- component: UntypedFormControl;
31
- inputText: ElementRef;
32
- /**
33
- * Possible values 'never', 'auto' or 'always'
34
- */
35
- floatLabel: FloatLabelType;
36
- color: ThemePalette;
37
- appearance: MatFormFieldAppearance;
38
- subscriptSizing: SubscriptSizing;
39
- bodyRequest: ApiFormData;
40
- debounceTimeValue: number;
41
- detailsTemplate: TemplateRef<any>;
42
- label: string;
43
- showLabel: boolean;
44
- placeholder: string;
45
- field: string[];
46
- filterString: string[] | string;
47
- displayOptions: DisplayOption;
48
- withoutPaddingBottom: boolean;
49
- valueId: boolean;
50
- showSuffix: boolean;
51
- requireSelection: boolean;
52
- order: string;
53
- serviceConfig: ServiceConfig;
54
- suffixIcon: string;
55
- removeProperties: string[];
56
- modifyResultFn: (options: any) => any;
57
- SelectElement: EventEmitter<any>;
58
- clearElement: EventEmitter<any>;
59
- set url(data: string);
60
- set clearData(value: Subject<void>);
61
- set initialValue(value: any);
62
- /**
63
- * Añade o elimina restricciones para la búsqueda
64
- *
65
- * @param restrictions - Restricciones para la búsqueda
66
- */
67
- set restrictions(restrictions: RestrictionFilter[]);
68
- /**
69
- * Añade o elimina la validación de que el campo sea requerido
70
- *
71
- * @param required - Define si es requerido o no
72
- */
73
- set isRequired(required: boolean);
74
- /**
75
- * Define si vamos a realizar una búsqueda al elemento estar en el focus de la aplicación
76
- *
77
- * @param focusSubject - Observable para la subscripción al evento Focus
78
- */
79
- set doFocus(focusSubject: Subject<void>);
80
- set notAllowedElements(element: any);
81
- /**
82
- * Subscripción a los cambios del input de búsqueda
83
- */
84
- private subscribeComponentChanges;
85
- /**
86
- * Búsqueda de los elementos a mostrar en el componente de auto-completamiento
87
- *
88
- * @param text - Texto a buscar
89
- */
90
- private getAutocompleteByTextHandler;
91
- /**
92
- * Define el texto por el que se va a realizar la búsqueda
93
- *
94
- * @return {string} Texto de la búsqueda
95
- */
96
- private getAutocompleteSearchText;
97
- propagateChange: (_: any) => void;
98
- registerOnChange(fn: (_: any) => void): void;
99
- registerOnTouched(): void;
100
- /**
101
- * Recibe el valor del FormControl
102
- *
103
- * @param value - Valor entrado por FormControl
104
- */
105
- writeValue(value: any): void;
106
- setDisabledState(isDisabled: boolean): void;
107
- /**
108
- * Función para mostrar los elementos a seleccionar
109
- *
110
- * @param value - Valor a mostrar
111
- */
112
- displayFn: (value: any) => string;
113
- /**
114
- * Acción al limpiar el valor del input
115
- *
116
- * @param trigger
117
- */
118
- clear(trigger: MatAutocompleteTrigger): void;
119
- /**
120
- * Acción en el Focus del elemento
121
- */
122
- onFocus(): void;
123
- optionSelected($event: any): void;
124
- static ɵfac: i0.ɵɵFactoryDeclaration<GuajiritosGeneralAutocomplete, never>;
125
- static ɵcmp: i0.ɵɵComponentDeclaration<GuajiritosGeneralAutocomplete, "guajiritos-general-autocomplete", never, { "floatLabel": { "alias": "floatLabel"; "required": false; }; "color": { "alias": "color"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "bodyRequest": { "alias": "bodyRequest"; "required": false; }; "debounceTimeValue": { "alias": "debounceTimeValue"; "required": false; }; "detailsTemplate": { "alias": "detailsTemplate"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "field": { "alias": "field"; "required": false; }; "filterString": { "alias": "filterString"; "required": false; }; "displayOptions": { "alias": "displayOptions"; "required": false; }; "withoutPaddingBottom": { "alias": "withoutPaddingBottom"; "required": false; }; "valueId": { "alias": "valueId"; "required": false; }; "showSuffix": { "alias": "showSuffix"; "required": false; }; "requireSelection": { "alias": "requireSelection"; "required": false; }; "order": { "alias": "order"; "required": false; }; "serviceConfig": { "alias": "serviceConfig"; "required": false; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; }; "removeProperties": { "alias": "removeProperties"; "required": false; }; "modifyResultFn": { "alias": "modifyResultFn"; "required": false; }; "url": { "alias": "url"; "required": false; }; "clearData": { "alias": "clearData"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "restrictions": { "alias": "restrictions"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "doFocus": { "alias": "doFocus"; "required": false; }; "notAllowedElements": { "alias": "notAllowedElements"; "required": false; }; }, { "SelectElement": "SelectElement"; "clearElement": "clearElement"; }, never, never, true, never>;
126
- }
127
- /**
128
- * Validación customizada para la selección de elementos
129
- */
130
- export declare function autocompleteValidator(control: AbstractControl): ValidationErrors | null;
package/public-api.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './utils/constants/constants';
2
- export * from './lib/guachos-general-autocomplete.component';
@@ -1,8 +0,0 @@
1
- import { DisplayOption } from '@guajiritos/services';
2
- export declare const GENERAL_DISPLAY_OPTIONS: DisplayOption;
3
- export interface ServiceConfig {
4
- service: any;
5
- method: string;
6
- postBody: any;
7
- searchProperty: string;
8
- }
@@ -1,15 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import { DisplayOptionItem } from '@guajiritos/services';
3
- import * as i0 from "@angular/core";
4
- export declare class ResolvePropertyPath implements PipeTransform {
5
- /**
6
- * Transforms the given object based on the provided path and returns the transformed string.
7
- *
8
- * @param {any} obj - The object to be transformed.
9
- * @param {DisplayOptionItem[]} path - The array of display option items used for transformation.
10
- * @return {string} The transformed string.
11
- */
12
- transform(obj: any, path: DisplayOptionItem[]): string;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<ResolvePropertyPath, never>;
14
- static ɵpipe: i0.ɵɵPipeDeclaration<ResolvePropertyPath, "resolvePropertyPath", true>;
15
- }
@@ -1,13 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class UtilsService {
3
- /**
4
- * Resolves the value of a property in an object by providing a path.
5
- *
6
- * @param {any} obj - The object to traverse.
7
- * @param {string[]} path - An array of strings representing the path to the desired property.
8
- * @return {any} The value of the property at the given path, or null if the path is invalid.
9
- */
10
- static resolvePropertyByPath(obj: any, path: string[]): any;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
13
- }