@guajiritos/general-autocomplete 18.0.11 → 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.
- package/fesm2022/guajiritos-general-autocomplete.mjs +13 -16
- package/fesm2022/guajiritos-general-autocomplete.mjs.map +1 -1
- package/index.d.ts +139 -3
- package/package.json +7 -9
- package/esm2022/guajiritos-general-autocomplete.mjs +0 -5
- package/esm2022/lib/guachos-general-autocomplete.component.mjs +0 -456
- package/esm2022/public-api.mjs +0 -6
- package/esm2022/utils/constants/constants.mjs +0 -11
- package/esm2022/utils/pipes/resolve-property-path.pipe.mjs +0 -37
- package/esm2022/utils/services/utils.service.mjs +0 -25
- package/lib/guachos-general-autocomplete.component.d.ts +0 -130
- package/public-api.d.ts +0 -2
- package/utils/constants/constants.d.ts +0 -8
- package/utils/pipes/resolve-property-path.pipe.d.ts +0 -15
- package/utils/services/utils.service.d.ts +0 -13
@@ -3,9 +3,9 @@ import { DisplayOptionItemType, I18nPipe } from '@guajiritos/services';
|
|
3
3
|
import * as i3 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
import * as i0 from '@angular/core';
|
6
|
-
import { Injectable, Pipe, signal, EventEmitter, forwardRef,
|
6
|
+
import { Injectable, Pipe, signal, EventEmitter, forwardRef, Input, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
7
7
|
import * as i6 from '@angular/forms';
|
8
|
-
import { UntypedFormControl, Validators,
|
8
|
+
import { UntypedFormControl, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
9
9
|
import * as i10 from '@angular/material/autocomplete';
|
10
10
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
11
11
|
import * as i8 from '@angular/material/button';
|
@@ -22,7 +22,6 @@ import * as i2 from '@ngx-translate/core';
|
|
22
22
|
import { TranslateModule } from '@ngx-translate/core';
|
23
23
|
import { debounceTime, finalize } from 'rxjs';
|
24
24
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
25
|
-
import * as i11 from '@angular/material/core';
|
26
25
|
|
27
26
|
const GENERAL_DISPLAY_OPTIONS = {
|
28
27
|
firthLabel: [
|
@@ -47,10 +46,10 @@ class UtilsService {
|
|
47
46
|
return prev ? prev[curr] : null;
|
48
47
|
}, obj || self);
|
49
48
|
}
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
51
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
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' }); }
|
52
51
|
}
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: UtilsService, decorators: [{
|
54
53
|
type: Injectable,
|
55
54
|
args: [{
|
56
55
|
providedIn: 'root'
|
@@ -79,10 +78,10 @@ class ResolvePropertyPath {
|
|
79
78
|
});
|
80
79
|
return result;
|
81
80
|
}
|
82
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
83
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
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" }); }
|
84
83
|
}
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ResolvePropertyPath, decorators: [{
|
86
85
|
type: Pipe,
|
87
86
|
args: [{
|
88
87
|
name: 'resolvePropertyPath',
|
@@ -250,7 +249,6 @@ class GuajiritosGeneralAutocomplete {
|
|
250
249
|
.pipe(debounceTime(this.debounceTimeValue), takeUntilDestroyed(this._destroyRef))
|
251
250
|
.subscribe({
|
252
251
|
next: () => {
|
253
|
-
console.log(this.component.value);
|
254
252
|
if (!this.firstCall && !this.wasSelected) {
|
255
253
|
this.getAutocompleteByTextHandler(this.getAutocompleteSearchText());
|
256
254
|
}
|
@@ -411,18 +409,18 @@ class GuajiritosGeneralAutocomplete {
|
|
411
409
|
this.propagateChange($event.option.value);
|
412
410
|
}
|
413
411
|
}
|
414
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
415
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
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: [
|
416
414
|
{
|
417
415
|
provide: NG_VALUE_ACCESSOR,
|
418
416
|
useExisting: forwardRef(() => GuajiritosGeneralAutocomplete),
|
419
417
|
multi: true
|
420
418
|
}
|
421
|
-
], 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"], 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:
|
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 }); }
|
422
420
|
}
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: GuajiritosGeneralAutocomplete, decorators: [{
|
424
422
|
type: Component,
|
425
|
-
args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush,
|
423
|
+
args: [{ selector: 'guajiritos-general-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
426
424
|
CommonModule,
|
427
425
|
MatFormFieldModule,
|
428
426
|
TranslateModule,
|
@@ -511,7 +509,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
511
509
|
* Validación customizada para la selección de elementos
|
512
510
|
*/
|
513
511
|
function autocompleteValidator(control) {
|
514
|
-
console.log(control?.value);
|
515
512
|
if (control?.value?.constructor !== Object || !control?.value?.id) {
|
516
513
|
return { invalidSelection: true };
|
517
514
|
}
|
@@ -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 standalone: true,\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 console.log(this.component.value);\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 console.log(control?.value);\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,CAAC;AACjB,SAAA;AACJ,KAAA;AACD,IAAA,cAAc,EAAE,IAAI;;;MCNX,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,CAAC;AACpC,SAAC,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC;KACnB;8GAZQ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFT,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAET,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;;MCMY,mBAAmB,CAAA;AAC9B;;;;;;AAMG;IACH,SAAS,CAAC,GAAQ,EAAE,IAAyB,EAAA;QAC3C,IAAI,MAAM,GAAW,EAAE,CAAC;AAExB,QAAA,IAAI,E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sBAApB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACG,oBAAoB,EAAA,CAAA;sBAA5B,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBAEI,aAAa,EAAA,CAAA;sBAAtB,MAAM;gBACG,YAAY,EAAA,CAAA;sBAArB,MAAM;gBAEM,GAAG,EAAA,CAAA;sBAAf,KAAK;gBAOO,SAAS,EAAA,CAAA;sBAArB,KAAK;gBAiBO,YAAY,EAAA,CAAA;sBAAxB,KAAK;gBASO,YAAY,EAAA,CAAA;sBAAxB,KAAK;gBAaO,UAAU,EAAA,CAAA;sBAAtB,KAAK;gBAiBO,OAAO,EAAA,CAAA;sBAAnB,KAAK;gBAkBO,kBAAkB,EAAA,CAAA;sBAA9B,KAAK;;AA8NR;;AAEG;AACG,SAAU,qBAAqB,CAAC,OAAwB,EAAA;AAC5D,IAAA,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC1B,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,CAAC;KACjC;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;AEhcA;;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,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,GA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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
|
-
*
|
136
|
+
* Validación customizada para la selección de elementos
|
3
137
|
*/
|
4
|
-
|
5
|
-
|
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,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@guajiritos/general-autocomplete",
|
3
|
-
"version": "
|
3
|
+
"version": "20.0.0",
|
4
4
|
"peerDependencies": {
|
5
|
-
"@angular/cdk": "^
|
6
|
-
"@angular/common": "^
|
7
|
-
"@angular/core": "^
|
8
|
-
"@angular/material": "
|
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": "
|
11
|
-
"lodash.merge": "~4.6.
|
10
|
+
"@guajiritos/services": "20.0.0",
|
11
|
+
"lodash.merge": "~4.6.2"
|
12
12
|
},
|
13
13
|
"maintainers": [
|
14
14
|
{
|
@@ -47,8 +47,6 @@
|
|
47
47
|
},
|
48
48
|
".": {
|
49
49
|
"types": "./index.d.ts",
|
50
|
-
"esm2022": "./esm2022/guajiritos-general-autocomplete.mjs",
|
51
|
-
"esm": "./esm2022/guajiritos-general-autocomplete.mjs",
|
52
50
|
"default": "./fesm2022/guajiritos-general-autocomplete.mjs"
|
53
51
|
}
|
54
52
|
},
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Generated bundle index. Do not edit.
|
3
|
-
*/
|
4
|
-
export * from './public-api';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VhamlyaXRvcy1nZW5lcmFsLWF1dG9jb21wbGV0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2d1YWNob3MtZ2VuZXJhbC1hdXRvY29tcGxldGUvc3JjL2d1YWppcml0b3MtZ2VuZXJhbC1hdXRvY29tcGxldGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|