ngx-dsxlibrary 1.0.60 → 1.0.62

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/index.d.ts CHANGED
@@ -2,8 +2,6 @@ import * as i3 from '@angular/forms';
2
2
  import { AbstractControl, FormGroup, FormBuilder, ValidatorFn, ValidationErrors } from '@angular/forms';
3
3
  import * as i0 from '@angular/core';
4
4
  import { OnInit, ElementRef, InjectionToken, PipeTransform, Provider } from '@angular/core';
5
- import { SweetAlertIcon, SweetAlertResult } from 'sweetalert2';
6
- import { Observable } from 'rxjs';
7
5
  import { HttpInterceptorFn } from '@angular/common/http';
8
6
  import * as i2 from '@angular/common';
9
7
  import * as i1 from 'primeng/accordion';
@@ -37,8 +35,10 @@ import * as i28 from 'primeng/textarea';
37
35
  import * as i29 from 'primeng/toast';
38
36
  import * as i30 from 'primeng/togglebutton';
39
37
  import * as i31 from 'primeng/tooltip';
38
+ import { SweetAlertIcon, SweetAlertResult } from 'sweetalert2';
40
39
  import { JwtHelperService } from '@auth0/angular-jwt';
41
40
  import { CookieService } from 'ngx-cookie-service';
41
+ import { Observable } from 'rxjs';
42
42
 
