ngx-dsxlibrary 1.21.17 → 1.21.19

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-dsxlibrary",
3
- "version": "1.21.17",
3
+ "version": "1.21.19",
4
4
  "description": "Libreria para control de código automatizado.",
5
5
  "author": "DevSoftXela",
6
6
  "dependencies": {
@@ -7,6 +7,7 @@ import * as rxjs from 'rxjs';
7
7
  import { Observable } from 'rxjs';
8
8
  import { HttpClient, HttpInterceptorFn, HttpErrorResponse } from '@angular/common/http';
9
9
  import { AnimationOptions } from 'ngx-lottie';
10
+ import { SweetAlertTheme, SweetAlertIcon, SweetAlertResult } from 'sweetalert2';
10
11
  import * as i3 from '@angular/common';
11
12
  import * as i1 from 'primeng/accordion';
12
13
  import * as i2 from 'primeng/autocomplete';
@@ -14,38 +15,38 @@ import * as i3$1 from 'primeng/autofocus';
14
15
  import * as i4$1 from 'primeng/avatargroup';
15
16
  import * as i5 from 'primeng/avatar';
16
17
  import * as i6 from 'primeng/button';
17
- import * as i7 from 'primeng/checkbox';
18
- import * as i8 from 'primeng/datepicker';
19
- import * as i9 from 'primeng/dialog';
20
- import * as i10 from 'primeng/divider';
21
- import * as i11 from 'primeng/drawer';
22
- import * as i12 from 'primeng/fieldset';
23
- import * as i13 from 'primeng/fileupload';
24
- import * as i14 from 'primeng/floatlabel';
25
- import * as i15 from 'primeng/iconfield';
26
- import * as i16 from 'primeng/image';
27
- import * as i17 from 'primeng/inputicon';
28
- import * as i18 from 'primeng/inputmask';
29
- import * as i19 from 'primeng/inputnumber';
30
- import * as i20 from 'primeng/inputtext';
31
- import * as i21 from 'primeng/menubar';
32
- import * as i22 from 'primeng/message';
33
- import * as i23 from 'primeng/multiselect';
34
- import * as i24 from 'primeng/panelmenu';
35
- import * as i25 from 'primeng/password';
36
- import * as i26 from 'primeng/radiobutton';
37
- import * as i27 from 'primeng/ripple';
38
- import * as i28 from 'primeng/select';
39
- import * as i29 from 'primeng/splitbutton';
40
- import * as i30 from 'primeng/stepper';
41
- import * as i31 from 'primeng/table';
42
- import * as i32 from 'primeng/tabs';
43
- import * as i33 from 'primeng/tag';
44
- import * as i34 from 'primeng/textarea';
45
- import * as i35 from 'primeng/toast';
46
- import * as i36 from 'primeng/togglebutton';
47
- import * as i37 from 'primeng/tooltip';
48
- import { SweetAlertTheme, SweetAlertIcon, SweetAlertResult } from 'sweetalert2';
18
+ import * as i7 from 'primeng/card';
19
+ import * as i8 from 'primeng/checkbox';
20
+ import * as i9 from 'primeng/datepicker';
21
+ import * as i10 from 'primeng/dialog';
22
+ import * as i11 from 'primeng/divider';
23
+ import * as i12 from 'primeng/drawer';
24
+ import * as i13 from 'primeng/fieldset';
25
+ import * as i14 from 'primeng/fileupload';
26
+ import * as i15 from 'primeng/floatlabel';
27
+ import * as i16 from 'primeng/iconfield';
28
+ import * as i17 from 'primeng/image';
29
+ import * as i18 from 'primeng/inputicon';
30
+ import * as i19 from 'primeng/inputmask';
31
+ import * as i20 from 'primeng/inputnumber';
32
+ import * as i21 from 'primeng/inputtext';
33
+ import * as i22 from 'primeng/menubar';
34
+ import * as i23 from 'primeng/message';
35
+ import * as i24 from 'primeng/multiselect';
36
+ import * as i25 from 'primeng/panelmenu';
37
+ import * as i26 from 'primeng/password';
38
+ import * as i27 from 'primeng/radiobutton';
39
+ import * as i28 from 'primeng/ripple';
40
+ import * as i29 from 'primeng/select';
41
+ import * as i30 from 'primeng/splitbutton';
42
+ import * as i31 from 'primeng/stepper';
43
+ import * as i32 from 'primeng/table';
44
+ import * as i33 from 'primeng/tabs';
45
+ import * as i34 from 'primeng/tag';
46
+ import * as i35 from 'primeng/textarea';
47
+ import * as i36 from 'primeng/toast';
48
+ import * as i37 from 'primeng/togglebutton';
49
+ import * as i38 from 'primeng/tooltip';
49
50
  import { Router } from '@angular/router';
50
51
  import { JwtHelperService } from '@auth0/angular-jwt';
51
52
  import { CookieService } from 'ngx-cookie-service';
@@ -196,6 +197,25 @@ declare class SelectAllOnFocusDirective {
196
197
 
197
198
  declare const CACHE_KEYS: InjectionToken<Record<string, string>>;
198
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];
199
219
  /**
200
220
  * Esquema de configuración del entorno - Fuente única de verdad (Single Source of Truth)
201
221
  *
@@ -251,6 +271,9 @@ declare const ENVIRONMENT_SCHEMA: {
251
271
  * @property sessionStatus - Nombre de la clave para el estado de sesión
252
272
  * @property refreshTokenExpiry - Tiempo de expiración del refresh token (ej: "7d", "24h")
253
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
+ *
254
277
  * @example
255
278
  * ```typescript
256
279
  * // En tu archivo environment.ts
@@ -263,12 +286,26 @@ declare const ENVIRONMENT_SCHEMA: {
263
286
  * tokenName: 'access_token',
264
287
  * tokenNameRF: 'refresh_token',
265
288
  * sessionStatus: 'session_status',
266
- * refreshTokenExpiry: '7d'
289
+ * refreshTokenExpiry: '7d',
290
+ * sweetAlertTheme: 'dark' // ← Tema global para alertas (opcional)
267
291
  * };
268
292
  * ```
269
293
  */
270
294
  type EnvironmentConfig = {
271
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?: SweetAlertTheme;
272
309
  };
273
310
  /**
274
311
  * Token de inyección de dependencias para la configuración del entorno.
@@ -656,7 +693,7 @@ declare class DsxAddToolsModule {
656
693
 
657
694
  declare class PrimeNgModule {
658
695
  static ɵfac: i0.ɵɵFactoryDeclaration<PrimeNgModule, never>;
659
- static ɵmod: i0.ɵɵNgModuleDeclaration<PrimeNgModule, never, never, [typeof i1.AccordionModule, typeof i2.AutoCompleteModule, typeof i3$1.AutoFocusModule, typeof i4$1.AvatarGroupModule, typeof i5.AvatarModule, typeof i6.ButtonModule, typeof i7.CheckboxModule, typeof i8.DatePickerModule, typeof i9.DialogModule, typeof i10.DividerModule, typeof i11.DrawerModule, typeof i12.FieldsetModule, typeof i13.FileUploadModule, typeof i14.FloatLabelModule, typeof i15.IconFieldModule, typeof i16.ImageModule, typeof i17.InputIconModule, typeof i18.InputMaskModule, typeof i19.InputNumberModule, typeof i20.InputTextModule, typeof i21.MenubarModule, typeof i22.MessageModule, typeof i23.MultiSelectModule, typeof i24.PanelMenuModule, typeof i25.PasswordModule, typeof i26.RadioButtonModule, typeof i27.RippleModule, typeof i28.SelectModule, typeof i29.SplitButtonModule, typeof i30.StepperModule, typeof i31.TableModule, typeof i32.TabsModule, typeof i33.TagModule, typeof i34.TextareaModule, typeof i35.ToastModule, typeof i36.ToggleButtonModule, typeof i37.TooltipModule]>;
696
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PrimeNgModule, never, never, [typeof i1.AccordionModule, typeof i2.AutoCompleteModule, typeof i3$1.AutoFocusModule, typeof i4$1.AvatarGroupModule, typeof i5.AvatarModule, typeof i6.ButtonModule, typeof i7.CardModule, typeof i8.CheckboxModule, typeof i9.DatePickerModule, typeof i10.DialogModule, typeof i11.DividerModule, typeof i12.DrawerModule, typeof i13.FieldsetModule, typeof i14.FileUploadModule, typeof i15.FloatLabelModule, typeof i16.IconFieldModule, typeof i17.ImageModule, typeof i18.InputIconModule, typeof i19.InputMaskModule, typeof i20.InputNumberModule, typeof i21.InputTextModule, typeof i22.MenubarModule, typeof i23.MessageModule, typeof i24.MultiSelectModule, typeof i25.PanelMenuModule, typeof i26.PasswordModule, typeof i27.RadioButtonModule, typeof i28.RippleModule, typeof i29.SelectModule, typeof i30.SplitButtonModule, typeof i31.StepperModule, typeof i32.TableModule, typeof i33.TabsModule, typeof i34.TagModule, typeof i35.TextareaModule, typeof i36.ToastModule, typeof i37.ToggleButtonModule, typeof i38.TooltipModule]>;
660
697
  static ɵinj: i0.ɵɵInjectorDeclaration<PrimeNgModule>;
661
698
  }
662
699
 
@@ -725,16 +762,42 @@ interface AlertOptions {
725
762
  }
726
763
  declare class AlertaService {
727
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;
728
770
  /**
729
771
  * Tema visual por defecto para todas las alertas SweetAlert2.
730
- * Puedes cambiarlo desde tu app llamando a setDefaultTheme().
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
731
780
  */
732
781
  private defaultTheme;
782
+ constructor();
733
783
  /**
734
784
  * Permite establecer el theme global para todas las alertas SweetAlert2.
785
+ * Este tema sobrescribe el configurado en el environment.
786
+ *
735
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
+ * ```
736
794
  */
737
795
  setDefaultTheme(theme: SweetAlertTheme): void;
796
+ /**
797
+ * Obtiene el tema actual configurado para SweetAlert2.
798
+ * @returns El tema actual o undefined si no hay tema configurado.
799
+ */
800
+ getDefaultTheme(): SweetAlertTheme | undefined;
738
801
  /**
739
802
  * @param {number} toastrType - 1. Success 2. Info 3. Warning 4. Error
740
803
  * @param {string} toastrTitle - Titulo de la alerta
@@ -1491,5 +1554,5 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
1491
1554
  */
1492
1555
  declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
1493
1556
 
1494
- 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 };
1495
- 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