ng-components-tsi 0.0.38 → 0.0.39
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.
- package/fesm2022/ng-components-tsi.mjs +5063 -0
- package/fesm2022/ng-components-tsi.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/directivas/acciones/atajos.directive.d.ts +8 -0
- package/lib/directivas/animaciones/fade-animation.d.ts +3 -0
- package/lib/directivas/estilos/animated-checkbox.directive.d.ts +9 -0
- package/lib/directivas/estilos/button.constants.d.ts +64 -0
- package/lib/directivas/estilos/buttons-modal.directive.d.ts +11 -0
- package/lib/directivas/estilos/buttons-outline-directive.d.ts +11 -0
- package/lib/directivas/estilos/icons.directive.d.ts +11 -0
- package/lib/directivas/inputs/caracteres-codigo.directive.d.ts +12 -0
- package/lib/directivas/inputs/decimal.directive.d.ts +13 -0
- package/lib/directivas/inputs/only-day.directive.d.ts +8 -0
- package/lib/directivas/inputs/only-number-flex.directive.d.ts +9 -0
- package/lib/directivas/inputs/only-number.directive.d.ts +8 -0
- package/lib/enums/table-events.d.ts +5 -0
- package/lib/modals/general/md-generico/md-generico.component.d.ts +25 -0
- package/lib/models/button-color.model.d.ts +3 -0
- package/{src/lib/models/button-properties.model.ts → lib/models/button-properties.model.d.ts} +7 -8
- package/lib/models/cell-rendered.d.ts +11 -0
- package/lib/models/comercial/documentos-cab-auxiliares.model.d.ts +17 -0
- package/{src/lib/models/dropdownoption.model.ts → lib/models/dropdownoption.model.d.ts} +14 -15
- package/lib/models/general/recursos.model.d.ts +271 -0
- package/lib/models/general/utils.interface.d.ts +57 -0
- package/lib/models/input-config.d.ts +25 -0
- package/{src/lib/models/selected-row.ts → lib/models/selected-row.d.ts} +4 -4
- package/{src/lib/models/table-data.model.ts → lib/models/table-data.model.d.ts} +21 -21
- package/lib/service/alert-confirmation.service.d.ts +26 -0
- package/lib/service/alert-error.service.d.ts +9 -0
- package/lib/service/alert.service.d.ts +33 -0
- package/lib/service/formateador.service.d.ts +10 -0
- package/lib/service/toast.service.d.ts +25 -0
- package/lib/ui/alerts/alert-confirmation/alert-confirmation.component.d.ts +32 -0
- package/lib/ui/alerts/alert-error/alert-error.component.d.ts +9 -0
- package/lib/ui/alerts/alerta/alerta.component.d.ts +12 -0
- package/lib/ui/alerts/badge/badge.component.d.ts +8 -0
- package/lib/ui/alerts/toaster/toaster.component.d.ts +17 -0
- package/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.d.ts +11 -0
- package/lib/ui/dropdown/dropdown-simple/dropdown.component.d.ts +13 -0
- package/lib/ui/forms/button/button.component.d.ts +47 -0
- package/lib/ui/forms/filter-toggle/filter-toggle.component.d.ts +9 -0
- package/lib/ui/forms/header/header.component.d.ts +17 -0
- package/lib/ui/forms/inputs/autocomplete/autocomplete.component.d.ts +43 -0
- package/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.d.ts +48 -0
- package/lib/ui/forms/inputs/check-box/check-box.component.d.ts +14 -0
- package/lib/ui/forms/inputs/doble-input/doble-input.component.d.ts +47 -0
- package/lib/ui/forms/inputs/input/input.component.d.ts +60 -0
- package/lib/ui/forms/inputs/input-clase/input-clase.component.d.ts +13 -0
- package/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.d.ts +8 -0
- package/lib/ui/forms/inputs/input-radio/input-radio.component.d.ts +24 -0
- package/lib/ui/forms/inputs/multiselected/multiselected.component.d.ts +39 -0
- package/lib/ui/forms/inputs/radio/radio.component.d.ts +14 -0
- package/lib/ui/forms/inputs/switch/switch.component.d.ts +20 -0
- package/lib/ui/forms/inputs/switch-activo/switch-activo.component.d.ts +21 -0
- package/lib/ui/forms/lists/list-option/list-option.component.d.ts +23 -0
- package/lib/ui/forms/lists/list-situaciones/list-situaciones.component.d.ts +28 -0
- package/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.d.ts +26 -0
- package/lib/ui/forms/sidebar/sidebar.component.d.ts +15 -0
- package/lib/ui/general/detalle-credito/detalle-credito.component.d.ts +8 -0
- package/lib/ui/general/montos-calcular/montos-calcular.component.d.ts +12 -0
- package/lib/ui/general/spinner/spinner.component.d.ts +5 -0
- package/lib/ui/tables/card-mobile/card-mobile.component.d.ts +17 -0
- package/lib/ui/tables/dropdown-menu/dropdown-menu.component.d.ts +43 -0
- package/lib/ui/tables/paginador/paginador.component.d.ts +20 -0
- package/lib/ui/tables/table-advance/table-advance.component.d.ts +94 -0
- package/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.d.ts +82 -0
- package/lib/ui/tables/table-agrupada/table-agrupada.component.d.ts +96 -0
- package/lib/ui/tables/table-busqueda/table-busqueda.component.d.ts +48 -0
- package/lib/ui/tables/table-detalle/table-detalle.component.d.ts +59 -0
- package/lib/ui/tables/table-simple/table-simple.component.d.ts +39 -0
- package/lib/ui/tables/table-ultimate/table-ultimate.component.d.ts +84 -0
- package/lib/ui/tabs/nav-tabs/nav-tabs.component.d.ts +9 -0
- package/lib/ui/tabs/tab-item/tab-item.component.d.ts +9 -0
- package/lib/utils/general/validaciones-simple.d.ts +2 -0
- package/lib/utils/general/validaciones.d.ts +11 -0
- package/lib/utils/helpers/api-result.d.ts +17 -0
- package/lib/utils/helpers/modal-result.d.ts +10 -0
- package/ng-components-tsi-0.0.39.tgz +0 -0
- package/package.json +31 -23
- package/{src/public-api.ts → public-api.d.ts} +68 -99
- package/ng-package.json +0 -7
- package/src/lib/directivas/acciones/atajos.directive.ts +0 -26
- package/src/lib/directivas/animaciones/fade-animation.ts +0 -45
- package/src/lib/directivas/animaciones/fade.directive.ts +0 -43
- package/src/lib/directivas/estilos/animated-checkbox.directive.ts +0 -26
- package/src/lib/directivas/estilos/button.constants.ts +0 -66
- package/src/lib/directivas/estilos/buttons-modal.directive.ts +0 -36
- package/src/lib/directivas/estilos/buttons-outline-directive.ts +0 -27
- package/src/lib/directivas/estilos/icons.directive.ts +0 -26
- package/src/lib/directivas/inputs/caracteres-codigo.directive.ts +0 -63
- package/src/lib/directivas/inputs/decimal.directive.ts +0 -51
- package/src/lib/directivas/inputs/only-day.directive.ts +0 -53
- package/src/lib/directivas/inputs/only-number-flex.directive.ts +0 -50
- package/src/lib/directivas/inputs/only-number.directive.ts +0 -53
- package/src/lib/enums/table-events.ts +0 -5
- package/src/lib/modals/general/md-generico/md-generico.component.html +0 -44
- package/src/lib/modals/general/md-generico/md-generico.component.scss +0 -4
- package/src/lib/modals/general/md-generico/md-generico.component.ts +0 -50
- package/src/lib/models/button-color.model.ts +0 -9
- package/src/lib/models/cell-rendered.ts +0 -12
- package/src/lib/models/comercial/documentos-cab-auxiliares.model.ts +0 -18
- package/src/lib/models/general/recursos.model.ts +0 -285
- package/src/lib/models/general/utils.interface.ts +0 -66
- package/src/lib/models/input-config.ts +0 -26
- package/src/lib/service/alert-confirmation.service.ts +0 -87
- package/src/lib/service/alert-error.service.ts +0 -27
- package/src/lib/service/alert.service.ts +0 -216
- package/src/lib/service/formateador.service.ts +0 -49
- package/src/lib/service/toast.service.ts +0 -75
- package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.html +0 -40
- package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.scss +0 -42
- package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.ts +0 -118
- package/src/lib/ui/alerts/alert-error/alert-error.component.html +0 -11
- package/src/lib/ui/alerts/alert-error/alert-error.component.scss +0 -39
- package/src/lib/ui/alerts/alert-error/alert-error.component.ts +0 -27
- package/src/lib/ui/alerts/alerta/alerta.component.html +0 -18
- package/src/lib/ui/alerts/alerta/alerta.component.scss +0 -104
- package/src/lib/ui/alerts/alerta/alerta.component.ts +0 -25
- package/src/lib/ui/alerts/badge/badge.component.ts +0 -16
- package/src/lib/ui/alerts/toaster/toaster.component.html +0 -52
- package/src/lib/ui/alerts/toaster/toaster.component.scss +0 -275
- package/src/lib/ui/alerts/toaster/toaster.component.ts +0 -50
- package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.html +0 -20
- package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.scss +0 -11
- package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.ts +0 -18
- package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.html +0 -10
- package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.scss +0 -54
- package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.ts +0 -36
- package/src/lib/ui/forms/button/button.component.html +0 -69
- package/src/lib/ui/forms/button/button.component.scss +0 -126
- package/src/lib/ui/forms/button/button.component.ts +0 -137
- package/src/lib/ui/forms/filter-toggle/filter-toggle.component.scss +0 -22
- package/src/lib/ui/forms/filter-toggle/filter-toggle.component.ts +0 -29
- package/src/lib/ui/forms/header/header.component.html +0 -22
- package/src/lib/ui/forms/header/header.component.scss +0 -22
- package/src/lib/ui/forms/header/header.component.ts +0 -40
- package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.html +0 -46
- package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.scss +0 -90
- package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.ts +0 -203
- package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.html +0 -61
- package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.scss +0 -128
- package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.ts +0 -145
- package/src/lib/ui/forms/inputs/check-box/check-box.component.html +0 -6
- package/src/lib/ui/forms/inputs/check-box/check-box.component.ts +0 -24
- package/src/lib/ui/forms/inputs/doble-input/doble-input.component.html +0 -60
- package/src/lib/ui/forms/inputs/doble-input/doble-input.component.scss +0 -86
- package/src/lib/ui/forms/inputs/doble-input/doble-input.component.ts +0 -129
- package/src/lib/ui/forms/inputs/input/input.component.html +0 -169
- package/src/lib/ui/forms/inputs/input/input.component.scss +0 -74
- package/src/lib/ui/forms/inputs/input/input.component.ts +0 -147
- package/src/lib/ui/forms/inputs/input-clase/input-clase.component.html +0 -30
- package/src/lib/ui/forms/inputs/input-clase/input-clase.component.scss +0 -0
- package/src/lib/ui/forms/inputs/input-clase/input-clase.component.ts +0 -28
- package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.html +0 -41
- package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.scss +0 -0
- package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.ts +0 -17
- package/src/lib/ui/forms/inputs/input-radio/input-radio.component.html +0 -26
- package/src/lib/ui/forms/inputs/input-radio/input-radio.component.scss +0 -53
- package/src/lib/ui/forms/inputs/input-radio/input-radio.component.ts +0 -36
- package/src/lib/ui/forms/inputs/multiselected/multiselected.component.html +0 -56
- package/src/lib/ui/forms/inputs/multiselected/multiselected.component.scss +0 -145
- package/src/lib/ui/forms/inputs/multiselected/multiselected.component.ts +0 -109
- package/src/lib/ui/forms/inputs/radio/radio.component.html +0 -7
- package/src/lib/ui/forms/inputs/radio/radio.component.scss +0 -0
- package/src/lib/ui/forms/inputs/radio/radio.component.ts +0 -23
- package/src/lib/ui/forms/inputs/switch/switch.component.html +0 -12
- package/src/lib/ui/forms/inputs/switch/switch.component.scss +0 -48
- package/src/lib/ui/forms/inputs/switch/switch.component.ts +0 -50
- package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.html +0 -12
- package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.scss +0 -65
- package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.ts +0 -52
- package/src/lib/ui/forms/lists/list-option/list-option.component.html +0 -24
- package/src/lib/ui/forms/lists/list-option/list-option.component.scss +0 -49
- package/src/lib/ui/forms/lists/list-option/list-option.component.ts +0 -35
- package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.html +0 -29
- package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.scss +0 -0
- package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.ts +0 -99
- package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.html +0 -46
- package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.scss +0 -30
- package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.ts +0 -96
- package/src/lib/ui/forms/sidebar/sidebar.component.html +0 -33
- package/src/lib/ui/forms/sidebar/sidebar.component.scss +0 -85
- package/src/lib/ui/forms/sidebar/sidebar.component.ts +0 -61
- package/src/lib/ui/general/detalle-credito/detalle-credito.component.html +0 -35
- package/src/lib/ui/general/detalle-credito/detalle-credito.component.scss +0 -35
- package/src/lib/ui/general/detalle-credito/detalle-credito.component.ts +0 -14
- package/src/lib/ui/general/montos-calcular/montos-calcular.component.html +0 -17
- package/src/lib/ui/general/montos-calcular/montos-calcular.component.scss +0 -36
- package/src/lib/ui/general/montos-calcular/montos-calcular.component.ts +0 -19
- package/src/lib/ui/general/spinner/spinner.component.html +0 -8
- package/src/lib/ui/general/spinner/spinner.component.scss +0 -96
- package/src/lib/ui/general/spinner/spinner.component.ts +0 -11
- package/src/lib/ui/tables/card-mobile/card-mobile.component.html +0 -34
- package/src/lib/ui/tables/card-mobile/card-mobile.component.scss +0 -0
- package/src/lib/ui/tables/card-mobile/card-mobile.component.ts +0 -36
- package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.html +0 -59
- package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.scss +0 -88
- package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.ts +0 -171
- package/src/lib/ui/tables/paginador/paginador.component.html +0 -12
- package/src/lib/ui/tables/paginador/paginador.component.scss +0 -27
- package/src/lib/ui/tables/paginador/paginador.component.ts +0 -49
- package/src/lib/ui/tables/table-advance/table-advance.component.html +0 -322
- package/src/lib/ui/tables/table-advance/table-advance.component.scss +0 -282
- package/src/lib/ui/tables/table-advance/table-advance.component.ts +0 -421
- package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.html +0 -226
- package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.scss +0 -282
- package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.ts +0 -352
- package/src/lib/ui/tables/table-agrupada/table-agrupada.component.html +0 -340
- package/src/lib/ui/tables/table-agrupada/table-agrupada.component.scss +0 -282
- package/src/lib/ui/tables/table-agrupada/table-agrupada.component.ts +0 -425
- package/src/lib/ui/tables/table-busqueda/table-busqueda.component.html +0 -130
- package/src/lib/ui/tables/table-busqueda/table-busqueda.component.scss +0 -189
- package/src/lib/ui/tables/table-busqueda/table-busqueda.component.ts +0 -199
- package/src/lib/ui/tables/table-detalle/table-detalle.component.html +0 -220
- package/src/lib/ui/tables/table-detalle/table-detalle.component.scss +0 -135
- package/src/lib/ui/tables/table-detalle/table-detalle.component.ts +0 -336
- package/src/lib/ui/tables/table-simple/table-simple.component.html +0 -116
- package/src/lib/ui/tables/table-simple/table-simple.component.scss +0 -70
- package/src/lib/ui/tables/table-simple/table-simple.component.ts +0 -141
- package/src/lib/ui/tables/table-ultimate/table-ultimate.component.html +0 -268
- package/src/lib/ui/tables/table-ultimate/table-ultimate.component.scss +0 -282
- package/src/lib/ui/tables/table-ultimate/table-ultimate.component.ts +0 -383
- package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.html +0 -12
- package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.scss +0 -100
- package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.ts +0 -19
- package/src/lib/ui/tabs/tab-item/tab-item.component.html +0 -0
- package/src/lib/ui/tabs/tab-item/tab-item.component.scss +0 -0
- package/src/lib/ui/tabs/tab-item/tab-item.component.ts +0 -13
- package/src/lib/utils/ayuda-global/datatable.ts +0 -67
- package/src/lib/utils/ayuda-global/filtros-busqueda.ts +0 -51
- package/src/lib/utils/general/validaciones-simple.ts +0 -14
- package/src/lib/utils/general/validaciones.ts +0 -123
- package/src/lib/utils/helpers/api-result.ts +0 -95
- package/src/lib/utils/helpers/modal-result.ts +0 -34
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,99 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './lib/ui/alerts/
|
|
6
|
-
export * from './lib/ui/
|
|
7
|
-
export * from './lib/ui/
|
|
8
|
-
export * from './lib/ui/
|
|
9
|
-
export * from './lib/ui/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export * from './lib/ui/
|
|
13
|
-
export * from './lib/ui/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export * from './lib/ui/forms/
|
|
17
|
-
export * from './lib/ui/forms/
|
|
18
|
-
export * from './lib/ui/forms/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export * from './lib/ui/forms/inputs/
|
|
22
|
-
export * from './lib/ui/forms/inputs/
|
|
23
|
-
export * from './lib/ui/forms/
|
|
24
|
-
export * from './lib/ui/forms/
|
|
25
|
-
export * from './lib/ui/forms/
|
|
26
|
-
export * from './lib/ui/forms/
|
|
27
|
-
export * from './lib/ui/
|
|
28
|
-
export * from './lib/ui/
|
|
29
|
-
export * from './lib/ui/
|
|
30
|
-
export * from './lib/ui/
|
|
31
|
-
export * from './lib/ui/
|
|
32
|
-
export * from './lib/ui/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export * from './lib/ui/
|
|
36
|
-
export * from './lib/ui/
|
|
37
|
-
export * from './lib/ui/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export * from './lib/ui/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export * from './lib/
|
|
44
|
-
export * from './lib/
|
|
45
|
-
export * from './lib/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export * from './lib/
|
|
49
|
-
export * from './lib/
|
|
50
|
-
export * from './lib/
|
|
51
|
-
export * from './lib/
|
|
52
|
-
export * from './lib/
|
|
53
|
-
export * from './lib/
|
|
54
|
-
export * from './lib/
|
|
55
|
-
export * from './lib/
|
|
56
|
-
export * from './lib/
|
|
57
|
-
export * from './lib/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export * from './lib/
|
|
61
|
-
export * from './lib/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export * from './lib/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
export * from './lib/
|
|
68
|
-
export * from './lib/
|
|
69
|
-
export * from './lib/service/alert-error.service';
|
|
70
|
-
export * from './lib/service/formateador.service';
|
|
71
|
-
export * from './lib/service/toast.service';
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// MODELS
|
|
75
|
-
export * from './lib/models/button-color.model';
|
|
76
|
-
export * from './lib/models/button-properties.model';
|
|
77
|
-
export * from './lib/models/cell-rendered';
|
|
78
|
-
export * from './lib/models/dropdownoption.model';
|
|
79
|
-
export * from './lib/models/input-config';
|
|
80
|
-
export * from './lib/models/table-data.model';
|
|
81
|
-
export * from './lib/models/selected-row';
|
|
82
|
-
export * from './lib/models/comercial/documentos-cab-auxiliares.model';
|
|
83
|
-
export * from './lib/models/general/recursos.model';
|
|
84
|
-
export * from './lib/models/general/utils.interface';
|
|
85
|
-
|
|
86
|
-
export * from './lib/utils/general/validaciones'
|
|
87
|
-
export * from './lib/utils/general/validaciones-simple'
|
|
88
|
-
|
|
89
|
-
export * from './lib/utils/helpers/api-result'
|
|
90
|
-
export * from './lib/utils/helpers/modal-result'
|
|
91
|
-
|
|
92
|
-
export * from './lib/enums/table-events'
|
|
93
|
-
|
|
94
|
-
export * from './lib/directivas/acciones/atajos.directive'
|
|
95
|
-
export * from './lib/directivas/inputs/caracteres-codigo.directive'
|
|
96
|
-
export * from './lib/directivas/inputs/decimal.directive'
|
|
97
|
-
export * from './lib/directivas/inputs/only-number-flex.directive'
|
|
98
|
-
export * from './lib/directivas/inputs/only-number.directive'
|
|
99
|
-
export * from './lib/directivas/estilos/animated-checkbox.directive'
|
|
1
|
+
export * from './lib/ui/alerts/alert-confirmation/alert-confirmation.component';
|
|
2
|
+
export * from './lib/ui/alerts/alerta/alerta.component';
|
|
3
|
+
export * from './lib/ui/alerts/alert-error/alert-error.component';
|
|
4
|
+
export * from './lib/ui/alerts/badge/badge.component';
|
|
5
|
+
export * from './lib/ui/alerts/toaster/toaster.component';
|
|
6
|
+
export * from './lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component';
|
|
7
|
+
export * from './lib/ui/dropdown/dropdown-simple/dropdown.component';
|
|
8
|
+
export * from './lib/ui/forms/button/button.component';
|
|
9
|
+
export * from './lib/ui/forms/header/header.component';
|
|
10
|
+
export * from './lib/ui/forms/filter-toggle/filter-toggle.component';
|
|
11
|
+
export * from './lib/ui/forms/inputs/autocomplete/autocomplete.component';
|
|
12
|
+
export * from './lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component';
|
|
13
|
+
export * from './lib/ui/forms/inputs/check-box/check-box.component';
|
|
14
|
+
export * from './lib/ui/forms/inputs/doble-input/doble-input.component';
|
|
15
|
+
export * from './lib/ui/forms/inputs/input/input.component';
|
|
16
|
+
export * from './lib/ui/forms/inputs/input-clase/input-clase.component';
|
|
17
|
+
export * from './lib/ui/forms/inputs/input-dinamico/input-dinamico.component';
|
|
18
|
+
export * from './lib/ui/forms/inputs/input-radio/input-radio.component';
|
|
19
|
+
export * from './lib/ui/forms/inputs/multiselected/multiselected.component';
|
|
20
|
+
export * from './lib/ui/forms/inputs/radio/radio.component';
|
|
21
|
+
export * from './lib/ui/forms/inputs/switch/switch.component';
|
|
22
|
+
export * from './lib/ui/forms/inputs/switch-activo/switch-activo.component';
|
|
23
|
+
export * from './lib/ui/forms/lists/list-option/list-option.component';
|
|
24
|
+
export * from './lib/ui/forms/lists/list-situaciones/list-situaciones.component';
|
|
25
|
+
export * from './lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component';
|
|
26
|
+
export * from './lib/ui/forms/sidebar/sidebar.component';
|
|
27
|
+
export * from './lib/ui/general/detalle-credito/detalle-credito.component';
|
|
28
|
+
export * from './lib/ui/general/montos-calcular/montos-calcular.component';
|
|
29
|
+
export * from './lib/ui/general/spinner/spinner.component';
|
|
30
|
+
export * from './lib/ui/tables/dropdown-menu/dropdown-menu.component';
|
|
31
|
+
export * from './lib/ui/tables/card-mobile/card-mobile.component';
|
|
32
|
+
export * from './lib/ui/tables/paginador/paginador.component';
|
|
33
|
+
export * from './lib/ui/tables/table-advance/table-advance.component';
|
|
34
|
+
export * from './lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component';
|
|
35
|
+
export * from './lib/ui/tables/table-busqueda/table-busqueda.component';
|
|
36
|
+
export * from './lib/ui/tables/table-detalle/table-detalle.component';
|
|
37
|
+
export * from './lib/ui/tables/table-simple/table-simple.component';
|
|
38
|
+
export * from './lib/ui/tables/table-ultimate/table-ultimate.component';
|
|
39
|
+
export * from './lib/ui/tables/table-agrupada/table-agrupada.component';
|
|
40
|
+
export * from './lib/ui/tabs/nav-tabs/nav-tabs.component';
|
|
41
|
+
export * from './lib/ui/tabs/tab-item/tab-item.component';
|
|
42
|
+
export * from './lib/modals/general/md-generico/md-generico.component';
|
|
43
|
+
export * from './lib/service/alert.service';
|
|
44
|
+
export * from './lib/service/alert-confirmation.service';
|
|
45
|
+
export * from './lib/service/alert-error.service';
|
|
46
|
+
export * from './lib/service/formateador.service';
|
|
47
|
+
export * from './lib/service/toast.service';
|
|
48
|
+
export * from './lib/models/button-color.model';
|
|
49
|
+
export * from './lib/models/button-properties.model';
|
|
50
|
+
export * from './lib/models/cell-rendered';
|
|
51
|
+
export * from './lib/models/dropdownoption.model';
|
|
52
|
+
export * from './lib/models/input-config';
|
|
53
|
+
export * from './lib/models/table-data.model';
|
|
54
|
+
export * from './lib/models/selected-row';
|
|
55
|
+
export * from './lib/models/comercial/documentos-cab-auxiliares.model';
|
|
56
|
+
export * from './lib/models/general/recursos.model';
|
|
57
|
+
export * from './lib/models/general/utils.interface';
|
|
58
|
+
export * from './lib/utils/general/validaciones';
|
|
59
|
+
export * from './lib/utils/general/validaciones-simple';
|
|
60
|
+
export * from './lib/utils/helpers/api-result';
|
|
61
|
+
export * from './lib/utils/helpers/modal-result';
|
|
62
|
+
export * from './lib/enums/table-events';
|
|
63
|
+
export * from './lib/directivas/acciones/atajos.directive';
|
|
64
|
+
export * from './lib/directivas/inputs/caracteres-codigo.directive';
|
|
65
|
+
export * from './lib/directivas/inputs/decimal.directive';
|
|
66
|
+
export * from './lib/directivas/inputs/only-number-flex.directive';
|
|
67
|
+
export * from './lib/directivas/inputs/only-number.directive';
|
|
68
|
+
export * from './lib/directivas/estilos/animated-checkbox.directive';
|
package/ng-package.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Directive, HostListener, input, output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[atajoTecla]'
|
|
5
|
-
})
|
|
6
|
-
export class AtajosDirective {
|
|
7
|
-
|
|
8
|
-
altKeyCombination = input<string>('')
|
|
9
|
-
emitirAtajo = output<void>()
|
|
10
|
-
|
|
11
|
-
@HostListener('window:keydown', ['$event'])
|
|
12
|
-
onKeyDown(event: KeyboardEvent) {
|
|
13
|
-
|
|
14
|
-
const key = event.key?.toLowerCase?.();
|
|
15
|
-
if (!key) return;
|
|
16
|
-
|
|
17
|
-
if (event.ctrlKey &&
|
|
18
|
-
!event.altKey &&
|
|
19
|
-
!event.metaKey &&
|
|
20
|
-
!event.shiftKey &&
|
|
21
|
-
key === this.altKeyCombination().toLowerCase()) {
|
|
22
|
-
event.preventDefault();
|
|
23
|
-
this.emitirAtajo.emit();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { animate, state, style, transition, trigger } from "@angular/animations";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const fadeInOut = trigger('fadeInOut', [
|
|
5
|
-
transition(':enter', [
|
|
6
|
-
style({ opacity: 0, transform: 'translateY(-5px)' }),
|
|
7
|
-
animate('200ms ease-out', style({ opacity: 1, transform: 'translateY(0)' })),
|
|
8
|
-
]),
|
|
9
|
-
transition(':leave', [
|
|
10
|
-
animate('200ms ease-in', style({ opacity: 0, transform: 'translateY(-5px)' })),
|
|
11
|
-
]),
|
|
12
|
-
]);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const dropdownAnimation = trigger('dropdownAnimation', [
|
|
16
|
-
transition(':enter', [
|
|
17
|
-
style({ height: '0', opacity: 0, transform: 'translateY(-10px)', overflow: 'hidden' }),
|
|
18
|
-
animate(
|
|
19
|
-
'200ms ease-out',
|
|
20
|
-
style({ height: '*', opacity: 1, transform: 'translateY(0)' })
|
|
21
|
-
),
|
|
22
|
-
]),
|
|
23
|
-
transition(':leave', [
|
|
24
|
-
animate(
|
|
25
|
-
'200ms ease-in',
|
|
26
|
-
style({ height: '0', opacity: 0, transform: 'translateY(-10px)' })
|
|
27
|
-
),
|
|
28
|
-
]),
|
|
29
|
-
]);
|
|
30
|
-
|
|
31
|
-
export const dropdownAnimationV2 = trigger('dropdownAnimation', [
|
|
32
|
-
state('cerrado', style({
|
|
33
|
-
height: '0px',
|
|
34
|
-
opacity: 0,
|
|
35
|
-
transform: 'translateY(-10px)',
|
|
36
|
-
overflow: 'hidden',
|
|
37
|
-
})),
|
|
38
|
-
state('abierto', style({
|
|
39
|
-
height: '*',
|
|
40
|
-
opacity: 1,
|
|
41
|
-
transform: 'translateY(0)',
|
|
42
|
-
overflow: 'hidden',
|
|
43
|
-
})),
|
|
44
|
-
transition('cerrado <=> abierto', animate('300ms ease')),
|
|
45
|
-
]);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
|
|
2
|
-
import { Directive, ElementRef, inject, input, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[fade]'
|
|
6
|
-
})
|
|
7
|
-
export class FadeDirective implements OnInit, OnDestroy{
|
|
8
|
-
|
|
9
|
-
private elementRef = inject(ElementRef)
|
|
10
|
-
private builder = inject(AnimationBuilder)
|
|
11
|
-
|
|
12
|
-
fadeIn = input<boolean>(true)
|
|
13
|
-
|
|
14
|
-
private player: AnimationPlayer;
|
|
15
|
-
|
|
16
|
-
playAnimation(fadeIn: boolean){
|
|
17
|
-
const animation = fadeIn
|
|
18
|
-
? [
|
|
19
|
-
style({ opacity: 0, transform: 'translateY(-5px)' }),
|
|
20
|
-
animate('200ms ease-out', style({ opacity: 1, transform: 'translateY(0)' })),
|
|
21
|
-
]
|
|
22
|
-
: [
|
|
23
|
-
style({ opacity: 1, transform: 'translateY(0)' }),
|
|
24
|
-
animate('200ms ease-in', style({ opacity: 0, transform: 'translateY(-5px)' })),
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const factory = this.builder.build(animation);
|
|
28
|
-
this.player = factory.create(this.elementRef.nativeElement);
|
|
29
|
-
this.player.play();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnInit(): void {
|
|
33
|
-
this.playAnimation(this.fadeIn());
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ngOnDestroy(): void {
|
|
37
|
-
if (this.player) {
|
|
38
|
-
this.playAnimation(false);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: 'input[type=checkbox][animatedCheckbox]',
|
|
5
|
-
standalone: true
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
export class AnimatedCheckboxDirective {
|
|
9
|
-
|
|
10
|
-
@Input() cbClass: 'success' | 'danger' | 'warning' | 'info' | '' = '';
|
|
11
|
-
|
|
12
|
-
private el = inject(ElementRef<HTMLInputElement>);
|
|
13
|
-
private renderer = inject(Renderer2);
|
|
14
|
-
|
|
15
|
-
ngOnInit() {
|
|
16
|
-
const input = this.el.nativeElement;
|
|
17
|
-
const label = input.closest('label');
|
|
18
|
-
if (!label) return;
|
|
19
|
-
|
|
20
|
-
this.renderer.addClass(label, 'checkbox-animated');
|
|
21
|
-
|
|
22
|
-
if (this.cbClass) {
|
|
23
|
-
this.renderer.addClass(label, this.cbClass);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export const COLOR_CLASSES = {
|
|
2
|
-
azul: 'btn-info',
|
|
3
|
-
rojo: 'btn-danger',
|
|
4
|
-
rojo_alerta: 'btn-danger-alert',
|
|
5
|
-
verde: 'btn-success',
|
|
6
|
-
negro: 'btn-dark',
|
|
7
|
-
amarillo: 'btn-warning',
|
|
8
|
-
gris: 'btn-secondary',
|
|
9
|
-
plomo: 'btn-dark bg-mid-button'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const OUTLINE_COLOR_CLASSES = {
|
|
13
|
-
azul: 'btn-outline-info',
|
|
14
|
-
rojo: 'btn-outline-danger',
|
|
15
|
-
verde: 'btn-outline-success',
|
|
16
|
-
negro: 'btn-outline-dark',
|
|
17
|
-
amarillo: 'btn-outline-warning',
|
|
18
|
-
gris: 'btn-outline-secondary',
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const ICON_CLASSES = {
|
|
22
|
-
agregar: 'fa-plus',
|
|
23
|
-
buscar: 'fa-search',
|
|
24
|
-
guardar: 'fa-save',
|
|
25
|
-
nocancelar: 'fa-check-circle',
|
|
26
|
-
cancelar: 'fa-times-circle',
|
|
27
|
-
cancelar2: 'fa-times',
|
|
28
|
-
marcar: 'fa-file',
|
|
29
|
-
atras: 'fa-angle-double-left',
|
|
30
|
-
adelante: 'fa-angle-double-right',
|
|
31
|
-
eliminar: 'fa-trash-alt',
|
|
32
|
-
imprimir: 'fa-print',
|
|
33
|
-
subir: 'fa-upload',
|
|
34
|
-
bajar: 'fa-download',
|
|
35
|
-
ver: 'fa-eye',
|
|
36
|
-
comentario: 'fa-comment',
|
|
37
|
-
editar: 'fa-pencil-alt',
|
|
38
|
-
calcular: 'fa-calculator',
|
|
39
|
-
aprobar: 'fa-thumbs-up',
|
|
40
|
-
desaprobar: 'fa-thumbs-down',
|
|
41
|
-
check: 'fa-check',
|
|
42
|
-
excel: 'fa-file-excel',
|
|
43
|
-
pdf: 'fa-file-pdf',
|
|
44
|
-
refresh: 'fa-sync-alt',
|
|
45
|
-
cerrar: 'fa-times',
|
|
46
|
-
visar: 'fa-paper-plane',
|
|
47
|
-
anular: 'fa-ban',
|
|
48
|
-
trazabilidad: 'fa-copy',
|
|
49
|
-
correo: 'fa-envelope-open',
|
|
50
|
-
usuario: 'fa-user-alt',
|
|
51
|
-
enviarSunat: 'fa-location-arrow',
|
|
52
|
-
descargar: 'fa-download',
|
|
53
|
-
borrar: 'fa-eraser',
|
|
54
|
-
lista: 'fa-list',
|
|
55
|
-
monedas: 'fa-coins',
|
|
56
|
-
izquierda: 'fa-arrow-left',
|
|
57
|
-
derecha: 'fa-arrow-right',
|
|
58
|
-
caja: 'fas fa-folder-plus',
|
|
59
|
-
cerrar_caja: 'fas fa-rectangle-xmark',
|
|
60
|
-
abrir_caja: 'fas fa-box-open',
|
|
61
|
-
liquidar: 'fas fa-cash-register',
|
|
62
|
-
configuracion: 'fas fa-cog',
|
|
63
|
-
contrato: 'fas fa-file-contract',
|
|
64
|
-
bloquear: 'fas fa-lock',
|
|
65
|
-
desbloquear: 'fas fa-unlock'
|
|
66
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, inject, input, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { COLOR_CLASSES } from './button.constants';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[colorBtn]',
|
|
6
|
-
standalone: true
|
|
7
|
-
})
|
|
8
|
-
export class ButtonsModalDirective implements OnInit {
|
|
9
|
-
color = input<'azul' | 'rojo' | 'verde' | 'negro' | 'amarillo' | 'gris' | 'plomo' | 'none' | string>('azul', { alias: 'colorBtn' })
|
|
10
|
-
|
|
11
|
-
private el = inject(ElementRef)
|
|
12
|
-
private renderer = inject(Renderer2)
|
|
13
|
-
|
|
14
|
-
ngOnInit(): void {
|
|
15
|
-
this.aplicarEstilos()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
aplicarEstilos() {
|
|
19
|
-
const baseClasses = ['btn', 'btn-sm', 'py-2', 'px-4', 'btn-rounded', 'me-1']
|
|
20
|
-
baseClasses.forEach(cls => this.renderer.addClass(this.el.nativeElement, cls))
|
|
21
|
-
|
|
22
|
-
if (this.color() === 'none') {
|
|
23
|
-
this.renderer.removeClass(this.el.nativeElement, 'py-2')
|
|
24
|
-
this.renderer.removeClass(this.el.nativeElement, 'px-4')
|
|
25
|
-
this.renderer.addClass(this.el.nativeElement, 'bg-none')
|
|
26
|
-
this.renderer.addClass(this.el.nativeElement, 'border-0')
|
|
27
|
-
this.renderer.addClass(this.el.nativeElement, 'fs-6')
|
|
28
|
-
this.renderer.addClass(this.el.nativeElement, 'fw-7')
|
|
29
|
-
} else {
|
|
30
|
-
const colorClass = COLOR_CLASSES[this.color()]
|
|
31
|
-
if (colorClass) {
|
|
32
|
-
this.renderer.addClass(this.el.nativeElement, colorClass)
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, inject, input, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { OUTLINE_COLOR_CLASSES } from './button.constants';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[colorOutlineBtn]',
|
|
6
|
-
standalone: true
|
|
7
|
-
})
|
|
8
|
-
export class ButtonsOutlineDirective implements OnInit {
|
|
9
|
-
color = input<'azul' | 'rojo' | 'verde' | 'negro' | 'amarillo' | 'gris' | 'plomo' | string>('azul', { alias: 'colorOutlineBtn' })
|
|
10
|
-
|
|
11
|
-
private el = inject(ElementRef)
|
|
12
|
-
private renderer = inject(Renderer2)
|
|
13
|
-
|
|
14
|
-
ngOnInit(): void {
|
|
15
|
-
this.aplicarEstilos()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
aplicarEstilos() {
|
|
19
|
-
const baseClasses = ['btn', 'btn-rounded', 'me-1', 'fs-8', 'px-3']
|
|
20
|
-
baseClasses.forEach(cls => this.renderer.addClass(this.el.nativeElement, cls))
|
|
21
|
-
|
|
22
|
-
const colorClass = OUTLINE_COLOR_CLASSES[this.color()]
|
|
23
|
-
if (colorClass) {
|
|
24
|
-
this.renderer.addClass(this.el.nativeElement, colorClass)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, inject, input, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
-
import { ICON_CLASSES } from './button.constants';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[iconName]',
|
|
6
|
-
standalone: true
|
|
7
|
-
})
|
|
8
|
-
export class IconsDirective implements OnInit {
|
|
9
|
-
name = input<keyof typeof ICON_CLASSES | string>('agregar', { alias: 'iconName' })
|
|
10
|
-
|
|
11
|
-
private elementRef = inject(ElementRef)
|
|
12
|
-
private renderer = inject(Renderer2)
|
|
13
|
-
|
|
14
|
-
ngOnInit(): void {
|
|
15
|
-
this.aplicarEstilo()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
aplicarEstilo() {
|
|
19
|
-
this.renderer.addClass(this.elementRef.nativeElement, 'fa')
|
|
20
|
-
|
|
21
|
-
const iconClass = ICON_CLASSES[this.name()]
|
|
22
|
-
if (iconClass) {
|
|
23
|
-
this.renderer.addClass(this.elementRef.nativeElement, iconClass)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Directive, HostListener, inject, input } from '@angular/core';
|
|
2
|
-
import { ToastService } from '../../service/toast.service';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[caracteresCodigo]'
|
|
6
|
-
})
|
|
7
|
-
export class CaracteresCodigoDirective {
|
|
8
|
-
|
|
9
|
-
private regex: RegExp = /^[a-zA-Z0-9.\-/]*$/
|
|
10
|
-
private toast = inject(ToastService)
|
|
11
|
-
|
|
12
|
-
caracteresCodigo = input<boolean>(true)
|
|
13
|
-
|
|
14
|
-
@HostListener('keypress', ['$event'])
|
|
15
|
-
onKeyPress(event: KeyboardEvent): void {
|
|
16
|
-
if (!this.caracteresCodigo()) return
|
|
17
|
-
const allowedKeys = ['Delete', 'Backspace', 'Tab', 'Escape', 'Enter']
|
|
18
|
-
const isCtrlCombination =
|
|
19
|
-
event.ctrlKey && ['a', 'c', 'v', 'x'].includes(event.key.toLowerCase())
|
|
20
|
-
if (allowedKeys.includes(event.key) || isCtrlCombination) {
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
if (!/^[a-zA-Z0-9.\-/]$/.test(event.key)) {
|
|
24
|
-
event.preventDefault()
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@HostListener('input', ['$event'])
|
|
29
|
-
onInput(event: Event) {
|
|
30
|
-
if (!this.caracteresCodigo()) return
|
|
31
|
-
const input = event.target as HTMLInputElement
|
|
32
|
-
const originalValue = input.value
|
|
33
|
-
|
|
34
|
-
const newValue = originalValue.replace(/[^a-zA-Z0-9.\-/]/g, '')
|
|
35
|
-
|
|
36
|
-
if (originalValue != newValue) {
|
|
37
|
-
input.value = newValue
|
|
38
|
-
this.toast.warning('Advertencia',`Solo se permiten caracteres alfanuméricos, guion (-), punto (.) y slash (/)`)
|
|
39
|
-
input.dispatchEvent(new Event('input'))
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@HostListener('paste', ['$event'])
|
|
44
|
-
onPaste(event: ClipboardEvent) {
|
|
45
|
-
if (!this.caracteresCodigo()) return
|
|
46
|
-
const clipboardData = event.clipboardData?.getData('text/plain') || ''
|
|
47
|
-
if (!this.regex.test(clipboardData)) {
|
|
48
|
-
event.preventDefault()
|
|
49
|
-
this.toast.warning('Advertencia', `Solo se permiten caracteres alfanuméricos, guion (-), punto (.) y slash (/)`)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@HostListener('drop', ['$event'])
|
|
54
|
-
onDrop(event: DragEvent) {
|
|
55
|
-
if (!this.caracteresCodigo()) return
|
|
56
|
-
const textData = event.dataTransfer?.getData('text') || ''
|
|
57
|
-
if (!this.regex.test(textData)) {
|
|
58
|
-
event.preventDefault()
|
|
59
|
-
this.toast.warning('Advertencia',`Solo se permiten caracteres alfanuméricos, guion (-), punto (.) y slash (/)`)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { DecimalPipe } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';
|
|
3
|
-
import { NgModel } from '@angular/forms';
|
|
4
|
-
import { cleanNumber } from 'shared-tsi';
|
|
5
|
-
|
|
6
|
-
@Directive({
|
|
7
|
-
selector: '[appDecimal]',
|
|
8
|
-
providers: [DecimalPipe]
|
|
9
|
-
})
|
|
10
|
-
export class DecimalDirective {
|
|
11
|
-
|
|
12
|
-
appDecimal = input<string>('1.2-2')
|
|
13
|
-
|
|
14
|
-
private elementRef = inject(ElementRef)
|
|
15
|
-
private decimalPipe = inject(DecimalPipe)
|
|
16
|
-
private ngModel = inject(NgModel)
|
|
17
|
-
|
|
18
|
-
private isFocused = false
|
|
19
|
-
|
|
20
|
-
ngAfterViewInit(): void {
|
|
21
|
-
queueMicrotask(() => {
|
|
22
|
-
this.formatValue()
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@HostListener('blur')
|
|
27
|
-
onBlur(): void {
|
|
28
|
-
this.isFocused = false
|
|
29
|
-
this.formatValue()
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// @HostListener('input', ['$event'])
|
|
33
|
-
// onInput(event: Event): void {
|
|
34
|
-
// const input = event.target as HTMLInputElement
|
|
35
|
-
// const rawValue = input.value
|
|
36
|
-
|
|
37
|
-
// const cleaned = rawValue.replace(/[^0-9.,-]/g, '')
|
|
38
|
-
// const normalized = cleaned.replace(',', '.')
|
|
39
|
-
// const parsed = parseFloat(normalized)
|
|
40
|
-
|
|
41
|
-
// if (!isNaN(parsed)) {
|
|
42
|
-
// this.ngModel.update.emit(parsed)
|
|
43
|
-
// }
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
private formatValue(): void {
|
|
47
|
-
const value = cleanNumber(this.ngModel.model)
|
|
48
|
-
const formatted = this.decimalPipe.transform(value, (this.appDecimal() ?? '1.2-2'))
|
|
49
|
-
this.elementRef.nativeElement.value = formatted !== null ? formatted : this.decimalPipe.transform(0, (this.appDecimal() ?? '1.2-2'))
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener, inject } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[onlyDay]'
|
|
5
|
-
})
|
|
6
|
-
export class OnlyDayDirective {
|
|
7
|
-
private elementRef = inject(ElementRef<HTMLInputElement>)
|
|
8
|
-
|
|
9
|
-
@HostListener('keypress', ['$event'])
|
|
10
|
-
onKeyPress(event: KeyboardEvent): void {
|
|
11
|
-
const inputChar = event.key
|
|
12
|
-
|
|
13
|
-
if (event.ctrlKey || event.metaKey || inputChar.length > 1) return
|
|
14
|
-
|
|
15
|
-
if (!/^[0-9]$/.test(inputChar)) {
|
|
16
|
-
event.preventDefault()
|
|
17
|
-
return
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const input = this.elementRef.nativeElement
|
|
21
|
-
const currentValue = input.value
|
|
22
|
-
const start = input.selectionStart ?? currentValue.length
|
|
23
|
-
const end = input.selectionEnd ?? currentValue.length
|
|
24
|
-
|
|
25
|
-
const proposed = currentValue.substring(0, start) + inputChar + currentValue.substring(end)
|
|
26
|
-
const num = Number(proposed)
|
|
27
|
-
|
|
28
|
-
if (num < 1 || num > 31) {
|
|
29
|
-
event.preventDefault()
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@HostListener('paste', ['$event'])
|
|
34
|
-
onPaste(event: ClipboardEvent): void {
|
|
35
|
-
const pasted = event.clipboardData?.getData('text') || ''
|
|
36
|
-
|
|
37
|
-
if (!/^\d+$/.test(pasted)) {
|
|
38
|
-
event.preventDefault()
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const input = this.elementRef.nativeElement
|
|
43
|
-
const currentValue = input.value
|
|
44
|
-
const start = input.selectionStart ?? currentValue.length
|
|
45
|
-
const end = input.selectionEnd ?? currentValue.length
|
|
46
|
-
|
|
47
|
-
const proposed = currentValue.substring(0, start) + pasted + currentValue.substring(end)
|
|
48
|
-
const num = Number(proposed)
|
|
49
|
-
if (num < 1 || num > 31) {
|
|
50
|
-
event.preventDefault()
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|