@jvsoft/components 0.0.13-alpha.3 → 1.0.0-alpha.10
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/dialog-flotante/README.md +169 -0
- package/dialog-flotante/dialog-flotante.component.d.ts +13 -22
- package/fesm2022/jvsoft-components-dialog-flotante.mjs +49 -82
- package/fesm2022/jvsoft-components-dialog-flotante.mjs.map +1 -1
- package/fesm2022/jvsoft-components-filtro-busqueda.mjs +660 -0
- package/fesm2022/jvsoft-components-filtro-busqueda.mjs.map +1 -0
- package/fesm2022/jvsoft-components-lista-arbol.mjs +121 -145
- package/fesm2022/jvsoft-components-lista-arbol.mjs.map +1 -1
- package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs +4 -2
- package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs.map +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs.map +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs +107 -61
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -1
- package/fesm2022/jvsoft-components.mjs +928 -301
- package/fesm2022/jvsoft-components.mjs.map +1 -1
- package/filtro-busqueda/README.md +156 -0
- package/filtro-busqueda/filtro-busqueda.component.d.ts +89 -0
- package/filtro-busqueda/filtro-busqueda.component.scss +98 -0
- package/filtro-busqueda/filtro-busqueda.service.d.ts +40 -0
- package/filtro-busqueda/index.d.ts +5 -0
- package/filtro-busqueda/interfaces/filtro-busqueda.interface.d.ts +86 -0
- package/filtro-busqueda/public-api.d.ts +3 -0
- package/index.d.ts +1 -0
- package/lista-arbol/README.md +268 -0
- package/lista-arbol/lista-arbol.component.d.ts +36 -37
- package/package.json +17 -14
- package/src/styles/base-jvsoft-components.css +6 -4
- package/src/styles/base.scss +1 -0
- package/tabla-mantenimiento/interfaces/global/columnas-tabla.d.ts +9 -10
- package/tabla-mantenimiento/interfaces/global/otros.d.ts +1 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.module.d.ts +2 -1
- package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +15 -8
- package/tabla-mantenimiento/tabla-mantenimiento.component.scss +14 -1
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, computed, Injectable, InjectionToken, inject, input, output, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
6
|
+
import moment from 'moment';
|
|
7
|
+
import * as i2 from '@angular/forms';
|
|
8
|
+
import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import * as i3 from '@angular/material/autocomplete';
|
|
10
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
11
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
12
|
+
import * as i4 from '@angular/material/datepicker';
|
|
13
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
14
|
+
import * as i5 from '@angular/material/form-field';
|
|
15
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
16
|
+
import * as i6 from '@angular/material/icon';
|
|
17
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
+
import { MatInputModule } from '@angular/material/input';
|
|
19
|
+
import * as i7 from '@angular/material/core';
|
|
20
|
+
import { MatOptionModule, MatRippleModule } from '@angular/material/core';
|
|
21
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
22
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
23
|
+
import * as i8 from '@angular/material/tabs';
|
|
24
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
25
|
+
import { TextFieldModule } from '@angular/cdk/text-field';
|
|
26
|
+
import { debounceTime, takeUntil, distinctUntilChanged } from 'rxjs/operators';
|
|
27
|
+
import { ToastrService } from 'ngx-toastr';
|
|
28
|
+
import { generateRandomString, dataEnLista, tipoValorFuncion, getUniqueValues, establecerQuitarRequired, mostrarValorEnBusqueda, getFormValidationErrors } from '@jvsoft/utils';
|
|
29
|
+
|
|
30
|
+
class FiltroBusquedaService {
|
|
31
|
+
// Estado centralizado con Signals (Angular 19+)
|
|
32
|
+
_filtrosActivos = signal(new Map());
|
|
33
|
+
_dataServidorActivos = signal(new Map());
|
|
34
|
+
// Interfaz de sólo lectura expuesta
|
|
35
|
+
filtrosActivos = this._filtrosActivos.asReadonly();
|
|
36
|
+
dataServidorActivos = this._dataServidorActivos.asReadonly();
|
|
37
|
+
/**
|
|
38
|
+
* Establece un valor para un filtro reactivo
|
|
39
|
+
*/
|
|
40
|
+
setValue(nombreFiltro, val) {
|
|
41
|
+
this._filtrosActivos.update(map => {
|
|
42
|
+
const nextMap = new Map(map);
|
|
43
|
+
nextMap.set(nombreFiltro, val);
|
|
44
|
+
return nextMap;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Usa `getFiltroSignal(nombreFiltro)` en componentes modernos.
|
|
49
|
+
* Retorna el snapshot sincrónico actual (para componentes legacy).
|
|
50
|
+
*/
|
|
51
|
+
getValue(nombreFiltro) {
|
|
52
|
+
return this._filtrosActivos().get(nombreFiltro);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Actualiza la metadata del servidor (Signals).
|
|
56
|
+
*/
|
|
57
|
+
setDataServidorSuscripcion(nombreFiltro, campo, data) {
|
|
58
|
+
this._dataServidorActivos.update(map => {
|
|
59
|
+
const nextMap = new Map(map);
|
|
60
|
+
let filterMap = nextMap.get(nombreFiltro) || new Map();
|
|
61
|
+
const nextFilterMap = new Map(filterMap);
|
|
62
|
+
nextFilterMap.set(campo, data);
|
|
63
|
+
nextMap.set(nombreFiltro, nextFilterMap);
|
|
64
|
+
return nextMap;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Usa `getDataServidorSignal(nombreFiltro, campo)` en componentes modernos.
|
|
69
|
+
* Retorna el snapshot sincrónico actual de metadata (para componentes legacy).
|
|
70
|
+
*/
|
|
71
|
+
getDataServidorSuscripcion(nombreFiltro, campo) {
|
|
72
|
+
return this._dataServidorActivos().get(nombreFiltro)?.get(campo);
|
|
73
|
+
}
|
|
74
|
+
// --- Opciones Signal (Angular 19+) ---
|
|
75
|
+
/**
|
|
76
|
+
* Crea y devuelve un Signal reactivo continuo para observar los valores aplicados de un filtro particular.
|
|
77
|
+
* @param nombreFiltro Nombre del filtro que se desea escuchar
|
|
78
|
+
* @param defaultValue Valor de respaldo seguro si aún no se ha inicializado el filtro.
|
|
79
|
+
*/
|
|
80
|
+
getFiltroSignal(nombreFiltro, defaultValue) {
|
|
81
|
+
return computed(() => {
|
|
82
|
+
const value = this._filtrosActivos().get(nombreFiltro);
|
|
83
|
+
return (value ?? defaultValue);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Crea y devuelve un Signal reactivo continuo para escuchar la metadata/catálogo recibida del backend para un campo.
|
|
88
|
+
* @param nombreFiltro Nombre de la colección del filtro principal
|
|
89
|
+
* @param campo Campo específico (ej: id_usuario, categoria) del que se espera escuchar la lista u objeto servidor
|
|
90
|
+
* @param defaultValue Valor de respaldo seguro si aún no hay data del servidor.
|
|
91
|
+
*/
|
|
92
|
+
getDataServidorSignal(nombreFiltro, campo, defaultValue) {
|
|
93
|
+
return computed(() => {
|
|
94
|
+
const value = this._dataServidorActivos().get(nombreFiltro)?.get(campo);
|
|
95
|
+
return (value ?? defaultValue);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FiltroBusquedaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
99
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FiltroBusquedaService, providedIn: 'root' });
|
|
100
|
+
}
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FiltroBusquedaService, decorators: [{
|
|
102
|
+
type: Injectable,
|
|
103
|
+
args: [{
|
|
104
|
+
providedIn: 'root',
|
|
105
|
+
}]
|
|
106
|
+
}] });
|
|
107
|
+
|
|
108
|
+
const QUERY_SERVICE_TOKEN = new InjectionToken('QUERY_SERVICE_TOKEN');
|
|
109
|
+
class FiltroBusquedaComponent {
|
|
110
|
+
fb = inject(FormBuilder);
|
|
111
|
+
toastr = inject(ToastrService);
|
|
112
|
+
filtroBusquedaService = inject(FiltroBusquedaService);
|
|
113
|
+
queryService = inject(QUERY_SERVICE_TOKEN, { optional: true });
|
|
114
|
+
opciones = input([]);
|
|
115
|
+
nombreColeccionInput = input(generateRandomString(10), { alias: 'nombreColeccion' });
|
|
116
|
+
prefijoConsulta = input('grl');
|
|
117
|
+
busquedaAutomatica = input(false);
|
|
118
|
+
opciones$ = input();
|
|
119
|
+
modificarOpciones$ = input();
|
|
120
|
+
defaultTab = input(0);
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated Paradigma Zero-Output: Inyecta FiltroBusquedaService y usa `getFiltroSignal('nombreColeccion')` para estado en tiempo real, esto evita renderizados innecesarios del padre.
|
|
123
|
+
*/
|
|
124
|
+
dataFiltro = output();
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated Su payload de diccionario crudo desaparecerá pronto (Mejora 2). Migra al nuevo evento `(buscar)` que emite la interfaz `FiltroResultante`.
|
|
127
|
+
* Se mantiene temporalmente para componentes legacy.
|
|
128
|
+
*/
|
|
129
|
+
resultados = output();
|
|
130
|
+
/**
|
|
131
|
+
* Evento principal explícito de búsqueda (Click en Filtrar). Emite el objeto con metadata y labels.
|
|
132
|
+
*/
|
|
133
|
+
buscar = output();
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated Paradigma Zero-Output: Maneja la finalización de carga a través de los Signals internos del servicio o asume inmediatez de la arquitectura nueva.
|
|
136
|
+
*/
|
|
137
|
+
cargaCompleta = output();
|
|
138
|
+
tabActual = signal(0);
|
|
139
|
+
dataOpcionesNuevo = signal([]);
|
|
140
|
+
isCargaCompleta = signal(false);
|
|
141
|
+
frmFiltroBusqueda = this.fb.group({
|
|
142
|
+
opcion: [0],
|
|
143
|
+
opciones: this.fb.array([]),
|
|
144
|
+
});
|
|
145
|
+
get opcionesTabs() {
|
|
146
|
+
return this.frmFiltroBusqueda.get('opciones');
|
|
147
|
+
}
|
|
148
|
+
get frmGroupSeleccionado() {
|
|
149
|
+
return this.opcionesTabs.at(this.tabActual()) || this.fb.group({});
|
|
150
|
+
}
|
|
151
|
+
getControl(nombre) {
|
|
152
|
+
return this.frmGroupSeleccionado.get(nombre);
|
|
153
|
+
}
|
|
154
|
+
getControlRaiz(nombre) {
|
|
155
|
+
return this.frmFiltroBusqueda.get(nombre);
|
|
156
|
+
}
|
|
157
|
+
getAutocompleteLabel(controlData, value) {
|
|
158
|
+
if (!value)
|
|
159
|
+
return '';
|
|
160
|
+
const config = controlData.autocomplete;
|
|
161
|
+
if (!config)
|
|
162
|
+
return '';
|
|
163
|
+
const list = this.dataServidorSuscripcion[config.data]?.getValue() || [];
|
|
164
|
+
const item = dataEnLista(list, config.campoValor || controlData.campo, value);
|
|
165
|
+
if (item) {
|
|
166
|
+
return this.campoTextEval(controlData, item);
|
|
167
|
+
}
|
|
168
|
+
// Fallback search in the filtered results if not in the main list
|
|
169
|
+
const filteredList = this.filtrados[controlData.campo] || [];
|
|
170
|
+
const filteredItem = dataEnLista(filteredList, config.campoValor || controlData.campo, value);
|
|
171
|
+
if (filteredItem) {
|
|
172
|
+
return this.campoTextEval(controlData, filteredItem);
|
|
173
|
+
}
|
|
174
|
+
return value?.toString() || '';
|
|
175
|
+
}
|
|
176
|
+
dataServidor = {};
|
|
177
|
+
dataServidorSuscripcion = {};
|
|
178
|
+
filtrados = {};
|
|
179
|
+
inputParaEnviarAutocomplete = new Subject();
|
|
180
|
+
destroy$ = new Subject();
|
|
181
|
+
sufixTemporal = '_temporal';
|
|
182
|
+
tipoValorFuncion = tipoValorFuncion;
|
|
183
|
+
fechaActual = moment().toDate();
|
|
184
|
+
constructor() {
|
|
185
|
+
this.inputParaEnviarAutocomplete.pipe(debounceTime(500), takeUntil(this.destroy$)).subscribe((param) => {
|
|
186
|
+
this.queryService?.cargar(this, [param.reqQuery], param.reqData, false, this.prefijoConsulta()).then((dRet) => {
|
|
187
|
+
if (dRet) {
|
|
188
|
+
this.filtrados[param.controlData.campo] = dRet[param.reqQuery];
|
|
189
|
+
this.filtroBusquedaService.setDataServidorSuscripcion(this.nombreColeccionInput(), param.controlData.campo, dRet[param.reqQuery]);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
ngOnInit() {
|
|
195
|
+
this.tabActual.set(this.defaultTab());
|
|
196
|
+
this.frmFiltroBusqueda.get('opcion')?.setValue(this.tabActual());
|
|
197
|
+
if (this.opciones().length > 0) {
|
|
198
|
+
this.initOpciones(this.opciones());
|
|
199
|
+
}
|
|
200
|
+
this.opciones$()?.pipe(takeUntil(this.destroy$)).subscribe(val => {
|
|
201
|
+
if (val)
|
|
202
|
+
this.initOpciones(val);
|
|
203
|
+
});
|
|
204
|
+
this.modificarOpciones$()?.pipe(takeUntil(this.destroy$)).subscribe(val => {
|
|
205
|
+
if (val) {
|
|
206
|
+
Object.keys(val).forEach(x => {
|
|
207
|
+
const ev = val[x];
|
|
208
|
+
this.actualizarEnFormArray(x, ev.value ?? ev['val'], { disabled: ev.disabled });
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
this.frmFiltroBusqueda.valueChanges.pipe(distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(() => {
|
|
213
|
+
this.actualizarEstadoService();
|
|
214
|
+
});
|
|
215
|
+
this.frmFiltroBusqueda.get('opcion')?.valueChanges.pipe(distinctUntilChanged(), takeUntil(this.destroy$)).subscribe((val) => {
|
|
216
|
+
if (val !== null) {
|
|
217
|
+
this.tabActual.set(val);
|
|
218
|
+
this.cargarDatosFiltroNuevo(val);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
initOpciones(val) {
|
|
223
|
+
const nOpc = this.reorganizarOpcionesNuevas(val);
|
|
224
|
+
this.dataOpcionesNuevo.set(nOpc);
|
|
225
|
+
this.cargarDatosFiltroNuevo();
|
|
226
|
+
}
|
|
227
|
+
reorganizarOpcionesNuevas(val) {
|
|
228
|
+
return val.filter(tab => !tab.esVisible || tipoValorFuncion(tab.esVisible, true, tab)).map(tab => ({
|
|
229
|
+
label: tab.label,
|
|
230
|
+
campos: tab.campos || []
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
async cargarDatosFiltroNuevo(idTab) {
|
|
234
|
+
const tabIdx = idTab !== undefined ? idTab : this.tabActual();
|
|
235
|
+
const currentTab = this.dataOpcionesNuevo()[tabIdx];
|
|
236
|
+
if (!currentTab)
|
|
237
|
+
return;
|
|
238
|
+
let llamadasJuntas = [[], [], [], [], []];
|
|
239
|
+
let llamadasJuntasParams = [{}, {}, {}, {}, {}];
|
|
240
|
+
const camposDisabled = [];
|
|
241
|
+
const camposRequired = [];
|
|
242
|
+
const procesarCampos = (campos, grupoFrm, agrupado = false) => {
|
|
243
|
+
campos.forEach((campo) => {
|
|
244
|
+
let val = campo;
|
|
245
|
+
if (val.modificadorDatos)
|
|
246
|
+
val = val.modificadorDatos(val);
|
|
247
|
+
if (val.disabled)
|
|
248
|
+
camposDisabled.push(val.campo);
|
|
249
|
+
if (val.required)
|
|
250
|
+
camposRequired.push(val.campo);
|
|
251
|
+
if (val.dateRange) {
|
|
252
|
+
const [fIni, fFin] = val.dateRange.campo;
|
|
253
|
+
grupoFrm[fIni] = val.dateRange.value?.[0] === '*fechaActual*' ? this.fechaActual : (val.dateRange.value?.[0] || '');
|
|
254
|
+
grupoFrm[fFin] = val.dateRange.value?.[1] === '*fechaActual*' ? this.fechaActual : (val.dateRange.value?.[1] || '');
|
|
255
|
+
}
|
|
256
|
+
else if (val.autocomplete) {
|
|
257
|
+
grupoFrm[val.campo + this.sufixTemporal] = val.value || '';
|
|
258
|
+
grupoFrm[val.campo] = val.value || '';
|
|
259
|
+
}
|
|
260
|
+
else if (val.controlAgrupado) {
|
|
261
|
+
grupoFrm[val.campo] = val.value || '';
|
|
262
|
+
procesarCampos(val.controlAgrupado, grupoFrm, true);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
grupoFrm[val.campo] = val.value === '*fechaActual*' ? this.fechaActual : (val.value || '');
|
|
266
|
+
}
|
|
267
|
+
if (val.select || val.autocomplete) {
|
|
268
|
+
const config = (val.select || val.autocomplete);
|
|
269
|
+
if (agrupado)
|
|
270
|
+
config.ordenPeticion = 3;
|
|
271
|
+
if (config.customData) {
|
|
272
|
+
this.setCustomData(config.data, config.customData);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
const level = config.ordenPeticion || 0;
|
|
276
|
+
if (config.data)
|
|
277
|
+
llamadasJuntas[level].push(config.data);
|
|
278
|
+
if (val.reqParams?.fields) {
|
|
279
|
+
val.reqParams.fields.forEach(f => {
|
|
280
|
+
if (grupoFrm[f] && !['*primero*', '*deUsuario*'].includes(grupoFrm[f])) {
|
|
281
|
+
llamadasJuntasParams[level][f] = grupoFrm[f];
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
if (val.reqParams?.params) {
|
|
286
|
+
llamadasJuntasParams[level] = { ...llamadasJuntasParams[level], ...val.reqParams.params };
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
const targetOpciones = idTab !== undefined ? [this.dataOpcionesNuevo()[idTab]] : this.dataOpcionesNuevo();
|
|
293
|
+
targetOpciones.forEach(tab => {
|
|
294
|
+
const grupoFrm = {};
|
|
295
|
+
procesarCampos(tab.campos, grupoFrm);
|
|
296
|
+
const group = this.fb.group(grupoFrm);
|
|
297
|
+
if (idTab === undefined) {
|
|
298
|
+
this.opcionesTabs.push(group);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
this.opcionesTabs.setControl(idTab, group);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
getUniqueValues(camposDisabled).forEach(c => this.actualizarEnFormArray(c, undefined, { disabled: true }));
|
|
305
|
+
establecerQuitarRequired(this.frmGroupSeleccionado, getUniqueValues(camposRequired));
|
|
306
|
+
const cargaNivel = async (idx) => {
|
|
307
|
+
const types = getUniqueValues(llamadasJuntas[idx]);
|
|
308
|
+
if (types.length === 0)
|
|
309
|
+
return;
|
|
310
|
+
const dRet = await this.queryService?.cargar(this, types, llamadasJuntasParams[idx], false, this.prefijoConsulta());
|
|
311
|
+
if (dRet) {
|
|
312
|
+
this.procesarRetornoDatos(idx, dRet, llamadasJuntasParams);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
await cargaNivel(0);
|
|
316
|
+
await cargaNivel(1);
|
|
317
|
+
await cargaNivel(2);
|
|
318
|
+
await cargaNivel(3);
|
|
319
|
+
await cargaNivel(4);
|
|
320
|
+
this.isCargaCompleta.set(true);
|
|
321
|
+
this.actualizarEstadoService();
|
|
322
|
+
this.cargaCompleta.emit(true);
|
|
323
|
+
}
|
|
324
|
+
actualizarEstadoService() {
|
|
325
|
+
if (this.isCargaCompleta()) {
|
|
326
|
+
const res = this.getFiltroResultante();
|
|
327
|
+
this.filtroBusquedaService.setValue(this.nombreColeccionInput(), res);
|
|
328
|
+
this.dataFiltro.emit(res.datosFiltro);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
setCustomData(key, data) {
|
|
332
|
+
if (!this.dataServidorSuscripcion[key]) {
|
|
333
|
+
this.dataServidorSuscripcion[key] = new BehaviorSubject(null);
|
|
334
|
+
}
|
|
335
|
+
this.dataServidorSuscripcion[key].next(data);
|
|
336
|
+
}
|
|
337
|
+
procesarRetornoDatos(idxLevel, data, paramsRef) {
|
|
338
|
+
const tabCampos = this.dataOpcionesNuevo()[this.tabActual()].campos;
|
|
339
|
+
const affected = tabCampos.filter(c => {
|
|
340
|
+
const config = c.select || c.autocomplete;
|
|
341
|
+
return config && (config.ordenPeticion || 0) === idxLevel;
|
|
342
|
+
});
|
|
343
|
+
affected.forEach(campo => {
|
|
344
|
+
const config = (campo.select || campo.autocomplete);
|
|
345
|
+
const res = data[config.data];
|
|
346
|
+
if (!this.dataServidorSuscripcion[config.data]) {
|
|
347
|
+
this.dataServidorSuscripcion[config.data] = new BehaviorSubject(null);
|
|
348
|
+
}
|
|
349
|
+
this.dataServidorSuscripcion[config.data].next(res);
|
|
350
|
+
this.filtroBusquedaService.setDataServidorSuscripcion(this.nombreColeccionInput(), campo.campo, res);
|
|
351
|
+
if (campo.value === '*primero*' && res?.length > 0) {
|
|
352
|
+
const firstVal = config.campoValor === '*objeto*' ? res[0] : res[0][config.campoValor || campo.campo];
|
|
353
|
+
this.actualizarEnFormArray(campo.campo, firstVal);
|
|
354
|
+
paramsRef.forEach((p, i) => {
|
|
355
|
+
if (i > idxLevel && p[campo.campo] === '')
|
|
356
|
+
p[campo.campo] = firstVal;
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
if (campo.autocomplete) {
|
|
360
|
+
this.filtrados[campo.campo] = res;
|
|
361
|
+
}
|
|
362
|
+
if (campo.change) {
|
|
363
|
+
this.cambiarSeleccionNuevo(campo);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
getFiltroResultante() {
|
|
368
|
+
const rawForm = this.frmGroupSeleccionado.getRawValue();
|
|
369
|
+
const datosFiltro = { opcion: this.tabActual() };
|
|
370
|
+
const datosFiltroConLabel = [];
|
|
371
|
+
const resumenItems = [];
|
|
372
|
+
const campos = this.dataOpcionesNuevo()[this.tabActual()]?.campos || [];
|
|
373
|
+
const procesarMetadatos = (campo) => {
|
|
374
|
+
const meta = { campo: campo.campo, label: campo.label || '', value: null };
|
|
375
|
+
if (campo.dateRange) {
|
|
376
|
+
const [fIni, fFin] = campo.dateRange.campo;
|
|
377
|
+
datosFiltro[fIni] = rawForm[fIni] ? moment(rawForm[fIni]).format('YYYYMMDD') : '';
|
|
378
|
+
datosFiltro[fFin] = rawForm[fFin] ? moment(rawForm[fFin]).format('YYYYMMDD') : '';
|
|
379
|
+
if (rawForm[fIni] && rawForm[fFin]) {
|
|
380
|
+
meta.value = `${moment(rawForm[fIni]).format('DD/MM/YYYY')} - ${moment(rawForm[fFin]).format('DD/MM/YYYY')}`;
|
|
381
|
+
resumenItems.push(`${meta.label}: ${meta.value}`);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
else if (campo.control === 'date') {
|
|
385
|
+
const val = rawForm[campo.campo];
|
|
386
|
+
datosFiltro[campo.campo] = val ? moment(val).format('YYYYMMDD') : '';
|
|
387
|
+
meta.value = val ? moment(val).format('DD/MM/YYYY') : '';
|
|
388
|
+
if (meta.value)
|
|
389
|
+
resumenItems.push(`${meta.label}: ${meta.value}`);
|
|
390
|
+
}
|
|
391
|
+
else if (campo.control === 'checkbox') {
|
|
392
|
+
datosFiltro[campo.campo] = rawForm[campo.campo];
|
|
393
|
+
meta.value = rawForm[campo.campo];
|
|
394
|
+
if (meta.value)
|
|
395
|
+
resumenItems.push(`${meta.label}`);
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
const val = rawForm[campo.campo];
|
|
399
|
+
datosFiltro[campo.campo] = val;
|
|
400
|
+
meta.value = val;
|
|
401
|
+
if (campo.select || campo.autocomplete) {
|
|
402
|
+
const config = (campo.select || campo.autocomplete);
|
|
403
|
+
const list = this.dataServidorSuscripcion[config.data]?.getValue() || [];
|
|
404
|
+
const item = config.campoValor === '*objeto*' ? val : dataEnLista(list, config.campoValor || campo.campo, val);
|
|
405
|
+
if (item) {
|
|
406
|
+
meta.list = list;
|
|
407
|
+
meta.valueObject = item;
|
|
408
|
+
meta.valueString = this.campoTextEval(campo, item);
|
|
409
|
+
resumenItems.push(`${meta.label}: ${meta.valueString}`);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
else if (val !== null && val !== undefined && val !== '') {
|
|
413
|
+
resumenItems.push(`${meta.label}: ${val}`);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
datosFiltroConLabel.push(meta);
|
|
417
|
+
};
|
|
418
|
+
campos.forEach(c => {
|
|
419
|
+
if (c.controlAgrupado) {
|
|
420
|
+
c.controlAgrupado.forEach(sub => procesarMetadatos(sub));
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
procesarMetadatos(c);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
const labelResumen = resumenItems.join(' | ');
|
|
427
|
+
return { datosFiltro, datosFiltroConLabel, labelResumen };
|
|
428
|
+
}
|
|
429
|
+
mostrarValorEnBusqueda = mostrarValorEnBusqueda;
|
|
430
|
+
campoValorEval(campoFiltro, itemSelect) {
|
|
431
|
+
if (campoFiltro.select || campoFiltro.autocomplete) {
|
|
432
|
+
const selectOrAutocomplete = campoFiltro.select ? campoFiltro.select : campoFiltro.autocomplete;
|
|
433
|
+
if (selectOrAutocomplete?.campoValor === '*objeto*') {
|
|
434
|
+
return itemSelect;
|
|
435
|
+
}
|
|
436
|
+
if (campoFiltro.campo === '*objeto*') {
|
|
437
|
+
return itemSelect;
|
|
438
|
+
}
|
|
439
|
+
if (selectOrAutocomplete && itemSelect[selectOrAutocomplete.campoValor] !== undefined) {
|
|
440
|
+
return itemSelect[selectOrAutocomplete.campoValor];
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return itemSelect[campoFiltro.campo];
|
|
444
|
+
}
|
|
445
|
+
campoTextEval(campoFiltro, itemSelect) {
|
|
446
|
+
if (campoFiltro.select || campoFiltro.autocomplete) {
|
|
447
|
+
const selectOrAutocomplete = (campoFiltro.select || campoFiltro.autocomplete);
|
|
448
|
+
if (selectOrAutocomplete.optionText) {
|
|
449
|
+
return selectOrAutocomplete.optionText(itemSelect);
|
|
450
|
+
}
|
|
451
|
+
if (selectOrAutocomplete.camposText) {
|
|
452
|
+
return selectOrAutocomplete.camposText.map(c => itemSelect[c]).join(' ');
|
|
453
|
+
}
|
|
454
|
+
return itemSelect[campoFiltro.campo];
|
|
455
|
+
}
|
|
456
|
+
return '';
|
|
457
|
+
}
|
|
458
|
+
concatenarCadenasArray(array, objData) {
|
|
459
|
+
if (typeof array === 'string') {
|
|
460
|
+
return objData[array];
|
|
461
|
+
}
|
|
462
|
+
const nTxtArray = [];
|
|
463
|
+
array.forEach(campo => {
|
|
464
|
+
if (campo.charAt(0) === '*') {
|
|
465
|
+
nTxtArray.push(campo.replace('*', ''));
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
nTxtArray.push(objData[campo]);
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
return nTxtArray.join(' ');
|
|
472
|
+
}
|
|
473
|
+
filtrarData() {
|
|
474
|
+
if (this.frmGroupSeleccionado.invalid) {
|
|
475
|
+
const errors = getFormValidationErrors(this.frmGroupSeleccionado);
|
|
476
|
+
const labels = errors.map(e => {
|
|
477
|
+
const found = this.dataOpcionesNuevo()[this.tabActual()].campos.find(c => c.campo === e.control);
|
|
478
|
+
return found?.label || e.control;
|
|
479
|
+
});
|
|
480
|
+
this.toastr.error(`Campos requeridos:<br>${labels.join(', ')}`, undefined, { enableHtml: true });
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this.actualizarEstadoService();
|
|
484
|
+
const res = this.getFiltroResultante();
|
|
485
|
+
// Soporte temporal a usos actuales
|
|
486
|
+
this.resultados.emit(res.datosFiltro);
|
|
487
|
+
// Nueva mejora 2 (Emisión completa)
|
|
488
|
+
this.buscar.emit(res);
|
|
489
|
+
}
|
|
490
|
+
actualizarEnFormArray(name, value, extra) {
|
|
491
|
+
this.opcionesTabs.controls.forEach((control) => {
|
|
492
|
+
const fc = control.get(name);
|
|
493
|
+
if (fc) {
|
|
494
|
+
if (value !== undefined)
|
|
495
|
+
fc.setValue(value, { emitEvent: false });
|
|
496
|
+
if (extra?.disabled === true)
|
|
497
|
+
fc.disable();
|
|
498
|
+
if (extra?.disabled === false)
|
|
499
|
+
fc.enable();
|
|
500
|
+
fc.updateValueAndValidity();
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
accionPosteriorCambioAutocomplete(controlData, valControl) {
|
|
505
|
+
const list = this.dataServidorSuscripcion[controlData.autocomplete?.data]?.getValue() || [];
|
|
506
|
+
this.filtrados[controlData.campo] = list.filter((algo) => {
|
|
507
|
+
let nTextVerif = this.concatenarCadenasArray(controlData.autocomplete?.camposText, algo);
|
|
508
|
+
if (controlData.autocomplete?.searchFields) {
|
|
509
|
+
const nTextVerifExtra = this.concatenarCadenasArray(controlData.autocomplete.searchFields, algo);
|
|
510
|
+
nTextVerif = nTextVerif.concat(nTextVerifExtra);
|
|
511
|
+
}
|
|
512
|
+
const textBuscar = valControl && typeof valControl === 'string' ? valControl.toLowerCase() : null;
|
|
513
|
+
if (nTextVerif) {
|
|
514
|
+
return nTextVerif.toLowerCase().includes(textBuscar) ? algo : null;
|
|
515
|
+
}
|
|
516
|
+
return null;
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
cambiarNuevo(campo, val) {
|
|
520
|
+
if (campo.autocomplete) {
|
|
521
|
+
const valControl = this.frmGroupSeleccionado.get(campo.campo + this.sufixTemporal)?.value;
|
|
522
|
+
if (!valControl) {
|
|
523
|
+
this.filtrados[campo.campo] = this.dataServidorSuscripcion[campo.autocomplete.data]?.getValue() || [];
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
const config = campo.autocomplete;
|
|
527
|
+
if (config.campotxtBuscar && val && val.length > (config.campotxtBuscarLength || 3)) {
|
|
528
|
+
const reqQuery = config.data;
|
|
529
|
+
let reqData = {};
|
|
530
|
+
if (campo.reqParams?.fields) {
|
|
531
|
+
campo.reqParams.fields.forEach(f => {
|
|
532
|
+
const ctrl = this.buscarControl(f);
|
|
533
|
+
reqData[ctrl?.aliasCampoEnviar || f] = this.frmGroupSeleccionado.get(f)?.value;
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
reqData[config.campotxtBuscar || campo.campo] = val;
|
|
537
|
+
if (campo.reqParams?.params)
|
|
538
|
+
Object.assign(reqData, campo.reqParams.params);
|
|
539
|
+
this.inputParaEnviarAutocomplete.next({ reqQuery, reqData, controlData: campo });
|
|
540
|
+
}
|
|
541
|
+
else {
|
|
542
|
+
this.accionPosteriorCambioAutocomplete(campo, valControl);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
cambiarSeleccionNuevo(campo, event) {
|
|
548
|
+
const val = event?.option?.value ?? event?.value ?? (event?.target ? event.target.value : event);
|
|
549
|
+
if (val !== undefined) {
|
|
550
|
+
this.actualizarEnFormArray(campo.campo, val);
|
|
551
|
+
if (campo.autocomplete) {
|
|
552
|
+
const config = campo.autocomplete;
|
|
553
|
+
const list = this.dataServidorSuscripcion[config.data]?.getValue() || [];
|
|
554
|
+
const item = config.campoValor === '*objeto*' ? val : dataEnLista(list, config.campoValor || campo.campo, val);
|
|
555
|
+
if (item) {
|
|
556
|
+
const text = this.campoTextEval(campo, item);
|
|
557
|
+
this.actualizarEnFormArray(campo.campo + this.sufixTemporal, text);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
const groupedMatch = this.dataOpcionesNuevo()[this.tabActual()].campos
|
|
561
|
+
.filter(c => c.controlAgrupado)
|
|
562
|
+
.find(c => c.controlAgrupado?.some(sub => sub.campo === campo.campo));
|
|
563
|
+
if (groupedMatch)
|
|
564
|
+
this.frmGroupSeleccionado.get(groupedMatch.campo)?.setValue(val);
|
|
565
|
+
}
|
|
566
|
+
if (campo.change?.filterFields) {
|
|
567
|
+
campo.change.filterFields.forEach(target => {
|
|
568
|
+
const targetMeta = this.buscarControl(target);
|
|
569
|
+
if (targetMeta) {
|
|
570
|
+
const params = this.generarParams(targetMeta, campo);
|
|
571
|
+
this.actualizarEnFormArray(target, null);
|
|
572
|
+
this.actualizarEnFormArray(target + this.sufixTemporal, null);
|
|
573
|
+
this.dataServidorSuscripcion[target]?.next(null);
|
|
574
|
+
const config = (targetMeta.select || targetMeta.autocomplete);
|
|
575
|
+
if (config?.data) {
|
|
576
|
+
this.queryService?.cargar(this, [config.data], params, false, this.prefijoConsulta()).then(d => {
|
|
577
|
+
if (d) {
|
|
578
|
+
const res = d[config.data];
|
|
579
|
+
this.actualizarEnFormArray(target, targetMeta.value || null);
|
|
580
|
+
this.actualizarEnFormArray(target + this.sufixTemporal, targetMeta.value || null);
|
|
581
|
+
if (!this.dataServidorSuscripcion[config.data]) {
|
|
582
|
+
this.dataServidorSuscripcion[config.data] = new BehaviorSubject(null);
|
|
583
|
+
}
|
|
584
|
+
this.dataServidorSuscripcion[config.data].next(res);
|
|
585
|
+
this.filtrados[target] = res;
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
else if (campo.change?.filter) {
|
|
593
|
+
setTimeout(() => this.filtrarData(), 1);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
buscarControl(campo) {
|
|
597
|
+
const rootCampos = this.dataOpcionesNuevo()[this.tabActual()].campos;
|
|
598
|
+
let found = rootCampos.find(c => c.campo === campo);
|
|
599
|
+
if (!found) {
|
|
600
|
+
found = rootCampos.filter(c => c.controlAgrupado).flatMap(c => c.controlAgrupado).find(c => c.campo === campo);
|
|
601
|
+
}
|
|
602
|
+
return found;
|
|
603
|
+
}
|
|
604
|
+
generarParams(meta, trigger) {
|
|
605
|
+
const params = {};
|
|
606
|
+
if (meta.reqParams?.fields) {
|
|
607
|
+
meta.reqParams.fields.forEach(f => {
|
|
608
|
+
const ctrl = this.buscarControl(f);
|
|
609
|
+
params[ctrl?.aliasCampoEnviar || f] = this.frmGroupSeleccionado.get(f)?.value;
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
params[meta.aliasCampoEnviar || trigger.campo || meta.campo] = this.frmGroupSeleccionado.get(trigger.campo || meta.campo)?.value;
|
|
614
|
+
}
|
|
615
|
+
if (meta.reqParams?.params)
|
|
616
|
+
Object.assign(params, meta.reqParams.params);
|
|
617
|
+
return params;
|
|
618
|
+
}
|
|
619
|
+
limpiarAutocomplete(campo, event) {
|
|
620
|
+
this.actualizarEnFormArray(campo.campo, '');
|
|
621
|
+
this.actualizarEnFormArray(campo.campo + this.sufixTemporal, '');
|
|
622
|
+
this.cambiarSeleccionNuevo(campo, { option: { value: '' } });
|
|
623
|
+
event.preventDefault();
|
|
624
|
+
}
|
|
625
|
+
ngOnDestroy() {
|
|
626
|
+
this.destroy$.next();
|
|
627
|
+
this.destroy$.complete();
|
|
628
|
+
}
|
|
629
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FiltroBusquedaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
630
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FiltroBusquedaComponent, isStandalone: true, selector: "jvs-filtro-busqueda", inputs: { opciones: { classPropertyName: "opciones", publicName: "opciones", isSignal: true, isRequired: false, transformFunction: null }, nombreColeccionInput: { classPropertyName: "nombreColeccionInput", publicName: "nombreColeccion", isSignal: true, isRequired: false, transformFunction: null }, prefijoConsulta: { classPropertyName: "prefijoConsulta", publicName: "prefijoConsulta", isSignal: true, isRequired: false, transformFunction: null }, busquedaAutomatica: { classPropertyName: "busquedaAutomatica", publicName: "busquedaAutomatica", isSignal: true, isRequired: false, transformFunction: null }, opciones$: { classPropertyName: "opciones$", publicName: "opciones$", isSignal: true, isRequired: false, transformFunction: null }, modificarOpciones$: { classPropertyName: "modificarOpciones$", publicName: "modificarOpciones$", isSignal: true, isRequired: false, transformFunction: null }, defaultTab: { classPropertyName: "defaultTab", publicName: "defaultTab", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dataFiltro: "dataFiltro", resultados: "resultados", buscar: "buscar", cargaCompleta: "cargaCompleta" }, host: { classAttribute: "jvsFiltroBusqueda" }, ngImport: i0, template: "@if (isCargaCompleta()) {\n <div class=\"filtroBusqueda w-full\">\n <div class=\"border-none p-0 flex flex-col\">\n\n @if (dataOpcionesNuevo().length === 1) {\n <div class=\"flex-1 flex items-end max-sm:flex-col flex-wrap gap-2\">\n <ng-container [ngTemplateOutlet]=\"verOpcionesT\"></ng-container>\n </div>\n } @else if (dataOpcionesNuevo().length > 1) {\n <div class=\"flex-1 flex flex-col flex-wrap gap-2 border\">\n <mat-tab-group\n [selectedIndex]=\"tabActual()\"\n (selectedIndexChange)=\"getControlRaiz('opcion').setValue($event)\"\n class=\"flex-1 flex flex-wrap\"\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n mat-align-tabs=\"start\"\n >\n @for (item of dataOpcionesNuevo(); track $index) {\n <mat-tab [aria-label]=\"(tabActual() === $index) ? 'primary' : ''\">\n <ng-template mat-tab-label>\n @if (tabActual() === $index) {\n <mat-icon class=\"icon-xs\" svgIcon=\"roundVerified\"></mat-icon>\n }\n {{ item.label }}\n </ng-template>\n\n <div class=\"mx-2 mt-0 pt-0 flex flex-col items-end sm:flex-row flex-wrap gap-2\">\n <ng-container [ngTemplateOutlet]=\"verOpcionesT\"></ng-container>\n </div>\n </mat-tab>\n }\n </mat-tab-group>\n </div>\n }\n </div>\n </div>\n}\n\n<ng-template #verOpcionesT>\n @for (campo of dataOpcionesNuevo()[tabActual()]?.campos; track campo.campo) {\n <ng-container [ngTemplateOutletContext]=\"{controlData: campo}\" [ngTemplateOutlet]=\"controlesFormularioNuevo\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"botonFiltrar\"></ng-container>\n</ng-template>\n\n<ng-template #botonFiltrar>\n <button (click)=\"filtrarData()\"\n class=\"flex items-center justify-center bg-primary text-primary-contrast font-bold uppercase text-xs px-2 py-1 rounded shadow-md hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150\"\n matRipple type=\"button\"\n [disabled]=\"!isCargaCompleta()\"\n >\n <mat-icon class=\"icon-xs\" svgIcon=\"roundFilterAlt\"></mat-icon> \n <span>Filtrar</span>\n </button>\n</ng-template>\n\n<ng-template #controlesFormularioNuevo let-controlData=\"controlData\">\n @switch (controlData.control) {\n @case ('controlAgrupado') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputControlAgrupado, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('select') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputSelect, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('autocomplete') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputAutocomplete, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('date') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputDate, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('date_range') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputDateRange, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('checkbox') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputCheckBox, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @default {\n @if (controlData.control === 'text' || controlData.control === 'number') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputTextNumber, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n }\n }\n</ng-template>\n\n<ng-template #contenedorInput let-template=\"template\" let-controlData=\"controlData\">\n <fieldset [class.flex-auto]=\"!controlData.cssClass\" [class]=\"controlData.cssClass\" class=\"appearance-none contenedorCampo relative\">\n <legend>\n <label [for]=\"controlData.campo\">{{ controlData.label }}@if(controlData.required){<span class=\"text-red-700 font-bold\"> *</span>}</label>\n </legend>\n <ng-container [ngTemplateOutletContext]=\"{controlData: controlData}\" [ngTemplateOutlet]=\"template\"></ng-container>\n </fieldset>\n</ng-template>\n\n<ng-template #inputSelect let-controlData=\"controlData\">\n <select [formControl]=\"getControl(controlData.campo)\"\n (change)=\"cambiarSeleccionNuevo(controlData, $event);\"\n [class]=\"controlData.select?.cssClass?.class\"\n [id]=\"controlData.campo\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n @if (controlData.select?.textoCuandoNulo) {\n <option value=\"\">{{ controlData.select?.textoCuandoNulo }}</option>\n }\n @for (itemSelect of dataServidorSuscripcion[controlData.select?.data!] | async; track $index) {\n <option [class]=\"controlData.select?.cssClass?.option\" [value]=\"campoValorEval(controlData, itemSelect)\">\n {{ campoTextEval(controlData, itemSelect) }}\n </option>\n }\n </select>\n</ng-template>\n\n<ng-template #inputControlAgrupado let-controlData=\"controlData\">\n <div class=\"flex items-center campos-container\">\n @for (sub of controlData.controlAgrupado; track sub.campo) {\n @switch (sub.control) {\n @case ('select') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputSelect\"></ng-container>\n }\n @case ('autocomplete') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputAutocomplete\"></ng-container>\n }\n @case ('date') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputDate\"></ng-container>\n }\n @case ('date_range') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputDateRange\"></ng-container>\n }\n @case ('checkbox') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputCheckBox\"></ng-container>\n }\n @default {\n @if (sub.control === 'text' || sub.control === 'number') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputTextNumber\"></ng-container>\n }\n }\n }\n }\n </div>\n</ng-template>\n\n<ng-template #inputAutocomplete let-controlData=\"controlData\">\n <div class=\"flex items-center formcontrol-container\">\n <input [formControl]=\"getControl(controlData.campo + sufixTemporal)\"\n (input)=\"cambiarNuevo(controlData, $any($event.target).value)\"\n [matAutocomplete]=\"auto\"\n autocomplete=\"off\"\n [id]=\"controlData.campo\"\n placeholder=\"{{ controlData.autocomplete?.textoCuandoNulo ?? controlData.label }}\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n <mat-autocomplete #auto=\"matAutocomplete\"\n (optionSelected)=\"cambiarSeleccionNuevo(controlData, $event)\"\n [panelWidth]=\"'auto'\"\n [displayWith]=\"getAutocompleteLabel.bind(this, controlData)\"\n >\n @for (itemSelect of filtrados[controlData.campo]; track $index) {\n <mat-option [class]=\"controlData.autocomplete?.cssClass?.option\" [value]=\"campoValorEval(controlData, itemSelect)\">\n @if (controlData.autocomplete?.optionInnerHtml) {\n <div [innerHTML]=\"controlData.autocomplete?.optionInnerHtml!(itemSelect)\"></div>\n } @else {\n {{ campoTextEval(controlData, itemSelect) }}\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n <div class=\"flex items-center justify-start\">\n <button (click)=\"limpiarAutocomplete(controlData, $event)\" class=\"boton-circular-gris\"\n matRipple\n type=\"button\"\n >\n <mat-icon [svgIcon]=\"(getControl(controlData.campo).value ? 'roundCancel' : 'roundSearch')\" class=\"icon-2xs\"></mat-icon>\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #inputTextNumber let-controlData=\"controlData\">\n <input (keyup.enter)=\"controlData.keyUpEnter ? filtrarData() : null\"\n [formControl]=\"getControl(controlData.campo)\"\n [type]=\"controlData.control\"\n autocomplete=\"off\"\n [id]=\"controlData.campo\"\n placeholder=\"{{ controlData.label }}\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n</ng-template>\n\n<ng-template #inputDate let-controlData=\"controlData\">\n <div class=\"flex items-center date-container\">\n <input (keyup.enter)=\"controlData.keyUpEnter ? filtrarData() : null\"\n [formControl]=\"getControl(controlData.campo)\"\n (dateChange)=\"cambiarSeleccionNuevo(controlData, $event)\"\n [matDatepicker]=\"i\"\n autocomplete=\"off\"\n [id]=\"controlData.campo\"\n placeholder=\"{{ controlData.label }}\"\n type=\"text\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n <mat-datepicker-toggle [for]=\"i\" class=\"icon-xs\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #i></mat-datepicker>\n </div>\n</ng-template>\n\n<ng-template #inputDateRange let-controlData=\"controlData\">\n <div class=\"flex items-center daterange-container\">\n <mat-date-range-input [rangePicker]=\"i\">\n <input [formControl]=\"getControl(controlData.dateRange?.campo![0])\" matStartDate placeholder=\"Desde\">\n <input [formControl]=\"getControl(controlData.dateRange?.campo![1])\" matEndDate placeholder=\"Hasta\">\n </mat-date-range-input>\n <mat-datepicker-toggle [for]=\"i\" class=\"icon-xs\"></mat-datepicker-toggle>\n <mat-date-range-picker #i></mat-date-range-picker>\n </div>\n</ng-template>\n\n<ng-template #inputCheckBox let-controlData=\"controlData\">\n <input [formControl]=\"getControl(controlData.campo)\"\n [id]=\"controlData.campo\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n type=\"checkbox\"\n (change)=\"cambiarSeleccionNuevo(controlData, $event)\"\n >\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.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: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i3.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: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i4.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i8.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i8.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i8.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: TextFieldModule }] });
|
|
631
|
+
}
|
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FiltroBusquedaComponent, decorators: [{
|
|
633
|
+
type: Component,
|
|
634
|
+
args: [{ selector: 'jvs-filtro-busqueda', standalone: true, imports: [
|
|
635
|
+
CommonModule,
|
|
636
|
+
FormsModule,
|
|
637
|
+
ReactiveFormsModule,
|
|
638
|
+
MatAutocompleteModule,
|
|
639
|
+
MatCheckboxModule,
|
|
640
|
+
MatDatepickerModule,
|
|
641
|
+
MatFormFieldModule,
|
|
642
|
+
MatIconModule,
|
|
643
|
+
MatInputModule,
|
|
644
|
+
MatOptionModule,
|
|
645
|
+
MatRadioModule,
|
|
646
|
+
MatRippleModule,
|
|
647
|
+
MatSelectModule,
|
|
648
|
+
MatTabsModule,
|
|
649
|
+
TextFieldModule,
|
|
650
|
+
], host: {
|
|
651
|
+
class: 'jvsFiltroBusqueda',
|
|
652
|
+
}, template: "@if (isCargaCompleta()) {\n <div class=\"filtroBusqueda w-full\">\n <div class=\"border-none p-0 flex flex-col\">\n\n @if (dataOpcionesNuevo().length === 1) {\n <div class=\"flex-1 flex items-end max-sm:flex-col flex-wrap gap-2\">\n <ng-container [ngTemplateOutlet]=\"verOpcionesT\"></ng-container>\n </div>\n } @else if (dataOpcionesNuevo().length > 1) {\n <div class=\"flex-1 flex flex-col flex-wrap gap-2 border\">\n <mat-tab-group\n [selectedIndex]=\"tabActual()\"\n (selectedIndexChange)=\"getControlRaiz('opcion').setValue($event)\"\n class=\"flex-1 flex flex-wrap\"\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n mat-align-tabs=\"start\"\n >\n @for (item of dataOpcionesNuevo(); track $index) {\n <mat-tab [aria-label]=\"(tabActual() === $index) ? 'primary' : ''\">\n <ng-template mat-tab-label>\n @if (tabActual() === $index) {\n <mat-icon class=\"icon-xs\" svgIcon=\"roundVerified\"></mat-icon>\n }\n {{ item.label }}\n </ng-template>\n\n <div class=\"mx-2 mt-0 pt-0 flex flex-col items-end sm:flex-row flex-wrap gap-2\">\n <ng-container [ngTemplateOutlet]=\"verOpcionesT\"></ng-container>\n </div>\n </mat-tab>\n }\n </mat-tab-group>\n </div>\n }\n </div>\n </div>\n}\n\n<ng-template #verOpcionesT>\n @for (campo of dataOpcionesNuevo()[tabActual()]?.campos; track campo.campo) {\n <ng-container [ngTemplateOutletContext]=\"{controlData: campo}\" [ngTemplateOutlet]=\"controlesFormularioNuevo\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"botonFiltrar\"></ng-container>\n</ng-template>\n\n<ng-template #botonFiltrar>\n <button (click)=\"filtrarData()\"\n class=\"flex items-center justify-center bg-primary text-primary-contrast font-bold uppercase text-xs px-2 py-1 rounded shadow-md hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150\"\n matRipple type=\"button\"\n [disabled]=\"!isCargaCompleta()\"\n >\n <mat-icon class=\"icon-xs\" svgIcon=\"roundFilterAlt\"></mat-icon> \n <span>Filtrar</span>\n </button>\n</ng-template>\n\n<ng-template #controlesFormularioNuevo let-controlData=\"controlData\">\n @switch (controlData.control) {\n @case ('controlAgrupado') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputControlAgrupado, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('select') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputSelect, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('autocomplete') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputAutocomplete, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('date') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputDate, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('date_range') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputDateRange, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @case ('checkbox') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputCheckBox, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n @default {\n @if (controlData.control === 'text' || controlData.control === 'number') {\n <ng-container [ngTemplateOutletContext]=\"{template: inputTextNumber, controlData: controlData}\" [ngTemplateOutlet]=\"contenedorInput\"></ng-container>\n }\n }\n }\n</ng-template>\n\n<ng-template #contenedorInput let-template=\"template\" let-controlData=\"controlData\">\n <fieldset [class.flex-auto]=\"!controlData.cssClass\" [class]=\"controlData.cssClass\" class=\"appearance-none contenedorCampo relative\">\n <legend>\n <label [for]=\"controlData.campo\">{{ controlData.label }}@if(controlData.required){<span class=\"text-red-700 font-bold\"> *</span>}</label>\n </legend>\n <ng-container [ngTemplateOutletContext]=\"{controlData: controlData}\" [ngTemplateOutlet]=\"template\"></ng-container>\n </fieldset>\n</ng-template>\n\n<ng-template #inputSelect let-controlData=\"controlData\">\n <select [formControl]=\"getControl(controlData.campo)\"\n (change)=\"cambiarSeleccionNuevo(controlData, $event);\"\n [class]=\"controlData.select?.cssClass?.class\"\n [id]=\"controlData.campo\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n @if (controlData.select?.textoCuandoNulo) {\n <option value=\"\">{{ controlData.select?.textoCuandoNulo }}</option>\n }\n @for (itemSelect of dataServidorSuscripcion[controlData.select?.data!] | async; track $index) {\n <option [class]=\"controlData.select?.cssClass?.option\" [value]=\"campoValorEval(controlData, itemSelect)\">\n {{ campoTextEval(controlData, itemSelect) }}\n </option>\n }\n </select>\n</ng-template>\n\n<ng-template #inputControlAgrupado let-controlData=\"controlData\">\n <div class=\"flex items-center campos-container\">\n @for (sub of controlData.controlAgrupado; track sub.campo) {\n @switch (sub.control) {\n @case ('select') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputSelect\"></ng-container>\n }\n @case ('autocomplete') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputAutocomplete\"></ng-container>\n }\n @case ('date') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputDate\"></ng-container>\n }\n @case ('date_range') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputDateRange\"></ng-container>\n }\n @case ('checkbox') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputCheckBox\"></ng-container>\n }\n @default {\n @if (sub.control === 'text' || sub.control === 'number') {\n <ng-container [ngTemplateOutletContext]=\"{controlData: sub}\" [ngTemplateOutlet]=\"inputTextNumber\"></ng-container>\n }\n }\n }\n }\n </div>\n</ng-template>\n\n<ng-template #inputAutocomplete let-controlData=\"controlData\">\n <div class=\"flex items-center formcontrol-container\">\n <input [formControl]=\"getControl(controlData.campo + sufixTemporal)\"\n (input)=\"cambiarNuevo(controlData, $any($event.target).value)\"\n [matAutocomplete]=\"auto\"\n autocomplete=\"off\"\n [id]=\"controlData.campo\"\n placeholder=\"{{ controlData.autocomplete?.textoCuandoNulo ?? controlData.label }}\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n <mat-autocomplete #auto=\"matAutocomplete\"\n (optionSelected)=\"cambiarSeleccionNuevo(controlData, $event)\"\n [panelWidth]=\"'auto'\"\n [displayWith]=\"getAutocompleteLabel.bind(this, controlData)\"\n >\n @for (itemSelect of filtrados[controlData.campo]; track $index) {\n <mat-option [class]=\"controlData.autocomplete?.cssClass?.option\" [value]=\"campoValorEval(controlData, itemSelect)\">\n @if (controlData.autocomplete?.optionInnerHtml) {\n <div [innerHTML]=\"controlData.autocomplete?.optionInnerHtml!(itemSelect)\"></div>\n } @else {\n {{ campoTextEval(controlData, itemSelect) }}\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n <div class=\"flex items-center justify-start\">\n <button (click)=\"limpiarAutocomplete(controlData, $event)\" class=\"boton-circular-gris\"\n matRipple\n type=\"button\"\n >\n <mat-icon [svgIcon]=\"(getControl(controlData.campo).value ? 'roundCancel' : 'roundSearch')\" class=\"icon-2xs\"></mat-icon>\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #inputTextNumber let-controlData=\"controlData\">\n <input (keyup.enter)=\"controlData.keyUpEnter ? filtrarData() : null\"\n [formControl]=\"getControl(controlData.campo)\"\n [type]=\"controlData.control\"\n autocomplete=\"off\"\n [id]=\"controlData.campo\"\n placeholder=\"{{ controlData.label }}\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n</ng-template>\n\n<ng-template #inputDate let-controlData=\"controlData\">\n <div class=\"flex items-center date-container\">\n <input (keyup.enter)=\"controlData.keyUpEnter ? filtrarData() : null\"\n [formControl]=\"getControl(controlData.campo)\"\n (dateChange)=\"cambiarSeleccionNuevo(controlData, $event)\"\n [matDatepicker]=\"i\"\n autocomplete=\"off\"\n [id]=\"controlData.campo\"\n placeholder=\"{{ controlData.label }}\"\n type=\"text\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n >\n <mat-datepicker-toggle [for]=\"i\" class=\"icon-xs\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #i></mat-datepicker>\n </div>\n</ng-template>\n\n<ng-template #inputDateRange let-controlData=\"controlData\">\n <div class=\"flex items-center daterange-container\">\n <mat-date-range-input [rangePicker]=\"i\">\n <input [formControl]=\"getControl(controlData.dateRange?.campo![0])\" matStartDate placeholder=\"Desde\">\n <input [formControl]=\"getControl(controlData.dateRange?.campo![1])\" matEndDate placeholder=\"Hasta\">\n </mat-date-range-input>\n <mat-datepicker-toggle [for]=\"i\" class=\"icon-xs\"></mat-datepicker-toggle>\n <mat-date-range-picker #i></mat-date-range-picker>\n </div>\n</ng-template>\n\n<ng-template #inputCheckBox let-controlData=\"controlData\">\n <input [formControl]=\"getControl(controlData.campo)\"\n [id]=\"controlData.campo\"\n [required]=\"controlData.required\"\n [class.border-b-red-700]=\"getControl(controlData.campo).invalid\"\n type=\"checkbox\"\n (change)=\"cambiarSeleccionNuevo(controlData, $event)\"\n >\n</ng-template>\n" }]
|
|
653
|
+
}], ctorParameters: () => [] });
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Generated bundle index. Do not edit.
|
|
657
|
+
*/
|
|
658
|
+
|
|
659
|
+
export { FiltroBusquedaComponent, FiltroBusquedaService, QUERY_SERVICE_TOKEN };
|
|
660
|
+
//# sourceMappingURL=jvsoft-components-filtro-busqueda.mjs.map
|