ngx-dsxlibrary 2.21.74 → 2.21.76

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.
@@ -8,7 +8,7 @@ import * as rxjs from 'rxjs';
8
8
  import { Observable, Subject } from 'rxjs';
9
9
  import { SweetAlertIcon, SweetAlertTheme, SweetAlertResult } from 'sweetalert2';
10
10
  import { HttpClient, HttpInterceptorFn, HttpParams, HttpHeaders, HttpErrorResponse, HttpResponse } from '@angular/common/http';
11
- import * as i17 from 'primeng/fileupload';
11
+ import * as i18 from 'primeng/fileupload';
12
12
  import { FileUpload } from 'primeng/fileupload';
13
13
  import { AnimationOptions } from 'ngx-lottie';
14
14
  import * as i7 from '@angular/router';
@@ -26,53 +26,54 @@ import * as i6 from 'primeng/badge';
26
26
  import * as i7$1 from 'primeng/button';
27
27
  import * as i8$1 from 'primeng/card';
28
28
  import * as i9 from 'primeng/checkbox';
29
- import * as i10 from 'primeng/contextmenu';
30
- import * as i11 from 'primeng/dataview';
31
- import * as i12 from 'primeng/datepicker';
32
- import * as i13 from 'primeng/dialog';
33
- import * as i14 from 'primeng/divider';
34
- import * as i15 from 'primeng/drawer';
35
- import * as i16 from 'primeng/fieldset';
36
- import * as i18 from 'primeng/floatlabel';
37
- import * as i19 from 'primeng/iconfield';
38
- import * as i20 from 'primeng/image';
39
- import * as i21 from 'primeng/inputicon';
40
- import * as i22 from 'primeng/inputmask';
41
- import * as i23 from 'primeng/inputnumber';
29
+ import * as i10 from 'primeng/chip';
30
+ import * as i11 from 'primeng/contextmenu';
31
+ import * as i12 from 'primeng/dataview';
32
+ import * as i13 from 'primeng/datepicker';
33
+ import * as i14 from 'primeng/dialog';
34
+ import * as i15 from 'primeng/divider';
35
+ import * as i16 from 'primeng/drawer';
36
+ import * as i17 from 'primeng/fieldset';
37
+ import * as i19 from 'primeng/floatlabel';
38
+ import * as i20 from 'primeng/iconfield';
39
+ import * as i21 from 'primeng/image';
40
+ import * as i22 from 'primeng/inputicon';
41
+ import * as i23 from 'primeng/inputmask';
42
+ import * as i24 from 'primeng/inputnumber';
42
43
  import { InputNumber } from 'primeng/inputnumber';
43
- import * as i24 from 'primeng/inputtext';
44
- import * as i25 from 'primeng/keyfilter';
45
- import * as i26 from 'primeng/knob';
46
- import * as i27 from 'primeng/menubar';
47
- import * as i28 from 'primeng/message';
48
- import * as i29 from 'primeng/multiselect';
49
- import * as i30 from 'primeng/organizationchart';
50
- import * as i31 from 'primeng/overlaybadge';
51
- import * as i32 from 'primeng/panelmenu';
52
- import * as i33 from 'primeng/password';
53
- import * as i34 from 'primeng/picklist';
54
- import * as i35 from 'primeng/popover';
55
- import * as i36 from 'primeng/radiobutton';
56
- import * as i37 from 'primeng/rating';
57
- import * as i38 from 'primeng/ripple';
58
- import * as i39 from 'primeng/scroller';
59
- import * as i40 from 'primeng/scrollpanel';
60
- import * as i41 from 'primeng/selectbutton';
61
- import * as i42 from 'primeng/select';
62
- import * as i43 from 'primeng/slider';
63
- import * as i44 from 'primeng/speeddial';
64
- import * as i45 from 'primeng/splitbutton';
65
- import * as i46 from 'primeng/stepper';
66
- import * as i47 from 'primeng/table';
67
- import * as i48 from 'primeng/tabs';
68
- import * as i49 from 'primeng/tag';
69
- import * as i50 from 'primeng/textarea';
70
- import * as i51 from 'primeng/timeline';
71
- import * as i52 from 'primeng/toast';
72
- import * as i53 from 'primeng/togglebutton';
73
- import * as i54 from 'primeng/tooltip';
74
- import * as i55 from 'primeng/tree';
75
- import * as i56 from 'primeng/treetable';
44
+ import * as i25 from 'primeng/inputtext';
45
+ import * as i26 from 'primeng/keyfilter';
46
+ import * as i27 from 'primeng/knob';
47
+ import * as i28 from 'primeng/menubar';
48
+ import * as i29 from 'primeng/message';
49
+ import * as i30 from 'primeng/multiselect';
50
+ import * as i31 from 'primeng/organizationchart';
51
+ import * as i32 from 'primeng/overlaybadge';
52
+ import * as i33 from 'primeng/panelmenu';
53
+ import * as i34 from 'primeng/password';
54
+ import * as i35 from 'primeng/picklist';
55
+ import * as i36 from 'primeng/popover';
56
+ import * as i37 from 'primeng/radiobutton';
57
+ import * as i38 from 'primeng/rating';
58
+ import * as i39 from 'primeng/ripple';
59
+ import * as i40 from 'primeng/scroller';
60
+ import * as i41 from 'primeng/scrollpanel';
61
+ import * as i42 from 'primeng/selectbutton';
62
+ import * as i43 from 'primeng/select';
63
+ import * as i44 from 'primeng/slider';
64
+ import * as i45 from 'primeng/speeddial';
65
+ import * as i46 from 'primeng/splitbutton';
66
+ import * as i47 from 'primeng/stepper';
67
+ import * as i48 from 'primeng/table';
68
+ import * as i49 from 'primeng/tabs';
69
+ import * as i50 from 'primeng/tag';
70
+ import * as i51 from 'primeng/textarea';
71
+ import * as i52 from 'primeng/timeline';
72
+ import * as i53 from 'primeng/toast';
73
+ import * as i54 from 'primeng/togglebutton';
74
+ import * as i55 from 'primeng/tooltip';
75
+ import * as i56 from 'primeng/tree';
76
+ import * as i57 from 'primeng/treetable';
76
77
  import * as ngx_dsxlibrary from 'ngx-dsxlibrary';
