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.
Files changed (237) hide show
  1. package/fesm2022/ng-components-tsi.mjs +5063 -0
  2. package/fesm2022/ng-components-tsi.mjs.map +1 -0
  3. package/index.d.ts +5 -0
  4. package/lib/directivas/acciones/atajos.directive.d.ts +8 -0
  5. package/lib/directivas/animaciones/fade-animation.d.ts +3 -0
  6. package/lib/directivas/estilos/animated-checkbox.directive.d.ts +9 -0
  7. package/lib/directivas/estilos/button.constants.d.ts +64 -0
  8. package/lib/directivas/estilos/buttons-modal.directive.d.ts +11 -0
  9. package/lib/directivas/estilos/buttons-outline-directive.d.ts +11 -0
  10. package/lib/directivas/estilos/icons.directive.d.ts +11 -0
  11. package/lib/directivas/inputs/caracteres-codigo.directive.d.ts +12 -0
  12. package/lib/directivas/inputs/decimal.directive.d.ts +13 -0
  13. package/lib/directivas/inputs/only-day.directive.d.ts +8 -0
  14. package/lib/directivas/inputs/only-number-flex.directive.d.ts +9 -0
  15. package/lib/directivas/inputs/only-number.directive.d.ts +8 -0
  16. package/lib/enums/table-events.d.ts +5 -0
  17. package/lib/modals/general/md-generico/md-generico.component.d.ts +25 -0
  18. package/lib/models/button-color.model.d.ts +3 -0
  19. package/{src/lib/models/button-properties.model.ts → lib/models/button-properties.model.d.ts} +7 -8
  20. package/lib/models/cell-rendered.d.ts +11 -0
  21. package/lib/models/comercial/documentos-cab-auxiliares.model.d.ts +17 -0
  22. package/{src/lib/models/dropdownoption.model.ts → lib/models/dropdownoption.model.d.ts} +14 -15
  23. package/lib/models/general/recursos.model.d.ts +271 -0
  24. package/lib/models/general/utils.interface.d.ts +57 -0
  25. package/lib/models/input-config.d.ts +25 -0
  26. package/{src/lib/models/selected-row.ts → lib/models/selected-row.d.ts} +4 -4
  27. package/{src/lib/models/table-data.model.ts → lib/models/table-data.model.d.ts} +21 -21
  28. package/lib/service/alert-confirmation.service.d.ts +26 -0
  29. package/lib/service/alert-error.service.d.ts +9 -0
  30. package/lib/service/alert.service.d.ts +33 -0
  31. package/lib/service/formateador.service.d.ts +10 -0
  32. package/lib/service/toast.service.d.ts +25 -0
  33. package/lib/ui/alerts/alert-confirmation/alert-confirmation.component.d.ts +32 -0
  34. package/lib/ui/alerts/alert-error/alert-error.component.d.ts +9 -0
  35. package/lib/ui/alerts/alerta/alerta.component.d.ts +12 -0
  36. package/lib/ui/alerts/badge/badge.component.d.ts +8 -0
  37. package/lib/ui/alerts/toaster/toaster.component.d.ts +17 -0
  38. package/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.d.ts +11 -0
  39. package/lib/ui/dropdown/dropdown-simple/dropdown.component.d.ts +13 -0
  40. package/lib/ui/forms/button/button.component.d.ts +47 -0
  41. package/lib/ui/forms/filter-toggle/filter-toggle.component.d.ts +9 -0
  42. package/lib/ui/forms/header/header.component.d.ts +17 -0
  43. package/lib/ui/forms/inputs/autocomplete/autocomplete.component.d.ts +43 -0
  44. package/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.d.ts +48 -0
  45. package/lib/ui/forms/inputs/check-box/check-box.component.d.ts +14 -0
  46. package/lib/ui/forms/inputs/doble-input/doble-input.component.d.ts +47 -0
  47. package/lib/ui/forms/inputs/input/input.component.d.ts +60 -0
  48. package/lib/ui/forms/inputs/input-clase/input-clase.component.d.ts +13 -0
  49. package/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.d.ts +8 -0
  50. package/lib/ui/forms/inputs/input-radio/input-radio.component.d.ts +24 -0
  51. package/lib/ui/forms/inputs/multiselected/multiselected.component.d.ts +39 -0
  52. package/lib/ui/forms/inputs/radio/radio.component.d.ts +14 -0
  53. package/lib/ui/forms/inputs/switch/switch.component.d.ts +20 -0
  54. package/lib/ui/forms/inputs/switch-activo/switch-activo.component.d.ts +21 -0
  55. package/lib/ui/forms/lists/list-option/list-option.component.d.ts +23 -0
  56. package/lib/ui/forms/lists/list-situaciones/list-situaciones.component.d.ts +28 -0
  57. package/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.d.ts +26 -0
  58. package/lib/ui/forms/sidebar/sidebar.component.d.ts +15 -0
  59. package/lib/ui/general/detalle-credito/detalle-credito.component.d.ts +8 -0
  60. package/lib/ui/general/montos-calcular/montos-calcular.component.d.ts +12 -0
  61. package/lib/ui/general/spinner/spinner.component.d.ts +5 -0
  62. package/lib/ui/tables/card-mobile/card-mobile.component.d.ts +17 -0
  63. package/lib/ui/tables/dropdown-menu/dropdown-menu.component.d.ts +43 -0
  64. package/lib/ui/tables/paginador/paginador.component.d.ts +20 -0
  65. package/lib/ui/tables/table-advance/table-advance.component.d.ts +94 -0
  66. package/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.d.ts +82 -0
  67. package/lib/ui/tables/table-agrupada/table-agrupada.component.d.ts +96 -0
  68. package/lib/ui/tables/table-busqueda/table-busqueda.component.d.ts +48 -0
  69. package/lib/ui/tables/table-detalle/table-detalle.component.d.ts +59 -0
  70. package/lib/ui/tables/table-simple/table-simple.component.d.ts +39 -0
  71. package/lib/ui/tables/table-ultimate/table-ultimate.component.d.ts +84 -0
  72. package/lib/ui/tabs/nav-tabs/nav-tabs.component.d.ts +9 -0
  73. package/lib/ui/tabs/tab-item/tab-item.component.d.ts +9 -0
  74. package/lib/utils/general/validaciones-simple.d.ts +2 -0
  75. package/lib/utils/general/validaciones.d.ts +11 -0
  76. package/lib/utils/helpers/api-result.d.ts +17 -0
  77. package/lib/utils/helpers/modal-result.d.ts +10 -0
  78. package/ng-components-tsi-0.0.39.tgz +0 -0
  79. package/package.json +31 -23
  80. package/{src/public-api.ts → public-api.d.ts} +68 -99
  81. package/ng-package.json +0 -7
  82. package/src/lib/directivas/acciones/atajos.directive.ts +0 -26
  83. package/src/lib/directivas/animaciones/fade-animation.ts +0 -45
  84. package/src/lib/directivas/animaciones/fade.directive.ts +0 -43
  85. package/src/lib/directivas/estilos/animated-checkbox.directive.ts +0 -26
  86. package/src/lib/directivas/estilos/button.constants.ts +0 -66
  87. package/src/lib/directivas/estilos/buttons-modal.directive.ts +0 -36
  88. package/src/lib/directivas/estilos/buttons-outline-directive.ts +0 -27
  89. package/src/lib/directivas/estilos/icons.directive.ts +0 -26
  90. package/src/lib/directivas/inputs/caracteres-codigo.directive.ts +0 -63
  91. package/src/lib/directivas/inputs/decimal.directive.ts +0 -51
  92. package/src/lib/directivas/inputs/only-day.directive.ts +0 -53
  93. package/src/lib/directivas/inputs/only-number-flex.directive.ts +0 -50
  94. package/src/lib/directivas/inputs/only-number.directive.ts +0 -53
  95. package/src/lib/enums/table-events.ts +0 -5
  96. package/src/lib/modals/general/md-generico/md-generico.component.html +0 -44
  97. package/src/lib/modals/general/md-generico/md-generico.component.scss +0 -4
  98. package/src/lib/modals/general/md-generico/md-generico.component.ts +0 -50
  99. package/src/lib/models/button-color.model.ts +0 -9
  100. package/src/lib/models/cell-rendered.ts +0 -12
  101. package/src/lib/models/comercial/documentos-cab-auxiliares.model.ts +0 -18
  102. package/src/lib/models/general/recursos.model.ts +0 -285
  103. package/src/lib/models/general/utils.interface.ts +0 -66
  104. package/src/lib/models/input-config.ts +0 -26
  105. package/src/lib/service/alert-confirmation.service.ts +0 -87
  106. package/src/lib/service/alert-error.service.ts +0 -27
  107. package/src/lib/service/alert.service.ts +0 -216
  108. package/src/lib/service/formateador.service.ts +0 -49
  109. package/src/lib/service/toast.service.ts +0 -75
  110. package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.html +0 -40
  111. package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.scss +0 -42
  112. package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.ts +0 -118
  113. package/src/lib/ui/alerts/alert-error/alert-error.component.html +0 -11
  114. package/src/lib/ui/alerts/alert-error/alert-error.component.scss +0 -39
  115. package/src/lib/ui/alerts/alert-error/alert-error.component.ts +0 -27
  116. package/src/lib/ui/alerts/alerta/alerta.component.html +0 -18
  117. package/src/lib/ui/alerts/alerta/alerta.component.scss +0 -104
  118. package/src/lib/ui/alerts/alerta/alerta.component.ts +0 -25
  119. package/src/lib/ui/alerts/badge/badge.component.ts +0 -16
  120. package/src/lib/ui/alerts/toaster/toaster.component.html +0 -52
  121. package/src/lib/ui/alerts/toaster/toaster.component.scss +0 -275
  122. package/src/lib/ui/alerts/toaster/toaster.component.ts +0 -50
  123. package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.html +0 -20
  124. package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.scss +0 -11
  125. package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.ts +0 -18
  126. package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.html +0 -10
  127. package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.scss +0 -54
  128. package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.ts +0 -36
  129. package/src/lib/ui/forms/button/button.component.html +0 -69
  130. package/src/lib/ui/forms/button/button.component.scss +0 -126
  131. package/src/lib/ui/forms/button/button.component.ts +0 -137
  132. package/src/lib/ui/forms/filter-toggle/filter-toggle.component.scss +0 -22
  133. package/src/lib/ui/forms/filter-toggle/filter-toggle.component.ts +0 -29
  134. package/src/lib/ui/forms/header/header.component.html +0 -22
  135. package/src/lib/ui/forms/header/header.component.scss +0 -22
  136. package/src/lib/ui/forms/header/header.component.ts +0 -40
  137. package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.html +0 -46
  138. package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.scss +0 -90
  139. package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.ts +0 -203
  140. package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.html +0 -61
  141. package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.scss +0 -128
  142. package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.ts +0 -145
  143. package/src/lib/ui/forms/inputs/check-box/check-box.component.html +0 -6
  144. package/src/lib/ui/forms/inputs/check-box/check-box.component.ts +0 -24
  145. package/src/lib/ui/forms/inputs/doble-input/doble-input.component.html +0 -60
  146. package/src/lib/ui/forms/inputs/doble-input/doble-input.component.scss +0 -86
  147. package/src/lib/ui/forms/inputs/doble-input/doble-input.component.ts +0 -129
  148. package/src/lib/ui/forms/inputs/input/input.component.html +0 -169
  149. package/src/lib/ui/forms/inputs/input/input.component.scss +0 -74
  150. package/src/lib/ui/forms/inputs/input/input.component.ts +0 -147
  151. package/src/lib/ui/forms/inputs/input-clase/input-clase.component.html +0 -30
  152. package/src/lib/ui/forms/inputs/input-clase/input-clase.component.scss +0 -0
  153. package/src/lib/ui/forms/inputs/input-clase/input-clase.component.ts +0 -28
  154. package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.html +0 -41
  155. package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.scss +0 -0
  156. package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.ts +0 -17
  157. package/src/lib/ui/forms/inputs/input-radio/input-radio.component.html +0 -26
  158. package/src/lib/ui/forms/inputs/input-radio/input-radio.component.scss +0 -53
  159. package/src/lib/ui/forms/inputs/input-radio/input-radio.component.ts +0 -36
  160. package/src/lib/ui/forms/inputs/multiselected/multiselected.component.html +0 -56
  161. package/src/lib/ui/forms/inputs/multiselected/multiselected.component.scss +0 -145
  162. package/src/lib/ui/forms/inputs/multiselected/multiselected.component.ts +0 -109
  163. package/src/lib/ui/forms/inputs/radio/radio.component.html +0 -7
  164. package/src/lib/ui/forms/inputs/radio/radio.component.scss +0 -0
  165. package/src/lib/ui/forms/inputs/radio/radio.component.ts +0 -23
  166. package/src/lib/ui/forms/inputs/switch/switch.component.html +0 -12
  167. package/src/lib/ui/forms/inputs/switch/switch.component.scss +0 -48
  168. package/src/lib/ui/forms/inputs/switch/switch.component.ts +0 -50
  169. package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.html +0 -12
  170. package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.scss +0 -65
  171. package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.ts +0 -52
  172. package/src/lib/ui/forms/lists/list-option/list-option.component.html +0 -24
  173. package/src/lib/ui/forms/lists/list-option/list-option.component.scss +0 -49
  174. package/src/lib/ui/forms/lists/list-option/list-option.component.ts +0 -35
  175. package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.html +0 -29
  176. package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.scss +0 -0
  177. package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.ts +0 -99
  178. package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.html +0 -46
  179. package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.scss +0 -30
  180. package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.ts +0 -96
  181. package/src/lib/ui/forms/sidebar/sidebar.component.html +0 -33
  182. package/src/lib/ui/forms/sidebar/sidebar.component.scss +0 -85
  183. package/src/lib/ui/forms/sidebar/sidebar.component.ts +0 -61
  184. package/src/lib/ui/general/detalle-credito/detalle-credito.component.html +0 -35
  185. package/src/lib/ui/general/detalle-credito/detalle-credito.component.scss +0 -35
  186. package/src/lib/ui/general/detalle-credito/detalle-credito.component.ts +0 -14
  187. package/src/lib/ui/general/montos-calcular/montos-calcular.component.html +0 -17
  188. package/src/lib/ui/general/montos-calcular/montos-calcular.component.scss +0 -36
  189. package/src/lib/ui/general/montos-calcular/montos-calcular.component.ts +0 -19
  190. package/src/lib/ui/general/spinner/spinner.component.html +0 -8
  191. package/src/lib/ui/general/spinner/spinner.component.scss +0 -96
  192. package/src/lib/ui/general/spinner/spinner.component.ts +0 -11
  193. package/src/lib/ui/tables/card-mobile/card-mobile.component.html +0 -34
  194. package/src/lib/ui/tables/card-mobile/card-mobile.component.scss +0 -0
  195. package/src/lib/ui/tables/card-mobile/card-mobile.component.ts +0 -36
  196. package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.html +0 -59
  197. package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.scss +0 -88
  198. package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.ts +0 -171
  199. package/src/lib/ui/tables/paginador/paginador.component.html +0 -12
  200. package/src/lib/ui/tables/paginador/paginador.component.scss +0 -27
  201. package/src/lib/ui/tables/paginador/paginador.component.ts +0 -49
  202. package/src/lib/ui/tables/table-advance/table-advance.component.html +0 -322
  203. package/src/lib/ui/tables/table-advance/table-advance.component.scss +0 -282
  204. package/src/lib/ui/tables/table-advance/table-advance.component.ts +0 -421
  205. package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.html +0 -226
  206. package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.scss +0 -282
  207. package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.ts +0 -352
  208. package/src/lib/ui/tables/table-agrupada/table-agrupada.component.html +0 -340
  209. package/src/lib/ui/tables/table-agrupada/table-agrupada.component.scss +0 -282
  210. package/src/lib/ui/tables/table-agrupada/table-agrupada.component.ts +0 -425
  211. package/src/lib/ui/tables/table-busqueda/table-busqueda.component.html +0 -130
  212. package/src/lib/ui/tables/table-busqueda/table-busqueda.component.scss +0 -189
  213. package/src/lib/ui/tables/table-busqueda/table-busqueda.component.ts +0 -199
  214. package/src/lib/ui/tables/table-detalle/table-detalle.component.html +0 -220
  215. package/src/lib/ui/tables/table-detalle/table-detalle.component.scss +0 -135
  216. package/src/lib/ui/tables/table-detalle/table-detalle.component.ts +0 -336
  217. package/src/lib/ui/tables/table-simple/table-simple.component.html +0 -116
  218. package/src/lib/ui/tables/table-simple/table-simple.component.scss +0 -70
  219. package/src/lib/ui/tables/table-simple/table-simple.component.ts +0 -141
  220. package/src/lib/ui/tables/table-ultimate/table-ultimate.component.html +0 -268
  221. package/src/lib/ui/tables/table-ultimate/table-ultimate.component.scss +0 -282
  222. package/src/lib/ui/tables/table-ultimate/table-ultimate.component.ts +0 -383
  223. package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.html +0 -12
  224. package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.scss +0 -100
  225. package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.ts +0 -19
  226. package/src/lib/ui/tabs/tab-item/tab-item.component.html +0 -0
  227. package/src/lib/ui/tabs/tab-item/tab-item.component.scss +0 -0
  228. package/src/lib/ui/tabs/tab-item/tab-item.component.ts +0 -13
  229. package/src/lib/utils/ayuda-global/datatable.ts +0 -67
  230. package/src/lib/utils/ayuda-global/filtros-busqueda.ts +0 -51
  231. package/src/lib/utils/general/validaciones-simple.ts +0 -14
  232. package/src/lib/utils/general/validaciones.ts +0 -123
  233. package/src/lib/utils/helpers/api-result.ts +0 -95
  234. package/src/lib/utils/helpers/modal-result.ts +0 -34
  235. package/tsconfig.lib.json +0 -15
  236. package/tsconfig.lib.prod.json +0 -11
  237. package/tsconfig.spec.json +0 -15
