ngx-dsxlibrary 2.21.75 → 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.
|
Binary file
|
package/package.json
CHANGED
|
@@ -17,6 +17,11 @@ declare function createInitialCache<T extends Record<string, string>>(cacheKeys:
|
|
|
17
17
|
-readonly [K in keyof T as T[K]]: boolean;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
interface Holiday {
|
|
21
|
+
dateHoliday: Date | string;
|
|
22
|
+
labelHoliday: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
interface ExportColumn {
|
|
21
26
|
title: string;
|
|
22
27
|
dataKey: string;
|
|
@@ -248,4 +253,4 @@ interface DsxValidateUnique {
|
|
|
248
253
|
}
|
|
249
254
|
|
|
250
255
|
export { createInitialCache };
|
|
251
|
-
export type { AutoCompleteCompleteEvent, Certificacion, Column, Complemento, Complementos, DatosEmision, DatosGenerales, Direccion, DocumentoFelResponse, DsxValidateUnique, Dte, Emisor, ExportColumn, FechasConversion, FilterOption, Frase, Frases, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, NITResponse, NumeroAutorizacion, Receptor, ResponseHttpModel, Sat, ServiceResult, ServiceResultVoid, T, TipoFechaConversion, TotalImpuesto, Totales, typeModel };
|
|
256
|
+
export type { AutoCompleteCompleteEvent, Certificacion, Column, Complemento, Complementos, DatosEmision, DatosGenerales, Direccion, DocumentoFelResponse, DsxValidateUnique, Dte, Emisor, ExportColumn, FechasConversion, FilterOption, Frase, Frases, Holiday, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, NITResponse, NumeroAutorizacion, Receptor, ResponseHttpModel, Sat, ServiceResult, ServiceResultVoid, T, TipoFechaConversion, TotalImpuesto, Totales, typeModel };
|
|
@@ -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
|
|
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/
|
|
30
|
-
import * as i11 from 'primeng/
|
|
31
|
-
import * as i12 from 'primeng/
|
|
32
|
-
import * as i13 from 'primeng/
|
|
33
|
-
import * as i14 from 'primeng/
|
|
34
|
-
import * as i15 from 'primeng/
|
|
35
|
-
import * as i16 from 'primeng/
|
|
36
|
-
import * as
|
|
37
|
-
import * as i19 from 'primeng/
|
|
38
|
-
import * as i20 from 'primeng/
|
|
39
|
-
import * as i21 from 'primeng/
|
|
40
|
-
import * as i22 from 'primeng/
|
|
41
|
-
import * as i23 from 'primeng/
|
|
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
|
|
44
|
-
import * as
|
|
45
|
-
import * as
|
|
46
|
-
import * as
|
|
47
|
-
import * as
|
|
48
|
-
import * as
|
|
49
|
-
import * as
|
|
50
|
-
import * as
|
|
51
|
-
import * as
|
|
52
|
-
import * as
|
|
53
|
-
import * as
|
|
54
|
-
import * as
|
|
55
|
-
import * as
|
|
56
|
-
import * as
|
|
57
|
-
import * as
|
|
58
|
-
import * as
|
|
59
|
-
import * as
|
|
60
|
-
import * as
|
|
61
|
-
import * as
|
|
62
|
-
import * as
|
|
63
|
-
import * as
|
|
64
|
-
import * as
|
|
65
|
-
import * as
|
|
66
|
-
import * as
|
|
67
|
-
import * as
|
|
68
|
-
import * as
|
|
69
|
-
import * as
|
|
70
|
-
import * as
|
|
71
|
-
import * as
|
|
72
|
-
import * as
|
|
73
|
-
import * as
|
|
74
|
-
import * as
|
|
75
|
-
import * as
|
|
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 {
|
|
@@ -625,6 +626,94 @@ declare class IconDsxComponent {
|
|
|
625
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>;
|
|
626
627
|
}
|
|
627
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
|
+
|
|
628
717
|
declare class FileComponent implements ControlValueAccessor, Validator, AfterViewInit, OnDestroy {
|
|
629
718
|
existingFile: _angular_core.InputSignal<File | null>;
|
|
630
719
|
existingFileName: _angular_core.InputSignal<string | null>;
|
|
@@ -2171,7 +2260,7 @@ declare class DsxAddToolsModule {
|
|
|
2171
2260
|
|
|
2172
2261
|
declare class PrimeNgModule {
|
|
2173
2262
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PrimeNgModule, never>;
|
|
2174
|
-
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.
|
|
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]>;
|
|
2175
2264
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<PrimeNgModule>;
|
|
2176
2265
|
}
|
|
2177
2266
|
|
|
@@ -3798,6 +3887,14 @@ declare class ParameterValuesService<T extends string = string> {
|
|
|
3798
3887
|
interface ReferenceMap {
|
|
3799
3888
|
[key: string]: any;
|
|
3800
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';
|
|
3801
3898
|
/**
|
|
3802
3899
|
* Configuración de un campo para el preview del formulario
|
|
3803
3900
|
*/
|
|
@@ -3806,28 +3903,71 @@ interface FieldConfig {
|
|
|
3806
3903
|
key: string;
|
|
3807
3904
|
/** Etiqueta que se mostrará en la vista */
|
|
3808
3905
|
label: string;
|
|
3809
|
-
/**
|
|
3810
|
-
|
|
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;
|
|
3811
3928
|
/**
|
|
3812
3929
|
* Mapa de referencia para traducir IDs a nombres legibles.
|
|
3813
3930
|
* Puede ser: Map, Array, objeto literal o función.
|
|
3814
|
-
*
|
|
3815
|
-
*
|
|
3816
|
-
*
|
|
3817
|
-
*
|
|
3818
|
-
*
|
|
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' }
|
|
3819
3949
|
*/
|
|
3820
3950
|
referenceMap?: Map<any, any> | any[] | ReferenceMap | ((id: any) => any);
|
|
3821
|
-
/**
|
|
3822
|
-
* Propiedad del objeto de referencia que se usará como etiqueta.
|
|
3823
|
-
* Por defecto: 'nombre'
|
|
3824
|
-
*/
|
|
3825
|
-
referenceLabel?: string;
|
|
3826
3951
|
/**
|
|
3827
3952
|
* Propiedad del objeto de referencia que se usará como ID.
|
|
3828
|
-
*
|
|
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'
|
|
3829
3959
|
*/
|
|
3830
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;
|
|
3831
3971
|
}
|
|
3832
3972
|
/**
|
|
3833
3973
|
* Opciones de configuración para el preview
|
|
@@ -3852,13 +3992,14 @@ interface OptionsConfig {
|
|
|
3852
3992
|
compact?: boolean;
|
|
3853
3993
|
/**
|
|
3854
3994
|
* Si es true, habilita logs de depuración.
|
|
3855
|
-
*
|
|
3856
|
-
* ¡
|
|
3995
|
+
* ⚠️ SOLO funciona en entorno de desarrollo.
|
|
3996
|
+
* ¡NUNCA se ejecuta en producción!
|
|
3857
3997
|
*/
|
|
3858
3998
|
debug?: boolean;
|
|
3859
3999
|
}
|
|
3860
4000
|
declare class FormPreviewService {
|
|
3861
4001
|
private readonly environment;
|
|
4002
|
+
private readonly isDev;
|
|
3862
4003
|
constructor();
|
|
3863
4004
|
/**
|
|
3864
4005
|
* Construye el HTML para el preview de un objeto
|
|
@@ -3869,17 +4010,30 @@ declare class FormPreviewService {
|
|
|
3869
4010
|
*
|
|
3870
4011
|
* @example
|
|
3871
4012
|
* ```typescript
|
|
4013
|
+
* // Ejemplo básico
|
|
3872
4014
|
* const data = {
|
|
3873
|
-
*
|
|
3874
|
-
*
|
|
3875
|
-
* email: 'juan@email.com'
|
|
3876
|
-
* },
|
|
4015
|
+
* empleadoId: 2,
|
|
4016
|
+
* fechaIngreso: '2026-04-07',
|
|
3877
4017
|
* estado: 1
|
|
3878
4018
|
* };
|
|
3879
4019
|
*
|
|
4020
|
+
* const empleados = [
|
|
4021
|
+
* { id: 1, nombreCompleto: 'Juan Pérez' },
|
|
4022
|
+
* { id: 2, nombreCompleto: 'María García' }
|
|
4023
|
+
* ];
|
|
4024
|
+
*
|
|
3880
4025
|
* const fields = [
|
|
3881
|
-
* {
|
|
3882
|
-
*
|
|
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
|
+
* },
|
|
3883
4037
|
* {
|
|
3884
4038
|
* key: 'estado',
|
|
3885
4039
|
* label: 'Estado',
|
|
@@ -3887,23 +4041,83 @@ declare class FormPreviewService {
|
|
|
3887
4041
|
* }
|
|
3888
4042
|
* ];
|
|
3889
4043
|
*
|
|
3890
|
-
* const html = this.formPreviewService.buildObjectSummaryHtml(
|
|
3891
|
-
*
|
|
3892
|
-
*
|
|
3893
|
-
*
|
|
3894
|
-
*
|
|
3895
|
-
*
|
|
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
|
+
* );
|
|
3896
4054
|
* ```
|
|
3897
4055
|
*/
|
|
3898
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
|
+
*/
|
|
3899
4061
|
private resolveReferenceValue;
|
|
4062
|
+
/**
|
|
4063
|
+
* Resuelve un valor individual de referencia
|
|
4064
|
+
*/
|
|
3900
4065
|
private resolveSingleReference;
|
|
4066
|
+
/**
|
|
4067
|
+
* Obtiene un valor anidado usando notación punto
|
|
4068
|
+
* @example
|
|
4069
|
+
* getNestedValue({ user: { name: 'Juan' } }, 'user.name') // 'Juan'
|
|
4070
|
+
*/
|
|
3901
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
|
+
*/
|
|
3902
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
|
+
*/
|
|
3903
4104
|
private formatSingleValue;
|
|
4105
|
+
/**
|
|
4106
|
+
* Genera el HTML del preview
|
|
4107
|
+
*/
|
|
3904
4108
|
private generateHtml;
|
|
4109
|
+
/**
|
|
4110
|
+
* 🔍 Debug: Muestra información detallada para depuración
|
|
4111
|
+
* ⚠️ SOLO se ejecuta en entorno de desarrollo
|
|
4112
|
+
*/
|
|
3905
4113
|
private debugInputData;
|
|
4114
|
+
/**
|
|
4115
|
+
* Encuentra propiedades similares para sugerencias en debug
|
|
4116
|
+
*/
|
|
3906
4117
|
private findSimilarProperties;
|
|
4118
|
+
/**
|
|
4119
|
+
* Escapa caracteres HTML para evitar inyección
|
|
4120
|
+
*/
|
|
3907
4121
|
private escapeHtml;
|
|
3908
4122
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormPreviewService, never>;
|
|
3909
4123
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormPreviewService>;
|
|
@@ -4798,6 +5012,29 @@ declare function removeStorage(key: string): void;
|
|
|
4798
5012
|
*/
|
|
4799
5013
|
declare function hasStorage(key: string): boolean;
|
|
4800
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
|
+
|
|
4801
5038
|
declare function chainControlGroups(form: FormGroup, groups: string[][]): void;
|
|
4802
5039
|
|
|
4803
5040
|
/**
|
|
@@ -4935,5 +5172,5 @@ declare function minimumAgeValidator(minimumAge: number, referenceDate?: Date):
|
|
|
4935
5172
|
|
|
4936
5173
|
declare function sorensenDiceValidator(dataSource: any[] | Observable<any[]>, key?: string, umbral?: number): AsyncValidatorFn;
|
|
4937
5174
|
|
|
4938
|
-
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, getStorage, getZeroBasedRolIndex, guardTokenPurposeGuard, hasStorage, httpAuthorizeInterceptor, minimumAgeValidator, nitValidator, productionEnvironment, provideEnvironment, removeStorage, setStorage, setStorageObject, sorensenDiceValidator, templateStructureValidator, templateVariablesValidator, validateEnvironmentConfig };
|
|
4939
|
-
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
|