@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.
@@ -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
- }