@jvsoft/components 0.0.3 → 0.0.5
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/jvsoft-components-tabla-mantenimiento.mjs +397 -396
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -1
- package/fesm2022/jvsoft-components.mjs +390 -455
- package/fesm2022/jvsoft-components.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/package.json +5 -9
- package/tabla-mantenimiento/interfaces/global/columnas-tabla.d.ts +10 -3
- package/tabla-mantenimiento/interfaces/global/no-export.d.ts +2 -0
- package/tabla-mantenimiento/interfaces/global/otros.d.ts +0 -2
- package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +10 -7
- 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.component.scss +0 -14
- package/progress-spinner/progress-spinner.service.d.ts +0 -25
- package/progress-spinner/public-api.d.ts +0 -2
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jvsoft/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=16.0.0",
|
|
6
6
|
"@angular/core": ">=16.0.0",
|
|
@@ -30,22 +30,18 @@
|
|
|
30
30
|
"types": "./dialog-flotante/index.d.ts",
|
|
31
31
|
"default": "./fesm2022/jvsoft-components-dialog-flotante.mjs"
|
|
32
32
|
},
|
|
33
|
-
"./luces-navidad": {
|
|
34
|
-
"types": "./luces-navidad/index.d.ts",
|
|
35
|
-
"default": "./fesm2022/jvsoft-components-luces-navidad.mjs"
|
|
36
|
-
},
|
|
37
33
|
"./mat-suffix-search-button": {
|
|
38
34
|
"types": "./mat-suffix-search-button/index.d.ts",
|
|
39
35
|
"default": "./fesm2022/jvsoft-components-mat-suffix-search-button.mjs"
|
|
40
36
|
},
|
|
41
|
-
"./progress-spinner": {
|
|
42
|
-
"types": "./progress-spinner/index.d.ts",
|
|
43
|
-
"default": "./fesm2022/jvsoft-components-progress-spinner.mjs"
|
|
44
|
-
},
|
|
45
37
|
"./tabla-mantenimiento": {
|
|
46
38
|
"types": "./tabla-mantenimiento/index.d.ts",
|
|
47
39
|
"default": "./fesm2022/jvsoft-components-tabla-mantenimiento.mjs"
|
|
48
40
|
},
|
|
41
|
+
"./luces-navidad": {
|
|
42
|
+
"types": "./luces-navidad/index.d.ts",
|
|
43
|
+
"default": "./fesm2022/jvsoft-components-luces-navidad.mjs"
|
|
44
|
+
},
|
|
49
45
|
"./tabla-mantenimiento/components/progress-bar": {
|
|
50
46
|
"types": "./tabla-mantenimiento/components/progress-bar/index.d.ts",
|
|
51
47
|
"default": "./fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TipoValorFuncion } from './otros';
|
|
2
1
|
import { EstilosBarra } from '../../components/progress-bar';
|
|
2
|
+
import { TipoValorFuncion } from './no-export';
|
|
3
3
|
type TiposColumnas = 'yes_no' | 'estiloEstablecido' | 'text' | 'number' | 'money' | 'date' | 'image' | 'estado' | 'badge' | 'progress' | 'checkbox' | 'icon' | 'icons' | 'icon_checkbox' | 'custom' | 'expandir' | 'numeracion_automatica';
|
|
4
4
|
export interface ColumnaTablaReporte {
|
|
5
5
|
ocultar?: boolean;
|
|
@@ -9,6 +9,7 @@ export interface ColumnaTablaReporte {
|
|
|
9
9
|
transformar?(titulo?: any): any;
|
|
10
10
|
};
|
|
11
11
|
opcionesPdfmake?: {
|
|
12
|
+
transformarCuerpo?(row: any): any;
|
|
12
13
|
titulo?: object;
|
|
13
14
|
cuerpo?: object;
|
|
14
15
|
total?: TipoValorFuncion<any>;
|
|
@@ -49,6 +50,8 @@ interface BaseColumna<T> {
|
|
|
49
50
|
click?: (row: any) => void;
|
|
50
51
|
transformar?: (row: any) => any;
|
|
51
52
|
transformarFooter?: () => any;
|
|
53
|
+
/** @deprecated usar `reporte.opcionesPdfmake.transformarCuerpo` */
|
|
54
|
+
transformarDirecto?: never;
|
|
52
55
|
}
|
|
53
56
|
export interface ColumnaTexto<T> extends BaseColumna<T> {
|
|
54
57
|
type: 'text';
|
|
@@ -95,12 +98,16 @@ export interface ColumnaYesNo<T> extends BaseColumna<T> {
|
|
|
95
98
|
noTooltip?: string;
|
|
96
99
|
noValue?: any;
|
|
97
100
|
}
|
|
101
|
+
export interface ColumnaEstiloEstablecido<T> extends BaseColumna<T> {
|
|
102
|
+
type: 'estiloEstablecido';
|
|
103
|
+
propertyTemplate: PropiedadString<T> | string;
|
|
104
|
+
}
|
|
98
105
|
export interface ColumnaOtros<T> extends BaseColumna<T> {
|
|
99
|
-
type: '
|
|
106
|
+
type: 'image' | 'custom' | 'estado' | 'numeracion_automatica';
|
|
100
107
|
/** @deprecated */
|
|
101
108
|
readonly estados?: object[];
|
|
102
109
|
}
|
|
103
|
-
export type ColumnaTabla<T> = ColumnaTexto<T> | ColumnaCheckbox<T> | ColumnaMoney<T> | ColumnaIcons<T> | ColumnaProgress<T> | ColumnaDate<T> | ColumnaNumber<T> | ColumnaExpandir<T> | ColumnaYesNo<T> | ColumnaOtros<T>;
|
|
110
|
+
export type ColumnaTabla<T> = ColumnaEstiloEstablecido<T> | ColumnaTexto<T> | ColumnaCheckbox<T> | ColumnaMoney<T> | ColumnaIcons<T> | ColumnaProgress<T> | ColumnaDate<T> | ColumnaNumber<T> | ColumnaExpandir<T> | ColumnaYesNo<T> | ColumnaOtros<T>;
|
|
104
111
|
export interface PropiedadesText {
|
|
105
112
|
separador?: string;
|
|
106
113
|
cssContenedor?: string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
2
|
import { TiposOpciones } from './boton-mantenimiento';
|
|
3
|
-
export type TipoValorFuncion<T> = T | ((...param: any) => T);
|
|
4
|
-
export declare function tipoValorFuncion<T>(datoParam: T, ...param: any[]): T;
|
|
5
3
|
export interface OpcionSeleccionada {
|
|
6
4
|
item?: any;
|
|
7
5
|
seccion: string;
|
|
@@ -1,14 +1,15 @@
|
|
|
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 { tipoValorFuncion, TipoValorFuncion } from './interfaces/global/no-export';
|
|
11
|
+
import { capitalizarTexto } from './tabla-mantenimiento.functions';
|
|
12
|
+
import { TablaMantenimientoService } from './tabla-mantenimiento.service';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
export interface MantenimientoFilaExtraData {
|
|
14
15
|
template?: TemplateRef<any>;
|
|
@@ -116,7 +117,8 @@ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterCont
|
|
|
116
117
|
set objSeleccionado(val: any);
|
|
117
118
|
get idsSeleccionado(): string;
|
|
118
119
|
idTablaValor(data: any): string;
|
|
119
|
-
condicionesClaseFila: (item: any) =>
|
|
120
|
+
condicionesClaseFila: (item: any) => any[];
|
|
121
|
+
soloIconos?: TipoValorFuncion<boolean>;
|
|
120
122
|
ngOnInit(): void;
|
|
121
123
|
ngAfterContentInit(): void;
|
|
122
124
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -134,12 +136,13 @@ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterCont
|
|
|
134
136
|
propiedadSeleccion(item: any): string;
|
|
135
137
|
esSeleccionActual(item: any): boolean;
|
|
136
138
|
seleccionarItem(item: any, forzado?: boolean): void;
|
|
137
|
-
opcMenu(item: any, objMenu: OpcionSeleccionada, modal?: null, retorno?: boolean):
|
|
139
|
+
opcMenu(item: any, objMenu: OpcionSeleccionada, modal?: null, retorno?: boolean): 1 | OpcionSeleccionada;
|
|
138
140
|
emitirResultados(evento?: {}): void;
|
|
139
141
|
abrirMenuContextual({ x, y }: MouseEvent, user: any): void;
|
|
140
142
|
cerrarMenuContextual(): void;
|
|
141
143
|
emitirAccionRecargar(): void;
|
|
144
|
+
protected readonly tipoValorFuncion: typeof tipoValorFuncion;
|
|
142
145
|
static ɵfac: i0.ɵɵFactoryDeclaration<TablaMantenimientoComponent<any>, never>;
|
|
143
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TablaMantenimientoComponent<any>, "jvs-tabla-mantenimiento", never, { "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "headerize": { "alias": "headerize"; "required": false; }; "dataSuscription": { "alias": "dataSuscription"; "required": false; }; "objThis": { "alias": "objThis"; "required": true; }; "nombreColeccion": { "alias": "nombreColeccion"; "required": true; }; "ctrlBusquedaValue": { "alias": "ctrlBusquedaValue"; "required": false; }; "ctrlBusquedaPlaceholder": { "alias": "ctrlBusquedaPlaceholder"; "required": false; }; "filtroCampos": { "alias": "filtroCampos"; "required": false; }; "paginador": { "alias": "paginador"; "required": false; }; "esTabla": { "alias": "esTabla"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "filaExtraHeader": { "alias": "filaExtraHeader"; "required": false; }; "filaFooter": { "alias": "filaFooter"; "required": false; }; "botonesCRUD": { "alias": "botonesCRUD"; "required": false; }; "objBotonesCRUD": { "alias": "objBotonesCRUD"; "required": false; }; "classSeleccionado": { "alias": "classSeleccionado"; "required": false; }; "classAnulado": { "alias": "classAnulado"; "required": false; }; "campoAnulado": { "alias": "campoAnulado"; "required": false; }; "campoAnuladoMensaje": { "alias": "campoAnuladoMensaje"; "required": false; }; "filaExtraTemplate": { "alias": "filaExtraTemplate"; "required": false; }; "exportarExcel": { "alias": "exportarExcel"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "derechosActuales": { "alias": "derechosActuales"; "required": false; }; "ctrlBusqueda": { "alias": "ctrlBusqueda"; "required": false; }; "leyenda": { "alias": "leyenda"; "required": false; }; "idTabla": { "alias": "idTabla"; "required": false; }; "columnasTabla": { "alias": "columnasTabla"; "required": false; }; "botonesMenu": { "alias": "botonesMenu"; "required": false; }; "condicionesClaseFila": { "alias": "condicionesClaseFila"; "required": false; }; }, { "dblclickItem": "dblclickItem"; "opcionSelecionada": "opcionSelecionada"; "opcBusqueda": "opcBusqueda"; "accionRecargar": "accionRecargar"; "dataSourceChange": "dataSourceChange"; "resultados": "resultados"; "resultadosConLabel": "resultadosConLabel"; "dataFiltro": "dataFiltro"; }, ["columnDefs"], ["[filtro]", "[objetosMenuPegado]", "[objetosMenu]", "[botonesFiltro]", "[cuerpo]", "[tableDefinitions]", "[appendTable]"], true, never>;
|
|
146
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TablaMantenimientoComponent<any>, "jvs-tabla-mantenimiento", never, { "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "headerize": { "alias": "headerize"; "required": false; }; "dataSuscription": { "alias": "dataSuscription"; "required": false; }; "objThis": { "alias": "objThis"; "required": true; }; "nombreColeccion": { "alias": "nombreColeccion"; "required": true; }; "ctrlBusquedaValue": { "alias": "ctrlBusquedaValue"; "required": false; }; "ctrlBusquedaPlaceholder": { "alias": "ctrlBusquedaPlaceholder"; "required": false; }; "filtroCampos": { "alias": "filtroCampos"; "required": false; }; "paginador": { "alias": "paginador"; "required": false; }; "esTabla": { "alias": "esTabla"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "filaExtraHeader": { "alias": "filaExtraHeader"; "required": false; }; "filaFooter": { "alias": "filaFooter"; "required": false; }; "botonesCRUD": { "alias": "botonesCRUD"; "required": false; }; "objBotonesCRUD": { "alias": "objBotonesCRUD"; "required": false; }; "classSeleccionado": { "alias": "classSeleccionado"; "required": false; }; "classAnulado": { "alias": "classAnulado"; "required": false; }; "campoAnulado": { "alias": "campoAnulado"; "required": false; }; "campoAnuladoMensaje": { "alias": "campoAnuladoMensaje"; "required": false; }; "filaExtraTemplate": { "alias": "filaExtraTemplate"; "required": false; }; "exportarExcel": { "alias": "exportarExcel"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "derechosActuales": { "alias": "derechosActuales"; "required": false; }; "ctrlBusqueda": { "alias": "ctrlBusqueda"; "required": false; }; "leyenda": { "alias": "leyenda"; "required": false; }; "idTabla": { "alias": "idTabla"; "required": false; }; "columnasTabla": { "alias": "columnasTabla"; "required": false; }; "botonesMenu": { "alias": "botonesMenu"; "required": false; }; "condicionesClaseFila": { "alias": "condicionesClaseFila"; "required": false; }; "soloIconos": { "alias": "soloIconos"; "required": false; }; }, { "dblclickItem": "dblclickItem"; "opcionSelecionada": "opcionSelecionada"; "opcBusqueda": "opcBusqueda"; "accionRecargar": "accionRecargar"; "dataSourceChange": "dataSourceChange"; "resultados": "resultados"; "resultadosConLabel": "resultadosConLabel"; "dataFiltro": "dataFiltro"; }, ["columnDefs"], ["[filtro]", "[objetosMenuPegado]", "[objetosMenu]", "[botonesFiltro]", "[cuerpo]", "[tableDefinitions]", "[appendTable]"], true, never>;
|
|
144
147
|
}
|
|
145
148
|
export {};
|
|
@@ -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: [":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: [":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":";;;;;;;MAca,sBAAsB,CAAA;AAiBX,IAAA,OAAA;AAhBZ,IAAA,UAAU,GAAe,IAAI,CAAC,aAAa,EAAE;AACrD,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC;AAClC,IAAA,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;AACvC,IAAA,OAAO,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC;AACjC,IAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;IAErC,aAAa,GAAG,KAAK;AAGrB,IAAA,IAAI,YAAY,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;;IAElC,IAAI,YAAY,CAAC,IAA2B,EAAA;AACxC,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;AAG3B,IAAA,WAAA,CAAoB,OAAgB,EAAA;QAAhB,IAAO,CAAA,OAAA,GAAP,OAAO;;IAEnB,aAAa,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AACvB,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,kBAAkB,EAAE,CAAC,gBAAgB;AAC3F,SAAA,CAAC;;AAGN,IAAA,IAAI,CAAC,MAA8B,EAAA;AAC/B,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,EAAE;AAChC,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAC;YACpB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,wBAAwB,CAAC,CAAC;AACrE,YAAA,IAAI,CAAC,aAAa,GAAG,IAAI;;;AAIjC,IAAA,IAAI,CAAC,MAA8B,EAAE,OAAA,GAAkB,CAAC,EAAA;AACpD,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,EAAE;QAChC,UAAU,CAAC,MAAK;AACZ,YAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;AACxB,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK;AAC9B,SAAC,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC;;uGAvCd,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,OAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFnB,MAAM,EAAA,CAAA;;2FAET,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;MCDY,wBAAwB,CAAA;AAKxB,IAAA,qBAAA;AAJX,IAAA,IAAI,qBAAqB,GAAA;QACvB,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,QAAQ,EAAE;;AAEtD,IAAA,WAAA,CACW,qBAA6C,EAAA;QAA7C,IAAqB,CAAA,qBAAA,GAArB,qBAAqB;;uGALrB,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZrC,0TAOA,EAAA,MAAA,EAAA,CAAA,wKAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDEQ,kBAAkB,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGb,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBARpC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAGvB,OAAA,EAAA;wBACL;AACH,qBAAA,EAAA,QAAA,EAAA,0TAAA,EAAA,MAAA,EAAA,CAAA,wKAAA,CAAA,EAAA;;;AEVL;;AAEG;;;;"}
|
|
@@ -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
|
-
}
|