77
78
 
78
79
  declare class DsxStatusToggle implements ControlValueAccessor {
@@ -214,14 +215,32 @@ declare class DocxPreviewComponent {
214
215
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DocxPreviewComponent, "app-docx-preview", never, { "visible": { "alias": "visible"; "required": false; }; "blob": { "alias": "blob"; "required": false; "isSignal": true; }; }, { "visibleChange": "visibleChange"; }, never, never, true, never>;
215
216
  }
216
217
 
218
+ type SupportedMimeType = 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
217
219
  declare class PdfPreviewComponent implements OnDestroy {
218
220
  private sanitizer;
219
221
  visible: _angular_core.ModelSignal<boolean>;
220
222
  blob: _angular_core.InputSignal<Blob | null>;
221
223
  private objectUrl;
222
- pdfUrl: SafeResourceUrl | null;
224
+ fileUrl: SafeResourceUrl | null;
225
+ fileType: SupportedMimeType | null;
226
+ fileName: string;
227
+ fileSize: string;
228
+ private rawBlob;
229
+ private readonly mimeTypeMap;
230
+ private readonly supportedTypes;
231
+ private readonly iconMap;
223
232
  constructor(sanitizer: DomSanitizer);
233
+ private isFileSupported;
234
+ private getFileNameFromBlob;
235
+ private formatFileSize;
224
236
  private limpiarUrlAnterior;
237
+ get isPdf(): boolean;
238
+ get isImage(): boolean;
239
+ get fileTypeLabel(): string;
240
+ getFileIcon(): string;
241
+ downloadFile(): void;
242
+ onImageLoad(): void;
243
+ onImageError(): void;
225
244
  ngOnDestroy(): void;
226
245
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfPreviewComponent, never>;
227
246
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfPreviewComponent, "app-pdf-preview", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "blob": { "alias": "blob"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; }, never, never, true, never>;
@@ -419,22 +438,23 @@ declare class AppMessageHelpComponent implements AfterViewInit, DoCheck, OnDestr
419
438
  * - `import` → Importar datos desde archivo (azul acero)
420
439
  */
421
440
  declare const ACTION_TYPES: {
441
+ readonly cancel: "cancel";
442
+ readonly create: "create";
443
+ readonly details: "details";
444
+ readonly download: "download";
445
+ readonly edit: "edit";
446
+ readonly export: "export";
422
447
  readonly hardDelete: "hardDelete";
423
- readonly softDelete: "softDelete";
424
- readonly return: "return";
425
448
  readonly home: "home";
426
- readonly validate: "validate";
449
+ readonly import: "import";
450
+ readonly refresh: "refresh";
427
451
  readonly restore: "restore";
428
- readonly edit: "edit";
429
- readonly create: "create";
452
+ readonly return: "return";
430
453
  readonly save: "save";
454
+ readonly softDelete: "softDelete";
431
455
  readonly update: "update";
432
- readonly refresh: "refresh";
433
- readonly details: "details";
456
+ readonly validate: "validate";
434
457
  readonly view: "view";
435
- readonly export: "export";
436
- readonly download: "download";
437
- readonly import: "import";
438
458
  };
439
459
  type ActionType = (typeof ACTION_TYPES)[keyof typeof ACTION_TYPES];
440
460
  interface ActionMessageConfig {
@@ -535,7 +555,7 @@ declare class DsxButtonComponent {
535
555
  tooltipOverride: _angular_core.InputSignal<string | undefined>;
536
556
  iconOverride: _angular_core.InputSignal<string | undefined>;
537
557
  primeIconOverride: _angular_core.InputSignal<string | undefined>;
538
- colorOverride: _angular_core.InputSignal<"view" | "success" | "info" | "danger" | "details" | "return" | "restore" | "download" | "import" | "warning" | "brown" | "caution" | "cyan" | "excel" | "magenta" | "neutral" | "olive" | "primary" | "slate" | "upload" | undefined>;
558
+ colorOverride: _angular_core.InputSignal<"view" | "success" | "info" | "danger" | "details" | "download" | "import" | "restore" | "return" | "warning" | "brown" | "caution" | "cyan" | "excel" | "magenta" | "neutral" | "olive" | "primary" | "slate" | "upload" | undefined>;
539
559
  outlinedOverride: _angular_core.InputSignal<boolean | undefined>;
540
560
  showValidateButtonOverride: _angular_core.InputSignal<boolean | undefined>;
541
561
  showRestoreButtonOverride: _angular_core.InputSignal<boolean | undefined>;
@@ -606,6 +626,94 @@ declare class IconDsxComponent {
606
626
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconDsxComponent, "icon-dsx", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "debug": { "alias": "debug"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
607
627
  }
608
628
 
629
+ interface Holiday {
630
+ dateHoliday: Date | string;
631
+ labelHoliday: string;
632
+ }
633
+
634
+ interface CalendarDay {
635
+ date: Date;
636
+ day: number;
637
+ isCurrentMonth: boolean;
638
+ isSunday: boolean;
639
+ isInRange: boolean;
640
+ isStart: boolean;
641
+ isEnd: boolean;
642
+ isHoliday: boolean;
643
+ holidayLabel?: string;
644
+ disabled: boolean;
645
+ rangePosition?: number;
646
+ }
647
+ interface MonthData {
648
+ label: string;
649
+ days: CalendarDay[];
650
+ }
651
+ interface RangeKPI {
652
+ totalDays: number;
653
+ businessDays: number;
654
+ holidays: number;
655
+ sundays: number;
656
+ holidaysList: Holiday[];
657
+ startDate: string;
658
+ endDate: string;
659
+ }
660
+ interface FormattedHoliday {
661
+ date: string;
662
+ label: string;
663
+ }
664
+ declare class DsxCalendarView {
665
+ startDate: _angular_core.ModelSignal<string | Date | null>;
666
+ endDate: _angular_core.ModelSignal<string | Date | null>;
667
+ excludeSundays: _angular_core.ModelSignal<boolean>;
668
+ holidays: _angular_core.InputSignal<Holiday[]>;
669
+ compactMode: _angular_core.InputSignal<boolean>;
670
+ showKPI: _angular_core.InputSignal<boolean>;
671
+ debugMode: _angular_core.InputSignal<boolean>;
672
+ isEdit: _angular_core.InputSignal<boolean>;
673
+ showControls: _angular_core.InputSignal<boolean>;
674
+ rangeChanged: _angular_core.OutputEmitterRef<{
675
+ start: string;
676
+ end: string;
677
+ }>;
678
+ startDateStr: _angular_core.WritableSignal<string>;
679
+ endDateStr: _angular_core.WritableSignal<string>;
680
+ readonly isDevMode: boolean;
681
+ shouldShowControls: _angular_core.Signal<boolean>;
682
+ months: _angular_core.Signal<MonthData[]>;
683
+ formattedHolidays: _angular_core.Signal<FormattedHoliday[]>;
684
+ kpi: _angular_core.Signal<RangeKPI | null>;
685
+ constructor();
686
+ private normalizeDateToString;
687
+ private formatInputDate;
688
+ private emitRangeChange;
689
+ onStartDateChange(event: Event): void;
690
+ onEndDateChange(event: Event): void;
691
+ onToggleSundays(event: Event): void;
692
+ private generateMonth;
693
+ private getDaysBetween;
694
+ private isDateInRange;
695
+ private isSameDay;
696
+ private formatDate;
697
+ /**
698
+ * Verifica si debemos mostrar logs
699
+ * ✅ Usa isDevMode() de Angular - simple y confiable
700
+ */
701
+ private shouldLog;
702
+ /**
703
+ * Log de depuración - Solo visible en desarrollo con debugMode=true
704
+ * 🔥 NUNCA se ejecuta en producción
705
+ */
706
+ private logDebug;
707
+ /**
708
+ * Log de rendimiento - Mide tiempos de ejecución
709
+ * 🔥 NUNCA se ejecuta en producción
710
+ */
711
+ private logPerformance;
712
+ chunk(arr: any[], size: number): any[][];
713
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DsxCalendarView, never>;
714
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DsxCalendarView, "dsx-calendar-view", never, { "startDate": { "alias": "startDate"; "required": false; "isSignal": true; }; "endDate": { "alias": "endDate"; "required": false; "isSignal": true; }; "excludeSundays": { "alias": "excludeSundays"; "required": false; "isSignal": true; }; "holidays": { "alias": "holidays"; "required": false; "isSignal": true; }; "compactMode": { "alias": "compactMode"; "required": false; "isSignal": true; }; "showKPI": { "alias": "showKPI"; "required": false; "isSignal": true; }; "debugMode": { "alias": "debugMode"; "required": false; "isSignal": true; }; "isEdit": { "alias": "isEdit"; "required": false; "isSignal": true; }; "showControls": { "alias": "showControls"; "required": false; "isSignal": true; }; }, { "startDate": "startDateChange"; "endDate": "endDateChange"; "excludeSundays": "excludeSundaysChange"; "rangeChanged": "rangeChanged"; }, never, never, true, never>;
715
+ }
716
+
609
717
  declare class FileComponent implements ControlValueAccessor, Validator, AfterViewInit, OnDestroy {
610
718
  existingFile: _angular_core.InputSignal<File | null>;
611
719
  existingFileName: _angular_core.InputSignal<string | null>;
@@ -688,8 +796,8 @@ declare class JsonValuesDebujComponent implements OnDestroy {
688
796
  readonly shouldShowLogs: _angular_core.Signal<boolean>;
689
797
  constructor();
690
798
  private findFilesInObject;
799
+ private serializeValue;
691
800
  private updateSerializedValue;
692
- private cloneWithFileProcessing;
693
801
  private updateFileInfo;
694
802
  hasFileProperty(): boolean;
695
803
  getFileInfo(): any;
@@ -2152,7 +2260,7 @@ declare class DsxAddToolsModule {
2152
2260
 
2153
2261
  declare class PrimeNgModule {
2154
2262
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PrimeNgModule, never>;
2155
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<PrimeNgModule, never, never, [typeof i1.AccordionModule, typeof i2.AutoCompleteModule, typeof i3.AutoFocusModule, typeof i4.AvatarGroupModule, typeof i5.AvatarModule, typeof i6.BadgeModule, typeof i7$1.ButtonModule, typeof i8$1.CardModule, typeof i9.CheckboxModule, typeof i10.ContextMenuModule, typeof i11.DataViewModule, typeof i12.DatePickerModule, typeof i13.DialogModule, typeof i14.DividerModule, typeof i15.DrawerModule, typeof i16.FieldsetModule, typeof i17.FileUploadModule, typeof i18.FloatLabelModule, typeof i19.IconFieldModule, typeof i20.ImageModule, typeof i21.InputIconModule, typeof i22.InputMaskModule, typeof i23.InputNumberModule, typeof i24.InputTextModule, typeof i25.KeyFilterModule, typeof i26.KnobModule, typeof i27.MenubarModule, typeof i28.MessageModule, typeof i29.MultiSelectModule, typeof i30.OrganizationChartModule, typeof i31.OverlayBadgeModule, typeof i32.PanelMenuModule, typeof i33.PasswordModule, typeof i34.PickListModule, typeof i35.PopoverModule, typeof i36.RadioButtonModule, typeof i37.RatingModule, typeof i38.RippleModule, typeof i39.ScrollerModule, typeof i40.ScrollPanelModule, typeof i41.SelectButtonModule, typeof i42.SelectModule, typeof i43.SliderModule, typeof i44.SpeedDialModule, typeof i45.SplitButtonModule, typeof i46.StepperModule, typeof i47.TableModule, typeof i48.TabsModule, typeof i49.TagModule, typeof i50.TextareaModule, typeof i51.TimelineModule, typeof i52.ToastModule, typeof i53.ToggleButtonModule, typeof i54.TooltipModule, typeof i55.TreeModule, typeof i56.TreeTableModule]>;
2263
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<PrimeNgModule, never, never, [typeof i1.AccordionModule, typeof i2.AutoCompleteModule, typeof i3.AutoFocusModule, typeof i4.AvatarGroupModule, typeof i5.AvatarModule, typeof i6.BadgeModule, typeof i7$1.ButtonModule, typeof i8$1.CardModule, typeof i9.CheckboxModule, typeof i10.ChipModule, typeof i11.ContextMenuModule, typeof i12.DataViewModule, typeof i13.DatePickerModule, typeof i14.DialogModule, typeof i15.DividerModule, typeof i16.DrawerModule, typeof i17.FieldsetModule, typeof i18.FileUploadModule, typeof i19.FloatLabelModule, typeof i20.IconFieldModule, typeof i21.ImageModule, typeof i22.InputIconModule, typeof i23.InputMaskModule, typeof i24.InputNumberModule, typeof i25.InputTextModule, typeof i26.KeyFilterModule, typeof i27.KnobModule, typeof i28.MenubarModule, typeof i29.MessageModule, typeof i30.MultiSelectModule, typeof i31.OrganizationChartModule, typeof i32.OverlayBadgeModule, typeof i33.PanelMenuModule, typeof i34.PasswordModule, typeof i35.PickListModule, typeof i36.PopoverModule, typeof i37.RadioButtonModule, typeof i38.RatingModule, typeof i39.RippleModule, typeof i40.ScrollerModule, typeof i41.ScrollPanelModule, typeof i42.SelectButtonModule, typeof i43.SelectModule, typeof i44.SliderModule, typeof i45.SpeedDialModule, typeof i46.SplitButtonModule, typeof i47.StepperModule, typeof i48.TableModule, typeof i49.TabsModule, typeof i50.TagModule, typeof i51.TextareaModule, typeof i52.TimelineModule, typeof i53.ToastModule, typeof i54.ToggleButtonModule, typeof i55.TooltipModule, typeof i56.TreeModule, typeof i57.TreeTableModule]>;
2156
2264
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<PrimeNgModule>;
2157
2265
  }
2158
2266
 
@@ -3779,6 +3887,14 @@ declare class ParameterValuesService<T extends string = string> {
3779
3887
  interface ReferenceMap {
3780
3888
  [key: string]: any;
3781
3889
  }
3890
+ /**
3891
+ * Tipos de formato de fecha disponibles
3892
+ * @example
3893
+ * 'date' -> "07/04/2026"
3894
+ * 'dateLong' -> "07 de abril de 2026"
3895
+ * 'dateTime' -> "07/04/2026 14:30"
3896
+ */
3897
+ type DateFormat = 'date' | 'dateLong' | 'dateTime';
3782
3898
  /**
3783
3899
  * Configuración de un campo para el preview del formulario
3784
3900
  */
@@ -3787,28 +3903,71 @@ interface FieldConfig {
3787
3903
  key: string;
3788
3904
  /** Etiqueta que se mostrará en la vista */
3789
3905
  label: string;
3790
- /** Función opcional para formatear el valor */
3791
- format?: (value: any) => string;
3906
+ /**
3907
+ * Formato para el valor:
3908
+ * - String: 'date' | 'dateLong' | 'dateTime' (formatos predefinidos)
3909
+ * - Función: (value) => string (formato personalizado)
3910
+ *
3911
+ * @example
3912
+ * // Formato predefinido
3913
+ * format: 'dateLong'
3914
+ *
3915
+ * // Formato personalizado
3916
+ * format: (value) => {
3917
+ * if (!value) return '';
3918
+ * const date = new Date(value);
3919
+ * return date.toLocaleDateString('es-ES', {
3920
+ * weekday: 'long',
3921
+ * day: '2-digit',
3922
+ * month: 'long',
3923
+ * year: 'numeric'
3924
+ * });
3925
+ * }
3926
+ */
3927
+ format?: ((value: any) => string) | DateFormat;
3792
3928
  /**
3793
3929
  * Mapa de referencia para traducir IDs a nombres legibles.
3794
3930
  * Puede ser: Map, Array, objeto literal o función.
3795
- * Ejemplos:
3796
- * - Map: new Map([[1, 'Activo'], [2, 'Inactivo']])
3797
- * - Array: [{id: 1, nombre: 'Activo'}, {id: 2, nombre: 'Inactivo'}]
3798
- * - Objeto: {1: 'Activo', 2: 'Inactivo'}
3799
- * - Función: (id) => obtenerNombre(id)
3931
+ *
3932
+ * @example
3933
+ * // Array de objetos (usa key como ID por defecto)
3934
+ * referenceMap: [{ id: 1, nombre: 'Activo' }, { id: 2, nombre: 'Inactivo' }]
3935
+ *
3936
+ * // Array con propiedades personalizadas
3937
+ * referenceMap: [{ empleadoId: 1, nombreCompleto: 'Juan Pérez' }]
3938
+ * referenceId: 'empleadoId'
3939
+ * referenceLabel: 'nombreCompleto'
3940
+ *
3941
+ * // Función para búsqueda personalizada
3942
+ * referenceMap: (id) => this.empleados.find(emp => emp.id === id)?.nombre
3943
+ *
3944
+ * // Map para búsqueda eficiente
3945
+ * referenceMap: new Map([[1, 'Activo'], [2, 'Inactivo']])
3946
+ *
3947
+ * // Objeto literal
3948
+ * referenceMap: { 1: 'Activo', 2: 'Inactivo' }
3800
3949
  */
3801
3950
  referenceMap?: Map<any, any> | any[] | ReferenceMap | ((id: any) => any);
3802
- /**
3803
- * Propiedad del objeto de referencia que se usará como etiqueta.
3804
- * Por defecto: 'nombre'
3805
- */
3806
- referenceLabel?: string;
3807
3951
  /**
3808
3952
  * Propiedad del objeto de referencia que se usará como ID.
3809
- * Por defecto: 'id'
3953
+ * Si no se especifica, usa el 'key' del campo o 'id' por defecto.
3954
+ * @default 'id'
3955
+ *
3956
+ * @example
3957
+ * // Si tu objeto usa 'empleadoId' en lugar de 'id'
3958
+ * referenceId: 'empleadoId'
3810
3959
  */
3811
3960
  referenceId?: string;
3961
+ /**
3962
+ * Propiedad del objeto de referencia que se usará como etiqueta.
3963
+ * Si no se especifica, usa 'nombre' por defecto.
3964
+ * @default 'nombre'
3965
+ *
3966
+ * @example
3967
+ * // Si tu objeto usa 'nombreCompleto' en lugar de 'nombre'
3968
+ * referenceLabel: 'nombreCompleto'
3969
+ */
3970
+ referenceLabel?: string;
3812
3971
  }
3813
3972
  /**
3814
3973
  * Opciones de configuración para el preview
@@ -3833,13 +3992,14 @@ interface OptionsConfig {
3833
3992
  compact?: boolean;
3834
3993
  /**
3835
3994
  * Si es true, habilita logs de depuración.
3836
- * Solo funciona en entorno de desarrollo.
3837
- * ¡No afecta en producción!
3995
+ * ⚠️ SOLO funciona en entorno de desarrollo.
3996
+ * ¡NUNCA se ejecuta en producción!
3838
3997
  */
3839
3998
  debug?: boolean;
3840
3999
  }
3841
4000
  declare class FormPreviewService {
3842
4001
  private readonly environment;
4002
+ private readonly isDev;
3843
4003
  constructor();
3844
4004
  /**
3845
4005
  * Construye el HTML para el preview de un objeto
@@ -3850,17 +4010,30 @@ declare class FormPreviewService {
3850
4010
  *
3851
4011
  * @example
3852
4012
  * ```typescript
4013
+ * // Ejemplo básico
3853
4014
  * const data = {
3854
- * usuario: {
3855
- * nombre: 'Juan Pérez',
3856
- * email: 'juan@email.com'
3857
- * },
4015
+ * empleadoId: 2,
4016
+ * fechaIngreso: '2026-04-07',
3858
4017
  * estado: 1
3859
4018
  * };
3860
4019
  *
4020
+ * const empleados = [
4021
+ * { id: 1, nombreCompleto: 'Juan Pérez' },
4022
+ * { id: 2, nombreCompleto: 'María García' }
4023
+ * ];
4024
+ *
3861
4025
  * const fields = [
3862
- * { key: 'usuario.nombre', label: 'Nombre' },
3863
- * { key: 'usuario.email', label: 'Email' },
4026
+ * {
4027
+ * key: 'empleadoId',
4028
+ * label: 'Empleado',
4029
+ * referenceMap: empleados,
4030
+ * referenceLabel: 'nombreCompleto'
4031
+ * },
4032
+ * {
4033
+ * key: 'fechaIngreso',
4034
+ * label: 'Fecha de Ingreso',
4035
+ * format: 'dateLong' // "07 de abril de 2026"
4036
+ * },
3864
4037
  * {
3865
4038
  * key: 'estado',
3866
4039
  * label: 'Estado',
@@ -3868,23 +4041,83 @@ declare class FormPreviewService {
3868
4041
  * }
3869
4042
  * ];
3870
4043
  *
3871
- * const html = this.formPreviewService.buildObjectSummaryHtml(data, fields, {
3872
- * title: 'Datos del Usuario',
3873
- * showEmpty: false,
3874
- * compact: true,
3875
- * debug: false
3876
- * });
4044
+ * const html = this.formPreviewService.buildObjectSummaryHtml(
4045
+ * data,
4046
+ * fields,
4047
+ * {
4048
+ * title: 'Datos del Usuario',
4049
+ * showEmpty: false,
4050
+ * compact: true,
4051
+ * debug: true // Solo en desarrollo
4052
+ * }
4053
+ * );
3877
4054
  * ```
3878
4055
  */
3879
4056
  buildObjectSummaryHtml(data: any, fields: FieldConfig[], options?: OptionsConfig): string;
4057
+ /**
4058
+ * Resuelve el valor de referencia
4059
+ * Soporta: arrays, maps, objetos literales y funciones
4060
+ */
3880
4061
  private resolveReferenceValue;
4062
+ /**
4063
+ * Resuelve un valor individual de referencia
4064
+ */
3881
4065
  private resolveSingleReference;
4066
+ /**
4067
+ * Obtiene un valor anidado usando notación punto
4068
+ * @example
4069
+ * getNestedValue({ user: { name: 'Juan' } }, 'user.name') // 'Juan'
4070
+ */
3882
4071
  private getNestedValue;
4072
+ /**
4073
+ * Formatea un valor usando el formato especificado
4074
+ * @param value - Valor a formatear
4075
+ * @param format - Formato a aplicar (string predefinido o función personalizada)
4076
+ * @returns String formateado
4077
+ */
3883
4078
  private formatValue;
4079
+ /**
4080
+ * Formato por defecto para cualquier valor
4081
+ */
4082
+ private formatDefault;
4083
+ /**
4084
+ * 🗓️ FORMATOS DE FECHA DISPONIBLES
4085
+ *
4086
+ * Para agregar un nuevo formato:
4087
+ * 1. Agrega el tipo en DateFormat
4088
+ * 2. Agrega el case en el switch del método formatDate
4089
+ * 3. Define las opciones de Intl.DateTimeFormatOptions
4090
+ *
4091
+ * @example
4092
+ * // Agregar 'dateShort' para mostrar "07-abr-2026"
4093
+ * // 1. type DateFormat = 'date' | 'dateLong' | 'dateTime' | 'dateShort'
4094
+ * // 2. case 'dateShort':
4095
+ * // options.day = '2-digit';
4096
+ * // options.month = 'short';
4097
+ * // options.year = 'numeric';
4098
+ * // break;
4099
+ */
4100
+ private formatDate;
4101
+ /**
4102
+ * Formatea un valor individual (para objetos y arrays)
4103
+ */
3884
4104
  private formatSingleValue;
4105
+ /**
4106
+ * Genera el HTML del preview
4107
+ */
3885
4108
  private generateHtml;
4109
+ /**
4110
+ * 🔍 Debug: Muestra información detallada para depuración
4111
+ * ⚠️ SOLO se ejecuta en entorno de desarrollo
4112
+ */
3886
4113
  private debugInputData;
4114
+ /**
4115
+ * Encuentra propiedades similares para sugerencias en debug
4116
+ */
3887
4117
  private findSimilarProperties;
4118
+ /**
4119
+ * Escapa caracteres HTML para evitar inyección
4120
+ */
3888
4121
  private escapeHtml;
3889
4122
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormPreviewService, never>;
3890
4123
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormPreviewService>;
@@ -4758,6 +4991,50 @@ declare const GTQFormatter: Intl.NumberFormat;
4758
4991
  */
4759
4992
  declare function createCurrencyFormatter(locale: string, currency: string): Intl.NumberFormat;
4760
4993
 
4994
+ /**
4995
+ * Guarda un valor en localStorage
4996
+ * Soporta: strings, números, objetos, arrays, null, undefined
4997
+ */
4998
+ declare function setStorage<T>(key: string, value: T): void;
4999
+ /**
5000
+ * Obtiene un valor desde localStorage
5001
+ * @param defaultValue - Valor por defecto si no existe la clave
5002
+ * @returns El valor guardado o el defaultValue
5003
+ */
5004
+ declare function getStorage<T>(key: string, defaultValue?: T): T | undefined;
5005
+ declare function setStorageObject<T extends Record<string, any>>(key: string, values?: Partial<T>, merge?: boolean): void;
5006
+ /**
5007
+ * 🆕 Función para eliminar una clave del storage
5008
+ */
5009
+ declare function removeStorage(key: string): void;
5010
+ /**
5011
+ * 🆕 Función para verificar si existe una clave en el storage
5012
+ */
5013
+ declare function hasStorage(key: string): boolean;
5014
+
5015
+ /**
5016
+ * Calcula la fecha sumando días hábiles (Lunes a Sábado, Domingos no cuentan)
5017
+ * Los feriados en el rango no consumen días
5018
+ *
5019
+ * @param fechaInicio - Fecha desde donde empezar
5020
+ * @param cantidadDias - Días hábiles a sumar
5021
+ * @param feriados - Lista de feriados (opcional)
5022
+ * @returns Fecha calculada o null si fechaInicio es null
5023
+ *
5024
+ * @example
5025
+ * // Sin feriados
5026
+ * calcularFechaFin(new Date('2026-07-07'), 15) // 2026-07-25
5027
+ *
5028
+ * @example
5029
+ * // Con feriados
5030
+ * calcularFechaFin(
5031
+ * new Date('2026-07-07'),
5032
+ * 15,
5033
+ * [{ date: '2026-07-14' }, { date: '2026-07-21' }]
5034
+ * ) // 2026-07-27
5035
+ */
5036
+ declare function dsxCalcularRangoFecha(fechaInicio: Date | null, cantidadDias: number, feriados?: Holiday[]): Date | null;
5037
+
4761
5038
  declare function chainControlGroups(form: FormGroup, groups: string[][]): void;
4762
5039
 
4763
5040
  /**
@@ -4895,5 +5172,5 @@ declare function minimumAgeValidator(minimumAge: number, referenceDate?: Date):
4895
5172
 
4896
5173
  declare function sorensenDiceValidator(dataSource: any[] | Observable<any[]>, key?: string, umbral?: number): AsyncValidatorFn;
4897
5174
 
4898
- export { ACTION_TYPES, AlertaService, AppMessageErrorComponent, AppMessageHelpComponent, ArrowNavigationDirective, AuthorizeService, AutoScrollHeightDirective, BaseCRUDService, CACHE_KEYS, CacheService, CssV2Component, DSX_PALETTE, DateIndicator, DocxPreviewComponent, DsxAddToolsModule, DsxAutocomplete, DsxButtonComponent, DsxEnableDisable, DsxInputCurrency, DsxMessagesService, DsxSelect, DsxStatusToggle, DsxdateShort, DsxdateTime, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, FileComponent, FormPreviewService, GTQFormatter, HeaderDsx, HelpersService, HttpHelpersService, INITIAL_PARAMETERS, IcoLabel, IconDsxComponent, JoinByPipe, JsonHighlightPipe, JsonValuesDebujComponent, JsonViewerComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, LogoDsxComponent, MasterDetailChangeService, NavbarDsxComponent, NetworkStatusComponent, OnlyRangoPatternDirective, ParameterValuesService, PdfPreviewComponent, PrimeNgModule, QrGenerator, ResultFileService, SWEET_ALERT_THEMES, ScreenInspector, SecurityService, SelectAllOnFocusDirective, SpinnerLoadingService, SweetAlert2DialogService, TablePreviewService, TemplateHighlight, TokenPurposeLogin, TruncatePipe, UtilityAddService, asyncExistsValidator, atLeastOneFieldRequiredValidator, chainControlGroups, createCurrencyFormatter, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, dateRangeValidatorFromTo, developmentEnvironment, getActionMessageConfig, getZeroBasedRolIndex, guardTokenPurposeGuard, httpAuthorizeInterceptor, minimumAgeValidator, nitValidator, productionEnvironment, provideEnvironment, sorensenDiceValidator, templateStructureValidator, templateVariablesValidator, validateEnvironmentConfig };
4899
- export type { ActionMessageConfig, ActionType, AppEnvironment, AsyncExistsValidatorOptions, AutoCompleteCompleteEvent, BlobRequestOptions$1 as BlobRequestOptions, Certificacion, Column, Complemento, Complementos, DataLoginModel, DataToken, DatosEmision, DatosGenerales, DevEnvironmentComplete, DevEnvironmentDefaults, Direccion, DocumentoFelResponse, DsxColorToken, DsxValidateUnique, Dte, Emisor, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig$1 as FieldConfig, FileData, FilterOption, FormRule, Frase, Frases, HttpParamValue$1 as HttpParamValue, HttpParamsRecord$1 as HttpParamsRecord, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, MasterDetailChangeResult, MasterDetailDifference, MasterDetailRawEntity, MasterDetailSimpleFormOptions, MasterDetailSimpleFormTracker, MasterDetailState, MyParameterValues, NITResponse, NumeroAutorizacion, ParameterSecurity, ParameterValue, ProdEnvironmentComplete, ProdEnvironmentDefaults, ReactiveForm, Receptor, ResponseHttpModel, Sat, SeguridadITParameter, ServiceResult, ServiceResultVoid, SweetAlertThemeType, T, TableColumn, TipoFechaConversion, TotalImpuesto, Totales, TypedForm, jwtSecurityModel, typeModel };
5175
+ export { ACTION_TYPES, AlertaService, AppMessageErrorComponent, AppMessageHelpComponent, ArrowNavigationDirective, AuthorizeService, AutoScrollHeightDirective, BaseCRUDService, CACHE_KEYS, CacheService, CssV2Component, DSX_PALETTE, DateIndicator, DocxPreviewComponent, DsxAddToolsModule, DsxAutocomplete, DsxButtonComponent, DsxCalendarView, DsxEnableDisable, DsxInputCurrency, DsxMessagesService, DsxSelect, DsxStatusToggle, DsxdateShort, DsxdateTime, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, FileComponent, FormPreviewService, GTQFormatter, HeaderDsx, HelpersService, HttpHelpersService, INITIAL_PARAMETERS, IcoLabel, IconDsxComponent, JoinByPipe, JsonHighlightPipe, JsonValuesDebujComponent, JsonViewerComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, LogoDsxComponent, MasterDetailChangeService, NavbarDsxComponent, NetworkStatusComponent, OnlyRangoPatternDirective, ParameterValuesService, PdfPreviewComponent, PrimeNgModule, QrGenerator, ResultFileService, SWEET_ALERT_THEMES, ScreenInspector, SecurityService, SelectAllOnFocusDirective, SpinnerLoadingService, SweetAlert2DialogService, TablePreviewService, TemplateHighlight, TokenPurposeLogin, TruncatePipe, UtilityAddService, asyncExistsValidator, atLeastOneFieldRequiredValidator, chainControlGroups, createCurrencyFormatter, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, dateRangeValidatorFromTo, developmentEnvironment, dsxCalcularRangoFecha, getActionMessageConfig, getStorage, getZeroBasedRolIndex, guardTokenPurposeGuard, hasStorage, httpAuthorizeInterceptor, minimumAgeValidator, nitValidator, productionEnvironment, provideEnvironment, removeStorage, setStorage, setStorageObject, sorensenDiceValidator, templateStructureValidator, templateVariablesValidator, validateEnvironmentConfig };
5176
+ export type { ActionMessageConfig, ActionType, AppEnvironment, AsyncExistsValidatorOptions, AutoCompleteCompleteEvent, BlobRequestOptions$1 as BlobRequestOptions, CalendarDay, Certificacion, Column, Complemento, Complementos, DataLoginModel, DataToken, DatosEmision, DatosGenerales, DevEnvironmentComplete, DevEnvironmentDefaults, Direccion, DocumentoFelResponse, DsxColorToken, DsxValidateUnique, Dte, Emisor, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig$1 as FieldConfig, FileData, FilterOption, FormRule, FormattedHoliday, Frase, Frases, Holiday, HttpParamValue$1 as HttpParamValue, HttpParamsRecord$1 as HttpParamsRecord, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, MasterDetailChangeResult, MasterDetailDifference, MasterDetailRawEntity, MasterDetailSimpleFormOptions, MasterDetailSimpleFormTracker, MasterDetailState, MonthData, MyParameterValues, NITResponse, NumeroAutorizacion, ParameterSecurity, ParameterValue, ProdEnvironmentComplete, ProdEnvironmentDefaults, RangeKPI, ReactiveForm, Receptor, ResponseHttpModel, Sat, SeguridadITParameter, ServiceResult, ServiceResultVoid, SweetAlertThemeType, T, TableColumn, TipoFechaConversion, TotalImpuesto, Totales, TypedForm, jwtSecurityModel, typeModel };
Binary file