ngx-dsxlibrary 1.21.97 → 1.21.99
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.
|
@@ -34,8 +34,10 @@ import { AccordionModule } from 'primeng/accordion';
|
|
|
34
34
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
35
35
|
import { AutoFocusModule } from 'primeng/autofocus';
|
|
36
36
|
import { AvatarGroupModule } from 'primeng/avatargroup';
|
|
37
|
+
import { BadgeModule } from 'primeng/badge';
|
|
37
38
|
import { CardModule } from 'primeng/card';
|
|
38
39
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
40
|
+
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
39
41
|
import { DatePickerModule } from 'primeng/datepicker';
|
|
40
42
|
import { DividerModule } from 'primeng/divider';
|
|
41
43
|
import { DrawerModule } from 'primeng/drawer';
|
|
@@ -46,21 +48,34 @@ import { InputIconModule } from 'primeng/inputicon';
|
|
|
46
48
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
47
49
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
48
50
|
import { InputTextModule } from 'primeng/inputtext';
|
|
51
|
+
import { KeyFilterModule } from 'primeng/keyfilter';
|
|
52
|
+
import { KnobModule } from 'primeng/knob';
|
|
49
53
|
import { MessageModule } from 'primeng/message';
|
|
50
54
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
55
|
+
import { OrganizationChartModule } from 'primeng/organizationchart';
|
|
56
|
+
import { OverlayBadgeModule } from 'primeng/overlaybadge';
|
|
51
57
|
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
52
58
|
import { PasswordModule } from 'primeng/password';
|
|
59
|
+
import { PickListModule } from 'primeng/picklist';
|
|
53
60
|
import { PopoverModule } from 'primeng/popover';
|
|
54
61
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
62
|
+
import { RatingModule } from 'primeng/rating';
|
|
55
63
|
import { RippleModule } from 'primeng/ripple';
|
|
64
|
+
import { ScrollerModule } from 'primeng/scroller';
|
|
65
|
+
import { ScrollPanelModule } from 'primeng/scrollpanel';
|
|
56
66
|
import { SelectModule } from 'primeng/select';
|
|
67
|
+
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
68
|
+
import { SliderModule } from 'primeng/slider';
|
|
69
|
+
import { SpeedDialModule } from 'primeng/speeddial';
|
|
57
70
|
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
58
71
|
import { StepperModule } from 'primeng/stepper';
|
|
59
72
|
import { TableModule } from 'primeng/table';
|
|
60
73
|
import { TabsModule } from 'primeng/tabs';
|
|
61
74
|
import { TextareaModule } from 'primeng/textarea';
|
|
75
|
+
import { TimelineModule } from 'primeng/timeline';
|
|
62
76
|
import { ToastModule } from 'primeng/toast';
|
|
63
77
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
78
|
+
import { TreeTableModule } from 'primeng/treetable';
|
|
64
79
|
import moment from 'moment-timezone';
|
|
65
80
|
|
|
66
81
|
class AppMessageErrorComponent {
|
|
@@ -869,26 +884,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
869
884
|
type: Input
|
|
870
885
|
}] } });
|
|
871
886
|
|
|
887
|
+
/**
|
|
888
|
+
* Servicio centralizado para controlar el estado de carga global.
|
|
889
|
+
*
|
|
890
|
+
* Expone una señal (`spinnerVisible`) que puede consumirse en componentes
|
|
891
|
+
* para mostrar u ocultar un spinner.
|
|
892
|
+
*
|
|
893
|
+
* Uso recomendado:
|
|
894
|
+
* - `show()` / `hide()` para flujos con múltiples operaciones concurrentes.
|
|
895
|
+
* - `showImmediate()` para feedback visual inmediato (sin afectar contador).
|
|
896
|
+
* - `reset()` para recuperar estado en errores inesperados.
|
|
897
|
+
*/
|
|
872
898
|
class SpinnerLoadingService {
|
|
873
|
-
|
|
899
|
+
/**
|
|
900
|
+
* Señal reactiva que indica si el spinner debe mostrarse.
|
|
901
|
+
*
|
|
902
|
+
* Ejemplo:
|
|
903
|
+
* ```ts
|
|
904
|
+
* readonly isLoading = this.spinnerLoadingService.spinnerVisible;
|
|
905
|
+
* ```
|
|
906
|
+
*/
|
|
874
907
|
spinnerVisible = signal(false, ...(ngDevMode ? [{ debugName: "spinnerVisible" }] : /* istanbul ignore next */ []));
|
|
875
|
-
|
|
908
|
+
/**
|
|
909
|
+
* Contador interno de operaciones activas.
|
|
910
|
+
* Permite que el spinner permanezca visible mientras haya procesos en curso.
|
|
911
|
+
*/
|
|
876
912
|
counter = 0;
|
|
877
913
|
constructor() { }
|
|
878
|
-
|
|
914
|
+
/**
|
|
915
|
+
* Incrementa el contador de cargas activas.
|
|
916
|
+
*
|
|
917
|
+
* Muestra el spinner solo en la transición de `0 -> 1` para evitar
|
|
918
|
+
* renderizados redundantes cuando hay varias operaciones simultáneas.
|
|
919
|
+
*
|
|
920
|
+
* Cuándo usarlo:
|
|
921
|
+
* - Antes de iniciar una petición HTTP manual.
|
|
922
|
+
* - Antes de ejecutar una acción asíncrona larga.
|
|
923
|
+
*/
|
|
879
924
|
show() {
|
|
880
925
|
this.counter++;
|
|
881
926
|
if (this.counter === 1) {
|
|
882
927
|
this.spinnerVisible.set(true);
|
|
883
928
|
}
|
|
884
929
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
930
|
+
/**
|
|
931
|
+
* Muestra el spinner de forma inmediata sin modificar el contador.
|
|
932
|
+
*
|
|
933
|
+
* Cuándo usarlo:
|
|
934
|
+
* - Para feedback instantáneo en la UI (por ejemplo, al hacer clic en un botón).
|
|
935
|
+
* - Cuando otro mecanismo (ejemplo: interceptor HTTP) controlará `show()`/`hide()`.
|
|
936
|
+
*/
|
|
888
937
|
showImmediate() {
|
|
889
938
|
this.spinnerVisible.set(true);
|
|
890
939
|
}
|
|
891
|
-
|
|
940
|
+
/**
|
|
941
|
+
* Decrementa el contador de cargas activas.
|
|
942
|
+
*
|
|
943
|
+
* Oculta el spinner únicamente cuando el contador llega a `0`.
|
|
944
|
+
* Si se llama más veces de las debidas, el contador no baja de `0`.
|
|
945
|
+
*
|
|
946
|
+
* Cuándo usarlo:
|
|
947
|
+
* - Al finalizar una operación iniciada con `show()`.
|
|
948
|
+
*/
|
|
892
949
|
hide() {
|
|
893
950
|
if (this.counter > 0) {
|
|
894
951
|
this.counter--;
|
|
@@ -897,7 +954,12 @@ class SpinnerLoadingService {
|
|
|
897
954
|
this.spinnerVisible.set(false);
|
|
898
955
|
}
|
|
899
956
|
}
|
|
900
|
-
|
|
957
|
+
/**
|
|
958
|
+
* Restablece el estado del servicio a su valor inicial.
|
|
959
|
+
*
|
|
960
|
+
* Fuerza `counter = 0` y oculta el spinner.
|
|
961
|
+
* Útil en escenarios de recuperación por error o al reinicializar contexto.
|
|
962
|
+
*/
|
|
901
963
|
reset() {
|
|
902
964
|
this.counter = 0;
|
|
903
965
|
this.spinnerVisible.set(false);
|
|
@@ -2863,9 +2925,11 @@ const PRIME_NG_MODULES = [
|
|
|
2863
2925
|
AutoFocusModule,
|
|
2864
2926
|
AvatarGroupModule,
|
|
2865
2927
|
AvatarModule,
|
|
2928
|
+
BadgeModule,
|
|
2866
2929
|
ButtonModule,
|
|
2867
2930
|
CardModule,
|
|
2868
2931
|
CheckboxModule,
|
|
2932
|
+
ContextMenuModule,
|
|
2869
2933
|
DatePickerModule,
|
|
2870
2934
|
DialogModule,
|
|
2871
2935
|
DividerModule,
|
|
@@ -2879,25 +2943,38 @@ const PRIME_NG_MODULES = [
|
|
|
2879
2943
|
InputMaskModule,
|
|
2880
2944
|
InputNumberModule,
|
|
2881
2945
|
InputTextModule,
|
|
2946
|
+
KeyFilterModule,
|
|
2947
|
+
KnobModule,
|
|
2882
2948
|
MenubarModule,
|
|
2883
2949
|
MessageModule,
|
|
2884
2950
|
MultiSelectModule,
|
|
2951
|
+
OrganizationChartModule,
|
|
2952
|
+
OverlayBadgeModule,
|
|
2885
2953
|
PanelMenuModule,
|
|
2886
2954
|
PasswordModule,
|
|
2955
|
+
PickListModule,
|
|
2887
2956
|
PopoverModule,
|
|
2888
2957
|
RadioButtonModule,
|
|
2958
|
+
RatingModule,
|
|
2889
2959
|
RippleModule,
|
|
2960
|
+
ScrollerModule,
|
|
2961
|
+
ScrollPanelModule,
|
|
2962
|
+
SelectButtonModule,
|
|
2890
2963
|
SelectModule,
|
|
2964
|
+
SliderModule,
|
|
2965
|
+
SpeedDialModule,
|
|
2891
2966
|
SplitButtonModule,
|
|
2892
2967
|
StepperModule,
|
|
2893
2968
|
TableModule,
|
|
2894
2969
|
TabsModule,
|
|
2895
2970
|
TagModule,
|
|
2896
2971
|
TextareaModule,
|
|
2972
|
+
TimelineModule,
|
|
2897
2973
|
ToastModule,
|
|
2898
2974
|
ToggleButtonModule,
|
|
2899
2975
|
TooltipModule,
|
|
2900
2976
|
TreeModule,
|
|
2977
|
+
TreeTableModule,
|
|
2901
2978
|
];
|
|
2902
2979
|
class PrimeNgModule {
|
|
2903
2980
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: PrimeNgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -2906,9 +2983,11 @@ class PrimeNgModule {
|
|
|
2906
2983
|
AutoFocusModule,
|
|
2907
2984
|
AvatarGroupModule,
|
|
2908
2985
|
AvatarModule,
|
|
2986
|
+
BadgeModule,
|
|
2909
2987
|
ButtonModule,
|
|
2910
2988
|
CardModule,
|
|
2911
2989
|
CheckboxModule,
|
|
2990
|
+
ContextMenuModule,
|
|
2912
2991
|
DatePickerModule,
|
|
2913
2992
|
DialogModule,
|
|
2914
2993
|
DividerModule,
|
|
@@ -2922,33 +3001,48 @@ class PrimeNgModule {
|
|
|
2922
3001
|
InputMaskModule,
|
|
2923
3002
|
InputNumberModule,
|
|
2924
3003
|
InputTextModule,
|
|
3004
|
+
KeyFilterModule,
|
|
3005
|
+
KnobModule,
|
|
2925
3006
|
MenubarModule,
|
|
2926
3007
|
MessageModule,
|
|
2927
3008
|
MultiSelectModule,
|
|
3009
|
+
OrganizationChartModule,
|
|
3010
|
+
OverlayBadgeModule,
|
|
2928
3011
|
PanelMenuModule,
|
|
2929
3012
|
PasswordModule,
|
|
3013
|
+
PickListModule,
|
|
2930
3014
|
PopoverModule,
|
|
2931
3015
|
RadioButtonModule,
|
|
3016
|
+
RatingModule,
|
|
2932
3017
|
RippleModule,
|
|
3018
|
+
ScrollerModule,
|
|
3019
|
+
ScrollPanelModule,
|
|
3020
|
+
SelectButtonModule,
|
|
2933
3021
|
SelectModule,
|
|
3022
|
+
SliderModule,
|
|
3023
|
+
SpeedDialModule,
|
|
2934
3024
|
SplitButtonModule,
|
|
2935
3025
|
StepperModule,
|
|
2936
3026
|
TableModule,
|
|
2937
3027
|
TabsModule,
|
|
2938
3028
|
TagModule,
|
|
2939
3029
|
TextareaModule,
|
|
3030
|
+
TimelineModule,
|
|
2940
3031
|
ToastModule,
|
|
2941
3032
|
ToggleButtonModule,
|
|
2942
3033
|
TooltipModule,
|
|
2943
|
-
TreeModule
|
|
3034
|
+
TreeModule,
|
|
3035
|
+
TreeTableModule] });
|
|
2944
3036
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: PrimeNgModule, imports: [AccordionModule,
|
|
2945
3037
|
AutoCompleteModule,
|
|
2946
3038
|
AutoFocusModule,
|
|
2947
3039
|
AvatarGroupModule,
|
|
2948
3040
|
AvatarModule,
|
|
3041
|
+
BadgeModule,
|
|
2949
3042
|
ButtonModule,
|
|
2950
3043
|
CardModule,
|
|
2951
3044
|
CheckboxModule,
|
|
3045
|
+
ContextMenuModule,
|
|
2952
3046
|
DatePickerModule,
|
|
2953
3047
|
DialogModule,
|
|
2954
3048
|
DividerModule,
|
|
@@ -2962,25 +3056,38 @@ class PrimeNgModule {
|
|
|
2962
3056
|
InputMaskModule,
|
|
2963
3057
|
InputNumberModule,
|
|
2964
3058
|
InputTextModule,
|
|
3059
|
+
KeyFilterModule,
|
|
3060
|
+
KnobModule,
|
|
2965
3061
|
MenubarModule,
|
|
2966
3062
|
MessageModule,
|
|
2967
3063
|
MultiSelectModule,
|
|
3064
|
+
OrganizationChartModule,
|
|
3065
|
+
OverlayBadgeModule,
|
|
2968
3066
|
PanelMenuModule,
|
|
2969
3067
|
PasswordModule,
|
|
3068
|
+
PickListModule,
|
|
2970
3069
|
PopoverModule,
|
|
2971
3070
|
RadioButtonModule,
|
|
3071
|
+
RatingModule,
|
|
2972
3072
|
RippleModule,
|
|
3073
|
+
ScrollerModule,
|
|
3074
|
+
ScrollPanelModule,
|
|
3075
|
+
SelectButtonModule,
|
|
2973
3076
|
SelectModule,
|
|
3077
|
+
SliderModule,
|
|
3078
|
+
SpeedDialModule,
|
|
2974
3079
|
SplitButtonModule,
|
|
2975
3080
|
StepperModule,
|
|
2976
3081
|
TableModule,
|
|
2977
3082
|
TabsModule,
|
|
2978
3083
|
TagModule,
|
|
2979
3084
|
TextareaModule,
|
|
3085
|
+
TimelineModule,
|
|
2980
3086
|
ToastModule,
|
|
2981
3087
|
ToggleButtonModule,
|
|
2982
3088
|
TooltipModule,
|
|
2983
|
-
TreeModule
|
|
3089
|
+
TreeModule,
|
|
3090
|
+
TreeTableModule] });
|
|
2984
3091
|
}
|
|
2985
3092
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: PrimeNgModule, decorators: [{
|
|
2986
3093
|
type: NgModule,
|
|
@@ -3553,21 +3660,23 @@ class UtilityAddService {
|
|
|
3553
3660
|
const fechaMoment = moment(fecha).format('YYYYMMDD');
|
|
3554
3661
|
return fechaMoment;
|
|
3555
3662
|
}
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
* @returns {FormGroup} - El FormGroup creado.
|
|
3564
|
-
*/
|
|
3565
|
-
createTypedForm(fb, config, groupValidators) {
|
|
3663
|
+
createTypedForm(fb, config, groupValidatorsOrOptions, options = { disableUnassignedControls: false }) {
|
|
3664
|
+
const groupValidators = Array.isArray(groupValidatorsOrOptions)
|
|
3665
|
+
? groupValidatorsOrOptions
|
|
3666
|
+
: undefined;
|
|
3667
|
+
const resolvedOptions = Array.isArray(groupValidatorsOrOptions)
|
|
3668
|
+
? options
|
|
3669
|
+
: (groupValidatorsOrOptions ?? options);
|
|
3566
3670
|
const formGroup = {};
|
|
3567
3671
|
// Crear controles de formulario individuales
|
|
3568
3672
|
for (const key in config) {
|
|
3569
3673
|
if (Object.prototype.hasOwnProperty.call(config, key)) {
|
|
3570
|
-
const
|
|
3674
|
+
const fieldConfig = config[key];
|
|
3675
|
+
const { value, validators = [] } = fieldConfig;
|
|
3676
|
+
const hasAssignedDisabled = Object.prototype.hasOwnProperty.call(fieldConfig, 'disabled');
|
|
3677
|
+
const disabled = hasAssignedDisabled
|
|
3678
|
+
? Boolean(fieldConfig.disabled)
|
|
3679
|
+
: Boolean(resolvedOptions.disableUnassignedControls);
|
|
3571
3680
|
formGroup[key] = new FormControl({ value, disabled }, validators);
|
|
3572
3681
|
}
|
|
3573
3682
|
}
|
|
@@ -3575,41 +3684,14 @@ class UtilityAddService {
|
|
|
3575
3684
|
const group = fb.group(formGroup, groupValidators ? { validators: groupValidators } : {});
|
|
3576
3685
|
return group;
|
|
3577
3686
|
}
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
* @param fb - Instancia de FormBuilder.
|
|
3587
|
-
* @param config - Configuración de los campos del formulario (FieldConfig<T>).
|
|
3588
|
-
* @returns ReactiveForm<T> - FormGroup tipado con Subject destroy$ para limpieza.
|
|
3589
|
-
*
|
|
3590
|
-
* @example
|
|
3591
|
-
* ```typescript
|
|
3592
|
-
* interface LoginForm {
|
|
3593
|
-
* username: string;
|
|
3594
|
-
* password: string;
|
|
3595
|
-
* }
|
|
3596
|
-
*
|
|
3597
|
-
* const config: FieldConfig<LoginForm> = {
|
|
3598
|
-
* username: { value: '', validators: [Validators.required] },
|
|
3599
|
-
* password: { value: '', validators: [Validators.required] }
|
|
3600
|
-
* };
|
|
3601
|
-
*
|
|
3602
|
-
* const form = this.utilityAddService.createReactiveForm(this.fb, config);
|
|
3603
|
-
*
|
|
3604
|
-
* // Al destruir el componente, limpiar todas las suscripciones
|
|
3605
|
-
* ngOnDestroy() {
|
|
3606
|
-
* form.destroy$.next();
|
|
3607
|
-
* form.destroy$.complete();
|
|
3608
|
-
* }
|
|
3609
|
-
* ```
|
|
3610
|
-
*/
|
|
3611
|
-
createReactiveForm(fb, config) {
|
|
3612
|
-
const form = this.createTypedForm(fb, config);
|
|
3687
|
+
createReactiveForm(fb, config, groupValidatorsOrOptions, options = { disableUnassignedControls: false }) {
|
|
3688
|
+
const groupValidators = Array.isArray(groupValidatorsOrOptions)
|
|
3689
|
+
? groupValidatorsOrOptions
|
|
3690
|
+
: undefined;
|
|
3691
|
+
const resolvedOptions = Array.isArray(groupValidatorsOrOptions)
|
|
3692
|
+
? options
|
|
3693
|
+
: (groupValidatorsOrOptions ?? options);
|
|
3694
|
+
const form = this.createTypedForm(fb, config, groupValidators, resolvedOptions);
|
|
3613
3695
|
form.destroy$ = new Subject();
|
|
3614
3696
|
return form;
|
|
3615
3697
|
}
|