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,130 +0,0 @@
1
- @if (withFiltro()) {
2
- <div class="col-12 mb-2 mt-2 d-flex flex-wrap justify-content-end align-items-center">
3
- <label for="text_busqueda_modal" class="form-label me-2 pt-2">Buscar:</label>
4
- <input type="text" id="text_busqueda_modal" class="form-control cw-250 ch-25" (input)="textoDigitado($event)">
5
- </div>
6
- }
7
-
8
- <div class="table-container" [ngClass]="mode() == 'normal' ? 'table-responsive' : ''" [style.max-height]="altoContainer()? 'calc(100vh - ' + altoContainer() + 'px)' : ''">
9
- <table #table class="table table-striped" [ngClass]="mode() == 'normal' ? 'normal-table' : 'flex-table'">
10
- <thead>
11
- <tr class="shadow-sm">
12
- @for (column of columns(); track $index) {
13
- @if (column.type !== 'mostrar' || column.condition()) {
14
- <th #thElement [title]="column.name" [ngClass]="colorHeader()== 'normal' ? 'header-normal' : ''">
15
- {{ column.name }}
16
- @if (sortColumn == column.prop) {
17
- <span (click)="sortTable(column.prop)" class="cursor-pointer">
18
- <i [ngClass]="sortDirection == 'asc' ? 'fas fa-angle-up fs-6':'fas fa-angle-down fs-6'"></i>
19
- </span>
20
- }
21
-
22
- @if (sortColumn !== column.prop) {
23
- <i class="fas fa-sort icon-sort cursor-pointer" (click)="sortTable(column.prop)"></i>
24
- }
25
- @if (mode() == 'flex' && $index + 1 != columns().length) {
26
- <span class="resize-handle" (mousedown)="onResizeStart($event, thElement)"></span>
27
- }
28
- </th>
29
- }
30
- }
31
-
32
- </tr>
33
- </thead>
34
-
35
- <tbody>
36
-
37
- @for (row of rows(); track $index) {
38
- <tr [ngClass]="{'table-active': selectedRow == $index, 'grilla-error': getSituacionNumberFromColumns(row, columns()) == 9}" #fila (click)="enviarDataClick(row)">
39
-
40
- @for (column of columns(); track $index) {
41
-
42
- @if (column.type !== 'mostrar' || column.condition()) {
43
- @switch (column.type) {
44
- @case ('fecha') {
45
- <td [innerHTML]="getHighlight(row[column.prop] | date:'dd/MM/yyyy')" [title]="row[column.prop] | date:'dd/MM/yyyy'" [ngClass]="row.situac == 'J' ? 'text-error':''">
46
- </td>
47
-
48
- }
49
-
50
- @case ('status') {
51
- <td [innerHTML]="getHighlight(row[column.prop])" [title]="row[column.prop]" [ngClass]="row.situac == 'J' ? 'text-error': situacDaClave[row.situacda]">
52
- </td>
53
-
54
- }
55
- @case ('situacion') {
56
- <td [innerHTML]="getHighlight(row[column.prop])" [title]="row[column.prop]" [ngClass]="row.situac == 'J' ? 'text-error':''">
57
-
58
- </td>
59
-
60
- }
61
- @case ('situacion_number') {
62
- <td [innerHTML]="getHighlight(situacTesoreria[row[column.prop]])" [title]="situacTesoreria[row[column.prop]]" [ngClass]="row[column.prop] == 9 ? 'text-error':''">
63
-
64
- </td>
65
-
66
- }
67
- @case ('situacion_string') {
68
- <td [innerHTML]="getHighlight(row[column.prop])" [title]="row[column.prop]" [ngClass]="row.situac == 'J' ? 'text-error': situacDaStringClave[row[column.prop]]">
69
-
70
- </td>
71
-
72
- }
73
-
74
- @case ('situacion_rendicion') {
75
- <td [innerHTML]="getHighlight(situacDaRendicion[row[column.prop]])" [title]="situacDaRendicion[row[column.prop]]" [ngClass]="row.situac == 'J' ? 'text-error': situacDaClaveRendicion[row[column.prop]]">
76
-
77
- </td>
78
-
79
- }
80
-
81
- @case ('decimal') {
82
- <td class="text-end"
83
- [innerHTML]="getHighlight((row[column.prop] ?? 0) | number:(column.pipe ?? '1.2-2'))"
84
- [title]="(row[column.prop] ?? 0) | number:(column.pipe ?? '1.2-2')"
85
- [ngClass]="row.situac == 'J' ? 'text-error':''">
86
- </td>
87
- }
88
-
89
- @case ('text-center') {
90
- <td class="text-center" [innerHTML]="getHighlight(row[column.prop])" [title]="row[column.prop]" [ngClass]="row.situac == 'J' ? 'text-error':''">
91
- </td>
92
- }
93
-
94
- @case ('check') {
95
- <td class="text-center" [title]="checkString[row[column.prop]]" >
96
- <i class="fs-5" [ngClass]="row[column.prop] == 'S'?'fas fa-check yes-icon':'fas fa-times no-icon'"></i>
97
- </td>
98
- }
99
-
100
- @case ('check-input') {
101
- <td class="text-center" >
102
- <input type="checkbox" class="form-check-input fs-8" [checked]="row[column.prop] == 1" (change)="column.event ? clicCheck(column.prop,$event,row) : null">
103
- </td>
104
- }
105
-
106
- @case ('mostrar') {
107
- @if (column.condition()) {
108
- <td [innerHTML]="getHighlight(row[column.prop])" [title]="row[column.prop]">
109
- </td>
110
- }
111
- }
112
-
113
- @default {
114
- <td [innerHTML]="getHighlight(row[column.prop])" [title]="row[column.prop]" [ngClass]="row.situac == 'J' ? 'text-error':''">
115
-
116
- </td>
117
-
118
- }
119
- }
120
- }
121
- <!-- <td>{{ row[column.prop] }}</td> -->
122
- }
123
-
124
- </tr>
125
- }
126
-
127
-
128
- </tbody>
129
- </table>
130
- </div>
@@ -1,189 +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
- text-align: center;
135
- font-weight: bold;
136
- color: black;
137
- max-width: 220px;
138
- white-space: nowrap;
139
- overflow: hidden;
140
- text-overflow: ellipsis;
141
- font-weight: 600;
142
- border: 1px solid rgb(226, 226, 226);
143
- }
144
-
145
- .header-normal {
146
- background: rgb(170, 170, 170) !important;
147
- }
148
-
149
- .normal-table tbody tr {
150
- height: 30px;
151
- }
152
-
153
- .normal-table tbody tr td {
154
- font-size: 11px;
155
- vertical-align: middle;
156
- font-weight: 500;
157
- color: black;
158
- white-space: nowrap;
159
- text-overflow: ellipsis;
160
- border: 1px solid rgb(226, 226, 226);
161
- padding-top: 0;
162
- padding-bottom: 0;
163
- }
164
-
165
- .normal-table thead {
166
- position: sticky;
167
- top: 0;
168
- z-index: 1;
169
- }
170
-
171
- @media (max-width:1600px) {
172
- .normal-table tbody tr td {
173
- font-size: 9px;
174
- }
175
-
176
- .normal-table thead tr th {
177
- font-size: 10px;
178
- }
179
- }
180
-
181
- .grilla-error td {
182
- color: rgb(214, 0, 0) !important;
183
- }
184
-
185
- .auditoria {
186
- padding-left: 35px;
187
- padding-top: 8px;
188
- padding-bottom: 10px;
189
- }
@@ -1,199 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, ElementRef, HostListener, input, output, QueryList, signal, ViewChildren } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { dropdownAnimation } from '../../../directivas/animaciones/fade-animation';
5
-
6
- @Component({
7
- selector: 'app-table-busqueda',
8
- imports: [CommonModule, FormsModule],
9
- templateUrl: './table-busqueda.component.html',
10
- styleUrl: './table-busqueda.component.scss',
11
- animations: [dropdownAnimation]
12
- })
13
- export class TableBusquedaComponent {
14
- @ViewChildren('fila') filas!: QueryList<ElementRef>
15
- @ViewChildren('thElement') tableHeaders!: QueryList<ElementRef>
16
-
17
- rows = input<any[]>([])
18
- columns = input<any[]>([])
19
- withFiltro = input<boolean>(false)
20
- mode = input<string>('normal')
21
- altoContainer = input<number>()
22
-
23
- emitirBusqueda = output<string>()
24
- emitirCheck = output<any>()
25
- emitirSelected = output<any>()
26
-
27
- colorHeader = input<'normal' | 'light'>('normal')
28
-
29
- busqueda: string = ''
30
- resizingColumn: HTMLElement | null = null
31
- startX: number = 0
32
- startWidth: number = 0
33
-
34
- selectedRow = 0
35
-
36
- sortColumn: string | null = null
37
- sortDirection: 'asc' | 'desc' = 'asc'
38
-
39
- situacDaClave: Record<string, string> = {
40
- 'A': '',
41
- 'B': 'text-exito',
42
- 'J': 'text-error'
43
- }
44
- situacDaStringClave: Record<string, string> = {
45
- 'En Espera': '',
46
- 'Aprobado': 'text-exito',
47
- 'Desaprobado': 'text-error'
48
- }
49
-
50
- situacDaRendicion: Record<string, string> = {
51
- 'A': 'EN ESPERA',
52
- 'S': 'APROBADO',
53
- 'N': 'DESAPROBADO'
54
- }
55
-
56
- situacDaClaveRendicion: Record<string, string> = {
57
- 'A': 'text-alerta',
58
- 'S': 'text-exito',
59
- 'N': 'text-error'
60
- }
61
-
62
- situacTesoreria: Record<number, string> = {
63
- 0: 'Libre',
64
- 1: 'Proceso',
65
- 2: 'Contabilizado',
66
- 9: 'Anulado'
67
- }
68
-
69
- checkString = {
70
- 'S': 'Activo',
71
- 'N': 'Inactivo'
72
- }
73
-
74
- showPopover = signal<boolean>(false)
75
-
76
-
77
- selectRow(index: number) {
78
- this.selectedRow = index
79
- }
80
-
81
- onResizeStart(event: MouseEvent, thElement: HTMLElement) {
82
- this.resizingColumn = thElement
83
- this.startX = event.pageX
84
- this.startWidth = thElement.offsetWidth
85
-
86
- document.addEventListener('mousemove', this.onResizing)
87
- document.addEventListener('mouseup', this.onResizeEnd)
88
- }
89
-
90
- onResizing = (event: MouseEvent) => {
91
- if (!this.resizingColumn) return
92
-
93
- const newWidth = this.startWidth + (event.pageX - this.startX)
94
- this.resizingColumn.style.width = `${newWidth}px`
95
- };
96
-
97
- onResizeEnd = () => {
98
- this.resizingColumn = null;
99
- document.removeEventListener('mousemove', this.onResizing)
100
- document.removeEventListener('mouseup', this.onResizeEnd)
101
- }
102
-
103
- sortTable(column: string) {
104
- if (this.sortColumn == column) {
105
- this.sortDirection = this.sortDirection == 'asc' ? 'desc' : 'asc'
106
- } else {
107
- this.sortColumn = column
108
- this.sortDirection = 'asc'
109
- }
110
-
111
- this.rows().sort((a, b) => {
112
- const valueA = a[column] ?? ''
113
- const valueB = b[column] ?? ''
114
-
115
- if (typeof valueA == 'number' && typeof valueB == 'number') {
116
- return this.sortDirection == 'asc' ? valueA - valueB : valueB - valueA
117
- } else {
118
- return this.sortDirection == 'asc'
119
- ? valueA.toString().localeCompare(valueB.toString())
120
- : valueB.toString().localeCompare(valueA.toString())
121
- }
122
- })
123
- }
124
-
125
- textoDigitado(event: Event) {
126
- const value = (event.target as HTMLInputElement).value
127
- this.busqueda = value
128
- this.emitirBusqueda.emit(value)
129
- }
130
-
131
- getHighlight(text: any): string {
132
- if (text == null) {
133
- text = ''
134
- }
135
- if (!this.busqueda) return text
136
- if (typeof text !== 'string') {
137
- text = text.toString()
138
- }
139
- const regex = new RegExp(`(${this.busqueda})`, 'gi')
140
- return text?.replace(regex, '<mark>$1</mark>')
141
- }
142
-
143
- desglozarValor = (valor: string) => {
144
- return valor!.split(',')
145
- }
146
-
147
- getSituacionNumberFromColumns(row: any, columns: any[]): number {
148
- const situacionColumn = columns.find(col => col.type == 'situacion_number')
149
- if (situacionColumn) {
150
- return row[situacionColumn.prop] || 0
151
- }
152
- return 0
153
- }
154
-
155
- clicCheck(item: string, event: Event, row: any) {
156
- const check = event.target as HTMLInputElement
157
- const resultCierre = check.checked ? 1 : 0
158
- const mes = item.at(-1)
159
- const formatObj = { ...row, cierre: resultCierre, mes }
160
- this.emitirCheck.emit(formatObj)
161
- }
162
-
163
-
164
- @HostListener('window:keydown', ['$event'])
165
- manejarTeclado(event: KeyboardEvent) {
166
- const numFilas = this.rows().length
167
-
168
- if (numFilas == 0) {
169
- return
170
- }
171
-
172
- if (event.key == 'ArrowDown') {
173
- this.selectedRow = (this.selectedRow + 1) % numFilas
174
- this.scrollToFila()
175
- } else if (event.key == 'ArrowUp') {
176
- this.selectedRow = (this.selectedRow - 1 + numFilas) % numFilas
177
- this.scrollToFila()
178
- } else if (event.key == 'Enter') {
179
- event.preventDefault();
180
- this.enviarDataClick(this.rows()[this.selectedRow])
181
- }
182
-
183
- }
184
-
185
- scrollToFila() {
186
- const filaElement = this.filas.toArray()[this.selectedRow]?.nativeElement
187
- if (filaElement) {
188
- filaElement.scrollIntoView({ behavior: 'smooth', block: 'center' })
189
- }
190
- }
191
-
192
- enviarDataClick(obj: any) {
193
- this.emitirSelected.emit(obj)
194
- }
195
-
196
- tooglePopover() {
197
- this.showPopover.update(status => !status)
198
- }
199
- }