@jvsoft/components 0.0.2 → 0.0.4
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/dialog-flotante/dialog-flotante.component.scss +36 -0
- package/fesm2022/jvsoft-components-dialog-flotante.mjs +21 -10
- package/fesm2022/jvsoft-components-dialog-flotante.mjs.map +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs +5 -3
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs.map +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs +689 -408
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -1
- package/fesm2022/jvsoft-components.mjs +704 -479
- package/fesm2022/jvsoft-components.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/luces-navidad/luces-navidad.component.scss +125 -0
- package/package.json +13 -14
- package/src/styles/base-jvsoft-components.css +9 -0
- package/src/styles/base.scss +9 -0
- package/tabla-mantenimiento/components/progress-bar/progress-bar.component.d.ts +3 -3
- package/tabla-mantenimiento/interfaces/archivo.d.ts +26 -0
- package/tabla-mantenimiento/interfaces/global/columnas-tabla.d.ts +97 -73
- package/tabla-mantenimiento/interfaces/implements/incluye-tabla-mantenimiento.d.ts +12 -0
- package/tabla-mantenimiento/interfaces/implements/index.d.ts +1 -0
- package/tabla-mantenimiento/interfaces/index.d.ts +3 -0
- package/tabla-mantenimiento/public-api.d.ts +1 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-date/column-type-date.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-icons/column-type-icons.component.d.ts +9 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-money/column-type-money.component.d.ts +9 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-number/column-type-number.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-progressbar/column-type-progressbar.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-sino/column-type-sino.component.d.ts +9 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-text/column-type-text.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.component.d.ts +18 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.module.d.ts +23 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.d.ts +5 -10
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.scss +0 -0
- package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.scss +0 -0
- package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +14 -12
- package/tabla-mantenimiento/tabla-mantenimiento.component.scss +219 -0
- package/fesm2022/jvsoft-components-progress-spinner.mjs +0 -78
- package/fesm2022/jvsoft-components-progress-spinner.mjs.map +0 -1
- package/progress-spinner/index.d.ts +0 -5
- package/progress-spinner/progress-spinner.component.d.ts +0 -9
- package/progress-spinner/progress-spinner.service.d.ts +0 -25
- package/progress-spinner/public-api.d.ts +0 -2
- /package/src/{styles.scss → styles/tailwind.scss} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
1
2
|
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
3
|
import { FormBuilder, FormControl } from '@angular/forms';
|
|
3
4
|
import { MatPaginator } from '@angular/material/paginator';
|
|
4
5
|
import { MatSort } from '@angular/material/sort';
|
|
5
6
|
import { MatColumnDef, MatTable, MatTableDataSource } from '@angular/material/table';
|
|
6
7
|
import { Observable, Subscription } from 'rxjs';
|
|
7
|
-
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
8
|
-
import { BotonMantenimiento, ColumnaTabla, OpcionSeleccionada, SeccionesBotonesMantenimiento } from './interfaces/global';
|
|
9
|
-
import { TablaMantenimientoService } from './tabla-mantenimiento.service';
|
|
10
|
-
import { capitalizarTexto } from './tabla-mantenimiento.functions';
|
|
11
8
|
import { DataModel } from './classes/data-model';
|
|
9
|
+
import { BotonMantenimiento, ColumnaTabla, OpcionSeleccionada, SeccionesBotonesMantenimiento } from './interfaces';
|
|
10
|
+
import { capitalizarTexto } from './tabla-mantenimiento.functions';
|
|
11
|
+
import { TablaMantenimientoService } from './tabla-mantenimiento.service';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
export interface MantenimientoFilaExtraData {
|
|
14
14
|
template?: TemplateRef<any>;
|
|
@@ -81,6 +81,7 @@ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterCont
|
|
|
81
81
|
userMenu: TemplateRef<any>;
|
|
82
82
|
opcFiltroActual: {};
|
|
83
83
|
protected readonly capitalizarTexto: typeof capitalizarTexto;
|
|
84
|
+
_seleccionado: any;
|
|
84
85
|
cCampoBusqueda: FormControl<string | null>;
|
|
85
86
|
chkLista: DataModel;
|
|
86
87
|
constructor(fb: FormBuilder, overlay: Overlay, viewContainerRef: ViewContainerRef, tablaMantenimientoService: TablaMantenimientoService, cdRef: ChangeDetectorRef);
|
|
@@ -108,20 +109,18 @@ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterCont
|
|
|
108
109
|
set botonesMenu(val: SeccionesBotonesMantenimiento);
|
|
109
110
|
get listaMenuCompleto(): BotonMantenimiento[];
|
|
110
111
|
get objVisibleColumns(): ColumnaTabla<any>[];
|
|
111
|
-
get visibleColumns():
|
|
112
|
-
get tieneCheckbox(): false |
|
|
112
|
+
get visibleColumns(): string[];
|
|
113
|
+
get tieneCheckbox(): false | import("@jvsoft/components/tabla-mantenimiento").ColumnaCheckbox<any>;
|
|
114
|
+
get buscarItemSeleccionado(): any;
|
|
113
115
|
get objSeleccionado(): any;
|
|
114
116
|
set objSeleccionado(val: any);
|
|
115
117
|
get idsSeleccionado(): string;
|
|
116
118
|
idTablaValor(data: any): string;
|
|
117
|
-
condicionesClaseFila: (item: any) =>
|
|
119
|
+
condicionesClaseFila: (item: any) => any[];
|
|
118
120
|
ngOnInit(): void;
|
|
119
121
|
ngAfterContentInit(): void;
|
|
120
122
|
ngOnChanges(changes: SimpleChanges): void;
|
|
121
|
-
trackByFn(index: number, item:
|
|
122
|
-
id: number;
|
|
123
|
-
value: number;
|
|
124
|
-
}): string;
|
|
123
|
+
trackByFn: (index: number, item: any) => string;
|
|
125
124
|
agregarBotonesExportacion(): void;
|
|
126
125
|
actualizarCrud(): void;
|
|
127
126
|
classFila(item: any): any[];
|
|
@@ -132,7 +131,10 @@ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterCont
|
|
|
132
131
|
cargarData(retorno?: boolean): any;
|
|
133
132
|
setData(data: any): void;
|
|
134
133
|
botonDisabled(btn: BotonMantenimiento, item: any): boolean | undefined;
|
|
135
|
-
|
|
134
|
+
propiedadSeleccion(item: any): string;
|
|
135
|
+
esSeleccionActual(item: any): boolean;
|
|
136
|
+
seleccionarItem(item: any, forzado?: boolean): void;
|
|
137
|
+
opcMenu(item: any, objMenu: OpcionSeleccionada, modal?: null, retorno?: boolean): 1 | OpcionSeleccionada;
|
|
136
138
|
emitirResultados(evento?: {}): void;
|
|
137
139
|
abrirMenuContextual({ x, y }: MouseEvent, user: any): void;
|
|
138
140
|
cerrarMenuContextual(): void;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
// SOBREESCRIBIR VARIABLES - DE SELECCION
|
|
5
|
+
//--tabla-mantenimiento-seleccion-fondo: rgb(var(--color-primary));
|
|
6
|
+
//--tabla-mantenimiento-seleccion-fondo: rgb(var(--color-primary));
|
|
7
|
+
--tabla-mantenimiento-seleccion-fondo: rgb(179, 217, 252);
|
|
8
|
+
--tabla-mantenimiento-seleccion-texto: rgb(1, 84, 164);
|
|
9
|
+
|
|
10
|
+
--mat-paginator-container-size: 30px;
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
"--tabla-mantenimiento-seleccion-fondo": "rgb(179,217,252)",
|
|
14
|
+
"--tabla-mantenimiento-seleccion-texto": "rgb(1,84,164)"
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
.table-mantenimiento {
|
|
18
|
+
.elemento-seleccionado {
|
|
19
|
+
background-color: var(--tabla-mantenimiento-seleccion-fondo) !important;
|
|
20
|
+
color: var(--tabla-mantenimiento-seleccion-texto) !important;
|
|
21
|
+
border-color: var(--tabla-mantenimiento-seleccion-texto) !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.jvs-tabla-mantenimiento {
|
|
27
|
+
width: inherit;
|
|
28
|
+
|
|
29
|
+
.contenedor-botones {
|
|
30
|
+
> *:first-child {
|
|
31
|
+
@apply rounded-l;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
> *:last-child {
|
|
35
|
+
@apply rounded-r;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
.mat-mdc-menu-content:not(:empty) {
|
|
41
|
+
@apply flex flex-col items-start;
|
|
42
|
+
padding: 0 !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mat-mdc-menu-item {
|
|
46
|
+
line-height: 24px !important;
|
|
47
|
+
height: 24px !important;
|
|
48
|
+
min-height: 24px !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mat-mdc-menu-panel {
|
|
52
|
+
min-height: auto !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mat-mdc-table .mat-mdc-cell, .mat-mdc-table .mat-mdc-header-cell .mat-mdc-footer-cell {
|
|
56
|
+
white-space: unset;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.table-container {
|
|
60
|
+
max-height: 600px !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
.table-mantenimiento {
|
|
65
|
+
|
|
66
|
+
.mat-mdc-table-sticky-border-elem-right {
|
|
67
|
+
border-left: 1px solid #e0e0e0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mat-mdc-table-sticky-border-elem-left {
|
|
71
|
+
border-right: 1px solid #e0e0e0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
tr.regAnulado {
|
|
75
|
+
.mat-mdc-cell {
|
|
76
|
+
color: unset !important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.bg-primary-activo .numeracionFila {
|
|
81
|
+
@apply rounded-full bg-primary-contrast text-primary mx-1 p-1 w-6 h-6;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
th {
|
|
85
|
+
.form-input {
|
|
86
|
+
@apply w-auto;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
th.mat-mdc-header-cell,
|
|
91
|
+
td.mat-mdc-cell,
|
|
92
|
+
td.mat-mdc-footer-cell {
|
|
93
|
+
&:not(.celda-numeracion-fila) {
|
|
94
|
+
padding: 0.05rem 0.25rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//@apply px-1;
|
|
98
|
+
border-width: 1px;
|
|
99
|
+
//border-width: 1px 1px 1px 1px;
|
|
100
|
+
border-style: solid;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
th.mat-mdc-header-cell:first-of-type,
|
|
104
|
+
th.mat-mdc-header-cell:last-of-type,
|
|
105
|
+
td.mat-mdc-cell:first-of-type,
|
|
106
|
+
td.mat-mdc-cell:last-of-type,
|
|
107
|
+
td.mat-mdc-footer-cell:first-of-type,
|
|
108
|
+
td.mat-mdc-footer-cell:last-of-type {
|
|
109
|
+
//@apply px-2;
|
|
110
|
+
&:not(.celda-numeracion-fila) {
|
|
111
|
+
padding: 0 0.25rem;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
tr.student-detail-row {
|
|
116
|
+
//height: 0 !important;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//.student-element-row td {
|
|
120
|
+
// border-bottom-width: 0 !important;
|
|
121
|
+
//}
|
|
122
|
+
|
|
123
|
+
.student-element-detail {
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
//background-color: #e1e1e1;
|
|
129
|
+
//box-shadow: inset 0 0 4px 0;
|
|
130
|
+
//border-radius: 3px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.mat-mdc-header-row {
|
|
134
|
+
height: 25px !important;
|
|
135
|
+
color: rgb(var(--color-primary)) !important;
|
|
136
|
+
background-color: rgb(var(--color-primary-contrast)) !important;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.mat-mdc-header-cell {
|
|
140
|
+
padding: 5px;
|
|
141
|
+
font-size: 10px;
|
|
142
|
+
line-height: 10px;
|
|
143
|
+
font-weight: bold !important;
|
|
144
|
+
color: inherit;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mat-mdc-row {
|
|
148
|
+
&:hover {
|
|
149
|
+
//background-color: rgba(var(--color-primary-contrast), 0.04);
|
|
150
|
+
//background-color: unset !important;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.mdc-data-table__row {
|
|
155
|
+
//&:not(.bg-primary-activo),
|
|
156
|
+
&:not(.mdc-data-table__row--selected) {
|
|
157
|
+
&:not(.elemento-seleccionado) {
|
|
158
|
+
&:hover, &:focus {
|
|
159
|
+
background-color: rgba(var(--color-primary-contrast), 0.04);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.mat-mdc-row,
|
|
166
|
+
.mat-mdc-footer-row {
|
|
167
|
+
//height: unset !important;
|
|
168
|
+
.mat-mdc-cell {
|
|
169
|
+
//@apply text-2xs;
|
|
170
|
+
font-size: 10px;
|
|
171
|
+
//font-size: unset;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
//.mat-mdc-footer-cell:not(:empty) {
|
|
175
|
+
.mat-mdc-footer-cell:empty {
|
|
176
|
+
/* Styles */
|
|
177
|
+
border-width: 0 !important;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.mat-mdc-cell {
|
|
182
|
+
@apply leading-tight;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
//style="height: 1.5rem !important; font-size: 0.75rem !important;"
|
|
186
|
+
/*
|
|
187
|
+
th.mat-mdc-header-cell:last-of-type, td.mat-mdc-cell:last-of-type, td.mat-mdc-footer-cell:last-of-type {
|
|
188
|
+
padding-right: 0 !important;
|
|
189
|
+
}
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
th.mat-mdc-header-cell {
|
|
193
|
+
//text-align: center !important;
|
|
194
|
+
border-color: rgb(212, 208, 208);
|
|
195
|
+
//border-right-color: rgb(var(--color-primary));
|
|
196
|
+
//border-left-color: rgb(var(--color-primary));
|
|
197
|
+
@apply text-center uppercase;
|
|
198
|
+
//&:first-child {
|
|
199
|
+
//}
|
|
200
|
+
.mat-sort-header-container {
|
|
201
|
+
@apply flex items-center justify-between w-full;
|
|
202
|
+
.mat-sort-header-content {
|
|
203
|
+
@apply inline w-full text-center;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.mat-sort-header-arrow {
|
|
207
|
+
@apply flex-none;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.mat-mdc-sort-header-content {
|
|
213
|
+
width: 100%;
|
|
214
|
+
text-align: center;
|
|
215
|
+
display: unset;
|
|
216
|
+
align-items: center;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component } from '@angular/core';
|
|
3
|
-
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
4
|
-
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
-
import { BehaviorSubject } from 'rxjs';
|
|
6
|
-
import * as i1 from '@angular/cdk/overlay';
|
|
7
|
-
|
|
8
|
-
class ProgressSpinnerService {
|
|
9
|
-
overlay;
|
|
10
|
-
overlayRef = this.createOverlay();
|
|
11
|
-
_mensaje = new BehaviorSubject('');
|
|
12
|
-
mensaje$ = this._mensaje.asObservable();
|
|
13
|
-
_config = new BehaviorSubject({});
|
|
14
|
-
config$ = this._config.asObservable();
|
|
15
|
-
overlayActivo = false;
|
|
16
|
-
get configActual() {
|
|
17
|
-
return this._config.getValue();
|
|
18
|
-
}
|
|
19
|
-
set configActual(data) {
|
|
20
|
-
this._config.next(data);
|
|
21
|
-
}
|
|
22
|
-
constructor(overlay) {
|
|
23
|
-
this.overlay = overlay;
|
|
24
|
-
}
|
|
25
|
-
createOverlay() {
|
|
26
|
-
return this.overlay.create({
|
|
27
|
-
hasBackdrop: true,
|
|
28
|
-
positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
show(config) {
|
|
32
|
-
this.configActual = config ?? {};
|
|
33
|
-
if (!this.overlayActivo) {
|
|
34
|
-
this.overlayRef.attach(new ComponentPortal(ProgressSpinnerComponent));
|
|
35
|
-
this.overlayActivo = true;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
hide(config, timeout = 1) {
|
|
39
|
-
this.configActual = config ?? {};
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
this.overlayRef.detach();
|
|
42
|
-
this.overlayActivo = false;
|
|
43
|
-
}, timeout * 1000); // Ajusta según sea necesario
|
|
44
|
-
}
|
|
45
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressSpinnerService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
46
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressSpinnerService, providedIn: 'root' });
|
|
47
|
-
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressSpinnerService, decorators: [{
|
|
49
|
-
type: Injectable,
|
|
50
|
-
args: [{
|
|
51
|
-
providedIn: 'root'
|
|
52
|
-
}]
|
|
53
|
-
}], ctorParameters: () => [{ type: i1.Overlay }] });
|
|
54
|
-
|
|
55
|
-
class ProgressSpinnerComponent {
|
|
56
|
-
progresSpinnerService;
|
|
57
|
-
get configProgressSpiiner() {
|
|
58
|
-
return this.progresSpinnerService._config.getValue();
|
|
59
|
-
}
|
|
60
|
-
constructor(progresSpinnerService) {
|
|
61
|
-
this.progresSpinnerService = progresSpinnerService;
|
|
62
|
-
}
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressSpinnerComponent, deps: [{ token: ProgressSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ProgressSpinnerComponent, isStandalone: true, selector: "jvs-progress-spinner", ngImport: i0, template: "<div class=\"overlay\" [style]=\"'background-color: ' + configProgressSpiiner?.fondoStyle\">\n <div class=\"flex flex-col justify-center items-center gap-2\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n <div class=\"w-full\">{{ configProgressSpiiner?.mensaje }}</div>\n </div>\n\n</div>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;:host .overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffffb3;display:flex;justify-content:center;align-items:center;z-index:1000}\n"], dependencies: [{ kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressSpinnerComponent, decorators: [{
|
|
67
|
-
type: Component,
|
|
68
|
-
args: [{ selector: 'jvs-progress-spinner', imports: [
|
|
69
|
-
MatProgressSpinner
|
|
70
|
-
], template: "<div class=\"overlay\" [style]=\"'background-color: ' + configProgressSpiiner?.fondoStyle\">\n <div class=\"flex flex-col justify-center items-center gap-2\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n <div class=\"w-full\">{{ configProgressSpiiner?.mensaje }}</div>\n </div>\n\n</div>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;:host .overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffffb3;display:flex;justify-content:center;align-items:center;z-index:1000}\n"] }]
|
|
71
|
-
}], ctorParameters: () => [{ type: ProgressSpinnerService }] });
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Generated bundle index. Do not edit.
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
export { ProgressSpinnerComponent, ProgressSpinnerService };
|
|
78
|
-
//# sourceMappingURL=jvsoft-components-progress-spinner.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jvsoft-components-progress-spinner.mjs","sources":["../../../projects/components/progress-spinner/progress-spinner.service.ts","../../../projects/components/progress-spinner/progress-spinner.component.ts","../../../projects/components/progress-spinner/progress-spinner.component.html","../../../projects/components/progress-spinner/jvsoft-components-progress-spinner.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {Overlay, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {BehaviorSubject} from 'rxjs';\nimport {ProgressSpinnerComponent} from './progress-spinner.component';\n\nexport interface ProgressSpinnerConfig {\n fondoStyle?: string;\n mensaje?: string;\n icono?: string;\n}\n@Injectable({\n providedIn: 'root'\n})\nexport class ProgressSpinnerService {\n private overlayRef: OverlayRef = this.createOverlay();\n _mensaje = new BehaviorSubject('');\n mensaje$ = this._mensaje.asObservable();\n _config = new BehaviorSubject({});\n config$ = this._config.asObservable();\n\n overlayActivo = false;\n\n\n get configActual(): ProgressSpinnerConfig {\n return this._config.getValue();\n }\n set configActual(data: ProgressSpinnerConfig) {\n this._config.next(data);\n }\n\n constructor(private overlay: Overlay) { }\n\n private createOverlay(): OverlayRef {\n return this.overlay.create({\n hasBackdrop: true,\n positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()\n });\n }\n\n show(config?: ProgressSpinnerConfig): void {\n this.configActual = config ?? {};\n if (!this.overlayActivo){\n this.overlayRef.attach(new ComponentPortal(ProgressSpinnerComponent));\n this.overlayActivo = true;\n }\n }\n\n hide(config?: ProgressSpinnerConfig, timeout: number = 1): void {\n this.configActual = config ?? {};\n setTimeout(() => {\n this.overlayRef.detach();\n this.overlayActivo = false;\n }, timeout * 1000); // Ajusta según sea necesario\n\n }\n}\n","import {Component} from '@angular/core';\nimport {ProgressSpinnerConfig, ProgressSpinnerService} from './progress-spinner.service';\nimport {MatProgressSpinner} from '@angular/material/progress-spinner';\n\n@Component({\n selector: 'jvs-progress-spinner',\n templateUrl: './progress-spinner.component.html',\n styleUrls: ['./progress-spinner.component.scss'],\n imports: [\n MatProgressSpinner\n ]\n})\nexport class ProgressSpinnerComponent {\n get configProgressSpiiner(): ProgressSpinnerConfig {\n return this.progresSpinnerService._config.getValue();\n }\n constructor(\n public progresSpinnerService: ProgressSpinnerService,\n ) {\n }\n}\n","<div class=\"overlay\" [style]=\"'background-color: ' + configProgressSpiiner?.fondoStyle\">\n <div class=\"flex flex-col justify-center items-center gap-2\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n <div class=\"w-full\">{{ configProgressSpiiner?.mensaje }}</div>\n </div>\n\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ProgressSpinnerService"],"mappings":"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"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ProgressSpinnerConfig, ProgressSpinnerService } from './progress-spinner.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ProgressSpinnerComponent {
|
|
4
|
-
progresSpinnerService: ProgressSpinnerService;
|
|
5
|
-
get configProgressSpiiner(): ProgressSpinnerConfig;
|
|
6
|
-
constructor(progresSpinnerService: ProgressSpinnerService);
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressSpinnerComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ProgressSpinnerComponent, "jvs-progress-spinner", never, {}, {}, never, never, true, never>;
|
|
9
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export interface ProgressSpinnerConfig {
|
|
5
|
-
fondoStyle?: string;
|
|
6
|
-
mensaje?: string;
|
|
7
|
-
icono?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class ProgressSpinnerService {
|
|
10
|
-
private overlay;
|
|
11
|
-
private overlayRef;
|
|
12
|
-
_mensaje: BehaviorSubject<string>;
|
|
13
|
-
mensaje$: import("rxjs").Observable<string>;
|
|
14
|
-
_config: BehaviorSubject<{}>;
|
|
15
|
-
config$: import("rxjs").Observable<{}>;
|
|
16
|
-
overlayActivo: boolean;
|
|
17
|
-
get configActual(): ProgressSpinnerConfig;
|
|
18
|
-
set configActual(data: ProgressSpinnerConfig);
|
|
19
|
-
constructor(overlay: Overlay);
|
|
20
|
-
private createOverlay;
|
|
21
|
-
show(config?: ProgressSpinnerConfig): void;
|
|
22
|
-
hide(config?: ProgressSpinnerConfig, timeout?: number): void;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressSpinnerService, never>;
|
|
24
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ProgressSpinnerService>;
|
|
25
|
-
}
|
|
File without changes
|