ng-components-tsi 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-components-tsi.mjs +5063 -0
- package/fesm2022/ng-components-tsi.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/directivas/acciones/atajos.directive.d.ts +8 -0
- package/lib/directivas/animaciones/fade-animation.d.ts +3 -0
- package/lib/directivas/estilos/animated-checkbox.directive.d.ts +9 -0
- package/lib/directivas/estilos/button.constants.d.ts +64 -0
- package/lib/directivas/estilos/buttons-modal.directive.d.ts +11 -0
- package/lib/directivas/estilos/buttons-outline-directive.d.ts +11 -0
- package/lib/directivas/estilos/icons.directive.d.ts +11 -0
- package/lib/directivas/inputs/caracteres-codigo.directive.d.ts +12 -0
- package/lib/directivas/inputs/decimal.directive.d.ts +13 -0
- package/lib/directivas/inputs/only-day.directive.d.ts +8 -0
- package/lib/directivas/inputs/only-number-flex.directive.d.ts +9 -0
- package/lib/directivas/inputs/only-number.directive.d.ts +8 -0
- package/lib/enums/table-events.d.ts +5 -0
- package/lib/modals/general/md-generico/md-generico.component.d.ts +25 -0
- package/lib/models/button-color.model.d.ts +3 -0
- package/{src/lib/models/button-properties.model.ts → lib/models/button-properties.model.d.ts} +7 -8
- package/lib/models/cell-rendered.d.ts +11 -0
- package/lib/models/comercial/documentos-cab-auxiliares.model.d.ts +17 -0
- package/{src/lib/models/dropdownoption.model.ts → lib/models/dropdownoption.model.d.ts} +14 -15
- package/lib/models/general/recursos.model.d.ts +271 -0
- package/lib/models/general/utils.interface.d.ts +57 -0
- package/lib/models/input-config.d.ts +25 -0
- package/{src/lib/models/selected-row.ts → lib/models/selected-row.d.ts} +4 -4
- package/{src/lib/models/table-data.model.ts → lib/models/table-data.model.d.ts} +21 -21
- package/lib/service/alert-confirmation.service.d.ts +26 -0
- package/lib/service/alert-error.service.d.ts +9 -0
- package/lib/service/alert.service.d.ts +33 -0
- package/lib/service/formateador.service.d.ts +10 -0
- package/lib/service/toast.service.d.ts +25 -0
- package/lib/ui/alerts/alert-confirmation/alert-confirmation.component.d.ts +32 -0
- package/lib/ui/alerts/alert-error/alert-error.component.d.ts +9 -0
- package/lib/ui/alerts/alerta/alerta.component.d.ts +12 -0
- package/lib/ui/alerts/badge/badge.component.d.ts +8 -0
- package/lib/ui/alerts/toaster/toaster.component.d.ts +17 -0
- package/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.d.ts +11 -0
- package/lib/ui/dropdown/dropdown-simple/dropdown.component.d.ts +13 -0
- package/lib/ui/forms/button/button.component.d.ts +47 -0
- package/lib/ui/forms/filter-toggle/filter-toggle.component.d.ts +9 -0
- package/lib/ui/forms/header/header.component.d.ts +17 -0
- package/lib/ui/forms/inputs/autocomplete/autocomplete.component.d.ts +43 -0
- package/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.d.ts +48 -0
- package/lib/ui/forms/inputs/check-box/check-box.component.d.ts +14 -0
- package/lib/ui/forms/inputs/doble-input/doble-input.component.d.ts +47 -0
- package/lib/ui/forms/inputs/input/input.component.d.ts +60 -0
- package/lib/ui/forms/inputs/input-clase/input-clase.component.d.ts +13 -0
- package/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.d.ts +8 -0
- package/lib/ui/forms/inputs/input-radio/input-radio.component.d.ts +24 -0
- package/lib/ui/forms/inputs/multiselected/multiselected.component.d.ts +39 -0
- package/lib/ui/forms/inputs/radio/radio.component.d.ts +14 -0
- package/lib/ui/forms/inputs/switch/switch.component.d.ts +20 -0
- package/lib/ui/forms/inputs/switch-activo/switch-activo.component.d.ts +21 -0
- package/lib/ui/forms/lists/list-option/list-option.component.d.ts +23 -0
- package/lib/ui/forms/lists/list-situaciones/list-situaciones.component.d.ts +28 -0
- package/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.d.ts +26 -0
- package/lib/ui/forms/sidebar/sidebar.component.d.ts +15 -0
- package/lib/ui/general/detalle-credito/detalle-credito.component.d.ts +8 -0
- package/lib/ui/general/montos-calcular/montos-calcular.component.d.ts +12 -0
- package/lib/ui/general/spinner/spinner.component.d.ts +5 -0
- package/lib/ui/tables/card-mobile/card-mobile.component.d.ts +17 -0
- package/lib/ui/tables/dropdown-menu/dropdown-menu.component.d.ts +43 -0
- package/lib/ui/tables/paginador/paginador.component.d.ts +20 -0
- package/lib/ui/tables/table-advance/table-advance.component.d.ts +94 -0
- package/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.d.ts +82 -0
- package/lib/ui/tables/table-agrupada/table-agrupada.component.d.ts +96 -0
- package/lib/ui/tables/table-busqueda/table-busqueda.component.d.ts +48 -0
- package/lib/ui/tables/table-detalle/table-detalle.component.d.ts +59 -0
- package/lib/ui/tables/table-simple/table-simple.component.d.ts +39 -0
- package/lib/ui/tables/table-ultimate/table-ultimate.component.d.ts +84 -0
- package/lib/ui/tabs/nav-tabs/nav-tabs.component.d.ts +9 -0
- package/lib/ui/tabs/tab-item/tab-item.component.d.ts +9 -0
- package/lib/utils/general/validaciones-simple.d.ts +2 -0
- package/lib/utils/general/validaciones.d.ts +11 -0
- package/lib/utils/helpers/api-result.d.ts +17 -0
- package/lib/utils/helpers/modal-result.d.ts +10 -0
- package/ng-components-tsi-0.0.39.tgz +0 -0
- package/package.json +31 -23
- package/{src/public-api.ts → public-api.d.ts} +68 -99
- package/ng-package.json +0 -7
- package/src/lib/directivas/acciones/atajos.directive.ts +0 -26
- package/src/lib/directivas/animaciones/fade-animation.ts +0 -45
- package/src/lib/directivas/animaciones/fade.directive.ts +0 -43
- package/src/lib/directivas/estilos/animated-checkbox.directive.ts +0 -26
- package/src/lib/directivas/estilos/button.constants.ts +0 -66
- package/src/lib/directivas/estilos/buttons-modal.directive.ts +0 -36
- package/src/lib/directivas/estilos/buttons-outline-directive.ts +0 -27
- package/src/lib/directivas/estilos/icons.directive.ts +0 -26
- package/src/lib/directivas/inputs/caracteres-codigo.directive.ts +0 -63
- package/src/lib/directivas/inputs/decimal.directive.ts +0 -51
- package/src/lib/directivas/inputs/only-day.directive.ts +0 -53
- package/src/lib/directivas/inputs/only-number-flex.directive.ts +0 -50
- package/src/lib/directivas/inputs/only-number.directive.ts +0 -53
- package/src/lib/enums/table-events.ts +0 -5
- package/src/lib/modals/general/md-generico/md-generico.component.html +0 -44
- package/src/lib/modals/general/md-generico/md-generico.component.scss +0 -4
- package/src/lib/modals/general/md-generico/md-generico.component.ts +0 -50
- package/src/lib/models/button-color.model.ts +0 -9
- package/src/lib/models/cell-rendered.ts +0 -12
- package/src/lib/models/comercial/documentos-cab-auxiliares.model.ts +0 -18
- package/src/lib/models/general/recursos.model.ts +0 -285
- package/src/lib/models/general/utils.interface.ts +0 -66
- package/src/lib/models/input-config.ts +0 -26
- package/src/lib/service/alert-confirmation.service.ts +0 -87
- package/src/lib/service/alert-error.service.ts +0 -27
- package/src/lib/service/alert.service.ts +0 -216
- package/src/lib/service/formateador.service.ts +0 -49
- package/src/lib/service/toast.service.ts +0 -75
- package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.html +0 -40
- package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.scss +0 -42
- package/src/lib/ui/alerts/alert-confirmation/alert-confirmation.component.ts +0 -118
- package/src/lib/ui/alerts/alert-error/alert-error.component.html +0 -11
- package/src/lib/ui/alerts/alert-error/alert-error.component.scss +0 -39
- package/src/lib/ui/alerts/alert-error/alert-error.component.ts +0 -27
- package/src/lib/ui/alerts/alerta/alerta.component.html +0 -18
- package/src/lib/ui/alerts/alerta/alerta.component.scss +0 -104
- package/src/lib/ui/alerts/alerta/alerta.component.ts +0 -25
- package/src/lib/ui/alerts/badge/badge.component.ts +0 -16
- package/src/lib/ui/alerts/toaster/toaster.component.html +0 -52
- package/src/lib/ui/alerts/toaster/toaster.component.scss +0 -275
- package/src/lib/ui/alerts/toaster/toaster.component.ts +0 -50
- package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.html +0 -20
- package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.scss +0 -11
- package/src/lib/ui/dropdown/dropdown-cdk/dropdown-cdk.component.ts +0 -18
- package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.html +0 -10
- package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.scss +0 -54
- package/src/lib/ui/dropdown/dropdown-simple/dropdown.component.ts +0 -36
- package/src/lib/ui/forms/button/button.component.html +0 -69
- package/src/lib/ui/forms/button/button.component.scss +0 -126
- package/src/lib/ui/forms/button/button.component.ts +0 -137
- package/src/lib/ui/forms/filter-toggle/filter-toggle.component.scss +0 -22
- package/src/lib/ui/forms/filter-toggle/filter-toggle.component.ts +0 -29
- package/src/lib/ui/forms/header/header.component.html +0 -22
- package/src/lib/ui/forms/header/header.component.scss +0 -22
- package/src/lib/ui/forms/header/header.component.ts +0 -40
- package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.html +0 -46
- package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.scss +0 -90
- package/src/lib/ui/forms/inputs/autocomplete/autocomplete.component.ts +0 -203
- package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.html +0 -61
- package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.scss +0 -128
- package/src/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.ts +0 -145
- package/src/lib/ui/forms/inputs/check-box/check-box.component.html +0 -6
- package/src/lib/ui/forms/inputs/check-box/check-box.component.ts +0 -24
- package/src/lib/ui/forms/inputs/doble-input/doble-input.component.html +0 -60
- package/src/lib/ui/forms/inputs/doble-input/doble-input.component.scss +0 -86
- package/src/lib/ui/forms/inputs/doble-input/doble-input.component.ts +0 -129
- package/src/lib/ui/forms/inputs/input/input.component.html +0 -169
- package/src/lib/ui/forms/inputs/input/input.component.scss +0 -74
- package/src/lib/ui/forms/inputs/input/input.component.ts +0 -147
- package/src/lib/ui/forms/inputs/input-clase/input-clase.component.html +0 -30
- package/src/lib/ui/forms/inputs/input-clase/input-clase.component.scss +0 -0
- package/src/lib/ui/forms/inputs/input-clase/input-clase.component.ts +0 -28
- package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.html +0 -41
- package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.scss +0 -0
- package/src/lib/ui/forms/inputs/input-dinamico/input-dinamico.component.ts +0 -17
- package/src/lib/ui/forms/inputs/input-radio/input-radio.component.html +0 -26
- package/src/lib/ui/forms/inputs/input-radio/input-radio.component.scss +0 -53
- package/src/lib/ui/forms/inputs/input-radio/input-radio.component.ts +0 -36
- package/src/lib/ui/forms/inputs/multiselected/multiselected.component.html +0 -56
- package/src/lib/ui/forms/inputs/multiselected/multiselected.component.scss +0 -145
- package/src/lib/ui/forms/inputs/multiselected/multiselected.component.ts +0 -109
- package/src/lib/ui/forms/inputs/radio/radio.component.html +0 -7
- package/src/lib/ui/forms/inputs/radio/radio.component.scss +0 -0
- package/src/lib/ui/forms/inputs/radio/radio.component.ts +0 -23
- package/src/lib/ui/forms/inputs/switch/switch.component.html +0 -12
- package/src/lib/ui/forms/inputs/switch/switch.component.scss +0 -48
- package/src/lib/ui/forms/inputs/switch/switch.component.ts +0 -50
- package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.html +0 -12
- package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.scss +0 -65
- package/src/lib/ui/forms/inputs/switch-activo/switch-activo.component.ts +0 -52
- package/src/lib/ui/forms/lists/list-option/list-option.component.html +0 -24
- package/src/lib/ui/forms/lists/list-option/list-option.component.scss +0 -49
- package/src/lib/ui/forms/lists/list-option/list-option.component.ts +0 -35
- package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.html +0 -29
- package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.scss +0 -0
- package/src/lib/ui/forms/lists/list-situaciones/list-situaciones.component.ts +0 -99
- package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.html +0 -46
- package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.scss +0 -30
- package/src/lib/ui/forms/lists/multi-select-dropdown/multi-select-dropdown.component.ts +0 -96
- package/src/lib/ui/forms/sidebar/sidebar.component.html +0 -33
- package/src/lib/ui/forms/sidebar/sidebar.component.scss +0 -85
- package/src/lib/ui/forms/sidebar/sidebar.component.ts +0 -61
- package/src/lib/ui/general/detalle-credito/detalle-credito.component.html +0 -35
- package/src/lib/ui/general/detalle-credito/detalle-credito.component.scss +0 -35
- package/src/lib/ui/general/detalle-credito/detalle-credito.component.ts +0 -14
- package/src/lib/ui/general/montos-calcular/montos-calcular.component.html +0 -17
- package/src/lib/ui/general/montos-calcular/montos-calcular.component.scss +0 -36
- package/src/lib/ui/general/montos-calcular/montos-calcular.component.ts +0 -19
- package/src/lib/ui/general/spinner/spinner.component.html +0 -8
- package/src/lib/ui/general/spinner/spinner.component.scss +0 -96
- package/src/lib/ui/general/spinner/spinner.component.ts +0 -11
- package/src/lib/ui/tables/card-mobile/card-mobile.component.html +0 -34
- package/src/lib/ui/tables/card-mobile/card-mobile.component.scss +0 -0
- package/src/lib/ui/tables/card-mobile/card-mobile.component.ts +0 -36
- package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.html +0 -59
- package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.scss +0 -88
- package/src/lib/ui/tables/dropdown-menu/dropdown-menu.component.ts +0 -171
- package/src/lib/ui/tables/paginador/paginador.component.html +0 -12
- package/src/lib/ui/tables/paginador/paginador.component.scss +0 -27
- package/src/lib/ui/tables/paginador/paginador.component.ts +0 -49
- package/src/lib/ui/tables/table-advance/table-advance.component.html +0 -322
- package/src/lib/ui/tables/table-advance/table-advance.component.scss +0 -282
- package/src/lib/ui/tables/table-advance/table-advance.component.ts +0 -421
- package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.html +0 -226
- package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.scss +0 -282
- package/src/lib/ui/tables/table-advance-optimizada/table-advance-optimizada.component.ts +0 -352
- package/src/lib/ui/tables/table-agrupada/table-agrupada.component.html +0 -340
- package/src/lib/ui/tables/table-agrupada/table-agrupada.component.scss +0 -282
- package/src/lib/ui/tables/table-agrupada/table-agrupada.component.ts +0 -425
- package/src/lib/ui/tables/table-busqueda/table-busqueda.component.html +0 -130
- package/src/lib/ui/tables/table-busqueda/table-busqueda.component.scss +0 -189
- package/src/lib/ui/tables/table-busqueda/table-busqueda.component.ts +0 -199
- package/src/lib/ui/tables/table-detalle/table-detalle.component.html +0 -220
- package/src/lib/ui/tables/table-detalle/table-detalle.component.scss +0 -135
- package/src/lib/ui/tables/table-detalle/table-detalle.component.ts +0 -336
- package/src/lib/ui/tables/table-simple/table-simple.component.html +0 -116
- package/src/lib/ui/tables/table-simple/table-simple.component.scss +0 -70
- package/src/lib/ui/tables/table-simple/table-simple.component.ts +0 -141
- package/src/lib/ui/tables/table-ultimate/table-ultimate.component.html +0 -268
- package/src/lib/ui/tables/table-ultimate/table-ultimate.component.scss +0 -282
- package/src/lib/ui/tables/table-ultimate/table-ultimate.component.ts +0 -383
- package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.html +0 -12
- package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.scss +0 -100
- package/src/lib/ui/tabs/nav-tabs/nav-tabs.component.ts +0 -19
- package/src/lib/ui/tabs/tab-item/tab-item.component.html +0 -0
- package/src/lib/ui/tabs/tab-item/tab-item.component.scss +0 -0
- package/src/lib/ui/tabs/tab-item/tab-item.component.ts +0 -13
- package/src/lib/utils/ayuda-global/datatable.ts +0 -67
- package/src/lib/utils/ayuda-global/filtros-busqueda.ts +0 -51
- package/src/lib/utils/general/validaciones-simple.ts +0 -14
- package/src/lib/utils/general/validaciones.ts +0 -123
- package/src/lib/utils/helpers/api-result.ts +0 -95
- package/src/lib/utils/helpers/modal-result.ts +0 -34
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { Component, ViewChildren, QueryList, ElementRef, inject, computed, signal, ViewChild, input, HostListener } from '@angular/core';
|
|
2
|
-
import { NgbDropdownModule, NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { IconsDirective } from '../../../directivas/estilos/icons.directive';
|
|
5
|
-
import { ButtonsModalDirective } from '../../../directivas/estilos/buttons-modal.directive';
|
|
6
|
-
import { ButtonsOutlineDirective } from '../../../directivas/estilos/buttons-outline-directive';
|
|
7
|
-
import { ButtonComponent } from '../../forms/button/button.component';
|
|
8
|
-
import { DropdownOption } from '../../../models/dropdownoption.model';
|
|
9
|
-
import { ButtonProperties } from '../../../models/button-properties.model';
|
|
10
|
-
import { SesionService } from 'core-tsi';
|
|
11
|
-
import { PermisoObject } from 'shared-tsi';
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'app-dropdown-menu',
|
|
15
|
-
imports: [NgbDropdownModule, CommonModule, ButtonComponent, IconsDirective, ButtonsModalDirective, ButtonsOutlineDirective],
|
|
16
|
-
templateUrl: './dropdown-menu.component.html',
|
|
17
|
-
styleUrl: './dropdown-menu.component.scss'
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
export class DropdownMenuComponent {
|
|
21
|
-
private sesion = inject(SesionService)
|
|
22
|
-
@ViewChild(NgbDropdown) dropdown!: NgbDropdown
|
|
23
|
-
@ViewChildren('submenuAnchor') submenuAnchors!: QueryList<NgbDropdown>
|
|
24
|
-
@ViewChildren('submenuDiv') submenuDivs!: QueryList<ElementRef>
|
|
25
|
-
|
|
26
|
-
disabled = input<boolean>(false)
|
|
27
|
-
options = input<DropdownOption[]>([], { alias: 'options' });
|
|
28
|
-
buttonProperties = input<ButtonProperties | null>(null, { alias: 'buttonProperties' })
|
|
29
|
-
hoverTrigger = input<boolean>(false)
|
|
30
|
-
|
|
31
|
-
propiedades = signal(this.sesion.getSession().propiedades)
|
|
32
|
-
factores = signal(this.sesion.getSession().factores)
|
|
33
|
-
|
|
34
|
-
activeSubmenu = signal<{ [key: string]: boolean }>({})
|
|
35
|
-
inputButton = input<boolean>(false)
|
|
36
|
-
|
|
37
|
-
isMobile = signal<boolean>(window.innerWidth <= 768)
|
|
38
|
-
|
|
39
|
-
@HostListener('window:resize', ['$event'])
|
|
40
|
-
onResize(event: any) {
|
|
41
|
-
this.isMobile.set(event.target.innerWidth <= 768)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
readonly visibleOptions = computed(() => {
|
|
45
|
-
const allOptions = this.options()
|
|
46
|
-
if (this.isMobile()) {
|
|
47
|
-
return allOptions.filter(opt =>
|
|
48
|
-
opt.condition !== false &&
|
|
49
|
-
(!opt.factor || this.factores()[opt.factor.key]) &&
|
|
50
|
-
(opt.action || opt.upload || opt.fileAction || opt.submenu)
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
return allOptions.filter(opt =>
|
|
54
|
-
opt.condition !== false &&
|
|
55
|
-
(!opt.factor || this.factores()[opt.factor.key])
|
|
56
|
-
)
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
readonly buttonProps = computed(() => this.buttonProperties())
|
|
60
|
-
|
|
61
|
-
readonly mobileFlatOptions = computed(() => {
|
|
62
|
-
if (!this.isMobile()) return []
|
|
63
|
-
|
|
64
|
-
const flat: any[] = []
|
|
65
|
-
|
|
66
|
-
this.visibleOptions().forEach(option => {
|
|
67
|
-
if (option.submenu) {
|
|
68
|
-
const subs = this.getVisibleSubmenuItems(option.submenu)
|
|
69
|
-
subs.forEach(sub => flat.push(sub))
|
|
70
|
-
} else {
|
|
71
|
-
flat.push(option)
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
return flat
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
isFirstMobileItem(item: any): boolean {
|
|
78
|
-
return this.mobileFlatOptions()[0] == item
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
isLastMobileItem(item: any): boolean {
|
|
82
|
-
const list = this.mobileFlatOptions()
|
|
83
|
-
return list[list.length - 1] == item
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
handleMainButtonMouseEnter() {
|
|
87
|
-
if (this.hoverTrigger()) {
|
|
88
|
-
this.dropdown.open()
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
handleMainButtonMouseLeave() {
|
|
93
|
-
if (this.hoverTrigger()) {
|
|
94
|
-
if (!this.isMouseOverDropdown()) {
|
|
95
|
-
this.closeAll()
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
handleDropdownMouseEnter() {
|
|
101
|
-
if (this.hoverTrigger()) {
|
|
102
|
-
this.keepOpen()
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
handleDropdownMouseLeave() {
|
|
107
|
-
if (this.hoverTrigger()) {
|
|
108
|
-
if (!this.isMouseOverButton()) {
|
|
109
|
-
this.closeAll()
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
private isMouseOverDropdown(): boolean {
|
|
115
|
-
const dropdownElement = document.querySelector('.dropdown-menu')
|
|
116
|
-
return dropdownElement?.contains(document.activeElement) || false
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
private isMouseOverButton(): boolean {
|
|
120
|
-
const buttonElement = document.querySelector('[ngbDropdownToggle]')
|
|
121
|
-
return buttonElement?.contains(document.activeElement) || false
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
private keepOpen() {
|
|
125
|
-
if (this.dropdown) {
|
|
126
|
-
this.dropdown.open()
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
private closeAll() {
|
|
131
|
-
if (this.dropdown) {
|
|
132
|
-
this.dropdown.close()
|
|
133
|
-
}
|
|
134
|
-
this.submenuAnchors.forEach(anchor => anchor.close())
|
|
135
|
-
this.activeSubmenu.set({})
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
mouseLeaveItem(dropdown: NgbDropdown, event: MouseEvent, optionText: string) {
|
|
139
|
-
const submenuElementRef = this.submenuDivs.find(elRef =>
|
|
140
|
-
this.visibleOptions().some(opt => opt.text == optionText && elRef.nativeElement.contains(event.relatedTarget))
|
|
141
|
-
)
|
|
142
|
-
if (!submenuElementRef) {
|
|
143
|
-
dropdown.close()
|
|
144
|
-
this.activeSubmenu.update(state => ({ ...state, [optionText]: false }))
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
mouseLeaveSubmenu(dropdown: NgbDropdown, event: MouseEvent, optionText: string) {
|
|
149
|
-
const parentElement = this.submenuAnchors.find(anchor =>
|
|
150
|
-
anchor.open && anchor['id'] == optionText
|
|
151
|
-
)
|
|
152
|
-
const relatedTarget = event.relatedTarget as HTMLElement | null
|
|
153
|
-
if (!parentElement || !relatedTarget || !parentElement['nativeElement'].contains(relatedTarget)) {
|
|
154
|
-
dropdown.close()
|
|
155
|
-
this.activeSubmenu.update(state => ({ ...state, [optionText]: false }))
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
getVisibleSubmenuItems(submenuItems: any[]) {
|
|
160
|
-
return submenuItems.filter(
|
|
161
|
-
sub => sub.condition !== false && (!sub.factor || this.factores()[sub.factor])
|
|
162
|
-
)
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
getPropertyName(key: PermisoObject) {
|
|
166
|
-
if (key) {
|
|
167
|
-
return key?.descri ?? ''
|
|
168
|
-
}
|
|
169
|
-
return null
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<div class="{{`d-flex justify-content-${position()} pe-3`}}">
|
|
2
|
-
<div class="contenedor d-flex justify-content-end align-items-center px-3 py-2 rounded-2 gap-1 bg-white">
|
|
3
|
-
<span class="fs-6 fw-6"> Mostrando {{ cantidadDatos() }}/{{ limit() }} </span>
|
|
4
|
-
<p class="bg-white px-3 py-1 my-0 mx-3 fs-7 rounded-2 fw-5" style="border: 1px solid rgb(222, 222, 222);"> {{contador()}} </p>
|
|
5
|
-
|
|
6
|
-
@if (contador() > 1) {
|
|
7
|
-
<button @fadeInOut class="py-1 btn btn-sm shadow bg-white rounded-4 px-3" [disabled]="loading()" (click)="retroceder()"> <i iconName="izquierda"></i></button>
|
|
8
|
-
}
|
|
9
|
-
<button [disabled]="cantidadDatos() < limit() || loading()" (click)="avanzar()" class="py-1 btn btn-sm btn-dark shadow rounded-4 px-3" > <i iconName="derecha"></i></button>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
</div>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@media (max-width:330px) {
|
|
2
|
-
.contenedor {
|
|
3
|
-
display: block !important;
|
|
4
|
-
width: 100%;
|
|
5
|
-
text-align: center;
|
|
6
|
-
|
|
7
|
-
span {
|
|
8
|
-
display: inline-block !important;
|
|
9
|
-
width: 100% !important;
|
|
10
|
-
padding-bottom: 10px !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
p {
|
|
14
|
-
display: block;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
button {
|
|
18
|
-
margin-top: 6px;
|
|
19
|
-
margin: 6px 2px 0 2px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.border-p {
|
|
26
|
-
border: 1px solid rgb(222, 222, 222);
|
|
27
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Component, computed, input, model, signal } from '@angular/core';
|
|
2
|
-
import { fadeInOut } from '../../../directivas/animaciones/fade-animation';
|
|
3
|
-
import { IconsDirective } from '../../../directivas/estilos/icons.directive';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'app-paginador',
|
|
7
|
-
imports: [IconsDirective],
|
|
8
|
-
templateUrl: './paginador.component.html',
|
|
9
|
-
styleUrl: './paginador.component.scss',
|
|
10
|
-
animations:[fadeInOut]
|
|
11
|
-
})
|
|
12
|
-
export class PaginadorComponent {
|
|
13
|
-
|
|
14
|
-
total = input<number>(0)
|
|
15
|
-
limit = input<number>(100) // DEFECTO
|
|
16
|
-
position = input<'start'| 'center' | 'end'>('end')
|
|
17
|
-
loaddata = input<(params: { offset: number; limit: number }) => Promise<boolean>>()
|
|
18
|
-
|
|
19
|
-
page = model<number>(1)
|
|
20
|
-
contador = computed(() => this.page())
|
|
21
|
-
readonly offset = computed(() => (this.page() - 1) * this.limit());
|
|
22
|
-
readonly cantidadDatos = computed(() => Math.min(this.page() * this.limit(), this.total()));
|
|
23
|
-
readonly loading = signal(false);
|
|
24
|
-
|
|
25
|
-
async avanzar() {
|
|
26
|
-
if (this.loading()) return;
|
|
27
|
-
if (this.total() < this.limit()) return;
|
|
28
|
-
await this.tryChangePage(this.page() + 1);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async retroceder() {
|
|
32
|
-
if (this.loading() || this.page() <= 1) return;
|
|
33
|
-
await this.tryChangePage(this.page() - 1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private async tryChangePage(newPage: number) {
|
|
37
|
-
const fn = this.loaddata();
|
|
38
|
-
if (!fn) return;
|
|
39
|
-
this.loading.set(true);
|
|
40
|
-
const params = { offset: (newPage - 1) * this.limit(), limit: this.limit() };
|
|
41
|
-
try {
|
|
42
|
-
const ok = await fn(params);
|
|
43
|
-
if (ok) this.page.set(newPage);
|
|
44
|
-
} catch {
|
|
45
|
-
} finally {
|
|
46
|
-
this.loading.set(false);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
@if (withFiltro()) {
|
|
2
|
-
<div class="col-12 mb-2 mt-2 d-flex justify-content-end align-items-center position-relative">
|
|
3
|
-
<label for="" class="form-label me-2 pt-2">Buscar</label>
|
|
4
|
-
<input type="text" class="form-control cw-250" (input)="textoDigitado($event)">
|
|
5
|
-
<button (click)="togglePopoverFilter()" class="btn btn-dark boton-buscar fs-7">
|
|
6
|
-
<i class="fas fa-cog"></i>
|
|
7
|
-
</button>
|
|
8
|
-
@if (showPopoverFilter()) {
|
|
9
|
-
<div class="popover-menu-filter shadow" @dropdownAnimation>
|
|
10
|
-
<div class="popover-title fs-7">Filtros</div>
|
|
11
|
-
<div class="form-check form-switch text-start">
|
|
12
|
-
<input class="form-check-input" type="checkbox" [checked]="true" (change)="toggleFiltros($event)">
|
|
13
|
-
<label class="form-check-label">Todos</label>
|
|
14
|
-
</div>
|
|
15
|
-
@for (col of columns(); track col.caption) {
|
|
16
|
-
<div class="form-check form-switch text-start">
|
|
17
|
-
<input type="checkbox" class="form-check-input" id="{{ 'filter_' + col.caption }}"
|
|
18
|
-
[(ngModel)]="filtrarColumnas()[col.fieldname]" />
|
|
19
|
-
<label class="form-check-label" for="{{ 'filter_' + col.caption }}">
|
|
20
|
-
{{ col.caption }}
|
|
21
|
-
</label>
|
|
22
|
-
</div>
|
|
23
|
-
}
|
|
24
|
-
</div>
|
|
25
|
-
}
|
|
26
|
-
</div>
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
<!---
|
|
30
|
-
<div class="table-container table-responsive" #tableContainer
|
|
31
|
-
[style.max-height]="altoContenedor()? 'calc(100vh - ' + altoContenedor() + 'px)' : ''"
|
|
32
|
-
(scroll)="onTableScroll($event)">
|
|
33
|
-
-->
|
|
34
|
-
<div class="table-container table-responsive"
|
|
35
|
-
[style.height]="withHeight() && altoContenedor() ? 'calc(100vh - ' + altoContenedor() + 'px)' : ''"
|
|
36
|
-
[style.max-height]="altoContenedor()? 'calc(100vh - ' + altoContenedor() + 'px)' : ''">
|
|
37
|
-
<div>
|
|
38
|
-
<!-- [style.height]="virtualScrollService.getTotalHeight(itemHeight(), rowFilter().length)" -->
|
|
39
|
-
<table #table class="table table-striped normal-table" [ngClass]="isDarkMode() ? 'table-dark' : ''">
|
|
40
|
-
<thead>
|
|
41
|
-
<tr class="shadow-sm">
|
|
42
|
-
@if (withDetails()) {
|
|
43
|
-
<th class="cw-20 b-table" [ngClass]="colorHeader()== 'normal' ? 'h-table' : ''"></th>
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@if (withCheckbox()) {
|
|
47
|
-
<th class="cw-20 b-table" [ngClass]="colorHeader()== 'normal' ? 'h-table' : ''">
|
|
48
|
-
<input type="checkbox" class="form-check-input fs-8 border border-secondary"
|
|
49
|
-
[checked]="validaAllCheck()" (change)="allCheck($event)">
|
|
50
|
-
</th>
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@if (customActions) {
|
|
54
|
-
<th class="cw-40 b-table" [ngClass]="colorHeader()== 'normal' ? 'h-table' : ''">
|
|
55
|
-
|
|
56
|
-
<app-dropdown-cdk>
|
|
57
|
-
<ng-template #trigger>
|
|
58
|
-
<button class="btn p-0 text-dark d-flex mx-auto border-0">
|
|
59
|
-
<i class="fas fa-cog"></i>
|
|
60
|
-
</button>
|
|
61
|
-
</ng-template>
|
|
62
|
-
<ng-template #content>
|
|
63
|
-
<div class="popover-menu-column bg-white shadow" @dropdownAnimation>
|
|
64
|
-
<div class="popover-title fs-7 bg-white">Columnas</div>
|
|
65
|
-
@for (col of columns(); track col.caption) {
|
|
66
|
-
@if (col.caption) {
|
|
67
|
-
<div class="form-check form-switch text-start align-items-center d-flex">
|
|
68
|
-
<input type="checkbox" class="form-check-input py-0 my-0 cw-25 ch-15"
|
|
69
|
-
id="{{'switch_' + col.caption}}"
|
|
70
|
-
[(ngModel)]="visibilidadColumn()[col.caption]" />
|
|
71
|
-
<label class="form-check-label ps-1 fs-6 cursor-pointer font-label"
|
|
72
|
-
for="{{'switch_' + col.caption}}">{{ col.caption }}</label>
|
|
73
|
-
</div>
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
</div>
|
|
77
|
-
</ng-template>
|
|
78
|
-
</app-dropdown-cdk>
|
|
79
|
-
|
|
80
|
-
<!-- <button (click)="togglePopoverColumn()" class="btn p-0 text-dark d-flex mx-auto border-0">
|
|
81
|
-
<i class="fas fa-cog"></i>
|
|
82
|
-
</button>
|
|
83
|
-
@if (showPopoverColumn()) {
|
|
84
|
-
<div class="popover-menu-column shadow" @dropdownAnimation>
|
|
85
|
-
<div class="popover-title fs-7">Columnas</div>
|
|
86
|
-
@for (col of columns(); track col.caption) {
|
|
87
|
-
@if (col.caption) {
|
|
88
|
-
<div class="form-check form-switch text-start">
|
|
89
|
-
<input type="checkbox" class="form-check-input py-0 my-0 cw-25 ch-15"
|
|
90
|
-
id="{{'switch_' + col.caption}}" [(ngModel)]="visibilidadColumn()[col.caption]" />
|
|
91
|
-
<label class="form-check-label ps-1 fs-6 cursor-pointer font-label"
|
|
92
|
-
for="{{'switch_' + col.caption}}">{{ col.caption }}</label>
|
|
93
|
-
</div>
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</div>
|
|
97
|
-
} -->
|
|
98
|
-
</th>
|
|
99
|
-
}
|
|
100
|
-
@for (column of columns(); track $index) {
|
|
101
|
-
@if (validaVisibilidad(column.visible) && visibilidadColumn()[column.caption] !== false) {
|
|
102
|
-
<th class="b-table" #thElement [title]="column.caption"
|
|
103
|
-
[ngClass]="colorHeader()== 'normal' ? 'h-table' : ''">
|
|
104
|
-
{{ column.caption }}
|
|
105
|
-
@if(column.caption){
|
|
106
|
-
@if (sortColumn == column.fieldname) {
|
|
107
|
-
<span (click)="sortTable(column.fieldname)" class="cursor-pointer">
|
|
108
|
-
<i [ngClass]="sortDirection == 'asc' ? 'fas fa-angle-up fs-6':'fas fa-angle-down fs-6'"></i>
|
|
109
|
-
</span>
|
|
110
|
-
}
|
|
111
|
-
@if (sortColumn !== column.fieldname) {
|
|
112
|
-
<i class="fas fa-sort icon-sort cursor-pointer" (click)="sortTable(column.fieldname)"></i>
|
|
113
|
-
}
|
|
114
|
-
@if (column.tipoCaption === 'check-input') {
|
|
115
|
-
<input type="checkbox" class="form-check-input fs-8 ms-2 border border-secondary"
|
|
116
|
-
[checked]="areAllChecked(column.fieldname)"
|
|
117
|
-
(change)="column.event ? toggleAllCheckboxes($event, column.fieldname, rowFilter()) : null">
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
</th>
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
</tr>
|
|
124
|
-
</thead>
|
|
125
|
-
<!--
|
|
126
|
-
<tbody
|
|
127
|
-
[style.transform]="virtualScrollService.getTransform(visibleRange().start, itemHeight())"
|
|
128
|
-
[style.min-height]="itemHeight() * rowFilter().length + 'px'">
|
|
129
|
-
@for (row of visibleRows(); track $index) {
|
|
130
|
-
<tr [ngClass]="{'table-active': (identifier().length < 1 ? selectedRow() == $index : selectedRow() == concatenarValue(row,identifier())),
|
|
131
|
-
'grilla-error': getSituacionNumberFromColumns(row, columns()) == 9}"
|
|
132
|
-
(click)="selectRow(identifier().length < 1 ? $index : row)"
|
|
133
|
-
[id]="identifier().length < 1 ? ('row_table_' + $index) : ('row_table_'+ concatenarValue(row,identifier()))">
|
|
134
|
-
-->
|
|
135
|
-
<tbody>
|
|
136
|
-
@for (row of rowFilter(); track $index) {
|
|
137
|
-
<tr [ngClass]="{'table-active': (identifier().length < 1 ? selectedRow() == $index : selectedRow() == concatenarValue(row,identifier())),
|
|
138
|
-
'grilla-error': getSituacionNumberFromColumns(row, columns()) == 9}"
|
|
139
|
-
(click)="selectRow(identifier().length < 1 ? $index : row); onClick(row)"
|
|
140
|
-
(dblclick)="onDoubleClick(row)" (contextmenu)="onRightClick($event,row)"
|
|
141
|
-
[id]="identifier().length < 1 ? ('row_table_' + $index) : ('row_table_'+ concatenarValue(row,identifier()))">
|
|
142
|
-
@if (withDetails()) {
|
|
143
|
-
<td class="b-table text-center mwp-25">
|
|
144
|
-
<a (click)="toggleExpandRow($index)" class="text-dark cursor-pointer fs-6">
|
|
145
|
-
<i class="fa-solid" [class.fa-chevron-right]="expandedRows != $index"
|
|
146
|
-
[class.fa-chevron-down]="expandedRows == $index"></i>
|
|
147
|
-
</a>
|
|
148
|
-
</td>
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
@if (withCheckbox()) {
|
|
152
|
-
<td scope="col" class="text-center b-table">
|
|
153
|
-
<input type="checkbox" class="form-check-input fs-8 border border-secondary my-0 py-0"
|
|
154
|
-
[checked]="isItemSelected($index)" (change)="toogleItem($index, $event)">
|
|
155
|
-
</td>
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
@if (customActions) {
|
|
159
|
-
<td class="text-center mwp-90 b-table">
|
|
160
|
-
<ng-container *ngTemplateOutlet="customActions; context: { $implicit: row }"></ng-container>
|
|
161
|
-
</td>
|
|
162
|
-
}
|
|
163
|
-
@for (column of columns(); track $index) {
|
|
164
|
-
@if (validaVisibilidad(column.visible) && visibilidadColumn()[column.caption] !== false) {
|
|
165
|
-
|
|
166
|
-
@if (column.template) {
|
|
167
|
-
<td class="b-table">
|
|
168
|
-
<ng-container *ngTemplateOutlet="column.template; context: { $implicit: row, column: column }">
|
|
169
|
-
</ng-container>
|
|
170
|
-
</td>
|
|
171
|
-
}
|
|
172
|
-
@else {
|
|
173
|
-
@switch (column.tipo) {
|
|
174
|
-
@case ('fecha') {
|
|
175
|
-
<td [innerHTML]="getHighlight(row[column.fieldname] | date:'dd/MM/yyyy', column.fieldname)"
|
|
176
|
-
[title]="row[column.fieldname] | date:'dd/MM/yyyy'" [ngClass]="getRowClass(row)"
|
|
177
|
-
class="text-center b-table">
|
|
178
|
-
</td>
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
@case ('date') {
|
|
182
|
-
<td [innerHTML]="getHighlight(row[column.fieldname] | date:'dd/MM/yyyy', column.fieldname)"
|
|
183
|
-
[title]="row[column.fieldname] | date:'dd/MM/yyyy'" [ngClass]="getRowClass(row)"
|
|
184
|
-
class="text-center b-table">
|
|
185
|
-
</td>
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@case ('situacion') {
|
|
189
|
-
<td [innerHTML]="getHighlight(row[column.fieldname], column.fieldname)"
|
|
190
|
-
[title]="row[column.fieldname]" [ngClass]="getRowClass(row)" class="b-table">
|
|
191
|
-
</td>
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@case ('decimal') {
|
|
195
|
-
<td class="text-end b-table"
|
|
196
|
-
[innerHTML]="getHighlight((row[column.fieldname] ?? 0) | number:'1.' + (column.decimales ?? 2) + '-' + (column.decimales ?? 2), column.fieldname)"
|
|
197
|
-
[title]="(row[column.fieldname] ?? 0) | number:'1.' + (column.decimales ?? 2) + '-' + (column.decimales ?? 2)"
|
|
198
|
-
[ngClass]="getRowClass(row)">
|
|
199
|
-
</td>
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
@case ('number') {
|
|
203
|
-
<td class="text-end b-table"
|
|
204
|
-
[innerHTML]="getHighlight((row[column.fieldname] ?? 0) | number:'1.' + (column.decimales ?? 2) + '-' + (column.decimales ?? 2), column.fieldname)"
|
|
205
|
-
[title]="(row[column.fieldname] ?? 0) | number:'1.' + (column.decimales ?? 2) + '-' + (column.decimales ?? 2)"
|
|
206
|
-
[ngClass]="getRowClass(row)">
|
|
207
|
-
</td>
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
@case ('text-center') {
|
|
211
|
-
<td class="text-center b-table" [innerHTML]="getHighlight(row[column.fieldname], column.fieldname)"
|
|
212
|
-
[title]="row[column.fieldname]" [ngClass]="getRowClass(row)">
|
|
213
|
-
</td>
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
@case ('check') {
|
|
217
|
-
<td class="text-center b-table" [title]="checkString[row[column.fieldname]]">
|
|
218
|
-
<i class="fs-5"
|
|
219
|
-
[ngClass]="row[column.fieldname] == 'S'?'fas fa-check yes-icon':'fas fa-times no-icon'"></i>
|
|
220
|
-
</td>
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@case ('check-input') {
|
|
224
|
-
<td class="text-center b-table">
|
|
225
|
-
<input type="checkbox" class="form-check-input fs-8 border border-secondary"
|
|
226
|
-
[checked]="row[column.fieldname] == 1 || row[column.fieldname] == 'S'"
|
|
227
|
-
(change)="column.event ? clickCheck(column.fieldname,$event,row) : null">
|
|
228
|
-
</td>
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
@case ('radio-input') {
|
|
232
|
-
<td class="text-center b-table">
|
|
233
|
-
@if (!column.condition || column.condition(row)) {
|
|
234
|
-
<input type="radio" class="form-check-input fs-8 mtn-0 border border-secondary"
|
|
235
|
-
name="radioGroup" (change)="column.event ? clickRadio(row) : null">
|
|
236
|
-
}
|
|
237
|
-
</td>
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
@case ('mostrar') {
|
|
241
|
-
@if (column.condition()) {
|
|
242
|
-
<td [innerHTML]="getHighlight(row[column.fieldname], column.fieldname)"
|
|
243
|
-
[title]="row[column.fieldname]" class="b-table">
|
|
244
|
-
</td>
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@case ('cell-render') {
|
|
249
|
-
@let resolverItem = resolveCell(column.fieldname, row);
|
|
250
|
-
@if (resolverItem) {
|
|
251
|
-
<td class="b-table" [title]="resolverItem.text" [class.text-center]="resolverItem.icon">
|
|
252
|
-
@if (resolverItem.icon) {
|
|
253
|
-
<i class="fs-5" [ngClass]="resolverItem.icon"></i>
|
|
254
|
-
} @else if (resolverItem.class) {
|
|
255
|
-
<span [ngClass]="row.situac == 'J' ? 'text-error' : resolverItem.class">
|
|
256
|
-
{{ resolverItem.text }}
|
|
257
|
-
</span>
|
|
258
|
-
} @else {
|
|
259
|
-
{{ resolverItem.text }}
|
|
260
|
-
}
|
|
261
|
-
</td>
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
@default {
|
|
266
|
-
<td [innerHTML]="getHighlight(row[column.fieldname], column.fieldname)"
|
|
267
|
-
[title]="row[column.fieldname]" [ngClass]="getRowClass(row)" class="b-table">
|
|
268
|
-
</td>
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
</tr>
|
|
275
|
-
@if ($index == expandedRows) {
|
|
276
|
-
<tr @fadeInOut>
|
|
277
|
-
<td [attr.colspan]="columns().length + (withDetails()? 1 : 0) + (customActions ? 1 : 0)"
|
|
278
|
-
class="table-blank">
|
|
279
|
-
<div class="d-flex flex-column auditoria">
|
|
280
|
-
<span class="fw-bold fs-7 text-dark">Datos de auditoría</span>
|
|
281
|
-
<span class="fs-6 text-dark fw-bold">
|
|
282
|
-
Creación: {{ row.nomucreac }} el {{ row.fcreac | date:'dd/MM/yyyy' }} a las {{
|
|
283
|
-
row.hcreac }}
|
|
284
|
-
</span>
|
|
285
|
-
<span class="fs-6 text-dark fw-bold">
|
|
286
|
-
Actualización: {{ row.nomuactua }} el {{ row.factua | date:'dd/MM/yyyy' }} a las {{
|
|
287
|
-
row.hactua }}
|
|
288
|
-
</span>
|
|
289
|
-
</div>
|
|
290
|
-
</td>
|
|
291
|
-
</tr>
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
</tbody>
|
|
295
|
-
|
|
296
|
-
@if (withTotal()) {
|
|
297
|
-
<tfoot>
|
|
298
|
-
<tr>
|
|
299
|
-
@for (seg of getFooterSegments(); track $index) {
|
|
300
|
-
@if (seg.type == 'colspan') {
|
|
301
|
-
<td class="b-table text-start fw-bold" [attr.colspan]="seg.span">
|
|
302
|
-
{{ $index == 0 ? 'Totales' : '' }}
|
|
303
|
-
</td>
|
|
304
|
-
} @else {
|
|
305
|
-
<td class="b-table text-end fw-bold">
|
|
306
|
-
@if (seg.type == 'total') {
|
|
307
|
-
{{ getTotals(seg.field) | number:'1.2-2' }}
|
|
308
|
-
}@else if (seg.type == 'averageSimple') {
|
|
309
|
-
{{ getAverageSimple(seg.field) | number:'1.2-2' }}
|
|
310
|
-
}
|
|
311
|
-
@else if (seg.type == 'averagePonderado') {
|
|
312
|
-
{{ getAveragePonderado(seg.field) | number:'1.2-2' }}
|
|
313
|
-
}
|
|
314
|
-
</td>
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
</tr>
|
|
318
|
-
</tfoot>
|
|
319
|
-
}
|
|
320
|
-
</table>
|
|
321
|
-
</div>
|
|
322
|
-
</div>
|