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,282 +0,0 @@
1
- .flex-table {
2
- width: 100%;
3
- ;
4
- min-width: max-content;
5
- border-collapse: collapse;
6
- table-layout: fixed;
7
- }
8
-
9
- .flex-table th,
10
- td {
11
- border: 1px solid #ddd;
12
- padding: 8px;
13
- position: relative;
14
- white-space: nowrap;
15
- overflow: hidden;
16
- text-overflow: ellipsis;
17
- min-width: 40px;
18
- }
19
-
20
- .flex-table th {
21
- transition: width 0.1s ease-out;
22
- padding-right: 15px;
23
- }
24
-
25
- .resize-handle {
26
- width: 5px;
27
- height: 100%;
28
- background: rgb(215, 215, 215);
29
- position: absolute;
30
- right: 0;
31
- top: 0;
32
- cursor: ew-resize;
33
- user-select: none;
34
- }
35
-
36
-
37
- .flex-table thead tr th {
38
- font-size: 12px;
39
- font-weight: bold;
40
- color: black;
41
- border: none;
42
- border-bottom: 1px solid rgb(206, 206, 206);
43
- }
44
-
45
-
46
- .flex-table tbody tr td {
47
- font-size: 11px;
48
- font-weight: 600;
49
- color: black;
50
- border: none;
51
- border-bottom: 1px solid rgb(206, 206, 206);
52
- padding-top: 7px;
53
- padding-bottom: 7px;
54
- }
55
-
56
- .flex-table tbody tr {
57
- transition: transform 0.3s ease-in-out, opacity 0.6s ease-in-out;
58
- }
59
-
60
-
61
- thead {
62
- position: sticky;
63
- top: 0;
64
- z-index: 1;
65
- }
66
-
67
- .icon-sort {
68
- font-size: 11px;
69
- }
70
-
71
- .collapsed {
72
- display: none;
73
- max-height: 0;
74
- opacity: 0;
75
- overflow: hidden;
76
- transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
77
- }
78
-
79
- .expand-row {
80
- max-height: 100px;
81
- opacity: 1;
82
- transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
83
- }
84
-
85
- .table-container {
86
- width: 100%;
87
- max-width: 100%;
88
- overflow-x: auto;
89
- display: block;
90
- white-space: nowrap;
91
- }
92
-
93
- .text-error {
94
- color: rgb(214, 0, 0) !important;
95
- font-weight: bold !important;
96
- }
97
-
98
- .text-error2 {
99
- color: rgb(214, 0, 0);
100
- font-weight: bold !important;
101
- }
102
-
103
- .text-exito {
104
- color: rgb(0, 119, 60) !important;
105
- font-weight: bold !important;
106
- }
107
-
108
- .text-alerta {
109
- color: rgb(233, 167, 0) !important;
110
- font-weight: bold !important;
111
- }
112
-
113
- .text-exito2 {
114
- color: rgb(0, 119, 60);
115
- font-weight: bold !important;
116
- }
117
-
118
- @media (max-width:1600px) {
119
- .flex-table tbody tr td {
120
- font-size: 9px;
121
- }
122
-
123
- .flex-table thead tr th {
124
- font-size: 10px;
125
- }
126
- }
127
-
128
- .table-blank {
129
- --bs-table-bg-state: white !important
130
- }
131
-
132
- .normal-table thead tr th {
133
- font-size: 12px;
134
-
135
- text-align: center;
136
- font-weight: bold;
137
- //color: black;
138
- max-width: 220px;
139
- white-space: nowrap;
140
- overflow: hidden;
141
- text-overflow: ellipsis;
142
- font-weight: 600;
143
- //border: 1px solid rgb(226, 226, 226);
144
- }
145
-
146
- .normal-table tbody tr {
147
- height: 30px;
148
- }
149
-
150
- .normal-table tbody tr td {
151
- font-size: 11px;
152
- vertical-align: middle;
153
- font-weight: 500;
154
- //color: black;
155
- white-space: nowrap;
156
- text-overflow: ellipsis;
157
- //border: 1px solid rgb(226, 226, 226);
158
- padding-top: 0;
159
- padding-bottom: 0;
160
- }
161
-
162
- .normal-table thead {
163
- position: sticky;
164
- top: 0;
165
- z-index: 1;
166
- }
167
-
168
- @media (max-width:1600px) {
169
- .normal-table tbody tr td {
170
- font-size: 9px;
171
- }
172
-
173
- .normal-table thead tr th {
174
- font-size: 10px;
175
- }
176
- }
177
-
178
- .grilla-error td {
179
- color: rgb(214, 0, 0) !important;
180
- }
181
-
182
- .auditoria {
183
- padding-left: 35px;
184
- padding-top: 8px;
185
- padding-bottom: 10px;
186
- }
187
-
188
- .popover-menu-column {
189
- position: absolute;
190
- top: 100%;
191
- left: 0;
192
- border-radius: 0.375rem;
193
- padding: 0rem 0.75rem;
194
- display: block;
195
- max-height: 300px;
196
- width: 250px;
197
- overflow-y: auto;
198
- }
199
-
200
- .popover-title {
201
- font-weight: 700;
202
- margin-bottom: 0.7rem;
203
- margin-left: -0.75rem;
204
- margin-right: -0.75rem;
205
- padding: 0.4rem 0.75rem;
206
- border-bottom: 1px solid #7e7e7e;
207
- position: sticky;
208
- top: 0;
209
- text-align: center;
210
- }
211
-
212
- .popover-menu-column::-webkit-scrollbar {
213
- width: 5px;
214
- }
215
-
216
- .popover-menu-column::-webkit-scrollbar-track {
217
- background: #f1f1f1;
218
- border-radius: 4px;
219
- }
220
-
221
- .popover-menu-column::-webkit-scrollbar-thumb {
222
- background-color: #d7d7d7;
223
- border-radius: 4px;
224
- border: 2px solid transparent;
225
- }
226
-
227
- .popover-menu-filter {
228
- position: absolute;
229
- top: 85%;
230
- right: 0;
231
- background-color: rgb(255, 255, 255);
232
- border: 1px solid #ddd;
233
- border-radius: 0.375rem;
234
- padding: 0rem 0.75rem;
235
- display: block;
236
- max-height: 300px;
237
- width: 250px;
238
- overflow-y: auto;
239
- z-index: 2;
240
- }
241
-
242
- .popover-menu-filter::-webkit-scrollbar {
243
- width: 5px;
244
- }
245
-
246
- .popover-menu-filter::-webkit-scrollbar-track {
247
- background: #f1f1f1;
248
- border-radius: 4px;
249
- }
250
-
251
- .popover-menu-filter::-webkit-scrollbar-thumb {
252
- background-color: #d7d7d7;
253
- border-radius: 4px;
254
- border: 2px solid transparent;
255
- }
256
-
257
- .font-label{
258
- font-weight: 500 !important;
259
- }
260
- .mtn-0{
261
- margin-top: 0px;
262
- }
263
-
264
- .normal-table tfoot tr {
265
- height: 50px;
266
- }
267
-
268
- .normal-table tfoot tr td {
269
- font-size: 11px;
270
- vertical-align: middle;
271
- font-weight: 500;
272
- white-space: nowrap;
273
- text-overflow: ellipsis;
274
- padding-top: 0;
275
- padding-bottom: 0;
276
- }
277
-
278
- .normal-table tfoot {
279
- position: sticky;
280
- bottom: 0;
281
- z-index: 1;
282
- }
@@ -1,383 +0,0 @@
1
- import { DecimalPipe, NgClass, NgTemplateOutlet } from '@angular/common';
2
- import { Component, computed, contentChild, effect, ElementRef, HostListener, inject, input, linkedSignal, model, output, QueryList, signal, TemplateRef, untracked, viewChild, ViewChild, ViewChildren } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { DropdownCdkComponent } from "../../dropdown/dropdown-cdk/dropdown-cdk.component";
5
- import { CardMobileComponent } from "../card-mobile/card-mobile.component";
6
- import { CellRender, CellRendered } from '../../../models/cell-rendered';
7
- import { TableData } from '../../../models/table-data.model';
8
- import { formatNumber, validarBoolean } from 'shared-tsi';
9
- import { FormateadorService } from '../../../service/formateador.service';
10
- import { SelectedRow } from '../../../models/selected-row';
11
- import { fadeInOut, dropdownAnimation } from '../../../directivas/animaciones/fade-animation';
12
- import { AnimatedCheckboxDirective } from '../../../directivas/estilos/animated-checkbox.directive';
13
-
14
- @Component({
15
- selector: 'app-table-ultimate',
16
- imports: [DropdownCdkComponent, FormsModule, NgClass, NgTemplateOutlet, CardMobileComponent, AnimatedCheckboxDirective],
17
- templateUrl: './table-ultimate.component.html',
18
- styleUrl: './table-ultimate.component.scss',
19
- animations:[fadeInOut, dropdownAnimation]
20
- })
21
- export class TableUltimateComponent {
22
-
23
- tableHeaders = viewChild<QueryList<ElementRef>>('thElement')
24
- customActions = contentChild<TemplateRef<any>>('customActions')
25
- anchor = viewChild<ElementRef<HTMLTableRowElement>>('anchor')
26
-
27
- private readonly formateador = inject(FormateadorService)
28
- private decimalPipe = inject(DecimalPipe)
29
- titleTabla = input<string>('Contrato')
30
- rows = input<any[]>([])
31
- columns = input<any[]>([])
32
- withDetails = input<boolean>(false)
33
- withFiltro = input<boolean>(false)
34
- altoContainer = input<number>()
35
- colorHeader = input<'normal' | 'light'>('normal')
36
-
37
- busqueda = signal<string>('')
38
- selectedRow = model<any>(null)
39
- identifier = input<string[]>([])
40
-
41
- altoContenedor = signal<number>(0)
42
- withHeight = input<boolean>(false)
43
- rendered = input<CellRendered[]>([])
44
- withTotal = input<boolean>(false)
45
- withCheckbox = input<boolean>(false)
46
- selectItems = model<SelectedRow<any>[]>([])
47
- isDarkMode = input<boolean>(false)
48
-
49
- sortColumn: string | null = null
50
- sortDirection: 'asc' | 'desc' = 'asc'
51
- expandedRows: number = -1
52
-
53
- activeMobileMode = input<boolean>(true)
54
-
55
- /* VARIABLES PARA OPTIMIZAR */
56
- dataVirtual = signal<any[]>([])
57
- isLoading = signal(false);
58
- isLoadingResponsive = signal(false)
59
-
60
- private loadedCount = 0;
61
- private observer!: IntersectionObserver;
62
- maxItems = input<number>(50)
63
- batchSize = input<number>(40)
64
-
65
- rowClassFn = input<(row: any) => string | string[] | Record<string, boolean>>(null);
66
- rowDisabledFn = input<((row: any) => boolean) | null>(null);
67
- rowEvent = output<any>()
68
-
69
- rowFormat = computed(() => this.formateador.procesarLista(this.rows(), this.columns()))
70
-
71
- rowFilter = linkedSignal(() => {
72
- const term = this.busqueda().toLowerCase()
73
- const currentRows = this.rowFormat?.() || []
74
- return currentRows.filter(item => this.filtraItem(item, term))
75
- })
76
-
77
- filtrarColumnas = linkedSignal(() => {
78
- const columns = this.columns()
79
- const filtro: { [caption: string]: boolean } = {}
80
- columns.forEach((col) => {
81
- if (col.fieldname) {
82
- filtro[col.fieldname] = true
83
- }
84
- })
85
- return filtro
86
- })
87
-
88
- toggleFiltros(event: Event) {
89
- const checked = (event.target as HTMLInputElement).checked
90
- const filtros = this.filtrarColumnas()
91
- Object.keys(filtros).forEach(key => {
92
- filtros[key] = checked
93
- })
94
- }
95
-
96
- visibilidadColumn = linkedSignal(() => {
97
- const columnVisibility: { [key: string]: boolean } = {}
98
- this.columns().forEach(col => {
99
- if (col.fieldname) {
100
- columnVisibility[col.fieldname] = true
101
- }
102
- })
103
- return columnVisibility
104
- })
105
-
106
- concatenarValue(obj: any, value: string[]) {
107
- let result = ''
108
- value.forEach(el => {
109
- result += obj[el]
110
- })
111
- return result
112
- }
113
-
114
- isMobile = signal<boolean>(window.innerWidth <= 768)
115
-
116
- constructor() {
117
- effect(() => {
118
- const size = (this.rowFilter() ?? []).length
119
-
120
- const alto = this.altoContainer()
121
- if (alto > 0 && alto < this.altoContenedor()) {
122
- setTimeout(() => {
123
- this.altoContenedor.set(alto)
124
- }, 300)
125
- }
126
- if (alto > 0 && alto > this.altoContenedor()) {
127
- this.altoContenedor.set(alto)
128
- }
129
-
130
- const selected = untracked(() => this.selectedRow())
131
- if (size > 0 && selected) {
132
- queueMicrotask(() => {
133
- const el = document.getElementById('row_table_' + selected)
134
- el?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })
135
- })
136
- }
137
- })
138
-
139
- effect(() => this.resetSroll());
140
-
141
- effect(() => {
142
- if (!this.activeMobileMode()) return
143
- this.isMobile();
144
- this.isLoadingResponsive.set(true);
145
- setTimeout(() => this.isLoadingResponsive.set(false), 200);
146
- });
147
-
148
- effect(() => {
149
- if (this.anchor()) {
150
- this.actionsAnchor()
151
- }
152
- })
153
- }
154
-
155
- @HostListener('window:resize', ['$event'])
156
- onResize(event: any) {
157
- if (!this.activeMobileMode()) return
158
- this.isMobile.set(event.target.innerWidth <= 768);
159
- }
160
-
161
- resetSroll() {
162
- const filtered = this.rowFilter();
163
- const firstBatch = filtered.slice(0, this.batchSize());
164
- this.dataVirtual.set(firstBatch);
165
- this.loadedCount = firstBatch.length;
166
- }
167
-
168
- actionsAnchor() {
169
- this.observer = new IntersectionObserver(entries => {
170
- if (entries[0].isIntersecting && this.loadedCount < this.rowFilter().length && !this.isLoading()) {
171
- this.loadMore();
172
- }
173
- });
174
- this.observer.observe(this.anchor().nativeElement);
175
- }
176
-
177
- selectRow(index: any) {
178
- if (this.identifier().length < 1) {
179
- return this.selectedRow.set(index)
180
- }
181
- this.selectedRow.set(this.concatenarValue(index, this.identifier()))
182
- }
183
-
184
- sortTable(column: string) {
185
- if (this.sortColumn == column) {
186
- this.sortDirection = this.sortDirection == 'asc' ? 'desc' : 'asc'
187
- } else {
188
- this.sortColumn = column
189
- this.sortDirection = 'asc'
190
- }
191
-
192
- const sorted = [...this.rowFilter()].sort((a, b) => {
193
- const valueA = a[column] ?? '';
194
- const valueB = b[column] ?? '';
195
-
196
- if (typeof valueA === 'number' && typeof valueB === 'number') {
197
- return this.sortDirection === 'asc'
198
- ? valueA - valueB
199
- : valueB - valueA;
200
- }
201
-
202
- // VALIDACION ADICIONAL, SI ES TEXTO ,PERO NUMEROS
203
- const numA = Number(valueA);
204
- const numB = Number(valueB);
205
-
206
- if (!isNaN(numA) && !isNaN(numB)) {
207
- return this.sortDirection === 'asc'
208
- ? numA - numB
209
- : numB - numA;
210
- }
211
-
212
- return this.sortDirection === 'asc'
213
- ? valueA.toString().localeCompare(valueB.toString())
214
- : valueB.toString().localeCompare(valueA.toString());
215
- });
216
-
217
- this.rowFilter.set(sorted);
218
- this.resetSroll()
219
-
220
- // this.dataVirtual().sort((a, b) => {
221
- // const valueA = a[column] ?? ''
222
- // const valueB = b[column] ?? ''
223
-
224
- // if (typeof valueA == 'number' && typeof valueB == 'number') {
225
- // return this.sortDirection == 'asc' ? valueA - valueB : valueB - valueA
226
- // } else {
227
- // return this.sortDirection == 'asc'
228
- // ? valueA.toString().localeCompare(valueB.toString())
229
- // : valueB.toString().localeCompare(valueA.toString())
230
- // }
231
- // })
232
- }
233
-
234
- toggleExpandRow(index: number) {
235
- this.expandedRows = this.expandedRows == index ? -1 : index
236
- }
237
-
238
- textoDigitado(event: Event) {
239
- const value = (event.target as HTMLInputElement).value
240
- this.busqueda.set(value)
241
- }
242
-
243
- getHighlight(text: any, fieldname: string): string {
244
- if (text == null) {
245
- text = ''
246
- }
247
- if (!this.filtrarColumnas()[fieldname] || !this.busqueda()) return text
248
- if (typeof text !== 'string') {
249
- text = text.toString()
250
- }
251
- const regex = new RegExp(`(${this.busqueda()})`, 'gi')
252
- return text?.replace(regex, '<mark>$1</mark>')
253
- }
254
-
255
- getSituacionNumberFromColumns(row: any, columns: any[]): number {
256
- const situacionColumn = columns.find(col => col.type == 'situacion_number')
257
- if (situacionColumn) {
258
- return row[situacionColumn.prop] || 0
259
- }
260
- return 0
261
- }
262
-
263
- private filtraItem(item: any, term: string): boolean {
264
- const columnasActivas = Object.entries(this.filtrarColumnas())
265
- .filter(([_campo, activo]) => activo)
266
- return columnasActivas.some(([campo]) => {
267
- const raw = item[campo];
268
- const formatted = item._format?.[campo];
269
- const valor = (formatted ?? raw ?? '').toString().toLowerCase();
270
- return valor.includes(term)
271
- })
272
- }
273
-
274
- validaVisibilidad(value: boolean) {
275
- return validarBoolean(value)
276
- }
277
-
278
- isCheckboxDisabled(row: any): boolean {
279
- return this.rowDisabledFn?.()?.(row) ?? false
280
- }
281
-
282
- allCheck(event: Event) {
283
- const input = event.target as HTMLInputElement
284
- if (input.checked) {
285
- const total = this.rowFilter()
286
- .filter(r => !this.isCheckboxDisabled(r))
287
- .map(r => ({ id: r.idListTsi, data: r }))
288
- this.selectItems.set(total)
289
- } else {
290
- this.selectItems.set([])
291
- }
292
- }
293
-
294
- validaAllCheck(): boolean {
295
- const selectable = this.rowFilter().filter(r => !this.isCheckboxDisabled(r))
296
- const selectedIds = new Set(this.selectItems().map(s => s.id));
297
- return selectable.length > 0 && selectable.every(row => selectedIds.has(row.idListTsi));
298
- }
299
-
300
- isItemSelected(id: string): boolean {
301
- return this.selectItems().some(item => item.id == id)
302
- }
303
-
304
- toogleItem(idList: string, event: Event) {
305
- const row = this.rowFormat().find(r => r.idListTsi == idList)
306
- if (!row || this.isCheckboxDisabled(row)) {
307
- return
308
- }
309
-
310
- const input = event.target as HTMLInputElement
311
- if (input.checked) {
312
- const item: SelectedRow<any> = { id: idList, data: row };
313
- this.selectItems.update(sel => [...sel, item])
314
- return
315
- }
316
- this.selectItems.update(sel => sel.filter(s => s.id != idList))
317
- }
318
-
319
- resolveCell(col: string, row: any): CellRender | null {
320
- const value = row[col]
321
- const r = this.rendered().find(r => r.matches(col, value, row))
322
- return r ? r.render(value, row) : null
323
- }
324
-
325
- getTotals(fieldname: string): string {
326
- const itemsSelected = this.withCheckbox() ? this.selectItems().map(item => JSON.parse(item?.toString())) : this.rowFormat()
327
- const final = itemsSelected.reduce((acc, row) => {
328
- const val = row[fieldname]
329
- return acc + (typeof val == 'number' ? val : 0)
330
- }, 0)
331
-
332
- return formatNumber(this.decimalPipe, final)
333
- }
334
-
335
- getColspanBeforeTotals(): number {
336
- const firstTotalizableIndex = this.columns().findIndex(c => c.totalizable)
337
- const result = firstTotalizableIndex >= 0 ? firstTotalizableIndex : this.columns.length
338
- return this.withCheckbox() ? result + 1 : result
339
- }
340
-
341
- getRowClass(row: any): { [key: string]: boolean } {
342
- return {
343
- 'text-error': row.situac == 'J',
344
- 'text-alerta': row.situac == 'L'
345
- }
346
- }
347
-
348
- getPosition(col: TableData): string {
349
- if (col.position) return `text-${col.position}`
350
- if (['decimal', 'number'].includes(col.tipo)) return `text-end`
351
- if (['fecha', 'date'].includes(col.tipo)) return `text-center`
352
- return 'text-start'
353
- }
354
-
355
- private loadMore() {
356
- this.isLoading.set(true);
357
- setTimeout(() => {
358
-
359
- const current = this.dataVirtual();
360
- const next = this.rowFilter().slice(this.loadedCount, this.loadedCount + this.batchSize());
361
- const merged = [...current];
362
- for (const item of next) {
363
- if (!merged.some(x => x.idListTsi === item.idListTsi)) {
364
- merged.push(item);
365
- }
366
- }
367
- this.dataVirtual.set(merged);
368
- this.loadedCount += next.length;
369
- this.isLoading.set(false);
370
- }, 100);
371
- }
372
-
373
- onClick(row: any) {
374
- this.rowEvent.emit({ usecase: 1, data: row })
375
- }
376
- onDoubleClick(row: any) {
377
- this.rowEvent.emit({ usecase: 2, data: row })
378
- }
379
- onRightClick(event: MouseEvent, row: any) {
380
- event.preventDefault();
381
- this.rowEvent.emit({ usecase: 3, data: row })
382
- }
383
- }
@@ -1,12 +0,0 @@
1
- <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav nav-tabs" [destroyOnHide]="isDestroy()">
2
- @for (tab of tabItems(); track $index) {
3
- <li [ngbNavItem]="tab.id()">
4
- <button ngbNavLink>{{ tab.title() }}</button>
5
- <ng-template ngbNavContent>
6
- <ng-container *ngTemplateOutlet="tab.content()"></ng-container>
7
- </ng-template>
8
- </li>
9
- }
10
-
11
- </ul>
12
- <div [ngbNavOutlet]="nav" class="mt-2"></div>