43
43
  declare class AppMessageErrorComponent {
44
44
  control: AbstractControl | null;
@@ -86,257 +86,9 @@ declare class LoadingComponent {
86
86
  static ɵcmp: i0.ɵɵComponentDeclaration<LoadingComponent, "app-loading", never, {}, {}, never, never, true, never>;
87
87
  }
88
88
 
89
- interface ResponseHttpModel {
90
- isSuccess: boolean;
91
- statusCode: number;
92
- title: string;
93
- statusMessage: string;
94
- isAdmin: boolean;
95
- }
96
-
97
- /**
98
- * Configuración personalizable para las alertas visuales
99
- *
100
- * @property icono - Nombre del archivo de imagen ubicado en 'assets/dsxResource/'.
101
- * Ejemplo: 'success-icon.png'. Por defecto usa 'icon/check02.png'.
102
- *
103
- * @property icon - Tipo de icono SweetAlert2 incorporado. Valores posibles:
104
- * 'success' | 'error' | 'warning' | 'info' | 'question'.
105
- * Por defecto: 'success'.
106
- *
107
- * @property showConfirmButton - Determina si se muestra el botón de confirmación.
108
- * Cuando es true, desactiva el cierre automático.
109
- * Por defecto: false.
110
- *
111
- * @property confirmButtonText - Texto personalizado para el botón de confirmación.
112
- * Por defecto: 'Ok'.
113
- *
114
- * @property timer - Tiempo en milisegundos para el cierre automático de la alerta.
115
- * Se ignora si showConfirmButton es true.
116
- * Por defecto: 2000 (2 segundos).
117
- *
118
- * @property imageWidth - Ancho en píxeles para la imagen personalizada.
119
- * Por defecto: 125.
120
- *
121
- * @property imageHeight - Alto en píxeles para la imagen personalizada.
122
- * Por defecto: 125.
123
- *
124
- * @property showImage - Controla si se muestra la imagen personalizada.
125
- * Cuando es false, solo se muestra el icono de SweetAlert2.
126
- * Por defecto: true.
127
- *
128
- * @example
129
- * // Ejemplo de configuración básica
130
- * const options: AlertOptions = {
131
- * icono: 'custom-icon.png',
132
- * icon: 'warning',
133
- * timer: 3000
134
- * };
135
- *
136
- * @example
137
- * // Ejemplo de alerta con botón de confirmación
138
- * const confirmOptions: AlertOptions = {
139
- * showConfirmButton: true,
140
- * confirmButtonText: 'Aceptar',
141
- * showImage: false
142
- * };
143
- */
144
- interface AlertOptions {
145
- icono?: string;
146
- icon?: SweetAlertIcon;
147
- showConfirmButton?: boolean;
148
- confirmButtonText?: string;
149
- timer?: number;
150
- imageWidth?: number;
151
- imageHeight?: number;
152
- showImage?: boolean;
153
- }
154
- declare class AlertaService {
155
- private toastrService;
156
- /**
157
- * @param {number} toastrType - 1. Success 2. Info 3. Warning 4. Error
158
- * @param {string} toastrTitle - Titulo de la alerta
159
- * @param {string} toastrMessage - Mensaje de la alerta
160
- * @param {number} toastrAlign - Alineación de la alerta, por defecto 1. OPCIONES: 0. top-left 1. top-center 2. top-right 3. bottom-left 4. bottom-center 5. bottom-right
161
- * @param {number} toastrTimer - Tiempo de la alerta default 3000
162
- * @returns - Retonar una alerta toastr
163
- * */
164
- toastrAlerts(toastrType: number, toastrTitle: string, toastrMessage: string, toastrAlign?: number, toastrTimer?: number): void;
165
- private preloadImage;
166
- alertConfirm(title: string, text: string, icono: string): Promise<boolean>;
167
- alertaHtml(titleAlert: string, message: string, icono?: string, timer?: number): Promise<void>;
168
- /**
169
- * Muestra una alerta visual personalizada usando SweetAlert2 con múltiples opciones de configuración
170
- *
171
- * @param titleAlert Título principal de la alerta (requerido)
172
- * @param messageHtml Mensaje en formato HTML (requerido)
173
- * @param options Opciones configurables de la alerta (opcional)
174
- *
175
- * @returns Promise<SweetAlertResult> que se resuelve cuando el usuario interactúa con la alerta
176
- * o cuando se cierra automáticamente. Puedes usar .then() para manejar la respuesta.
177
- *
178
- * @example
179
- * // Alerta básica con icono de éxito y cierre automático
180
- * alertaHtmlSuccess('Operación exitosa', 'Los datos se guardaron correctamente');
181
- *
182
- * @example
183
- * // Alerta de error con imagen personalizada
184
- * alertaHtmlSuccess('Error crítico', 'No se pudo conectar al servidor', {
185
- * icono: 'error-icon.png',
186
- * icon: 'error',
187
- * timer: 5000
188
- * });
189
- *
190
- * @example
191
- * // Alerta de confirmación con botón
192
- * alertaHtmlSuccess('Confirmar acción', '¿Está seguro de eliminar este registro?', {
193
- * showConfirmButton: true,
194
- * confirmButtonText: 'Sí, eliminar',
195
- * icon: 'warning',
196
- * showImage: false
197
- * }).then((result) => {
198
- * if (result.isConfirmed) {
199
- * // Lógica cuando el usuario confirma
200
- * }
201
- * });
202
- */
203
- alertaHtmlSuccess(titleAlert: string, messageHtml: string, options?: AlertOptions): Promise<SweetAlertResult>;
204
- private configureTimer;
205
- toastrHttpResponse(response: ResponseHttpModel): void;
206
- static ɵfac: i0.ɵɵFactoryDeclaration<AlertaService, never>;
207
- static ɵprov: i0.ɵɵInjectableDeclaration<AlertaService>;
208
- }
209
-
210
- declare const INITIAL_PARAMETERS_FOR_TYPE: readonly ["pCreate", "pRead", "pUpdate", "pDelete"];
211
- interface ParameterValue {
212
- value: number;
213
- }
214
- interface ParameterSecurity {
215
- parameterName: string;
216
- parameterValues: ParameterValue[];
217
- }
218
- interface SeguridadITParameter {
219
- sistemaId: number;
220
- sistema: string;
221
- parameterBase: string | null;
222
- parameterSecurity: ParameterSecurity[];
223
- }
224
- interface MyParameterValues {
225
- parameterName: string;
226
- values: (string | number | boolean)[];
227
- }
228
- type ParameterName = (typeof INITIAL_PARAMETERS_FOR_TYPE)[number];
229
-
230
- declare class ParameterValuesService {
231
- /** Parámetros iniciales inyectados mediante INITIAL_PARAMETERS */
232
- private initialParameters;
233
- /** Servicio que contiene el método getParameterSecurity() */
234
- private apiService;
235
- /** Señal que contiene los parámetros cargados */
236
- private _dataParameter;
237
- /** Flag que indica si ya se cargaron los parámetros desde la API */
238
- private _loaded;
239
- /** ===================== GETTERS/SETTERS ===================== */
240
- /**
241
- * Devuelve los parámetros actuales como un array de solo lectura.
242
- */
243
- get dataParameter(): Readonly<MyParameterValues[]>;
244
- /**
245
- * Setter privado para actualizar los parámetros.
246
- * Solo puede ser usado dentro del servicio para mantener la integridad de los datos.
247
- * @param values Array de parámetros a almacenar
248
- */
249
- private setDataParameter;
250
- /** ===================== MÉTODOS PRINCIPALES ===================== */
251
- /**
252
- * Carga los parámetros desde la API.
253
- * Si ya se cargaron y force=false, devuelve la copia en memoria.
254
- * @param force Indica si se debe forzar la recarga desde la API (default: false)
255
- * @returns Observable que emite los parámetros cargados como MyParameterValues[]
256
- */
257
- loadParameters(force?: boolean): Observable<MyParameterValues[]>;
258
- /**
259
- * Fuerza la recarga de los parámetros desde la API.
260
- * @returns Observable que emite los parámetros actualizados
261
- */
262
- refreshParameters(): Observable<MyParameterValues[]>;
263
- /** ===================== MÉTODOS PRIVADOS ===================== */
264
- /**
265
- * Valida que los parámetros devueltos por la API coincidan con los iniciales.
266
- * Muestra errores o advertencias en consola si existen diferencias.
267
- * @param apiParameters Parámetros recibidos desde la API
268
- */
269
- private validateParameters;
270
- /**
271
- * Transforma un array de ParameterSecurity en MyParameterValues
272
- * @param apiParameters Parámetros recibidos desde la API
273
- * @returns Array de MyParameterValues
274
- */
275
- private mapToMyParameterValues;
276
- /** ===================== HELPERS SEGUROS ===================== */
277
- /**
278
- * Obtiene un valor específico de un parámetro.
279
- * Devuelve `defaultValue` si no existe o el índice es inválido.
280
- * @param parameterName Nombre del parámetro
281
- * @param index Índice del valor dentro del array (default: 0)
282
- * @param defaultValue Valor por defecto si no existe
283
- * @returns Valor del parámetro o defaultValue
284
- */
285
- getValue<T = any>(parameterName: ParameterName, index?: number, defaultValue?: T | null): T;
286
- /**
287
- * Compara un valor específico con un valor esperado.
288
- * @param parameterName Nombre del parámetro
289
- * @param expectedValue Valor esperado
290
- * @param index Índice del valor dentro del array (default: 0)
291
- * @returns true si coincide, false en caso contrario
292
- */
293
- isParameterValue<T = any>(parameterName: ParameterName, expectedValue: T, index?: number): boolean;
294
- /**
295
- * Verifica si un parámetro tiene al menos un valor.
296
- * @param parameterName Nombre del parámetro
297
- * @returns true si tiene al menos un valor, false si no tiene
298
- */
299
- hasAnyValue(parameterName: ParameterName): boolean;
300
- /**
301
- * Devuelve todos los valores de un parámetro.
302
- * @param parameterName Nombre del parámetro
303
- * @returns Array de valores
304
- */
305
- getAllValues<T = any>(parameterName: ParameterName): T[];
306
- static ɵfac: i0.ɵɵFactoryDeclaration<ParameterValuesService, never>;
307
- static ɵprov: i0.ɵɵInjectableDeclaration<ParameterValuesService>;
308
- }
309
-
310
- interface ModelToken {
311
- token: string;
312
- tokenRefresh: string;
313
- refreshTokenExpiry: Date;
314
- }
315
-
316
- declare class SecurityService {
317
- private http;
318
- private environment;
319
- private urlApi;
320
- /**
321
- * Método para obtener un nuevo token de acceso utilizando un refresh token.
322
- * @param refreshToken El refresh token que se utilizará para obtener un nuevo token de acceso.
323
- * @returns Un Observable que emite un objeto de tipo ModelToken.
324
- */
325
- tokenRefresh(refreshToken: string): Observable<ModelToken>;
326
- /**
327
- * Método para obtener los parámetros de seguridad.
328
- * @param invalidCacheParam Indica si se debe invalidar la caché (opcional, por defecto es false).
329
- * @returns Un Observable que emite un objeto de tipo SeguridadITParameter.
330
- */
331
- getParameterSecurity(invalidCacheParam?: boolean): Observable<SeguridadITParameter>;
332
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurityService, never>;
333
- static ɵprov: i0.ɵɵInjectableDeclaration<SecurityService>;
334
- }
335
-
336
89
  declare class NavbarDsxComponent implements OnInit {
337
- _securityService: SecurityService;
338
- _parameterSecurityService: ParameterValuesService;
339
- _alertaService: AlertaService;
90
+ private _parameterSecurityService;
91
+ private _alertaService;
340
92
  logoWidth: i0.InputSignal<string>;
341
93
  appVersion: i0.InputSignal<string>;
342
94
  urlLogo: i0.InputSignal<string>;
@@ -406,7 +158,25 @@ interface EnvironmentConfig {
406
158
  }
407
159
  declare const ENVIRONMENT: InjectionToken<EnvironmentConfig>;
408
160
 
409
- declare const INITIAL_PARAMETERS: InjectionToken<MyParameterValues[]>;
161
+ interface ParameterValue {
162
+ value: number;
163
+ }
164
+ interface ParameterSecurity {
165
+ parameterName: string;
166
+ parameterValues: ParameterValue[];
167
+ }
168
+ interface SeguridadITParameter {
169
+ sistemaId: number;
170
+ sistema: string;
171
+ parameterBase: string | null;
172
+ parameterSecurity: ParameterSecurity[];
173
+ }
174
+ interface MyParameterValues<T extends string = string> {
175
+ parameterName: T;
176
+ values: (string | number | boolean)[];
177
+ }
178
+
179
+ declare const INITIAL_PARAMETERS: InjectionToken<MyParameterValues<string>[]>;
410
180
 
411
181
  declare const httpAuthorizeInterceptor: HttpInterceptorFn;
412
182
 
@@ -463,6 +233,14 @@ type FieldConfig<T> = {
463
233
  };
464
234
  };
465
235
 
236
+ interface ResponseHttpModel {
237
+ isSuccess: boolean;
238
+ statusCode: number;
239
+ title: string;
240
+ statusMessage: string;
241
+ isAdmin: boolean;
242
+ }
243
+
466
244
  declare class DsxAddToolsModule {
467
245
  static ɵfac: i0.ɵɵFactoryDeclaration<DsxAddToolsModule, never>;
468
246
  static ɵmod: i0.ɵɵNgModuleDeclaration<DsxAddToolsModule, never, [typeof JsonValuesDebujComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof JsonValuesDebujComponent, typeof i3.ReactiveFormsModule]>;
@@ -496,6 +274,125 @@ declare class TruncatePipe implements PipeTransform {
496
274
  static ɵpipe: i0.ɵɵPipeDeclaration<TruncatePipe, "truncate", true>;
497
275
  }
498
276
 
277
+ /**
278
+ * Configuración personalizable para las alertas visuales
279
+ *
280
+ * @property icono - Nombre del archivo de imagen ubicado en 'assets/dsxResource/'.
281
+ * Ejemplo: 'success-icon.png'. Por defecto usa 'icon/check02.png'.
282
+ *
283
+ * @property icon - Tipo de icono SweetAlert2 incorporado. Valores posibles:
284
+ * 'success' | 'error' | 'warning' | 'info' | 'question'.
285
+ * Por defecto: 'success'.
286
+ *
287
+ * @property showConfirmButton - Determina si se muestra el botón de confirmación.
288
+ * Cuando es true, desactiva el cierre automático.
289
+ * Por defecto: false.
290
+ *
291
+ * @property confirmButtonText - Texto personalizado para el botón de confirmación.
292
+ * Por defecto: 'Ok'.
293
+ *
294
+ * @property timer - Tiempo en milisegundos para el cierre automático de la alerta.
295
+ * Se ignora si showConfirmButton es true.
296
+ * Por defecto: 2000 (2 segundos).
297
+ *
298
+ * @property imageWidth - Ancho en píxeles para la imagen personalizada.
299
+ * Por defecto: 125.
300
+ *
301
+ * @property imageHeight - Alto en píxeles para la imagen personalizada.
302
+ * Por defecto: 125.
303
+ *
304
+ * @property showImage - Controla si se muestra la imagen personalizada.
305
+ * Cuando es false, solo se muestra el icono de SweetAlert2.
306
+ * Por defecto: true.
307
+ *
308
+ * @example
309
+ * // Ejemplo de configuración básica
310
+ * const options: AlertOptions = {
311
+ * icono: 'custom-icon.png',
312
+ * icon: 'warning',
313
+ * timer: 3000
314
+ * };
315
+ *
316
+ * @example
317
+ * // Ejemplo de alerta con botón de confirmación
318
+ * const confirmOptions: AlertOptions = {
319
+ * showConfirmButton: true,
320
+ * confirmButtonText: 'Aceptar',
321
+ * showImage: false
322
+ * };
323
+ */
324
+ interface AlertOptions {
325
+ icono?: string;
326
+ icon?: SweetAlertIcon;
327
+ showConfirmButton?: boolean;
328
+ confirmButtonText?: string;
329
+ timer?: number;
330
+ imageWidth?: number;
331
+ imageHeight?: number;
332
+ showImage?: boolean;
333
+ }
334
+ declare class AlertaService {
335
+ private toastrService;
336
+ /**
337
+ * @param {number} toastrType - 1. Success 2. Info 3. Warning 4. Error
338
+ * @param {string} toastrTitle - Titulo de la alerta
339
+ * @param {string} toastrMessage - Mensaje de la alerta
340
+ * @param {number} toastrAlign - Alineación de la alerta, por defecto 1. OPCIONES: 0. top-left 1. top-center 2. top-right 3. bottom-left 4. bottom-center 5. bottom-right
341
+ * @param {number} toastrTimer - Tiempo de la alerta default 3000
342
+ * @returns - Retonar una alerta toastr
343
+ * */
344
+ toastrAlerts(toastrType: number, toastrTitle: string, toastrMessage: string, toastrAlign?: number, toastrTimer?: number): void;
345
+ private preloadImage;
346
+ alertConfirm(title: string, text: string, icono: string): Promise<boolean>;
347
+ alertaHtml(titleAlert: string, message: string, icono?: string, timer?: number): Promise<void>;
348
+ /**
349
+ * Muestra una alerta visual personalizada usando SweetAlert2 con múltiples opciones de configuración
350
+ *
351
+ * @param titleAlert Título principal de la alerta (requerido)
352
+ * @param messageHtml Mensaje en formato HTML (requerido)
353
+ * @param options Opciones configurables de la alerta (opcional)
354
+ *
355
+ * @returns Promise<SweetAlertResult> que se resuelve cuando el usuario interactúa con la alerta
356
+ * o cuando se cierra automáticamente. Puedes usar .then() para manejar la respuesta.
357
+ *
358
+ * @example
359
+ * // Alerta básica con icono de éxito y cierre automático
360
+ * alertaHtmlSuccess('Operación exitosa', 'Los datos se guardaron correctamente');
361
+ *
362
+ * @example
363
+ * // Alerta de error con imagen personalizada
364
+ * alertaHtmlSuccess('Error crítico', 'No se pudo conectar al servidor', {
365
+ * icono: 'error-icon.png',
366
+ * icon: 'error',
367
+ * timer: 5000
368
+ * });
369
+ *
370
+ * @example
371
+ * // Alerta de confirmación con botón
372
+ * alertaHtmlSuccess('Confirmar acción', '¿Está seguro de eliminar este registro?', {
373
+ * showConfirmButton: true,
374
+ * confirmButtonText: 'Sí, eliminar',
375
+ * icon: 'warning',
376
+ * showImage: false
377
+ * }).then((result) => {
378
+ * if (result.isConfirmed) {
379
+ * // Lógica cuando el usuario confirma
380
+ * }
381
+ * });
382
+ */
383
+ alertaHtmlSuccess(titleAlert: string, messageHtml: string, options?: AlertOptions): Promise<SweetAlertResult>;
384
+ private configureTimer;
385
+ toastrHttpResponse(response: ResponseHttpModel): void;
386
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertaService, never>;
387
+ static ɵprov: i0.ɵɵInjectableDeclaration<AlertaService>;
388
+ }
389
+
390
+ interface ModelToken {
391
+ token: string;
392
+ tokenRefresh: string;
393
+ refreshTokenExpiry: Date;
394
+ }
395
+
499
396
  declare class AuthorizeService {
500
397
  private environment;
501
398
  _cookieService: CookieService;
@@ -570,6 +467,150 @@ declare class EndpointService<T> {
570
467
  static ɵprov: i0.ɵɵInjectableDeclaration<EndpointService<any>>;
571
468
  }
572
469
 
470
+ declare class ParameterValuesService<T extends string = string> {
471
+ /**
472
+ * Parámetros iniciales inyectados mediante INITIAL_PARAMETERS.
473
+ * Se usan para validar y mapear los parámetros recibidos de la API.
474
+ */
475
+ private initialParameters;
476
+ /**
477
+ * Cache interno para optimizar la comparación de valores de parámetros.
478
+ * La clave es una combinación de nombre e índice, el valor es el resultado de la consulta.
479
+ */
480
+ private parameterCache;
481
+ private alertedParams;
482
+ /**
483
+ * Servicio que contiene el método getParameterSecurity() para obtener los parámetros desde la API.
484
+ */
485
+ private apiService;
486
+ /**
487
+ * Señal reactiva que contiene los parámetros cargados y permite actualizaciones automáticas.
488
+ */
489
+ private _dataParameter;
490
+ /**
491
+ * Flag que indica si ya se cargaron los parámetros desde la API.
492
+ */
493
+ private _loaded;
494
+ /**
495
+ * Inicializa los datos de parámetros usando los valores inyectados.
496
+ * @returns Array de parámetros iniciales tipados
497
+ */
498
+ private initializeData;
499
+ /**
500
+ * Crea una instancia de MyParameterValues tipada y segura.
501
+ * @param parameterName Nombre del parámetro
502
+ * @param values Valores asociados al parámetro
503
+ * @returns Objeto MyParameterValues
504
+ */
505
+ private createMyParameterValue;
506
+ /**
507
+ * Devuelve los parámetros actuales como un array de solo lectura.
508
+ */
509
+ get dataParameter(): Readonly<MyParameterValues<T>[]>;
510
+ /**
511
+ * Setter privado para actualizar los parámetros.
512
+ * Solo puede ser usado dentro del servicio para mantener la integridad de los datos.
513
+ * @param values Array de parámetros a almacenar
514
+ */
515
+ private setDataParameter;
516
+ /**
517
+ * Carga los parámetros desde la API.
518
+ * Si ya se cargaron y force=false, devuelve la copia en memoria.
519
+ * @param force Indica si se debe forzar la recarga desde la API (default: false)
520
+ * @returns Observable que emite los parámetros cargados como MyParameterValues[]
521
+ */
522
+ loadParameters(force?: boolean): Observable<MyParameterValues<T>[]>;
523
+ /**
524
+ * Fuerza la recarga de los parámetros desde la API.
525
+ * @returns Observable que emite los parámetros actualizados
526
+ */
527
+ refreshParameters(): Observable<MyParameterValues<T>[]>;
528
+ /**
529
+ * Crea una copia segura y mutable de los parámetros actuales.
530
+ * @returns Array de parámetros
531
+ */
532
+ private createSafeCopy;
533
+ /**
534
+ * Mapea los parámetros recibidos de la API a objetos tipados y seguros.
535
+ * @param apiParameters Parámetros recibidos desde la API
536
+ * @returns Array de MyParameterValues
537
+ */
538
+ private mapToMyParameterValues;
539
+ /**
540
+ * Convierte un parámetro de la API a un objeto tipado, validando el nombre.
541
+ * @param param Parámetro recibido de la API
542
+ * @returns Objeto MyParameterValues o null si no es válido
543
+ */
544
+ private convertToTypedParameter;
545
+ /**
546
+ * Verifica si un nombre de parámetro es válido según los parámetros iniciales.
547
+ * @param name Nombre a validar
548
+ * @returns true si es válido
549
+ */
550
+ private isValidParameterName;
551
+ /**
552
+ * Valida que los parámetros devueltos por la API coincidan con los iniciales.
553
+ * Muestra errores o advertencias en consola si existen diferencias.
554
+ * @param apiParameters Parámetros recibidos desde la API
555
+ */
556
+ private validateParameters;
557
+ /**
558
+ * Obtiene un valor específico de un parámetro.
559
+ * Devuelve `defaultValue` si no existe o el índice es inválido.
560
+ * @param parameterName Nombre del parámetro
561
+ * @param index Índice del valor dentro del array (default: 0)
562
+ * @param defaultValue Valor por defecto si no existe
563
+ * @returns Valor del parámetro o defaultValue
564
+ */
565
+ getValue<U = any>(parameterName: T, index?: number, defaultValue?: U | null): U;
566
+ /**
567
+ * Compara un valor específico con un valor esperado, usando cache para optimizar llamadas repetidas.
568
+ * @param parameterName Nombre del parámetro
569
+ * @param expectedValue Valor esperado
570
+ * @param index Índice del valor dentro del array (default: 0)
571
+ * @returns true si coincide, false en caso contrario
572
+ */
573
+ isParameterValue<U = any>(parameterName: T, expectedValue: U, index?: number): boolean;
574
+ /**
575
+ * Limpia el cache interno de comparaciones de parámetros.
576
+ */
577
+ clearParameterCache(): void;
578
+ /**
579
+ * Verifica si un parámetro tiene al menos un valor.
580
+ * @param parameterName Nombre del parámetro
581
+ * @returns true si tiene al menos un valor, false si no tiene
582
+ */
583
+ hasAnyValue(parameterName: T): boolean;
584
+ /**
585
+ * Devuelve todos los valores de un parámetro.
586
+ * @param parameterName Nombre del parámetro
587
+ * @returns Array de valores
588
+ */
589
+ getAllValues<U = any>(parameterName: T): U[];
590
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParameterValuesService<any>, never>;
591
+ static ɵprov: i0.ɵɵInjectableDeclaration<ParameterValuesService<any>>;
592
+ }
593
+
594
+ declare class SecurityService {
595
+ private http;
596
+ private environment;
597
+ private urlApi;
598
+ /**
599
+ * Método para obtener un nuevo token de acceso utilizando un refresh token.
600
+ * @param refreshToken El refresh token que se utilizará para obtener un nuevo token de acceso.
601
+ * @returns Un Observable que emite un objeto de tipo ModelToken.
602
+ */
603
+ tokenRefresh(refreshToken: string): Observable<ModelToken>;
604
+ /**
605
+ * Método para obtener los parámetros de seguridad.
606
+ * @param invalidCacheParam Indica si se debe invalidar la caché (opcional, por defecto es false).
607
+ * @returns Un Observable que emite un objeto de tipo SeguridadITParameter.
608
+ */
609
+ getParameterSecurity(invalidCacheParam?: boolean): Observable<SeguridadITParameter>;
610
+ static ɵfac: i0.ɵɵFactoryDeclaration<SecurityService, never>;
611
+ static ɵprov: i0.ɵɵInjectableDeclaration<SecurityService>;
612
+ }
613
+
573
614
  declare class UtilityAddService {
574
615
  private _serviceAlerta;
575
616
  private environment;
@@ -767,4 +808,4 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
767
808
  declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
768
809
 
769
810
  export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, DsxAddToolsModule, ENVIRONMENT, EndpointService, INITIAL_PARAMETERS, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SecurityService, SelectAllOnFocusDirective, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, httpAuthorizeInterceptor, nitValidator };
770
- export type { Column, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig, FilterOption, InferCacheKeyType, InferCacheOptions, MyParameterValues, ParameterName, ParameterSecurity, ParameterValue, ResponseHttpModel, SeguridadITParameter, T, TipoFechaConversion, typeModel };
811
+ export type { Column, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig, FilterOption, InferCacheKeyType, InferCacheOptions, MyParameterValues, ParameterSecurity, ParameterValue, ResponseHttpModel, SeguridadITParameter, T, TipoFechaConversion, typeModel };
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-dsxlibrary",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "description": "Libreria para control de código automatizado.",
5
5
  "author": "DevSoftXela",
6
6
  "dependencies": {
@@ -21,14 +21,14 @@
21
21
  "types": "./src/lib/components/index.d.ts",
22
22
  "default": "./fesm2022/ngx-dsxlibrary-src-lib-components.mjs"
23
23
  },
24
- "./src/lib/injections": {
25
- "types": "./src/lib/injections/index.d.ts",
26
- "default": "./fesm2022/ngx-dsxlibrary-src-lib-injections.mjs"
27
- },
28
24
  "./src/lib/directives": {
29
25
  "types": "./src/lib/directives/index.d.ts",
30
26
  "default": "./fesm2022/ngx-dsxlibrary-src-lib-directives.mjs"
31
27
  },
28
+ "./src/lib/injections": {
29
+ "types": "./src/lib/injections/index.d.ts",
30
+ "default": "./fesm2022/ngx-dsxlibrary-src-lib-injections.mjs"
31
+ },
32
32
  "./src/lib/interceptors": {
33
33
  "types": "./src/lib/interceptors/index.d.ts",
34
34
  "default": "./fesm2022/ngx-dsxlibrary-src-lib-interceptors.mjs"
Binary file