sf-loading 12.1.0 → 13.0.1
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/sf-loading.mjs +128 -0
- package/fesm2022/sf-loading.mjs.map +1 -0
- package/{sf-loading.d.ts → index.d.ts} +5 -5
- package/lib/components/table-skeleton/table-skeleton.component.d.ts +13 -0
- package/lib/sf-loading.component.d.ts +16 -16
- package/lib/sf-loading.module.d.ts +11 -11
- package/package.json +17 -9
- package/public-api.d.ts +3 -2
- package/bundles/sf-loading.umd.js +0 -127
- package/bundles/sf-loading.umd.js.map +0 -1
- package/esm2015/lib/sf-loading.component.js +0 -53
- package/esm2015/lib/sf-loading.module.js +0 -38
- package/esm2015/public-api.js +0 -6
- package/esm2015/sf-loading.js +0 -5
- package/fesm2015/sf-loading.js +0 -99
- package/fesm2015/sf-loading.js.map +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ViewChild, Input, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from 'primeng/progressspinner';
|
|
4
|
+
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
5
|
+
import * as i2 from 'primeng/progressbar';
|
|
6
|
+
import { ProgressBarModule } from 'primeng/progressbar';
|
|
7
|
+
import * as i3 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { TableModule } from 'primeng/table';
|
|
10
|
+
import { Skeleton } from 'primeng/skeleton';
|
|
11
|
+
import { CardModule } from 'primeng/card';
|
|
12
|
+
import { BlockUIModule } from 'primeng/blockui';
|
|
13
|
+
|
|
14
|
+
class SfLoadingComponent {
|
|
15
|
+
target;
|
|
16
|
+
progress;
|
|
17
|
+
texto;
|
|
18
|
+
logo;
|
|
19
|
+
enProceso = false;
|
|
20
|
+
block;
|
|
21
|
+
prevPosition;
|
|
22
|
+
constructor() { }
|
|
23
|
+
ngOnChanges() {
|
|
24
|
+
if (this.block)
|
|
25
|
+
this.ngAfterViewInit();
|
|
26
|
+
}
|
|
27
|
+
ngAfterViewInit() {
|
|
28
|
+
if (this.enProceso) {
|
|
29
|
+
if (this.target) {
|
|
30
|
+
this.target.style.position = "relative";
|
|
31
|
+
this.target.appendChild(this.block.nativeElement);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
if (this.target) {
|
|
36
|
+
const hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
37
|
+
if (hasBlockChild)
|
|
38
|
+
this.target.removeChild(this.block.nativeElement);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SfLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SfLoadingComponent, isStandalone: false, selector: "sf-loading", inputs: { target: "target", progress: "progress", texto: "texto", logo: "logo", enProceso: "enProceso" }, viewQueries: [{ propertyName: "block", first: true, predicate: ["block"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n", styles: [".full-width{width:100%;height:100%;position:fixed;z-index:9999}.blocking-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#9e9797cc;z-index:9999;display:flex;flex-direction:column;justify-content:center;align-items:center}.blocking-overlay>p{font-size:1.5rem;text-align:center;max-width:80%}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}::ng-deep .p-dialog-mask .p-dialog{max-width:95vw}}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "component", type: i1.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i2.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "style", "unit", "mode", "color"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SfLoadingComponent, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{ selector: 'sf-loading', standalone: false, template: "<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n", styles: [".full-width{width:100%;height:100%;position:fixed;z-index:9999}.blocking-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#9e9797cc;z-index:9999;display:flex;flex-direction:column;justify-content:center;align-items:center}.blocking-overlay>p{font-size:1.5rem;text-align:center;max-width:80%}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}::ng-deep .p-dialog-mask .p-dialog{max-width:95vw}}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
48
|
+
}], ctorParameters: () => [], propDecorators: { target: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], progress: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], texto: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], logo: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], enProceso: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], block: [{
|
|
59
|
+
type: ViewChild,
|
|
60
|
+
args: ['block']
|
|
61
|
+
}] } });
|
|
62
|
+
|
|
63
|
+
class TableSkeletonComponent {
|
|
64
|
+
columns = 5;
|
|
65
|
+
rows = 10;
|
|
66
|
+
skeletonRows = [];
|
|
67
|
+
skeletonColumns = [];
|
|
68
|
+
loadingType = '';
|
|
69
|
+
ngOnInit() {
|
|
70
|
+
this.updateSkeletonColumns();
|
|
71
|
+
}
|
|
72
|
+
updateSkeletonColumns() {
|
|
73
|
+
this.skeletonRows = Array.from({ length: this.rows }, (_, i) => i);
|
|
74
|
+
this.skeletonColumns = Array.from({ length: this.columns }, (_, i) => i);
|
|
75
|
+
}
|
|
76
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TableSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
77
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TableSkeletonComponent, isStandalone: true, selector: "app-table-skeleton", inputs: { columns: "columns", rows: "rows", loadingType: "loadingType" }, ngImport: i0, template: "<!-- Skeleton mientras carga -->\r\n<div class=\"flex flex-column gap-3\">\r\n <!-- Skeleton del header/t\u00EDtulo -->\r\n <div class=\"flex flex-column md:justify-content-between md:align-items-center mb-3 md:flex-row gap-3\"\r\n *ngIf=\"loadingType === 'all'\">\r\n <p-skeleton width=\"200px\" height=\"2rem\"></p-skeleton>\r\n <div class=\"w-full md:w-20rem\">\r\n <p-skeleton width=\"100%\" height=\"2rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!-- Skeleton de la tabla con scroll horizontal -->\r\n <div class=\"table-skeleton-wrapper\">\r\n <div class=\"table-skeleton\">\r\n <!-- Header de la tabla -->\r\n <div class=\"table-row header-row\" *ngIf=\"loadingType === 'all'\">\r\n <div *ngFor=\"let col of skeletonColumns\" class=\"table-cell\">\r\n <p-skeleton height=\"1.2rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!-- Filas de la tabla -->\r\n <div *ngIf=\"loadingType === 'all' || loadingType === 'data'\">\r\n <div *ngFor=\"let row of skeletonRows\" class=\"table-row body-row\">\r\n <div *ngFor=\"let col of skeletonColumns\" class=\"table-cell\">\r\n <p-skeleton height=\"1rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Skeleton del paginador -->\r\n <div class=\"flex justify-content-center align-items-center\" *ngIf=\"loadingType === 'all'\">\r\n <div class=\"flex gap-2\">\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".table-skeleton-wrapper{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-skeleton-wrapper::-webkit-scrollbar{height:6px}.table-skeleton-wrapper::-webkit-scrollbar-track{background:var(--surface-100);border-radius:3px}.table-skeleton-wrapper::-webkit-scrollbar-thumb{background:var(--surface-300);border-radius:3px}.table-skeleton-wrapper::-webkit-scrollbar-thumb:hover{background:var(--surface-400)}.table-skeleton{min-width:600px;width:100%}.table-row{display:flex;width:100%;gap:2rem}.header-row{background-color:var(--surface-100);border-radius:4px 4px 0 0}.body-row{border-bottom:1px solid var(--surface-200)}.body-row:last-child{border-bottom:none}.table-cell{flex:1;padding:1rem 0;min-width:120px}.header-actions{flex-wrap:wrap;gap:.5rem}@media screen and (max-width: 768px){.table-skeleton{min-width:700px}.table-cell{min-width:100px;padding:.75rem}.header-actions{flex-direction:column}.header-actions p-skeleton{width:100%!important}}@media screen and (max-width: 480px){.table-skeleton{min-width:600px}.table-cell{min-width:80px;padding:.5rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: CardModule }] });
|
|
78
|
+
}
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TableSkeletonComponent, decorators: [{
|
|
80
|
+
type: Component,
|
|
81
|
+
args: [{ selector: 'app-table-skeleton', imports: [CommonModule, TableModule, Skeleton, CardModule], standalone: true, template: "<!-- Skeleton mientras carga -->\r\n<div class=\"flex flex-column gap-3\">\r\n <!-- Skeleton del header/t\u00EDtulo -->\r\n <div class=\"flex flex-column md:justify-content-between md:align-items-center mb-3 md:flex-row gap-3\"\r\n *ngIf=\"loadingType === 'all'\">\r\n <p-skeleton width=\"200px\" height=\"2rem\"></p-skeleton>\r\n <div class=\"w-full md:w-20rem\">\r\n <p-skeleton width=\"100%\" height=\"2rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!-- Skeleton de la tabla con scroll horizontal -->\r\n <div class=\"table-skeleton-wrapper\">\r\n <div class=\"table-skeleton\">\r\n <!-- Header de la tabla -->\r\n <div class=\"table-row header-row\" *ngIf=\"loadingType === 'all'\">\r\n <div *ngFor=\"let col of skeletonColumns\" class=\"table-cell\">\r\n <p-skeleton height=\"1.2rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!-- Filas de la tabla -->\r\n <div *ngIf=\"loadingType === 'all' || loadingType === 'data'\">\r\n <div *ngFor=\"let row of skeletonRows\" class=\"table-row body-row\">\r\n <div *ngFor=\"let col of skeletonColumns\" class=\"table-cell\">\r\n <p-skeleton height=\"1rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Skeleton del paginador -->\r\n <div class=\"flex justify-content-center align-items-center\" *ngIf=\"loadingType === 'all'\">\r\n <div class=\"flex gap-2\">\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".table-skeleton-wrapper{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-skeleton-wrapper::-webkit-scrollbar{height:6px}.table-skeleton-wrapper::-webkit-scrollbar-track{background:var(--surface-100);border-radius:3px}.table-skeleton-wrapper::-webkit-scrollbar-thumb{background:var(--surface-300);border-radius:3px}.table-skeleton-wrapper::-webkit-scrollbar-thumb:hover{background:var(--surface-400)}.table-skeleton{min-width:600px;width:100%}.table-row{display:flex;width:100%;gap:2rem}.header-row{background-color:var(--surface-100);border-radius:4px 4px 0 0}.body-row{border-bottom:1px solid var(--surface-200)}.body-row:last-child{border-bottom:none}.table-cell{flex:1;padding:1rem 0;min-width:120px}.header-actions{flex-wrap:wrap;gap:.5rem}@media screen and (max-width: 768px){.table-skeleton{min-width:700px}.table-cell{min-width:100px;padding:.75rem}.header-actions{flex-direction:column}.header-actions p-skeleton{width:100%!important}}@media screen and (max-width: 480px){.table-skeleton{min-width:600px}.table-cell{min-width:80px;padding:.5rem}}\n"] }]
|
|
82
|
+
}], propDecorators: { columns: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], rows: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], loadingType: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}] } });
|
|
89
|
+
|
|
90
|
+
class SfLoadingModule {
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SfLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
92
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [BlockUIModule,
|
|
93
|
+
ProgressSpinnerModule,
|
|
94
|
+
ProgressBarModule,
|
|
95
|
+
CommonModule], exports: [SfLoadingComponent] });
|
|
96
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SfLoadingModule, imports: [BlockUIModule,
|
|
97
|
+
ProgressSpinnerModule,
|
|
98
|
+
ProgressBarModule,
|
|
99
|
+
CommonModule] });
|
|
100
|
+
}
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SfLoadingModule, decorators: [{
|
|
102
|
+
type: NgModule,
|
|
103
|
+
args: [{
|
|
104
|
+
declarations: [
|
|
105
|
+
SfLoadingComponent
|
|
106
|
+
],
|
|
107
|
+
imports: [
|
|
108
|
+
BlockUIModule,
|
|
109
|
+
ProgressSpinnerModule,
|
|
110
|
+
ProgressBarModule,
|
|
111
|
+
CommonModule
|
|
112
|
+
],
|
|
113
|
+
exports: [
|
|
114
|
+
SfLoadingComponent
|
|
115
|
+
]
|
|
116
|
+
}]
|
|
117
|
+
}] });
|
|
118
|
+
|
|
119
|
+
/*
|
|
120
|
+
* Public API Surface of sf-loading
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Generated bundle index. Do not edit.
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
export { SfLoadingComponent, SfLoadingModule, TableSkeletonComponent };
|
|
128
|
+
//# sourceMappingURL=sf-loading.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sf-loading.mjs","sources":["../../../projects/sf-loading/src/lib/sf-loading.component.ts","../../../projects/sf-loading/src/lib/sf-loading.compontent.html","../../../projects/sf-loading/src/lib/components/table-skeleton/table-skeleton.component.ts","../../../projects/sf-loading/src/lib/components/table-skeleton/table-skeleton.component.html","../../../projects/sf-loading/src/lib/sf-loading.module.ts","../../../projects/sf-loading/src/public-api.ts","../../../projects/sf-loading/src/sf-loading.ts"],"sourcesContent":["import { AfterViewInit, Component, ElementRef, Input, OnChanges, ViewChild } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sf-loading',\r\n templateUrl: 'sf-loading.compontent.html',\r\n styleUrls: ['sf-loading.component.css'],\r\n standalone: false\r\n})\r\nexport class SfLoadingComponent implements AfterViewInit, OnChanges{\r\n\r\n @Input() target:HTMLElement|undefined;\r\n @Input() progress?: number;\r\n @Input() texto: string | undefined;\r\n\r\n @Input() logo: string | undefined;\r\n\r\n @Input() enProceso = false;\r\n\r\n @ViewChild('block') block!: ElementRef<HTMLElement>;\r\n\r\n private prevPosition: string | undefined;\r\n\r\n\r\n constructor(){}\r\n\r\n ngOnChanges(): void {\r\n if (this.block) this.ngAfterViewInit()\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.enProceso){\r\n if (this.target){\r\n this.target.style.position = \"relative\";\r\n (this.target as Node).appendChild(this.block.nativeElement)\r\n }\r\n }else {\r\n if (this.target) {\r\n const hasBlockChild = (this.target as Node).contains(this.block.nativeElement);\r\n if (hasBlockChild) (this.target as Node).removeChild(this.block.nativeElement)\r\n }\r\n }\r\n }\r\n}\r\n","<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { TableModule } from 'primeng/table';\r\nimport { Skeleton } from 'primeng/skeleton';\r\nimport { CardModule } from 'primeng/card';\r\n\r\n@Component({\r\n selector: 'app-table-skeleton',\r\n imports: [CommonModule, TableModule, Skeleton, CardModule],\r\n templateUrl: './table-skeleton.component.html',\r\n styleUrls: ['./table-skeleton.component.scss'],\r\n standalone: true\r\n})\r\nexport class TableSkeletonComponent implements OnInit {\r\n @Input() columns: number = 5;\r\n @Input() rows: number = 10;\r\n skeletonRows: number[] = [];\r\n skeletonColumns: number[] = [];\r\n @Input() loadingType: string = '';\r\n \r\n ngOnInit() {\r\n this.updateSkeletonColumns();\r\n }\r\n \r\n updateSkeletonColumns() {\r\n this.skeletonRows = Array.from({ length: this.rows }, (_, i) => i);\r\n this.skeletonColumns = Array.from({ length: this.columns }, (_, i) => i);\r\n }\r\n\r\n}\r\n","<!-- Skeleton mientras carga -->\r\n<div class=\"flex flex-column gap-3\">\r\n <!-- Skeleton del header/título -->\r\n <div class=\"flex flex-column md:justify-content-between md:align-items-center mb-3 md:flex-row gap-3\"\r\n *ngIf=\"loadingType === 'all'\">\r\n <p-skeleton width=\"200px\" height=\"2rem\"></p-skeleton>\r\n <div class=\"w-full md:w-20rem\">\r\n <p-skeleton width=\"100%\" height=\"2rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!-- Skeleton de la tabla con scroll horizontal -->\r\n <div class=\"table-skeleton-wrapper\">\r\n <div class=\"table-skeleton\">\r\n <!-- Header de la tabla -->\r\n <div class=\"table-row header-row\" *ngIf=\"loadingType === 'all'\">\r\n <div *ngFor=\"let col of skeletonColumns\" class=\"table-cell\">\r\n <p-skeleton height=\"1.2rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <!-- Filas de la tabla -->\r\n <div *ngIf=\"loadingType === 'all' || loadingType === 'data'\">\r\n <div *ngFor=\"let row of skeletonRows\" class=\"table-row body-row\">\r\n <div *ngFor=\"let col of skeletonColumns\" class=\"table-cell\">\r\n <p-skeleton height=\"1rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Skeleton del paginador -->\r\n <div class=\"flex justify-content-center align-items-center\" *ngIf=\"loadingType === 'all'\">\r\n <div class=\"flex gap-2\">\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n <p-skeleton size=\"2rem\" shape=\"circle\"></p-skeleton>\r\n\r\n </div>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { SfLoadingComponent } from './sf-loading.component';\r\nimport { BlockUIModule } from 'primeng/blockui';\r\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ProgressBarModule } from 'primeng/progressbar';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n SfLoadingComponent\r\n ],\r\n imports: [\r\n BlockUIModule\r\n ,ProgressSpinnerModule\r\n ,ProgressBarModule\r\n ,CommonModule\r\n ],\r\n exports: [\r\n SfLoadingComponent\r\n ]\r\n})\r\nexport class SfLoadingModule { }\r\n","/*\r\n * Public API Surface of sf-loading\r\n */\r\n\r\nexport * from './lib/sf-loading.component';\r\nexport * from './lib/components/table-skeleton/table-skeleton.component';\r\nexport * from './lib/sf-loading.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,kBAAkB,CAAA;AAEpB,IAAA,MAAM;AACN,IAAA,QAAQ;AACR,IAAA,KAAK;AAEL,IAAA,IAAI;IAEJ,SAAS,GAAG,KAAK;AAEN,IAAA,KAAK;AAEjB,IAAA,YAAY;AAGpB,IAAA,WAAA,GAAA;IAEA,WAAW,GAAA;QACT,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,eAAe,EAAE;;IAGxC,eAAe,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,SAAS,EAAC;AACjB,YAAA,IAAI,IAAI,CAAC,MAAM,EAAC;gBACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;gBACtC,IAAI,CAAC,MAAe,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;;;aAEzD;AACJ,YAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,gBAAA,MAAM,aAAa,GAAI,IAAI,CAAC,MAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;AAC9E,gBAAA,IAAI,aAAa;oBAAG,IAAI,CAAC,MAAe,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;;;;wGA9BzE,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA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 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="sf-loading" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="sf-loading" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TableSkeletonComponent implements OnInit {
|
|
4
|
+
columns: number;
|
|
5
|
+
rows: number;
|
|
6
|
+
skeletonRows: number[];
|
|
7
|
+
skeletonColumns: number[];
|
|
8
|
+
loadingType: string;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
updateSkeletonColumns(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableSkeletonComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableSkeletonComponent, "app-table-skeleton", never, { "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "loadingType": { "alias": "loadingType"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SfLoadingComponent implements AfterViewInit, OnChanges {
|
|
4
|
-
target: HTMLElement | undefined;
|
|
5
|
-
progress?: number;
|
|
6
|
-
texto: string | undefined;
|
|
7
|
-
logo: string | undefined;
|
|
8
|
-
enProceso: boolean;
|
|
9
|
-
block: ElementRef<HTMLElement>;
|
|
10
|
-
private prevPosition;
|
|
11
|
-
constructor();
|
|
12
|
-
ngOnChanges(): void;
|
|
13
|
-
ngAfterViewInit(): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SfLoadingComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SfLoadingComponent, "sf-loading", never, { "target": "target"; "progress": "progress"; "texto": "texto"; "logo": "logo"; "enProceso": "enProceso"; }, {}, never, never>;
|
|
16
|
-
}
|
|
1
|
+
import { AfterViewInit, ElementRef, OnChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SfLoadingComponent implements AfterViewInit, OnChanges {
|
|
4
|
+
target: HTMLElement | undefined;
|
|
5
|
+
progress?: number;
|
|
6
|
+
texto: string | undefined;
|
|
7
|
+
logo: string | undefined;
|
|
8
|
+
enProceso: boolean;
|
|
9
|
+
block: ElementRef<HTMLElement>;
|
|
10
|
+
private prevPosition;
|
|
11
|
+
constructor();
|
|
12
|
+
ngOnChanges(): void;
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SfLoadingComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SfLoadingComponent, "sf-loading", never, { "target": { "alias": "target"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "texto": { "alias": "texto"; "required": false; }; "logo": { "alias": "logo"; "required": false; }; "enProceso": { "alias": "enProceso"; "required": false; }; }, {}, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./sf-loading.component";
|
|
3
|
-
import * as i2 from "primeng/blockui";
|
|
4
|
-
import * as i3 from "primeng/progressspinner";
|
|
5
|
-
import * as i4 from "primeng/progressbar";
|
|
6
|
-
import * as i5 from "@angular/common";
|
|
7
|
-
export declare class SfLoadingModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SfLoadingModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SfLoadingModule, [typeof i1.SfLoadingComponent], [typeof i2.BlockUIModule, typeof i3.ProgressSpinnerModule, typeof i4.ProgressBarModule, typeof i5.CommonModule], [typeof i1.SfLoadingComponent]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SfLoadingModule>;
|
|
11
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./sf-loading.component";
|
|
3
|
+
import * as i2 from "primeng/blockui";
|
|
4
|
+
import * as i3 from "primeng/progressspinner";
|
|
5
|
+
import * as i4 from "primeng/progressbar";
|
|
6
|
+
import * as i5 from "@angular/common";
|
|
7
|
+
export declare class SfLoadingModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SfLoadingModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SfLoadingModule, [typeof i1.SfLoadingComponent], [typeof i2.BlockUIModule, typeof i3.ProgressSpinnerModule, typeof i4.ProgressBarModule, typeof i5.CommonModule], [typeof i1.SfLoadingComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SfLoadingModule>;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sf-loading",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^19.2.0",
|
|
6
|
+
"@angular/core": "^19.2.0",
|
|
7
|
+
"primeflex": "^4.0.0",
|
|
8
|
+
"primeng": "^19.1.4",
|
|
9
|
+
"primeicons": "^7.0.0"
|
|
7
10
|
},
|
|
8
11
|
"dependencies": {
|
|
9
12
|
"tslib": "^2.3.0"
|
|
10
13
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
"module": "fesm2022/sf-loading.mjs",
|
|
15
|
+
"typings": "index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"default": "./fesm2022/sf-loading.mjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
17
25
|
"sideEffects": false
|
|
18
26
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './lib/sf-loading.component';
|
|
2
|
-
export * from './lib/
|
|
1
|
+
export * from './lib/sf-loading.component';
|
|
2
|
+
export * from './lib/components/table-skeleton/table-skeleton.component';
|
|
3
|
+
export * from './lib/sf-loading.module';
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('primeng/progressspinner'), require('primeng/progressbar'), require('@angular/common'), require('primeng/blockui')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('sf-loading', ['exports', '@angular/core', 'primeng/progressspinner', 'primeng/progressbar', '@angular/common', 'primeng/blockui'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["sf-loading"] = {}, global.ng.core, global.i1, global.i2, global.ng.common, global.blockui));
|
|
5
|
-
})(this, (function (exports, i0, i1, i2, i3, blockui) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
|
-
|
|
30
|
-
var SfLoadingComponent = /** @class */ (function () {
|
|
31
|
-
function SfLoadingComponent() {
|
|
32
|
-
this.enProceso = false;
|
|
33
|
-
}
|
|
34
|
-
SfLoadingComponent.prototype.ngOnChanges = function () {
|
|
35
|
-
if (this.block)
|
|
36
|
-
this.ngAfterViewInit();
|
|
37
|
-
};
|
|
38
|
-
SfLoadingComponent.prototype.ngAfterViewInit = function () {
|
|
39
|
-
if (this.enProceso) {
|
|
40
|
-
if (this.target) {
|
|
41
|
-
this.target.style.position = "relative";
|
|
42
|
-
this.target.appendChild(this.block.nativeElement);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
if (this.target) {
|
|
47
|
-
var hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
48
|
-
if (hasBlockChild)
|
|
49
|
-
this.target.removeChild(this.block.nativeElement);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
return SfLoadingComponent;
|
|
54
|
-
}());
|
|
55
|
-
SfLoadingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
56
|
-
SfLoadingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SfLoadingComponent, selector: "sf-loading", inputs: { target: "target", progress: "progress", texto: "texto", logo: "logo", enProceso: "enProceso" }, viewQueries: [{ propertyName: "block", first: true, predicate: ["block"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n", styles: [".full-width{width:100%;height:100%;position:fixed;z-index:9999}.blocking-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#9e9797cc;z-index:9999;display:flex;flex-direction:column;justify-content:center;align-items:center}.blocking-overlay>p{font-size:1.5rem;text-align:center;max-width:80%}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}::ng-deep .p-dialog-mask .p-dialog{max-width:95vw}}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], components: [{ type: i1__namespace.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: i2__namespace.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "style", "styleClass", "unit", "mode"] }], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
57
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingComponent, decorators: [{
|
|
58
|
-
type: i0.Component,
|
|
59
|
-
args: [{
|
|
60
|
-
selector: 'sf-loading',
|
|
61
|
-
templateUrl: 'sf-loading.compontent.html',
|
|
62
|
-
styleUrls: ['sf-loading.component.css']
|
|
63
|
-
}]
|
|
64
|
-
}], ctorParameters: function () { return []; }, propDecorators: { target: [{
|
|
65
|
-
type: i0.Input
|
|
66
|
-
}], progress: [{
|
|
67
|
-
type: i0.Input
|
|
68
|
-
}], texto: [{
|
|
69
|
-
type: i0.Input
|
|
70
|
-
}], logo: [{
|
|
71
|
-
type: i0.Input
|
|
72
|
-
}], enProceso: [{
|
|
73
|
-
type: i0.Input
|
|
74
|
-
}], block: [{
|
|
75
|
-
type: i0.ViewChild,
|
|
76
|
-
args: ['block']
|
|
77
|
-
}] } });
|
|
78
|
-
|
|
79
|
-
var SfLoadingModule = /** @class */ (function () {
|
|
80
|
-
function SfLoadingModule() {
|
|
81
|
-
}
|
|
82
|
-
return SfLoadingModule;
|
|
83
|
-
}());
|
|
84
|
-
SfLoadingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
85
|
-
SfLoadingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [blockui.BlockUIModule,
|
|
86
|
-
i1.ProgressSpinnerModule,
|
|
87
|
-
i2.ProgressBarModule,
|
|
88
|
-
i3.CommonModule], exports: [SfLoadingComponent] });
|
|
89
|
-
SfLoadingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, imports: [[
|
|
90
|
-
blockui.BlockUIModule,
|
|
91
|
-
i1.ProgressSpinnerModule,
|
|
92
|
-
i2.ProgressBarModule,
|
|
93
|
-
i3.CommonModule
|
|
94
|
-
]] });
|
|
95
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, decorators: [{
|
|
96
|
-
type: i0.NgModule,
|
|
97
|
-
args: [{
|
|
98
|
-
declarations: [
|
|
99
|
-
SfLoadingComponent
|
|
100
|
-
],
|
|
101
|
-
imports: [
|
|
102
|
-
blockui.BlockUIModule,
|
|
103
|
-
i1.ProgressSpinnerModule,
|
|
104
|
-
i2.ProgressBarModule,
|
|
105
|
-
i3.CommonModule
|
|
106
|
-
],
|
|
107
|
-
exports: [
|
|
108
|
-
SfLoadingComponent
|
|
109
|
-
]
|
|
110
|
-
}]
|
|
111
|
-
}] });
|
|
112
|
-
|
|
113
|
-
/*
|
|
114
|
-
* Public API Surface of sf-loading
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Generated bundle index. Do not edit.
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
exports.SfLoadingComponent = SfLoadingComponent;
|
|
122
|
-
exports.SfLoadingModule = SfLoadingModule;
|
|
123
|
-
|
|
124
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
125
|
-
|
|
126
|
-
}));
|
|
127
|
-
//# sourceMappingURL=sf-loading.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sf-loading.umd.js","sources":["../../../projects/sf-loading/src/lib/sf-loading.component.ts","../../../projects/sf-loading/src/lib/sf-loading.compontent.html","../../../projects/sf-loading/src/lib/sf-loading.module.ts","../../../projects/sf-loading/src/public-api.ts","../../../projects/sf-loading/src/sf-loading.ts"],"sourcesContent":["import { AfterViewInit, Component, ElementRef, Input, OnChanges, ViewChild } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sf-loading',\r\n templateUrl: 'sf-loading.compontent.html',\r\n styleUrls: ['sf-loading.component.css']\r\n})\r\nexport class SfLoadingComponent implements AfterViewInit, OnChanges{\r\n\r\n @Input() target:HTMLElement|undefined;\r\n @Input() progress?: number;\r\n @Input() texto: string | undefined;\r\n\r\n @Input() logo: string | undefined;\r\n\r\n @Input() enProceso = false;\r\n\r\n @ViewChild('block') block!: ElementRef<HTMLElement>;\r\n\r\n private prevPosition: string | undefined;\r\n\r\n\r\n constructor(){}\r\n\r\n ngOnChanges(): void {\r\n if (this.block) this.ngAfterViewInit()\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.enProceso){\r\n if (this.target){\r\n this.target.style.position = \"relative\";\r\n (this.target as Node).appendChild(this.block.nativeElement)\r\n }\r\n }else {\r\n if (this.target) {\r\n const hasBlockChild = (this.target as Node).contains(this.block.nativeElement);\r\n if (hasBlockChild) (this.target as Node).removeChild(this.block.nativeElement)\r\n }\r\n }\r\n }\r\n}\r\n","<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { SfLoadingComponent } from './sf-loading.component';\r\nimport { BlockUIModule } from 'primeng/blockui';\r\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ProgressBarModule } from 'primeng/progressbar';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n SfLoadingComponent\r\n ],\r\n imports: [\r\n BlockUIModule\r\n ,ProgressSpinnerModule\r\n ,ProgressBarModule\r\n ,CommonModule\r\n ],\r\n exports: [\r\n SfLoadingComponent\r\n ]\r\n})\r\nexport class SfLoadingModule { }\r\n","/*\r\n * Public API Surface of sf-loading\r\n */\r\n\r\nexport * from './lib/sf-loading.component';\r\nexport * from './lib/sf-loading.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0","i1","i2","i3","Component","Input","ViewChild","BlockUIModule","ProgressSpinnerModule","ProgressBarModule","CommonModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,QAAA,kBAAA,kBAAA,YAAA;IAeE,IAAA,SAAA,kBAAA,GAAA;IAPS,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;SAOZ;IAEf,IAAA,kBAAA,CAAA,SAAA,CAAA,WAAW,GAAX,YAAA;YACE,IAAI,IAAI,CAAC,KAAK;gBAAE,IAAI,CAAC,eAAe,EAAE,CAAA;SACvC,CAAA;IAED,IAAA,kBAAA,CAAA,SAAA,CAAA,eAAe,GAAf,YAAA;YACE,IAAI,IAAI,CAAC,SAAS,EAAC;gBACjB,IAAI,IAAI,CAAC,MAAM,EAAC;oBACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;oBACvC,IAAI,CAAC,MAAe,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAC5D,aAAA;IACF,SAAA;IAAK,aAAA;gBACJ,IAAI,IAAI,CAAC,MAAM,EAAE;IACf,gBAAA,IAAM,aAAa,GAAI,IAAI,CAAC,MAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAC/E,gBAAA,IAAI,aAAa;wBAAG,IAAI,CAAC,MAAe,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAC/E,aAAA;IACF,SAAA;SACF,CAAA;;;0IAjCU,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAA,aAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAlB,kBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA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AAA,SAAA,eAAA,GAAA;;;;uIAAa,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAN,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wIAAf,eAAe,EAAA,YAAA,EAAA,CAZxB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAGlBO,qBAAa;YACZC,wBAAqB;YACrBC,oBAAiB;YACjBC,eAAY,aAGb,kBAAkB,CAAA,EAAA,CAAA,CAAA;IAGT,eAAA,CAAA,IAAA,GAAAV,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,eAAe,EAVjB,OAAA,EAAA,CAAA;gBACPO,qBAAa;gBACZC,wBAAqB;gBACrBC,oBAAiB;gBACjBC,eAAY;aACd,CAAA,EAAA,CAAA,CAAA;sHAKU,eAAe,EAAA,UAAA,EAAA,CAAA;sBAd3BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACR,oBAAA,YAAY,EAAE;4BACZ,kBAAkB;IACnB,qBAAA;IACD,oBAAA,OAAO,EAAE;4BACPJ,qBAAa;4BACZC,wBAAqB;4BACrBC,oBAAiB;4BACjBC,eAAY;IACd,qBAAA;IACD,oBAAA,OAAO,EAAE;4BACP,kBAAkB;IACnB,qBAAA;qBACF,CAAA;;;ICrBD;;IAEG;;ICFH;;IAEG;;;;;;;;;;;"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "primeng/progressspinner";
|
|
4
|
-
import * as i2 from "primeng/progressbar";
|
|
5
|
-
import * as i3 from "@angular/common";
|
|
6
|
-
export class SfLoadingComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.enProceso = false;
|
|
9
|
-
}
|
|
10
|
-
ngOnChanges() {
|
|
11
|
-
if (this.block)
|
|
12
|
-
this.ngAfterViewInit();
|
|
13
|
-
}
|
|
14
|
-
ngAfterViewInit() {
|
|
15
|
-
if (this.enProceso) {
|
|
16
|
-
if (this.target) {
|
|
17
|
-
this.target.style.position = "relative";
|
|
18
|
-
this.target.appendChild(this.block.nativeElement);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
if (this.target) {
|
|
23
|
-
const hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
24
|
-
if (hasBlockChild)
|
|
25
|
-
this.target.removeChild(this.block.nativeElement);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
SfLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
-
SfLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SfLoadingComponent, selector: "sf-loading", inputs: { target: "target", progress: "progress", texto: "texto", logo: "logo", enProceso: "enProceso" }, viewQueries: [{ propertyName: "block", first: true, predicate: ["block"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n", styles: [".full-width{width:100%;height:100%;position:fixed;z-index:9999}.blocking-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#9e9797cc;z-index:9999;display:flex;flex-direction:column;justify-content:center;align-items:center}.blocking-overlay>p{font-size:1.5rem;text-align:center;max-width:80%}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}::ng-deep .p-dialog-mask .p-dialog{max-width:95vw}}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], components: [{ type: i1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: i2.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "style", "styleClass", "unit", "mode"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, decorators: [{
|
|
33
|
-
type: Component,
|
|
34
|
-
args: [{
|
|
35
|
-
selector: 'sf-loading',
|
|
36
|
-
templateUrl: 'sf-loading.compontent.html',
|
|
37
|
-
styleUrls: ['sf-loading.component.css']
|
|
38
|
-
}]
|
|
39
|
-
}], ctorParameters: function () { return []; }, propDecorators: { target: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], progress: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}], texto: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], logo: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}], enProceso: [{
|
|
48
|
-
type: Input
|
|
49
|
-
}], block: [{
|
|
50
|
-
type: ViewChild,
|
|
51
|
-
args: ['block']
|
|
52
|
-
}] } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2YtbG9hZGluZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zZi1sb2FkaW5nL3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gIDxkaXYgKm5nSWY9XCJlblByb2Nlc29cIiBjbGFzcz1cImJsb2NraW5nLW92ZXJsYXlcIj5cclxuICAgICAgICA8aW1nICpuZ0lmPVwibG9nb1wiIFtzcmNdPVwibG9nb1wiIGNsYXNzPVwiaWNvbi1ibG9ja1wiPlxyXG4gICAgICAgIDxwLXByb2dyZXNzU3Bpbm5lciAqbmdJZj1cIiFsb2dvXCI+PC9wLXByb2dyZXNzU3Bpbm5lcj5cclxuICAgICAgICA8cCAqbmdJZj1cInRleHRvXCI+e3t0ZXh0b319PC9wPlxyXG4gICAgICAgIDxwLXByb2dyZXNzQmFyICpuZ0lmPVwicHJvZ3Jlc3MgIT09IHVuZGVmaW5lZFwiIFt2YWx1ZV09XCJwcm9ncmVzc1wiIFtzdHlsZV09XCJ7J2hlaWdodCc6ICcyMHB4JywgJ3dpZHRoJzogJzUwdncnfVwiPjwvcC1wcm9ncmVzc0Jhcj5cclxuICAgIDwvZGl2PlxyXG4gICAgPGRpdiAqbmdJZj1cIiFlblByb2Nlc29cIj48L2Rpdj5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { SfLoadingComponent } from './sf-loading.component';
|
|
3
|
-
import { BlockUIModule } from 'primeng/blockui';
|
|
4
|
-
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { ProgressBarModule } from 'primeng/progressbar';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export class SfLoadingModule {
|
|
9
|
-
}
|
|
10
|
-
SfLoadingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11
|
-
SfLoadingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [BlockUIModule,
|
|
12
|
-
ProgressSpinnerModule,
|
|
13
|
-
ProgressBarModule,
|
|
14
|
-
CommonModule], exports: [SfLoadingComponent] });
|
|
15
|
-
SfLoadingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, imports: [[
|
|
16
|
-
BlockUIModule,
|
|
17
|
-
ProgressSpinnerModule,
|
|
18
|
-
ProgressBarModule,
|
|
19
|
-
CommonModule
|
|
20
|
-
]] });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, decorators: [{
|
|
22
|
-
type: NgModule,
|
|
23
|
-
args: [{
|
|
24
|
-
declarations: [
|
|
25
|
-
SfLoadingComponent
|
|
26
|
-
],
|
|
27
|
-
imports: [
|
|
28
|
-
BlockUIModule,
|
|
29
|
-
ProgressSpinnerModule,
|
|
30
|
-
ProgressBarModule,
|
|
31
|
-
CommonModule
|
|
32
|
-
],
|
|
33
|
-
exports: [
|
|
34
|
-
SfLoadingComponent
|
|
35
|
-
]
|
|
36
|
-
}]
|
|
37
|
-
}] });
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2YtbG9hZGluZy5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zZi1sb2FkaW5nL3NyYy9saWIvc2YtbG9hZGluZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUM1RCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWl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b24nO1xyXG5pbXBvcnQgeyBQcm9ncmVzc0Jhck1vZHVsZSB9IGZyb20gJ3ByaW1lbmcvcHJvZ3Jlc3NiYXInO1xyXG5cclxuXHJcbkBOZ01vZHVsZSh7XHJcbiAgZGVjbGFyYXRpb25zOiBbXHJcbiAgICBTZkxvYWRpbmdDb21wb25lbnRcclxuICBdLFxyXG4gIGltcG9ydHM6IFtcclxuICAgIEJsb2NrVUlNb2R1bGVcclxuICAgICxQcm9ncmVzc1NwaW5uZXJNb2R1bGVcclxuICAgICxQcm9ncmVzc0Jhck1vZHVsZVxyXG4gICAgLENvbW1vbk1vZHVsZVxyXG4gIF0sXHJcbiAgZXhwb3J0czogW1xyXG4gICAgU2ZMb2FkaW5nQ29tcG9uZW50XHJcbiAgXVxyXG59KVxyXG5leHBvcnQgY2xhc3MgU2ZMb2FkaW5nTW9kdWxlIHsgfVxyXG4iXX0=
|
package/esm2015/public-api.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of sf-loading
|
|
3
|
-
*/
|
|
4
|
-
export * from './lib/sf-loading.component';
|
|
5
|
-
export * from './lib/sf-loading.module';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3NmLWxvYWRpbmcvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMseUJBQXlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygc2YtbG9hZGluZ1xyXG4gKi9cclxuXHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3NmLWxvYWRpbmcuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvc2YtbG9hZGluZy5tb2R1bGUnO1xyXG4iXX0=
|
package/esm2015/sf-loading.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2YtbG9hZGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3NmLWxvYWRpbmcvc3JjL3NmLWxvYWRpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
package/fesm2015/sf-loading.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from 'primeng/progressspinner';
|
|
4
|
-
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
5
|
-
import * as i2 from 'primeng/progressbar';
|
|
6
|
-
import { ProgressBarModule } from 'primeng/progressbar';
|
|
7
|
-
import * as i3 from '@angular/common';
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
9
|
-
import { BlockUIModule } from 'primeng/blockui';
|
|
10
|
-
|
|
11
|
-
class SfLoadingComponent {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.enProceso = false;
|
|
14
|
-
}
|
|
15
|
-
ngOnChanges() {
|
|
16
|
-
if (this.block)
|
|
17
|
-
this.ngAfterViewInit();
|
|
18
|
-
}
|
|
19
|
-
ngAfterViewInit() {
|
|
20
|
-
if (this.enProceso) {
|
|
21
|
-
if (this.target) {
|
|
22
|
-
this.target.style.position = "relative";
|
|
23
|
-
this.target.appendChild(this.block.nativeElement);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
if (this.target) {
|
|
28
|
-
const hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
29
|
-
if (hasBlockChild)
|
|
30
|
-
this.target.removeChild(this.block.nativeElement);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
SfLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
SfLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SfLoadingComponent, selector: "sf-loading", inputs: { target: "target", progress: "progress", texto: "texto", logo: "logo", enProceso: "enProceso" }, viewQueries: [{ propertyName: "block", first: true, predicate: ["block"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n", styles: [".full-width{width:100%;height:100%;position:fixed;z-index:9999}.blocking-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#9e9797cc;z-index:9999;display:flex;flex-direction:column;justify-content:center;align-items:center}.blocking-overlay>p{font-size:1.5rem;text-align:center;max-width:80%}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}::ng-deep .p-dialog-mask .p-dialog{max-width:95vw}}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], components: [{ type: i1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: i2.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "style", "styleClass", "unit", "mode"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, decorators: [{
|
|
38
|
-
type: Component,
|
|
39
|
-
args: [{
|
|
40
|
-
selector: 'sf-loading',
|
|
41
|
-
templateUrl: 'sf-loading.compontent.html',
|
|
42
|
-
styleUrls: ['sf-loading.component.css']
|
|
43
|
-
}]
|
|
44
|
-
}], ctorParameters: function () { return []; }, propDecorators: { target: [{
|
|
45
|
-
type: Input
|
|
46
|
-
}], progress: [{
|
|
47
|
-
type: Input
|
|
48
|
-
}], texto: [{
|
|
49
|
-
type: Input
|
|
50
|
-
}], logo: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}], enProceso: [{
|
|
53
|
-
type: Input
|
|
54
|
-
}], block: [{
|
|
55
|
-
type: ViewChild,
|
|
56
|
-
args: ['block']
|
|
57
|
-
}] } });
|
|
58
|
-
|
|
59
|
-
class SfLoadingModule {
|
|
60
|
-
}
|
|
61
|
-
SfLoadingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
62
|
-
SfLoadingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [BlockUIModule,
|
|
63
|
-
ProgressSpinnerModule,
|
|
64
|
-
ProgressBarModule,
|
|
65
|
-
CommonModule], exports: [SfLoadingComponent] });
|
|
66
|
-
SfLoadingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, imports: [[
|
|
67
|
-
BlockUIModule,
|
|
68
|
-
ProgressSpinnerModule,
|
|
69
|
-
ProgressBarModule,
|
|
70
|
-
CommonModule
|
|
71
|
-
]] });
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, decorators: [{
|
|
73
|
-
type: NgModule,
|
|
74
|
-
args: [{
|
|
75
|
-
declarations: [
|
|
76
|
-
SfLoadingComponent
|
|
77
|
-
],
|
|
78
|
-
imports: [
|
|
79
|
-
BlockUIModule,
|
|
80
|
-
ProgressSpinnerModule,
|
|
81
|
-
ProgressBarModule,
|
|
82
|
-
CommonModule
|
|
83
|
-
],
|
|
84
|
-
exports: [
|
|
85
|
-
SfLoadingComponent
|
|
86
|
-
]
|
|
87
|
-
}]
|
|
88
|
-
}] });
|
|
89
|
-
|
|
90
|
-
/*
|
|
91
|
-
* Public API Surface of sf-loading
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Generated bundle index. Do not edit.
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
export { SfLoadingComponent, SfLoadingModule };
|
|
99
|
-
//# sourceMappingURL=sf-loading.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sf-loading.js","sources":["../../../projects/sf-loading/src/lib/sf-loading.component.ts","../../../projects/sf-loading/src/lib/sf-loading.compontent.html","../../../projects/sf-loading/src/lib/sf-loading.module.ts","../../../projects/sf-loading/src/public-api.ts","../../../projects/sf-loading/src/sf-loading.ts"],"sourcesContent":["import { AfterViewInit, Component, ElementRef, Input, OnChanges, ViewChild } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sf-loading',\r\n templateUrl: 'sf-loading.compontent.html',\r\n styleUrls: ['sf-loading.component.css']\r\n})\r\nexport class SfLoadingComponent implements AfterViewInit, OnChanges{\r\n\r\n @Input() target:HTMLElement|undefined;\r\n @Input() progress?: number;\r\n @Input() texto: string | undefined;\r\n\r\n @Input() logo: string | undefined;\r\n\r\n @Input() enProceso = false;\r\n\r\n @ViewChild('block') block!: ElementRef<HTMLElement>;\r\n\r\n private prevPosition: string | undefined;\r\n\r\n\r\n constructor(){}\r\n\r\n ngOnChanges(): void {\r\n if (this.block) this.ngAfterViewInit()\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.enProceso){\r\n if (this.target){\r\n this.target.style.position = \"relative\";\r\n (this.target as Node).appendChild(this.block.nativeElement)\r\n }\r\n }else {\r\n if (this.target) {\r\n const hasBlockChild = (this.target as Node).contains(this.block.nativeElement);\r\n if (hasBlockChild) (this.target as Node).removeChild(this.block.nativeElement)\r\n }\r\n }\r\n }\r\n}\r\n","<div #block [ngClass]=\"{'full-width': !this.target && enProceso}\">\r\n <div *ngIf=\"enProceso\" class=\"blocking-overlay\">\r\n <img *ngIf=\"logo\" [src]=\"logo\" class=\"icon-block\">\r\n <p-progressSpinner *ngIf=\"!logo\"></p-progressSpinner>\r\n <p *ngIf=\"texto\">{{texto}}</p>\r\n <p-progressBar *ngIf=\"progress !== undefined\" [value]=\"progress\" [style]=\"{'height': '20px', 'width': '50vw'}\"></p-progressBar>\r\n </div>\r\n <div *ngIf=\"!enProceso\"></div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { SfLoadingComponent } from './sf-loading.component';\r\nimport { BlockUIModule } from 'primeng/blockui';\r\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ProgressBarModule } from 'primeng/progressbar';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n SfLoadingComponent\r\n ],\r\n imports: [\r\n BlockUIModule\r\n ,ProgressSpinnerModule\r\n ,ProgressBarModule\r\n ,CommonModule\r\n ],\r\n exports: [\r\n SfLoadingComponent\r\n ]\r\n})\r\nexport class SfLoadingModule { }\r\n","/*\r\n * Public API Surface of sf-loading\r\n */\r\n\r\nexport * from './lib/sf-loading.component';\r\nexport * from './lib/sf-loading.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,kBAAkB,CAAA;AAe7B,IAAA,WAAA,GAAA;QAPS,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;KAOZ;IAEf,WAAW,GAAA;QACT,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,eAAe,EAAE,CAAA;KACvC;IAED,eAAe,GAAA;QACb,IAAI,IAAI,CAAC,SAAS,EAAC;YACjB,IAAI,IAAI,CAAC,MAAM,EAAC;gBACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;gBACvC,IAAI,CAAC,MAAe,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AAC5D,aAAA;AACF,SAAA;AAAK,aAAA;YACJ,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,gBAAA,MAAM,aAAa,GAAI,IAAI,CAAC,MAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC/E,gBAAA,IAAI,aAAa;oBAAG,IAAI,CAAC,MAAe,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AAC/E,aAAA;AACF,SAAA;KACF;;gHAjCU,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAA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