@@ -1,86 +0,0 @@
1
- .content-1 {
2
- flex-basis: 30%;
3
- display: flex;
4
- align-items: center;
5
- }
6
-
7
- .content-2 {
8
- flex-basis: 70%;
9
- display: flex;
10
- align-items: center;
11
- }
12
-
13
- @media (max-width: 442px) {
14
- .d-flex {
15
- flex-direction: column !important;
16
- align-items: stretch !important;
17
- }
18
- }
19
-
20
- .show-input {
21
- display: none;
22
- }
23
-
24
- @media (min-width: 443px) {
25
- .show-input {
26
- display: block;
27
- }
28
- }
29
-
30
- .input-error {
31
- border: 1px solid rgb(203, 0, 0);
32
- color: rgb(203, 0, 0) !important;
33
- animation: aura-pulse 1.5s ease-out infinite;
34
- position: relative;
35
- z-index: 1;
36
- }
37
-
38
- .infoBox {
39
- position: absolute;
40
- width: 400px;
41
- top: calc(100% + 10px);
42
- left: 0;
43
- right: 0;
44
- margin-top: 2px;
45
- background: rgba(190, 0, 0, 0.835);
46
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
47
- border-radius: 6px;
48
- padding: 15px 12px;
49
- font-size: 14px;
50
- color: #dbdbdb;
51
- z-index: 10;
52
- font-size: 12px;
53
- font-weight: 600;
54
- }
55
-
56
- .infoBox::before {
57
- content: "";
58
- position: absolute;
59
- top: -10px;
60
- left: 20px;
61
- border-width: 0 8px 10px 8px;
62
- border-style: solid;
63
- border-color: transparent transparent rgba(190, 0, 0, 0.835) transparent;
64
- filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.1));
65
- }
66
-
67
- @media (max-width: 442px) {
68
- .d-flex {
69
- flex-direction: column !important;
70
- align-items: stretch !important;
71
- }
72
-
73
- .infoBox {
74
- font-size: 12px;
75
- padding: 8px 12px;
76
- width: 100% !important;
77
- max-width: 100% !important;
78
- }
79
- }
80
-
81
- @media (max-width: 900px) {
82
-
83
- .infoBox {
84
- width: 250px !important;
85
- }
86
- }
@@ -1,129 +0,0 @@
1
-
2
- import { Component, computed, effect, HostListener, inject, input, model, output, signal } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { fadeInOut } from '../../../../directivas/animaciones/fade-animation';
5
- import { beep, getFirstItem, validaArray, validarVacioAndNull } from 'shared-tsi';
6
- import { ToastService } from '../../../../service/toast.service';
7
-
8
- @Component({
9
- selector: 'app-doble-input',
10
- imports: [FormsModule],
11
- templateUrl: './doble-input.component.html',
12
- styleUrl: './doble-input.component.scss',
13
- animations: [fadeInOut]
14
- })
15
-
16
- export class DobleInputComponent {
17
-
18
- private toast = inject(ToastService)
19
-
20
- wlabel = input<number>(0)
21
- label = input<string>('')
22
- withBuscar = input<boolean>(false)
23
- withBuscar2 = input<boolean>(false)
24
- isRequired = input<boolean>(false)
25
- tipoInput2 = input<number>(1)
26
- lista = input<any[]>([])
27
- keyCodigo = input<string>('')
28
- keyDescri = input<string>('')
29
- joinInfo = input<boolean>(false)
30
- isVertical = input<boolean>(false)
31
- withTodos = input<boolean>(true)
32
-
33
- firstItemDefault = input<boolean>(false)
34
-
35
- disabled1 = model<boolean>()
36
- disabled2 = model<boolean>()
37
-
38
- value = model<any>()
39
- value2 = model<any>()
40
-
41
- changeInput = output<void>()
42
- activeFocus = input<boolean>(true)
43
-
44
- customBorderColor = input<string>('')
45
- customBoxShadow = input<string>('')
46
- customTransition = input<string>('')
47
-
48
- maxLength = input<number>(null)
49
- listName = input<string>('')
50
- invalidInput = model<boolean>(false)
51
-
52
- accion1 = output<void>()
53
- accion2 = output<void>()
54
-
55
- blur1 = input<() => void>(null)
56
- enter1 = input<() => void>(null)
57
-
58
- blur2 = input<() => void>(null)
59
- enter2 = input<() => void>(null)
60
-
61
- typeKey = input<'string' | 'number'>('number')
62
- withAdicionalInfo = input<boolean>(false)
63
-
64
- validaLista = input<boolean>(false)
65
-
66
- isSmallScreen = signal<boolean>(window.innerWidth < 443)
67
-
68
- joinInfoReal = computed(() => this.isSmallScreen() ? true : this.joinInfo());
69
-
70
- @HostListener('window:resize')
71
- onResize() {
72
- this.isSmallScreen.set(window.innerWidth < 443);
73
- }
74
-
75
- constructor() {
76
- effect(() => {
77
- if (this.invalidInput()) beep()
78
- })
79
-
80
- effect(() => {
81
- if (this.withAdicionalInfo() && validaArray(this.lista()) && this.value() && this.keyCodigo() && this.keyDescri()) {
82
- this.buscarItem()
83
- }
84
- })
85
-
86
- effect(() => {
87
- const data = (this.lista() ?? [])
88
- if (data.length > 0 && this.firstItemDefault()) {
89
- const firstItem = getFirstItem(data)
90
- this.value.set(firstItem ? firstItem[this.keyCodigo()] : null)
91
- }
92
- })
93
- }
94
-
95
- emitirChange() {
96
- this.changeInput.emit()
97
- if (this.withAdicionalInfo()) {
98
- this.buscarItem()
99
- }
100
- }
101
-
102
- buscarItem() {
103
- const findItem = this.lista().find(item => item[this.keyCodigo()] == this.value())
104
- this.value2.set(findItem ? findItem[this.keyDescri()] : null)
105
- }
106
-
107
- validaItem() {
108
- if(!this.validaLista()) return
109
- if (!validaArray(this.lista())) return
110
- if (this.typeKey() == 'number' && this.value() == -1) return
111
-
112
- if (this.typeKey() != 'number' && !validarVacioAndNull(this.value())) {
113
- this.value.set('')
114
- return
115
- }
116
- const findItem = this.lista().find(item => item[this.keyCodigo()] == this.value())
117
- if (findItem) return
118
-
119
- const nombre = this.listName() || this.label();
120
- const isWarning = !!this.listName();
121
-
122
- const mensaje = `El código ${this.value() ? this.value() : 'vacio'} no existe en la lista de "${nombre}"`;
123
- isWarning ? this.toast.warning('Advertencia', mensaje) : this.toast.error('Error', mensaje);
124
- const firstItem = getFirstItem(this.lista());
125
- this.value.set(firstItem ? firstItem[this.keyCodigo()] : null);
126
- }
127
-
128
-
129
- }
@@ -1,169 +0,0 @@
1
- @if (isVertical()) {
2
- <label [ngClass]="{'text-error': isImportant()}" [for]="inputId" [style.min-width]="wlabel() + 'px'"> {{label()}} @if (isRequired()) {<span
3
- class="fw-bold text-danger">(*)</span>}</label>
4
- }
5
- <div class="d-flex align-items-{{position_row()}}">
6
- @if (!isVertical()) {
7
- <label [ngClass]="{'text-error': isImportant()}" [for]="inputId" [style.min-width]="wlabel() + 'px'"> {{label()}} @if (isRequired()) {<span
8
- class="fw-bold text-danger">(*)</span>}</label>
9
- }
10
- <div class="flex-grow-1 me-2">
11
- <div [ngClass]="{'d-block': typeStandar() == 'date','d-flex': typeStandar() != 'date', 'flex-column': showTopLabel() }"
12
- class="position-relative">
13
-
14
- @if (showTopLabel() && topLabelText()) {
15
- <div class="input-top-label">
16
- <label class="fw-bold">{{ topLabelText() }}</label>
17
- </div>
18
- }
19
-
20
- @if (!distintInputs.includes(typeStandar())) {
21
- <input [type]="typeStandar()" (blur)="callBlur()" (keyup.enter)="ejecutarAccion()" (input)="keyup()?.()"
22
- class="form-control text-{{position()}}"
23
- [placeholder]="placeholder()"
24
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
25
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
26
- [style.--focus-transition]="customTransition()" [style.max-width.px]="maxWidth()"
27
- (focus)="invalidInput.set(false)" autocomplete="off" [ngClass]="invalidInput() ? 'input-error' : ''"
28
- [disabled]="allDisabled() ? true : disabled()" [(ngModel)]="value" [id]="inputId" [caracteresCodigo]="validaCodigo()"
29
- [name]="inputId" [attr.maxlength]="maxLength()">
30
- }
31
-
32
- @if (typeStandar() == 'input-switch') {
33
- <div class="d-flex w-100">
34
- <div class="flex-grow-1">
35
- <input type="text" class="form-control" (blur)="callBlur()" (input)="keyup()?.()"
36
- [placeholder]="placeholder()"
37
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
38
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
39
- [style.--focus-transition]="customTransition()" [ngClass]="'text-' + position()"
40
- [style.max-width.px]="maxWidth()" [disabled]="allDisabled() ? true : disabled()" [(ngModel)]="value"
41
- [id]="inputId" [name]="inputId" [caracteresCodigo]="validaCodigo()"
42
- [attr.maxlength]="maxLength()" (focus)="invalidInput.set(false)">
43
- </div>
44
- <div class="px-2">
45
- <app-switch-activo valueOn="S" valueOff="N" [id]="`switch_${inputId}`" [(model)]="value2" />
46
- </div>
47
- </div>
48
- }
49
-
50
- @if (typeStandar() == 'number-format-decimal') {
51
- <input type="text" class="form-control" (blur)="callBlur()" (input)="keyup()?.()"
52
- [placeholder]="placeholder()"
53
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
54
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
55
- [style.--focus-transition]="customTransition()" [ngClass]="'text-' + position()"
56
- [style.max-width.px]="maxWidth()" [disabled]="allDisabled() ? true : disabled()" [(ngModel)]="value"
57
- [id]="inputId" [name]="inputId" [appDecimal]="formatNumber()" onlyNumberFlex
58
- [attr.maxlength]="maxLength()" (focus)="invalidInput.set(false)">
59
- }
60
-
61
- @if (typeStandar() == 'number-integer') {
62
- <input type="text" class="form-control text-{{position()}}" (blur)="callBlur()" (input)="keyup()?.()"
63
- [placeholder]="placeholder()"
64
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
65
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
66
- [style.--focus-transition]="customTransition()" [style.max-width.px]="maxWidth()"
67
- [ngClass]="invalidInput() ? 'input-error' : ''" [disabled]="allDisabled() ? true : disabled()"
68
- [(ngModel)]="value" [id]="inputId" [name]="inputId" onlyNumber
69
- [attr.maxlength]="maxLength()" (focus)="invalidInput.set(false)">
70
- }
71
-
72
- @if (typeStandar() == 'day') {
73
- <input type="text" class="form-control text-{{position()}}" (blur)="callBlur()" (input)="keyup()?.()"
74
- [placeholder]="placeholder()"
75
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
76
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
77
- [style.--focus-transition]="customTransition()" [style.max-width.px]="maxWidth()"
78
- [ngClass]="invalidInput() ? 'input-error' : ''" [disabled]="allDisabled() ? true : disabled()"
79
- [(ngModel)]="value" [id]="inputId" [name]="inputId" onlyDay
80
- [attr.maxlength]="maxLength()" (focus)="invalidInput.set(false)">
81
- }
82
-
83
- @if (typeStandar() == 'date') {
84
- <input type="date" class="form-control text-{{position()}}" (blur)="callBlur()" (input)="keyup()?.()"
85
- [placeholder]="placeholder()"
86
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
87
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
88
- [style.--focus-transition]="customTransition()" [ngClass]="invalidInput() ? 'input-error' : ''"
89
- [disabled]="allDisabled() ? true : disabled()" [(ngModel)]="value" [id]="inputId"
90
- [name]="inputId" (focus)="invalidInput.set(false)">
91
- }
92
-
93
- @if (typeStandar() == 'time') {
94
- <input type="time" class="form-control text-{{position()}}" (blur)="callBlur()" (input)="keyup()?.()"
95
- [placeholder]="placeholder()"
96
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
97
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
98
- [style.--focus-transition]="customTransition()" [ngClass]="invalidInput() ? 'input-error' : ''"
99
- [disabled]="allDisabled() ? true : disabled()" [(ngModel)]="value" [id]="inputId"
100
- [name]="inputId" (focus)="invalidInput.set(false)">
101
- }
102
-
103
- @if (typeStandar() == 'text-area') {
104
- <textarea class="{{'text-' + position()}} form-area"
105
- [placeholder]="placeholder()"
106
- [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
107
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
108
- [style.--focus-transition]="customTransition()" [id]="inputId" [name]="inputId"
109
- [disabled]="allDisabled() ? true : disabled()" [(ngModel)]="value" [rows]="alto()"
110
- [attr.maxlength]="maxLength()" (focus)="invalidInput.set(false)">
111
-
112
- </textarea>
113
- }
114
-
115
- @if (typeStandar() == 'select') {
116
- <select class="form-select" [attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
117
- [class.text-error]="isImportant()"
118
- [style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
119
- [style.--focus-transition]="customTransition()" [style.max-width.px]="maxWidth()" [style.min-width.px]="maxWidth()" [(ngModel)]="value"
120
- [disabled]="allDisabled() ? true : disabled()" [id]="inputId"
121
- [name]="inputId" (change)="emitirChange()" (focus)="focusInput()">
122
- @if (withTodos()) {
123
- <option [value]="typeKey() == 'number' ? -1 : ''">Todos</option>
124
- }
125
- @for (item of lista(); track $index) {
126
- @if (!keyCodigo()) {
127
- <option [value]="item"> {{ item }}</option>
128
- }
129
- @if (keyCodigo()) {
130
- <option [value]="item[keyCodigo()]"> {{ joinInfo() ? item[keyCodigo()] + ' - ' + item[keyDescri()] :
131
- item[keyDescri()]}}</option>
132
- }
133
-
134
- }
135
- </select>
136
- }
137
-
138
- @if (withBuscar()) {
139
- <button class="btn btn-dark boton-buscar fs-7" [ngClass]="classButton()" [disabled]="allDisabled()" (click)="ejecutarAccion()">
140
- <i [ngClass]="iconButton()" ></i>
141
- </button>
142
- }
143
- @if (withChangeInput()) {
144
- <button class="btn btn-dark boton-buscar bg-search fs-7" [disabled]="allDisabled()" (click)="changeInputAction()">
145
- <i [ngClass]="typeStandar() == 'select' ? 'fas fa-times' : 'fa solid fa-pen'"></i>
146
- </button>
147
- }
148
- @if (invalidInput()) {
149
- <div class="infoBox" @fadeInOut><i class="fas fa-exclamation-triangle fs-9 text-danger"></i> Ocurrió un
150
- error: El campo es obligatorio, asegúrese de ingresar datos válidos.</div>
151
- }
152
-
153
- </div>
154
- </div>
155
- </div>
156
-
157
- @if (textoAyuda() && typeStandar() == 'text-area') {
158
- <div class="d-flex flex-wrap justify-content-between align-items-center px-2">
159
- <span class="text-error fs-6">{{textoAyuda()}}</span>
160
- <span class="text-dark fs-6 fw-5">{{ valueSize() }}/{{maxLength()}} caracteres</span>
161
- </div>
162
- }
163
-
164
- @if (sinAyuda() && typeStandar() == 'text-area') {
165
- <div class="d-flex flex-wrap justify-content-between align-items-center px-2">
166
- <span class="text-error fs-6"></span>
167
- <span class="text-dark fs-6 fw-5">{{ valueSize() }}/{{maxLength()}} caracteres</span>
168
- </div>
169
- }
@@ -1,74 +0,0 @@
1
- .text-error {
2
- color: rgb(214, 0, 0) !important;
3
- font-weight: bold !important;
4
- }
5
-
6
- @media (max-width: 442px) {
7
- .d-flex {
8
- flex-direction: column !important;
9
- align-items: stretch !important;
10
- }
11
- .infoBox{
12
- font-size: 12px;
13
- padding: 8px 12px;
14
- width: 100% !important;
15
- max-width: 100% !important;
16
- }
17
- }
18
-
19
- @media (max-width: 900px) {
20
-
21
- .infoBox{
22
- width: 250px !important;
23
- }
24
- }
25
-
26
- .infoBox {
27
- position: absolute;
28
- width: 400px;
29
- top: calc(100% + 10px);
30
- left: 0;
31
- right: 0;
32
- margin-top: 2px;
33
- background: rgba(190, 0, 0, 0.835);
34
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
35
- border-radius: 6px;
36
- padding: 15px 12px;
37
- font-size: 14px;
38
- color: #dbdbdb;
39
- z-index: 10;
40
- font-size: 12px;
41
- font-weight: 600;
42
- }
43
-
44
- .infoBox::before {
45
- content: "";
46
- position: absolute;
47
- top: -10px;
48
- left: 20px;
49
- border-width: 0 8px 10px 8px;
50
- border-style: solid;
51
- border-color: transparent transparent rgba(190, 0, 0, 0.835) transparent;
52
- filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.1));
53
- }
54
-
55
-
56
- .input-error{
57
- border: 1px solid rgb(203, 0, 0);
58
- color: rgb(203, 0, 0) !important;
59
- animation: aura-pulse 1.5s ease-out infinite;
60
- position: relative;
61
- z-index: 1;
62
- }
63
-
64
- @keyframes aura-pulse {
65
- 0% {
66
- box-shadow: 0 0 0 0 rgba(203, 0, 0, 0.7);
67
- }
68
- 70% {
69
- box-shadow: 0 0 0 5px rgba(203, 0, 0, 0);
70
- }
71
- 100% {
72
- box-shadow: 0 0 0 0 rgba(203, 0, 0, 0);
73
- }
74
- }
@@ -1,147 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, computed, effect, input, linkedSignal, model, output } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { DecimalDirective } from '../../../../directivas/inputs/decimal.directive';
5
- import { OnlyNumberDirective } from '../../../../directivas/inputs/only-number.directive';
6
- import { OnlyDayDirective } from '../../../../directivas/inputs/only-day.directive';
7
- import { fadeInOut } from '../../../../directivas/animaciones/fade-animation';
8
- import { beep, getFirstItem } from 'shared-tsi';
9
- import { SwitchActivoComponent } from "../switch-activo/switch-activo.component";
10
- import { OnlyNumberFlexDirective } from "../../../../directivas/inputs/only-number-flex.directive";
11
- import { CaracteresCodigoDirective } from '../../../../directivas/inputs/caracteres-codigo.directive';
12
-
13
- @Component({
14
- selector: 'app-input',
15
- imports: [FormsModule, CommonModule, DecimalDirective, OnlyNumberDirective, OnlyDayDirective, SwitchActivoComponent, OnlyNumberFlexDirective, CaracteresCodigoDirective],
16
- templateUrl: './input.component.html',
17
- styleUrl: './input.component.scss',
18
- animations: [fadeInOut],
19
- changeDetection: ChangeDetectionStrategy.OnPush
20
- })
21
-
22
- export class InputComponent {
23
- wlabel = input<number>(0)
24
- label = input<string>('')
25
- placeholder = input<string>('')
26
- withBuscar = input<boolean>(false)
27
- iconButton = input<string>('fa fa-search')
28
- classButton = input<string>('bg-search')
29
- isRequired = input<boolean>(false)
30
- type = input<'text' | 'text-area' | 'date' | 'number' | 'select' | 'number-format-decimal' | 'number-integer' | 'time' | 'day' | 'input-switch'>('text')
31
- typeStandar = linkedSignal(() => this.type())
32
- position = input<'start' | 'end' | 'center'>('start')
33
- value = model<any>()
34
- value2 = model<any>()
35
- position_row = input<'center' | 'start' | 'end'>('center')
36
- withChangeInput = input<boolean>(false)
37
- disabled = model<boolean>(false)
38
- isImportant = input<boolean>(false)
39
- lista = input<any[]>([])
40
- keyCodigo = input<string>('')
41
- keyDescri = input<string>('')
42
- joinInfo = input<boolean>(false)
43
-
44
- distintInputs = ['text-area', 'select', 'date', 'number-format-decimal', 'number-integer', 'time', 'day', 'input-switch']
45
- withTodos = input<boolean>(true)
46
- allDisabled = model<boolean>(false)
47
-
48
- isVertical = input<boolean>(false)
49
- alto = input<number>(72)
50
-
51
- formatNumber = input<string>('1.2-2')
52
- blur = input<() => void>(null)
53
- enter = input<() => void>(null)
54
- keyup = input<() => void>(null)
55
-
56
- invalidInput = model<boolean>(false)
57
-
58
- accion = output<void>()
59
-
60
- activeFocus = input<boolean>(true)
61
-
62
- customBorderColor = input<string>('')
63
- customBoxShadow = input<string>('')
64
- customTransition = input<string>('')
65
-
66
- maxLength = input<number>(null)
67
-
68
- valueSize = computed(() => this.value()?.length || 0)
69
-
70
- textoAyuda = input<string>('')
71
- sinAyuda = input<boolean>(false)
72
-
73
- maxWidth = input<number>()
74
- changeInput = output<any>()
75
-
76
- showTopLabel = input<boolean>(false)
77
- topLabelText = input<string>('')
78
-
79
- firstItemDefault = input<boolean>(false)
80
- typeKey = input<'string' | 'number'>('number')
81
- validaCodigo = input<boolean>(false)
82
-
83
- private static nextId = 0;
84
- readonly inputId = `app-input-${InputComponent.nextId++}`;
85
-
86
- constructor() {
87
- effect(() => {
88
- if (this.invalidInput()) beep()
89
- })
90
-
91
- effect(() => {
92
- const data = (this.lista() ?? [])
93
- if (data.length > 0 && this.firstItemDefault()) {
94
- const firstItem = getFirstItem(data)
95
- this.value.set(firstItem ? firstItem[this.keyCodigo()] : null)
96
- }
97
- })
98
- }
99
-
100
- ngOnInit() {
101
- this.typeStandar.set(this.type())
102
- }
103
-
104
- ejecutarAccion() {
105
- this.accion.emit()
106
- }
107
-
108
- changeInputAction() {
109
- if (this.typeStandar() == 'select') {
110
- this.typeStandar.set('text')
111
- return
112
- }
113
- this.typeStandar.set('select')
114
- }
115
-
116
- focusInput() {
117
- this.invalidInput.set(false)
118
- }
119
-
120
- callBlur() {
121
- if (this.typeStandar() == 'day') {
122
- const val = this.value()
123
-
124
- if (!val || val.toString().trim() == '') {
125
- this.invalidInput.set(true)
126
- beep()
127
- return
128
- }
129
-
130
- const num = Number(val)
131
- if (isNaN(num) || num < 1 || num > 31) {
132
- this.invalidInput.set(true)
133
- beep()
134
- return
135
- }
136
- this.invalidInput.set(false)
137
- }
138
-
139
- if (this.blur()) this.blur()()
140
- }
141
-
142
- emitirChange() {
143
- const encontrar = this.lista().find(item => item[this.keyCodigo()] == this.value())
144
- this.changeInput.emit(encontrar)
145
- }
146
-
147
- }
@@ -1,30 +0,0 @@
1
-
2
- <div class="col-md-8 pt-1">
3
- @switch (tipoInput()) {
4
- @case ('vchar') {
5
- <app-input [label]="title()" [isRequired]="required()" [maxLength]="1" (onBlur)="onBlur.emit()" [wlabel]="wlabel()" [(value)]="value" />
6
- }
7
- @case ('vstrg') {
8
- <app-input [label]="title()" [isRequired]="required()" [maxLength]="80" (onBlur)="onBlur.emit()" [wlabel]="wlabel()" [(value)]="value"/>
9
- }
10
- @case ('ventero') {
11
- <app-input [label]="title()" [isRequired]="required()" position="end" type="number-integer" (onBlur)="onBlur.emit()" [wlabel]="wlabel()" [(value)]="value"/>
12
- }
13
- @case ('vreal') {
14
- <app-input [label]="title()" [isRequired]="required()" position="end" type="number-format-decimal" (onBlur)="onBlur.emit()" [wlabel]="wlabel()" [(value)]="value"/>
15
- }
16
- @case ('vdate') {
17
- <app-input [label]="title()" [isRequired]="required()" (onBlur)="onBlur.emit()" type="date" [wlabel]="wlabel()" [(value)]="value"/>
18
- }
19
- @case ('vtime') {
20
- <app-input [label]="title()" [isRequired]="required()" (onBlur)="onBlur.emit()" type="date" [wlabel]="wlabel()" [(value)]="value"/>
21
- }
22
- @case ('vglosa') {
23
- <app-input [label]="title()" [isRequired]="required()" (onBlur)="onBlur.emit()" type="text-area" [alto]="5" [maxLength]="500" [wlabel]="wlabel()" [(value)]="value"/>
24
- }
25
- @case ('codigo') {
26
- <app-doble-input [label]="title()" [isRequired]="required()" [tipoInput2]="2" [withTodos]="false" keyCodigo="codigo" keyDescri="descri" [lista]="item().codigos" (onBlur)="onBlur.emit()" [wlabel]="wlabel()" [(value)]="value"></app-doble-input>
27
- }
28
- }
29
-
30
- </div>
@@ -1,28 +0,0 @@
1
- import { Component, computed, input, model, output } from '@angular/core';
2
- import { InputComponent } from "../input/input.component";
3
- import { DobleInputComponent } from "../doble-input/doble-input.component";
4
- import { obtenerTipoClases } from 'shared-tsi';
5
-
6
- @Component({
7
- selector: 'app-input-clase',
8
- imports: [InputComponent, DobleInputComponent],
9
- templateUrl: './input-clase.component.html',
10
- styleUrl: './input-clase.component.scss'
11
- })
12
- export class InputClaseComponent {
13
-
14
- title = input<string>('')
15
- item = input<any>(null)
16
- required = input<boolean>(false)
17
- onBlur = output<void>();
18
- wlabel = input<number>(350)
19
- tipoInput = computed(() => this.item() ? this.getClase(this.item()) : '');
20
-
21
- value = model<string>('')
22
-
23
-
24
- getClase(data: any): string {
25
- return obtenerTipoClases(data);
26
- }
27
-
28
- }