ngx-dsxlibrary 1.21.18 → 1.21.20
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.
|
Binary file
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ import * as i35 from 'primeng/textarea';
|
|
|
46
46
|
import * as i36 from 'primeng/toast';
|
|
47
47
|
import * as i37 from 'primeng/togglebutton';
|
|
48
48
|
import * as i38 from 'primeng/tooltip';
|
|
49
|
-
import {
|
|
49
|
+
import { SweetAlertIcon, SweetAlertResult } from 'sweetalert2';
|
|
50
50
|
import { Router } from '@angular/router';
|
|
51
51
|
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
52
52
|
import { CookieService } from 'ngx-cookie-service';
|
|
@@ -197,6 +197,25 @@ declare class SelectAllOnFocusDirective {
|
|
|
197
197
|
|
|
198
198
|
declare const CACHE_KEYS: InjectionToken<Record<string, string>>;
|
|
199
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Valores válidos para el tema de SweetAlert2.
|
|
202
|
+
* Esta constante permite autocompletado y validación en tiempo de compilación.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* // En environment.ts
|
|
207
|
+
* export const environment: EnvironmentConfig = {
|
|
208
|
+
* // ...otros campos
|
|
209
|
+
* sweetAlertTheme: 'dark', // ✅ Autocompletado disponible
|
|
210
|
+
* };
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
declare const SWEET_ALERT_THEMES: readonly ["auto", "light", "dark", "default", "bootstrap-4", "borderless", "bulma", "material-ui", "minimal", "wordpress-admin"];
|
|
214
|
+
/**
|
|
215
|
+
* Tipo literal para los temas válidos de SweetAlert2.
|
|
216
|
+
* Se genera automáticamente desde la constante SWEET_ALERT_THEMES.
|
|
217
|
+
*/
|
|
218
|
+
type SweetAlertThemeType = (typeof SWEET_ALERT_THEMES)[number];
|
|
200
219
|
/**
|
|
201
220
|
* Esquema de configuración del entorno - Fuente única de verdad (Single Source of Truth)
|
|
202
221
|
*
|
|
@@ -252,6 +271,9 @@ declare const ENVIRONMENT_SCHEMA: {
|
|
|
252
271
|
* @property sessionStatus - Nombre de la clave para el estado de sesión
|
|
253
272
|
* @property refreshTokenExpiry - Tiempo de expiración del refresh token (ej: "7d", "24h")
|
|
254
273
|
*
|
|
274
|
+
* **Campos opcionales:**
|
|
275
|
+
* @property sweetAlertTheme - Tema visual global para SweetAlert2 ('auto' | 'light' | 'dark' | 'default' | 'bootstrap-4' | 'borderless' | 'bulma' | 'material-ui' | 'minimal' | 'wordpress-admin')
|
|
276
|
+
*
|
|
255
277
|
* @example
|
|
256
278
|
* ```typescript
|
|
257
279
|
* // En tu archivo environment.ts
|
|
@@ -264,12 +286,26 @@ declare const ENVIRONMENT_SCHEMA: {
|
|
|
264
286
|
* tokenName: 'access_token',
|
|
265
287
|
* tokenNameRF: 'refresh_token',
|
|
266
288
|
* sessionStatus: 'session_status',
|
|
267
|
-
* refreshTokenExpiry: '7d'
|
|
289
|
+
* refreshTokenExpiry: '7d',
|
|
290
|
+
* sweetAlertTheme: 'dark' // ← Tema global para alertas (opcional)
|
|
268
291
|
* };
|
|
269
292
|
* ```
|
|
270
293
|
*/
|
|
271
294
|
type EnvironmentConfig = {
|
|
272
295
|
[K in keyof typeof ENVIRONMENT_SCHEMA]: (typeof ENVIRONMENT_SCHEMA)[K] extends 'string' ? string : (typeof ENVIRONMENT_SCHEMA)[K] extends 'boolean' ? boolean : (typeof ENVIRONMENT_SCHEMA)[K] extends 'number' ? number : never;
|
|
296
|
+
} & {
|
|
297
|
+
/**
|
|
298
|
+
* Tema visual global para las alertas SweetAlert2.
|
|
299
|
+
* Es opcional. Si no se define, se usará el tema por defecto de SweetAlert2.
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* ```typescript
|
|
303
|
+
* sweetAlertTheme: 'dark' // Tema oscuro
|
|
304
|
+
* sweetAlertTheme: 'minimal' // Tema minimalista
|
|
305
|
+
* sweetAlertTheme: 'auto' // Detecta según preferencias del sistema
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
sweetAlertTheme?: SweetAlertThemeType;
|
|
273
309
|
};
|
|
274
310
|
/**
|
|
275
311
|
* Token de inyección de dependencias para la configuración del entorno.
|
|
@@ -722,20 +758,46 @@ interface AlertOptions {
|
|
|
722
758
|
imageWidth?: number;
|
|
723
759
|
imageHeight?: number;
|
|
724
760
|
showImage?: boolean;
|
|
725
|
-
theme?:
|
|
761
|
+
theme?: SweetAlertThemeType;
|
|
726
762
|
}
|
|
727
763
|
declare class AlertaService {
|
|
728
764
|
private toastrService;
|
|
765
|
+
/**
|
|
766
|
+
* Configuración del entorno inyectada (opcional).
|
|
767
|
+
* Se usa para obtener el tema global de SweetAlert2 desde el environment.
|
|
768
|
+
*/
|
|
769
|
+
private environment;
|
|
729
770
|
/**
|
|
730
771
|
* Tema visual por defecto para todas las alertas SweetAlert2.
|
|
731
|
-
*
|
|
772
|
+
* Se inicializa desde el environment si está configurado, o puede establecerse
|
|
773
|
+
* manualmente llamando a setDefaultTheme().
|
|
774
|
+
*
|
|
775
|
+
* **Prioridad de temas:**
|
|
776
|
+
* 1. Tema específico pasado en options de cada alerta
|
|
777
|
+
* 2. Tema establecido con setDefaultTheme()
|
|
778
|
+
* 3. Tema configurado en environment.sweetAlertTheme
|
|
779
|
+
* 4. Tema por defecto de SweetAlert2
|
|
732
780
|
*/
|
|
733
781
|
private defaultTheme;
|
|
782
|
+
constructor();
|
|
734
783
|
/**
|
|
735
784
|
* Permite establecer el theme global para todas las alertas SweetAlert2.
|
|
785
|
+
* Este tema sobrescribe el configurado en el environment.
|
|
786
|
+
*
|
|
736
787
|
* @param theme - Valor de theme válido para SweetAlert2 (por ejemplo: 'dark', 'minimal', etc).
|
|
788
|
+
*
|
|
789
|
+
* @example
|
|
790
|
+
* ```typescript
|
|
791
|
+
* // Cambiar el tema en tiempo de ejecución
|
|
792
|
+
* alertaService.setDefaultTheme('dark');
|
|
793
|
+
* ```
|
|
794
|
+
*/
|
|
795
|
+
setDefaultTheme(theme: SweetAlertThemeType): void;
|
|
796
|
+
/**
|
|
797
|
+
* Obtiene el tema actual configurado para SweetAlert2.
|
|
798
|
+
* @returns El tema actual o undefined si no hay tema configurado.
|
|
737
799
|
*/
|
|
738
|
-
|
|
800
|
+
getDefaultTheme(): SweetAlertThemeType | undefined;
|
|
739
801
|
/**
|
|
740
802
|
* @param {number} toastrType - 1. Success 2. Info 3. Warning 4. Error
|
|
741
803
|
* @param {string} toastrTitle - Titulo de la alerta
|
|
@@ -1492,5 +1554,5 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
|
|
|
1492
1554
|
*/
|
|
1493
1555
|
declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
|
|
1494
1556
|
|
|
1495
|
-
export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, CssV2Component, DsxAddToolsModule, ENVIRONMENT, EndpointService, ErrorHandlerService, INITIAL_PARAMETERS, IconDsxComponent, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SecurityService, SelectAllOnFocusDirective, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, httpAuthorizeInterceptor, nitValidator, provideEnvironment, validateEnvironmentConfig };
|
|
1496
|
-
export type { Certificacion, Column, Complemento, Complementos, DatosEmision, DatosGenerales, Direccion, DocumentoFelResponse, Dte, Emisor, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig, FilterOption, Frase, Frases, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, MyParameterValues, NITResponse, NumeroAutorizacion, ParameterSecurity, ParameterValue, Receptor, ResponseHttpModel, Sat, SeguridadITParameter, ServiceResult, ServiceResultVoid, T, TipoFechaConversion, TotalImpuesto, Totales, typeModel };
|
|
1557
|
+
export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, CssV2Component, DsxAddToolsModule, ENVIRONMENT, EndpointService, ErrorHandlerService, INITIAL_PARAMETERS, IconDsxComponent, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SWEET_ALERT_THEMES, SecurityService, SelectAllOnFocusDirective, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, httpAuthorizeInterceptor, nitValidator, provideEnvironment, validateEnvironmentConfig };
|
|
1558
|
+
export type { Certificacion, Column, Complemento, Complementos, DatosEmision, DatosGenerales, Direccion, DocumentoFelResponse, Dte, Emisor, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig, FilterOption, Frase, Frases, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, MyParameterValues, NITResponse, NumeroAutorizacion, ParameterSecurity, ParameterValue, Receptor, ResponseHttpModel, Sat, SeguridadITParameter, ServiceResult, ServiceResultVoid, SweetAlertThemeType, T, TipoFechaConversion, TotalImpuesto, Totales, typeModel };
|
|
Binary file
|