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,54 +0,0 @@
|
|
|
1
|
-
.menu-content {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.toggle {
|
|
7
|
-
padding: 10px;
|
|
8
|
-
background-color: rgb(246, 246, 246);
|
|
9
|
-
color: black;
|
|
10
|
-
border: none;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
margin: 0 10px;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.toggle:focus {
|
|
18
|
-
outline: none;
|
|
19
|
-
box-shadow: none;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.menu-desplegable {
|
|
23
|
-
position: absolute;
|
|
24
|
-
min-width: 200px;
|
|
25
|
-
border: 1px solid #ccc;
|
|
26
|
-
background: white;
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
|
|
29
|
-
z-index: 1500;
|
|
30
|
-
max-height: 200px;
|
|
31
|
-
overflow-y: auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.menu-desplegable.top-left {
|
|
35
|
-
top: 100%;
|
|
36
|
-
left: 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.menu-desplegable.top-right {
|
|
40
|
-
top: 100%;
|
|
41
|
-
right: 10px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.menu-desplegable.bottom-left {
|
|
45
|
-
bottom: 100%;
|
|
46
|
-
left: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.menu-desplegable.bottom-right {
|
|
50
|
-
bottom: 100%;
|
|
51
|
-
right: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Component, ContentChild, input, output, signal, TemplateRef } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { fadeInOut } from '../../../directivas/animaciones/fade-animation';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'app-dropdown',
|
|
7
|
-
imports: [CommonModule],
|
|
8
|
-
templateUrl: './dropdown.component.html',
|
|
9
|
-
styleUrl: './dropdown.component.scss',
|
|
10
|
-
animations: [fadeInOut]
|
|
11
|
-
})
|
|
12
|
-
export class DropdownComponent {
|
|
13
|
-
@ContentChild('customActions', { static: false }) customActions!: TemplateRef<any>
|
|
14
|
-
|
|
15
|
-
items = input<string[]>([])
|
|
16
|
-
selected = output<string>()
|
|
17
|
-
isOpen = signal<boolean>(false)
|
|
18
|
-
|
|
19
|
-
toggleDropdown() {
|
|
20
|
-
if (this.customActions) {
|
|
21
|
-
this.isOpen.set(!this.isOpen())
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
onDropdownClick(event: MouseEvent) {
|
|
26
|
-
const target = event.target as HTMLElement
|
|
27
|
-
if (!target.closest('.close-on-click')) {
|
|
28
|
-
this.isOpen.set(false)
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
selectItem(item: string) {
|
|
33
|
-
this.selected.emit(item)
|
|
34
|
-
this.isOpen.set(false)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
@if(!closeButton() && !dropdownButton() && !uploadButton() && !sunatButton() && ! inputButton()){
|
|
2
|
-
<button atajoTecla #boton [altKeyCombination]="atajo()"
|
|
3
|
-
(emitirAtajo)="disabled() ? null : ( atajo() ? ejecutarAccion() : null)" [title]="construirAlt()"
|
|
4
|
-
(focus)="onFocus()" (blur)="onBlur()"
|
|
5
|
-
[style.--focus-color-rgb]="getFocusColor()"
|
|
6
|
-
[style.--focus-color]="'rgba(' + getFocusColor() + ',0.5)'"
|
|
7
|
-
class="{{ isNotStyle() ? 'btn btn-sm' : (isRounded() ? 'circle button-tilt-hover' : 'btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100') }}"
|
|
8
|
-
[ngClass]="outline() ? getColorClassOutline() : getColorClass() + (hasFocus() ? ' aura-focus' : '') " (click)="ejecutarAccion()" [disabled]="disabled()"
|
|
9
|
-
[id]="`id_button_${texto()}`">
|
|
10
|
-
<i [ngClass]="getIconClass()" class="button-icon-hover"></i>
|
|
11
|
-
@if(texto()){
|
|
12
|
-
<span [innerHTML]="isHtml() ? getSafeHtml() : texto()"></span>
|
|
13
|
-
}
|
|
14
|
-
</button>
|
|
15
|
-
}
|
|
16
|
-
@if(sunatButton()){
|
|
17
|
-
<button atajoTecla [altKeyCombination]="atajo()"
|
|
18
|
-
(emitirAtajo)="disabled() ? null : ( atajo() ? ejecutarAccion() : null)"
|
|
19
|
-
class="btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100"
|
|
20
|
-
[ngClass]="[outline() ? getColorClassOutline() : getColorClass()]" (click)="ejecutarAccion()"
|
|
21
|
-
[disabled]="disabled()">
|
|
22
|
-
<img src="../../../../../assets/images/Sunat.ico" class="button-icon-hover" height="16px" alt="Sunat"> {{texto() ?
|
|
23
|
-
texto() : 'Importar de SUNAT'}}
|
|
24
|
-
</button>
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@if(inputButton()){
|
|
28
|
-
<button class="btn button-tilt-hover text-white me-1 fs-6 px-3 py-0 w-auto w-sm-100 radius-none padd"
|
|
29
|
-
[ngClass]="[outline() ? getColorClassOutline() : getColorClass(), !texto() ? 'boton-buscar' : '']"
|
|
30
|
-
(click)="ejecutarAccion()" [disabled]="disabled()">
|
|
31
|
-
<i [ngClass]="getIconClass()" class="button-icon-hover"></i>
|
|
32
|
-
@if(texto()){
|
|
33
|
-
<span>{{ texto() }}</span>
|
|
34
|
-
}
|
|
35
|
-
</button>
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@if(closeButton()){
|
|
39
|
-
<button class="btn close fs-5 no-border" (click)="ejecutarAccion()" [disabled]="disabled()">
|
|
40
|
-
<i class="me-1 button-icon-hover text-dark fw-bold" [ngClass]="getIconClass()"></i>
|
|
41
|
-
</button>
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@if(dropdownButton()){
|
|
45
|
-
<button class="dropdown-item fs-6" (click)="handleClick($event)" [disabled]="disabled()" [ngClass]="extraClass()"
|
|
46
|
-
[ngbTooltip]="tooltip()" [style.cursor]="shouldBlockClick() ? 'not-allowed' : 'pointer'" placement="right">
|
|
47
|
-
<i class="me-1" [ngClass]="getIconClass()"></i>
|
|
48
|
-
@if(texto()){
|
|
49
|
-
<span [innerHTML]="isHtml() ? getSafeHtml() : texto()"></span>
|
|
50
|
-
}
|
|
51
|
-
@if(uploadButton()){
|
|
52
|
-
<input type="file" #fileInput [accept]="accept()" (change)="handleFileInput($event)" [disabled]="disabled()"
|
|
53
|
-
class="d-none">
|
|
54
|
-
}
|
|
55
|
-
</button>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@if(uploadButton() && !dropdownButton()){
|
|
59
|
-
<button class="btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100"
|
|
60
|
-
[ngClass]="outline() ? getColorClassOutline() : getColorClass()" (click)="triggerFileInput()"
|
|
61
|
-
[disabled]="disabled()" [ngbTooltip]="tooltip()" type="button">
|
|
62
|
-
<i [ngClass]="getIconClass()" class="me-1 button-icon-hover"></i>
|
|
63
|
-
@if(texto()){
|
|
64
|
-
<span [innerHTML]="isHtml() ? getSafeHtml() : texto()"></span>
|
|
65
|
-
}
|
|
66
|
-
<input type="file" #fileInput [accept]="accept()" (change)="handleFileInput($event)" [disabled]="disabled()"
|
|
67
|
-
class="d-none">
|
|
68
|
-
</button>
|
|
69
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
.no-border {
|
|
2
|
-
border: none !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.button-icon-hover {
|
|
6
|
-
display: inline-block;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.btn {
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
text-overflow: ellipsis;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@keyframes tilt-bounce {
|
|
16
|
-
|
|
17
|
-
0%,
|
|
18
|
-
100% {
|
|
19
|
-
transform: rotate(0deg);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
25% {
|
|
23
|
-
transform: rotate(-0.5deg);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
75% {
|
|
27
|
-
transform: rotate(0.5deg);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@keyframes icon-rotate-pop {
|
|
32
|
-
0% {
|
|
33
|
-
transform: rotate(0deg) scale(1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
25% {
|
|
37
|
-
transform: rotate(10deg) scale(1.05);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
50% {
|
|
41
|
-
transform: rotate(-10deg) scale(1.1);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
75% {
|
|
45
|
-
transform: rotate(10deg) scale(1.05);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
100% {
|
|
49
|
-
transform: rotate(0deg) scale(1);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.button-tilt-hover:hover {
|
|
54
|
-
animation: tilt-bounce 0.6s infinite ease-in-out, aura-pulse 1.5s ease-out infinite;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.button-tilt-hover:hover .button-icon-hover {
|
|
58
|
-
animation: icon-rotate-pop 1s ease-in-out infinite;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.dropdown-item {
|
|
62
|
-
font-size: 12px !important;
|
|
63
|
-
padding: 7px 20px;
|
|
64
|
-
color: rgb(117, 117, 117);
|
|
65
|
-
transition: color .3s ease-in-out;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.dropdown-item:hover {
|
|
69
|
-
background: rgb(232, 232, 232);
|
|
70
|
-
color: rgb(34, 34, 34);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.tooltip-inner {
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
max-width: none !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:host ::ng-deep .tooltip-inner {
|
|
79
|
-
white-space: nowrap;
|
|
80
|
-
max-width: none !important;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.radius-none {
|
|
84
|
-
border-radius: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.padd {
|
|
88
|
-
padding: 3px 8px !important;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.circle {
|
|
92
|
-
width: 40px !important;
|
|
93
|
-
height: 40px !important;
|
|
94
|
-
min-width: 40px !important;
|
|
95
|
-
min-height: 40px !important;
|
|
96
|
-
max-width: 40px !important;
|
|
97
|
-
max-height: 40px !important;
|
|
98
|
-
border-radius: 100%;
|
|
99
|
-
color: white;
|
|
100
|
-
transition: box-shadow 0.3s ease;
|
|
101
|
-
display: flex !important;
|
|
102
|
-
justify-content: center !important;
|
|
103
|
-
align-items: center !important;
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.circle:hover {
|
|
108
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@keyframes aura-pulse {
|
|
112
|
-
0% {
|
|
113
|
-
box-shadow: 0 0 0 0 var(--focus-color, rgba(0,123,255,0.5));
|
|
114
|
-
}
|
|
115
|
-
50% {
|
|
116
|
-
box-shadow: 0 0 0 6px rgba(var(--focus-color-rgb, 0,123,255), 0.2);
|
|
117
|
-
}
|
|
118
|
-
100% {
|
|
119
|
-
box-shadow: 0 0 0 0 var(--focus-color, rgba(0,123,255,0));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.aura-focus {
|
|
124
|
-
animation: aura-pulse 1.5s ease-out infinite;
|
|
125
|
-
outline: none !important;
|
|
126
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { Component, computed, effect, ElementRef, inject, input, output, signal, viewChild, ViewChild } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
4
|
-
import { AtajosDirective } from '../../../directivas/acciones/atajos.directive';
|
|
5
|
-
import { ColorType, IconType, OutlineType } from '../../../models/button-color.model';
|
|
6
|
-
import { COLOR_CLASSES, ICON_CLASSES, OUTLINE_COLOR_CLASSES } from '../../../directivas/estilos/button.constants';
|
|
7
|
-
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'app-button',
|
|
11
|
-
imports: [CommonModule, NgbTooltipModule, AtajosDirective],
|
|
12
|
-
templateUrl: './button.component.html',
|
|
13
|
-
styleUrl: './button.component.scss'
|
|
14
|
-
})
|
|
15
|
-
export class ButtonComponent {
|
|
16
|
-
|
|
17
|
-
private sanitizer = inject(DomSanitizer)
|
|
18
|
-
|
|
19
|
-
@ViewChild('fileInput') fileInput!: ElementRef<HTMLInputElement>
|
|
20
|
-
|
|
21
|
-
buttonNormal = viewChild<ElementRef<HTMLInputElement>>('boton')
|
|
22
|
-
autoFocus = input<boolean>(false)
|
|
23
|
-
|
|
24
|
-
color = input<ColorType>(undefined)
|
|
25
|
-
outline = input<OutlineType>(undefined)
|
|
26
|
-
icon = input<IconType>(undefined)
|
|
27
|
-
tooltip = input<string>('')
|
|
28
|
-
|
|
29
|
-
texto = input<string>('')
|
|
30
|
-
isHtml = input<boolean>(false)
|
|
31
|
-
closeButton = input<boolean>(false)
|
|
32
|
-
sunatButton = input<boolean>(false)
|
|
33
|
-
inputButton = input<boolean>(false)
|
|
34
|
-
buttonDeshabilitado = input<boolean>(false)
|
|
35
|
-
atajo = input<string>('')
|
|
36
|
-
|
|
37
|
-
dropdownButton = input<boolean>(false)
|
|
38
|
-
extraClass = input<string>('')
|
|
39
|
-
|
|
40
|
-
accion = output<void>()
|
|
41
|
-
|
|
42
|
-
disabled = input<boolean>(false)
|
|
43
|
-
|
|
44
|
-
uploadButton = input<boolean>(false)
|
|
45
|
-
accept = input<string>('*/*')
|
|
46
|
-
fileSelected = output<File>()
|
|
47
|
-
|
|
48
|
-
isRounded = input<boolean>(false)
|
|
49
|
-
isNotStyle = input<boolean>(false)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
hasFocus = signal(false);
|
|
53
|
-
|
|
54
|
-
onFocus() {
|
|
55
|
-
this.hasFocus.set(true);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
onBlur() {
|
|
59
|
-
this.hasFocus.set(false);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
constructor() {
|
|
63
|
-
effect(() => {
|
|
64
|
-
if (this.buttonNormal() && this.autoFocus()) {
|
|
65
|
-
this.buttonNormal().nativeElement.focus()
|
|
66
|
-
}
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
getFocusColor(): string {
|
|
71
|
-
switch (this.color()) {
|
|
72
|
-
case 'rojo': return '255,0,0';
|
|
73
|
-
case 'azul': return '0,123,255';
|
|
74
|
-
case 'verde': return '0,200,0';
|
|
75
|
-
case 'plomo': return '128,128,128';
|
|
76
|
-
default: return '0,123,255';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
getSafeHtml(): SafeHtml {
|
|
81
|
-
return this.sanitizer.bypassSecurityTrustHtml(this.texto())
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
shouldBlockClick(): boolean {
|
|
85
|
-
return this.buttonDeshabilitado() == true
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
getColorClass(): string {
|
|
89
|
-
return this.color() ? COLOR_CLASSES[this.color()] || '' : ''
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
getColorClassOutline(): string {
|
|
93
|
-
return this.outline() ? OUTLINE_COLOR_CLASSES[this.outline()] || '' : ''
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
getIconClass(): string {
|
|
97
|
-
const iconClass = this.icon() ? `${ICON_CLASSES[this.icon()] || ''} ${!this.isRounded() ? 'me-1' : ''}` : ''
|
|
98
|
-
return iconClass ? `fa ${iconClass}` : ''
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
handleClick(event: MouseEvent): void {
|
|
102
|
-
if (this.shouldBlockClick()) {
|
|
103
|
-
event.stopPropagation()
|
|
104
|
-
event.preventDefault()
|
|
105
|
-
return
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (this.uploadButton()) {
|
|
109
|
-
event.stopPropagation()
|
|
110
|
-
this.triggerFileInput()
|
|
111
|
-
} else {
|
|
112
|
-
this.ejecutarAccion()
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
ejecutarAccion() {
|
|
117
|
-
this.accion.emit()
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
triggerFileInput(): void {
|
|
121
|
-
if (!this.disabled()) {
|
|
122
|
-
this.fileInput.nativeElement.click()
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
handleFileInput(event: Event): void {
|
|
127
|
-
const input = event.target as HTMLInputElement
|
|
128
|
-
if (input.files && input.files.length > 0) {
|
|
129
|
-
this.fileSelected.emit(input.files[0])
|
|
130
|
-
input.value = ''
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
construirAlt = () => {
|
|
135
|
-
return this.atajo() ? `${this.texto()}: Ctrl + ${this.atajo()}` : ""
|
|
136
|
-
}
|
|
137
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.rotate-up {
|
|
2
|
-
transform: rotate(180deg);
|
|
3
|
-
transition: transform 0.3s ease;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.icon-arrow {
|
|
7
|
-
transition: transform 0.3s ease;
|
|
8
|
-
margin-left: -12px;
|
|
9
|
-
font-size: 10px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.disabled-icon {
|
|
13
|
-
opacity: 0.5;
|
|
14
|
-
cursor: not-allowed;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.header-actions {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
margin-left: auto;
|
|
21
|
-
gap: 0.5rem;
|
|
22
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Component, input, model } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-filter-toggle',
|
|
6
|
-
imports: [CommonModule],
|
|
7
|
-
template: `
|
|
8
|
-
<div class="d-flex align-items-center cursor-pointer"
|
|
9
|
-
[ngClass]="{ 'disabled-icon': !hasData() }">
|
|
10
|
-
<i class="fa-solid fa-filter px-2 me-1" [class]="'fs-' + tamanio()"></i>
|
|
11
|
-
<i class="icon-arrow fa-solid fa-chevron-down"
|
|
12
|
-
[ngClass]="{ 'rotate-up': !withFiltro(), 'disabled-icon': !hasData() }"></i>
|
|
13
|
-
</div>
|
|
14
|
-
`,
|
|
15
|
-
styleUrl: './filter-toggle.component.scss'
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export class FilterToggleComponent {
|
|
19
|
-
|
|
20
|
-
hasData = input<boolean>(false)
|
|
21
|
-
tamanio = input<string>('7')
|
|
22
|
-
withFiltro = model<boolean>(true)
|
|
23
|
-
|
|
24
|
-
toggleFiltro() {
|
|
25
|
-
if (this.hasData()) {
|
|
26
|
-
this.withFiltro.update(value => !value)
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<div class="d-flex justify-content-between position-relative flex-wrap"
|
|
2
|
-
[ngClass]="{ 'align-items-center': !validateSalto(), 'align-items-start': validateSalto()}">
|
|
3
|
-
<div (click)="toggleFiltro()" [ngClass]="{ 'cursor-pointer': !isModal() }" class="d-flex align-items-center mb-2">
|
|
4
|
-
<h5 class="fw-bold no-select" [ngClass]="['fs-' + tamanio(), isModal() ? 'pt-3' : 'pt-2']">
|
|
5
|
-
{{ title() }}
|
|
6
|
-
</h5>
|
|
7
|
-
@if(showFiltro()){
|
|
8
|
-
<div [ngClass]="{'pt-2': isModal()}">
|
|
9
|
-
<app-filter-toggle [hasData]="hasData()" [(withFiltro)]="withFiltro" />
|
|
10
|
-
</div>
|
|
11
|
-
}
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<div class="header-actions">
|
|
15
|
-
@if (showAlerta()) {
|
|
16
|
-
<app-alerta [mensaje]="textAlerta()" [validateSalto]="validateSalto()" />
|
|
17
|
-
}
|
|
18
|
-
@if(isModal()){
|
|
19
|
-
<app-button icon="cerrar" [closeButton]="true" (accion)="cerrar()" />
|
|
20
|
-
}
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.rotate-up {
|
|
2
|
-
transform: rotate(180deg);
|
|
3
|
-
transition: transform 0.3s ease;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.icon-arrow {
|
|
7
|
-
transition: transform 0.3s ease;
|
|
8
|
-
margin-left: -12px;
|
|
9
|
-
font-size: 10px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.disabled-icon {
|
|
13
|
-
opacity: 0.5;
|
|
14
|
-
cursor: not-allowed;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.header-actions {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
margin-left: auto;
|
|
21
|
-
gap: 0.5rem;
|
|
22
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, input, output, model } from '@angular/core';
|
|
3
|
-
import { ButtonComponent } from '../button/button.component';
|
|
4
|
-
import { AlertaComponent } from "../../alerts/alerta/alerta.component";
|
|
5
|
-
import { FilterToggleComponent } from "../filter-toggle/filter-toggle.component";
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'app-header',
|
|
9
|
-
imports: [CommonModule, ButtonComponent, AlertaComponent, FilterToggleComponent],
|
|
10
|
-
templateUrl: './header.component.html',
|
|
11
|
-
styleUrl: './header.component.scss'
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export class HeaderComponent {
|
|
15
|
-
|
|
16
|
-
title = input<string>('')
|
|
17
|
-
tamanio = input<string>('7')
|
|
18
|
-
|
|
19
|
-
showFiltro = input<boolean>(true)
|
|
20
|
-
withFiltro = model<boolean>(true)
|
|
21
|
-
|
|
22
|
-
hasData = input<boolean>(false)
|
|
23
|
-
|
|
24
|
-
isModal = input<boolean>(false)
|
|
25
|
-
cerrarModal = output<void>()
|
|
26
|
-
|
|
27
|
-
showAlerta = input<boolean>(false)
|
|
28
|
-
textAlerta = input<string>('La consulta muestra los 100 primeros registros.')
|
|
29
|
-
validateSalto = input<boolean>(false)
|
|
30
|
-
|
|
31
|
-
toggleFiltro() {
|
|
32
|
-
if (this.hasData()) {
|
|
33
|
-
this.withFiltro.update(value => !value)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
cerrar() {
|
|
38
|
-
this.cerrarModal.emit()
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
@if (isVertical()) {
|
|
2
|
-
<label for="{{'id_' + label()}}" [style.min-width]="wlabel() + 'px'"> {{label()}} @if (isRequired()) {<span
|
|
3
|
-
class="fw-bold text-danger">(*)</span>}</label>
|
|
4
|
-
}
|
|
5
|
-
<div class="d-flex align-items-center">
|
|
6
|
-
@if (!isVertical()) {
|
|
7
|
-
<label for="{{'id_' + label()}}" [style.min-width]="wlabel() + 'px'">{{label()}} @if (isRequired()) { <span
|
|
8
|
-
class="fw-bold text-danger">(*)</span>}</label>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
<div class="autocomplete d-flex ">
|
|
12
|
-
@if(showId()){
|
|
13
|
-
<div class="content-1 me-1">
|
|
14
|
-
<input type="text" class="form-control show-input"
|
|
15
|
-
[attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
|
|
16
|
-
[style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
|
|
17
|
-
[style.--focus-transition]="customTransition()" [disabled]="disabled1()" [(ngModel)]="searchIdText"
|
|
18
|
-
(input)="onSearchById()" id="{{'id_' + label()}}" name="{{'id_' + label()}}" />
|
|
19
|
-
</div>
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
<div class="input-container content-2 me-2">
|
|
23
|
-
<input type="text" [(ngModel)]="searchText" class="form-select"
|
|
24
|
-
[attr.data-active-focus]="activeFocus() == false ? 'false' : ''"
|
|
25
|
-
[style.--focus-border-color]="customBorderColor()" [style.--focus-box-shadow]="customBoxShadow()"
|
|
26
|
-
[style.--focus-transition]="customTransition()" [disabled]="disabled2()" (input)="onSearch()"
|
|
27
|
-
(blur)="showDropdown.set(false)" (click)="onClick()" (keydown)="onKeyDown($event)" />
|
|
28
|
-
<ul [class.show]="showDropdown()">
|
|
29
|
-
@for (item of filteredItems(); track $index) {
|
|
30
|
-
<li #autocompleteItem
|
|
31
|
-
[ngClass]="{'fw-bold': selectedItem()[keyCodigo()] == item[keyCodigo()], 'bg-primary text-white': highlightedIndex() == $index}"
|
|
32
|
-
(mousedown)="selectItem(item)">
|
|
33
|
-
@if (joinInfo()) {
|
|
34
|
-
{{ item[keyCodigo()] }} - {{ item[keyDescri()] }}
|
|
35
|
-
} @else{
|
|
36
|
-
{{ item[keyDescri()] }}
|
|
37
|
-
}
|
|
38
|
-
@if (selectedItem()[keyCodigo()] == item[keyCodigo()]) {
|
|
39
|
-
<i class="far fa-check-circle fw-bold text-success cw-20"></i>
|
|
40
|
-
}
|
|
41
|
-
</li>
|
|
42
|
-
}
|
|
43
|
-
</ul>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
.autocomplete {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.autocomplete ul {
|
|
7
|
-
position: absolute;
|
|
8
|
-
width: 100%;
|
|
9
|
-
border: 1px solid #ccc;
|
|
10
|
-
background: white;
|
|
11
|
-
list-style: none;
|
|
12
|
-
padding: 0;
|
|
13
|
-
margin: 0;
|
|
14
|
-
top: 100%;
|
|
15
|
-
left: 0;
|
|
16
|
-
max-height: 0;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
|
|
19
|
-
z-index: 1000;
|
|
20
|
-
opacity: 0;
|
|
21
|
-
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.autocomplete ul.show {
|
|
25
|
-
max-height: 250px;
|
|
26
|
-
overflow-y: auto;
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.autocomplete li {
|
|
31
|
-
padding: 8px;
|
|
32
|
-
font-size: 0.7rem;
|
|
33
|
-
font-weight: 400;
|
|
34
|
-
color: rgb(53, 53, 53);
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.autocomplete li:hover {
|
|
39
|
-
background: #f0f0f0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.dropdown-arrow {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 15px;
|
|
45
|
-
font-size: 11px;
|
|
46
|
-
transition: transform 0.3s ease-in-out;
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
user-select: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@media (max-width: 442px) {
|
|
52
|
-
.d-flex {
|
|
53
|
-
flex-direction: column !important;
|
|
54
|
-
align-items: stretch !important;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.content-1 {
|
|
59
|
-
flex-basis: 23%;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.content-2 {
|
|
65
|
-
flex-grow: 1;
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.input-container {
|
|
71
|
-
position: relative;
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
width: 70%;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.show-input {
|
|
78
|
-
display: block;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@media (max-width: 443px) {
|
|
82
|
-
.show-input {
|
|
83
|
-
display: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.input-container {
|
|
87
|
-
width: 100%;
|
|
88
|
-
padding-right: 8px;
|
|
89
|
-
}
|
|
90
|
-
}
|