sf-loading 12.0.0
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/README.md +24 -0
- package/bundles/sf-loading.umd.js +121 -0
- package/bundles/sf-loading.umd.js.map +1 -0
- package/esm2015/lib/sf-loading.component.js +50 -0
- package/esm2015/lib/sf-loading.module.js +34 -0
- package/esm2015/public-api.js +6 -0
- package/esm2015/sf-loading.js +5 -0
- package/fesm2015/sf-loading.js +92 -0
- package/fesm2015/sf-loading.js.map +1 -0
- package/lib/sf-loading.component.d.ts +15 -0
- package/lib/sf-loading.module.d.ts +10 -0
- package/package.json +18 -0
- package/public-api.d.ts +2 -0
- package/sf-loading.d.ts +5 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SfLoading
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project sf-loading` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project sf-loading`.
|
|
8
|
+
> Note: Don't forget to add `--project sf-loading` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build sf-loading` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build sf-loading`, go to the dist folder `cd dist/sf-loading` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test sf-loading` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('primeng/progressspinner'), require('@angular/common'), require('primeng/blockui')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('sf-loading', ['exports', '@angular/core', 'primeng/progressspinner', '@angular/common', 'primeng/blockui'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["sf-loading"] = {}, global.ng.core, global.i1, global.ng.common, global.blockui));
|
|
5
|
+
})(this, (function (exports, i0, i1, i2, 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
|
+
|
|
29
|
+
var SfLoadingComponent = /** @class */ (function () {
|
|
30
|
+
function SfLoadingComponent() {
|
|
31
|
+
this.enProceso = false;
|
|
32
|
+
}
|
|
33
|
+
SfLoadingComponent.prototype.ngOnChanges = function () {
|
|
34
|
+
if (this.block)
|
|
35
|
+
this.ngAfterViewInit();
|
|
36
|
+
};
|
|
37
|
+
SfLoadingComponent.prototype.ngAfterViewInit = function () {
|
|
38
|
+
if (this.enProceso) {
|
|
39
|
+
if (this.target) {
|
|
40
|
+
this.target.style.position = "relative";
|
|
41
|
+
this.target.appendChild(this.block.nativeElement);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (this.target) {
|
|
46
|
+
var hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
47
|
+
if (hasBlockChild)
|
|
48
|
+
this.target.removeChild(this.block.nativeElement);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return SfLoadingComponent;
|
|
53
|
+
}());
|
|
54
|
+
SfLoadingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
55
|
+
SfLoadingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SfLoadingComponent, selector: "sf-loading", inputs: { target: "target", 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 </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:absolute;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.6rem}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}}@keyframes rotation{0%{transform:rotate(0)}50%{transform:rotate(270deg)}to{transform:rotate(360deg)}}\n"], components: [{ type: i1__namespace.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }], directives: [{ type: i2__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
56
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingComponent, decorators: [{
|
|
57
|
+
type: i0.Component,
|
|
58
|
+
args: [{
|
|
59
|
+
selector: 'sf-loading',
|
|
60
|
+
templateUrl: 'sf-loading.compontent.html',
|
|
61
|
+
styleUrls: ['sf-loading.component.css']
|
|
62
|
+
}]
|
|
63
|
+
}], ctorParameters: function () { return []; }, propDecorators: { target: [{
|
|
64
|
+
type: i0.Input
|
|
65
|
+
}], texto: [{
|
|
66
|
+
type: i0.Input
|
|
67
|
+
}], logo: [{
|
|
68
|
+
type: i0.Input
|
|
69
|
+
}], enProceso: [{
|
|
70
|
+
type: i0.Input
|
|
71
|
+
}], block: [{
|
|
72
|
+
type: i0.ViewChild,
|
|
73
|
+
args: ['block']
|
|
74
|
+
}] } });
|
|
75
|
+
|
|
76
|
+
var SfLoadingModule = /** @class */ (function () {
|
|
77
|
+
function SfLoadingModule() {
|
|
78
|
+
}
|
|
79
|
+
return SfLoadingModule;
|
|
80
|
+
}());
|
|
81
|
+
SfLoadingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
82
|
+
SfLoadingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [blockui.BlockUIModule,
|
|
83
|
+
i1.ProgressSpinnerModule,
|
|
84
|
+
i2.CommonModule], exports: [SfLoadingComponent] });
|
|
85
|
+
SfLoadingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, imports: [[
|
|
86
|
+
blockui.BlockUIModule,
|
|
87
|
+
i1.ProgressSpinnerModule,
|
|
88
|
+
i2.CommonModule
|
|
89
|
+
]] });
|
|
90
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfLoadingModule, decorators: [{
|
|
91
|
+
type: i0.NgModule,
|
|
92
|
+
args: [{
|
|
93
|
+
declarations: [
|
|
94
|
+
SfLoadingComponent
|
|
95
|
+
],
|
|
96
|
+
imports: [
|
|
97
|
+
blockui.BlockUIModule,
|
|
98
|
+
i1.ProgressSpinnerModule,
|
|
99
|
+
i2.CommonModule
|
|
100
|
+
],
|
|
101
|
+
exports: [
|
|
102
|
+
SfLoadingComponent
|
|
103
|
+
]
|
|
104
|
+
}]
|
|
105
|
+
}] });
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
* Public API Surface of sf-loading
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Generated bundle index. Do not edit.
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
exports.SfLoadingComponent = SfLoadingComponent;
|
|
116
|
+
exports.SfLoadingModule = SfLoadingModule;
|
|
117
|
+
|
|
118
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
119
|
+
|
|
120
|
+
}));
|
|
121
|
+
//# sourceMappingURL=sf-loading.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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\r\n @Input() target!: HTMLElement;\r\n\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 </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\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 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","Component","Input","ViewChild","BlockUIModule","ProgressSpinnerModule","CommonModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,QAAA,kBAAA,kBAAA,YAAA;IAgBE,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;;;0IAlCU,kBAAkB,EAAA,IAAA,EA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A;;;;uIAAa,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAL,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wIAAf,eAAe,EAAA,YAAA,EAAA,CAXxB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAGlBM,qBAAa;YACZC,wBAAqB;YACtBC,eAAY,aAGZ,kBAAkB,CAAA,EAAA,CAAA,CAAA;IAGT,eAAA,CAAA,IAAA,GAAAR,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,eAAe,EATjB,OAAA,EAAA,CAAA;gBACPM,qBAAa;gBACZC,wBAAqB;gBACtBC,eAAY;aACb,CAAA,EAAA,CAAA,CAAA;sHAKU,eAAe,EAAA,UAAA,EAAA,CAAA;sBAb3BC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACR,oBAAA,YAAY,EAAE;4BACZ,kBAAkB;IACnB,qBAAA;IACD,oBAAA,OAAO,EAAE;4BACPH,qBAAa;4BACZC,wBAAqB;4BACtBC,eAAY;IACb,qBAAA;IACD,oBAAA,OAAO,EAAE;4BACP,kBAAkB;IACnB,qBAAA;qBACF,CAAA;;;ICnBD;;IAEG;;ICFH;;IAEG;;;;;;;;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 "@angular/common";
|
|
5
|
+
export class SfLoadingComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.enProceso = false;
|
|
8
|
+
}
|
|
9
|
+
ngOnChanges() {
|
|
10
|
+
if (this.block)
|
|
11
|
+
this.ngAfterViewInit();
|
|
12
|
+
}
|
|
13
|
+
ngAfterViewInit() {
|
|
14
|
+
if (this.enProceso) {
|
|
15
|
+
if (this.target) {
|
|
16
|
+
this.target.style.position = "relative";
|
|
17
|
+
this.target.appendChild(this.block.nativeElement);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (this.target) {
|
|
22
|
+
const hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
23
|
+
if (hasBlockChild)
|
|
24
|
+
this.target.removeChild(this.block.nativeElement);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
SfLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
SfLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SfLoadingComponent, selector: "sf-loading", inputs: { target: "target", 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 </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:absolute;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.6rem}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}}@keyframes rotation{0%{transform:rotate(0)}50%{transform:rotate(270deg)}to{transform:rotate(360deg)}}\n"], components: [{ type: i1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: 'sf-loading',
|
|
35
|
+
templateUrl: 'sf-loading.compontent.html',
|
|
36
|
+
styleUrls: ['sf-loading.component.css']
|
|
37
|
+
}]
|
|
38
|
+
}], ctorParameters: function () { return []; }, propDecorators: { target: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}], texto: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], logo: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], enProceso: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], block: [{
|
|
47
|
+
type: ViewChild,
|
|
48
|
+
args: ['block']
|
|
49
|
+
}] } });
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2YtbG9hZGluZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zZi1sb2FkaW5nL3NyYy9saWIvc2YtbG9hZGluZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zZi1sb2FkaW5nL3NyYy9saWIvc2YtbG9hZGluZy5jb21wb250ZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixTQUFTLEVBQWMsS0FBSyxFQUFhLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7OztBQU9sRyxNQUFNLE9BQU8sa0JBQWtCO0lBZ0I3QjtRQ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Rpdj5cclxuIl19
|
|
@@ -0,0 +1,34 @@
|
|
|
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 * as i0 from "@angular/core";
|
|
7
|
+
export class SfLoadingModule {
|
|
8
|
+
}
|
|
9
|
+
SfLoadingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
+
SfLoadingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [BlockUIModule,
|
|
11
|
+
ProgressSpinnerModule,
|
|
12
|
+
CommonModule], exports: [SfLoadingComponent] });
|
|
13
|
+
SfLoadingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, imports: [[
|
|
14
|
+
BlockUIModule,
|
|
15
|
+
ProgressSpinnerModule,
|
|
16
|
+
CommonModule
|
|
17
|
+
]] });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, decorators: [{
|
|
19
|
+
type: NgModule,
|
|
20
|
+
args: [{
|
|
21
|
+
declarations: [
|
|
22
|
+
SfLoadingComponent
|
|
23
|
+
],
|
|
24
|
+
imports: [
|
|
25
|
+
BlockUIModule,
|
|
26
|
+
ProgressSpinnerModule,
|
|
27
|
+
CommonModule
|
|
28
|
+
],
|
|
29
|
+
exports: [
|
|
30
|
+
SfLoadingComponent
|
|
31
|
+
]
|
|
32
|
+
}]
|
|
33
|
+
}] });
|
|
34
|
+
//# source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BTZkxvYWRpbmdDb21wb25lbnQgfSBmcm9tICcuL3NmLWxvYWRpbmcuY29tcG9uZW50JztcclxuaW1wb3J0IHsgQmxvY2tVSU1vZHVsZSB9IGZyb20gJ3ByaW1lbmcvYmxvY2t1aSc7XHJcbmltcG9ydCB7IFByb2dyZXNzU3Bpbm5lck1vZHVsZSAgfSBmcm9tICdwcmltZW5nL3Byb2dyZXNzc3Bpbm5lcic7XHJcbmltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XHJcblxyXG5cclxuQE5nTW9kdWxlKHtcclxuICBkZWNsYXJhdGlvbnM6IFtcclxuICAgIFNmTG9hZGluZ0NvbXBvbmVudFxyXG4gIF0sXHJcbiAgaW1wb3J0czogW1xyXG4gICAgQmxvY2tVSU1vZHVsZVxyXG4gICAgLFByb2dyZXNzU3Bpbm5lck1vZHVsZSxcclxuICAgIENvbW1vbk1vZHVsZVxyXG4gIF0sXHJcbiAgZXhwb3J0czogW1xyXG4gICAgU2ZMb2FkaW5nQ29tcG9uZW50XHJcbiAgXVxyXG59KVxyXG5leHBvcnQgY2xhc3MgU2ZMb2FkaW5nTW9kdWxlIHsgfVxyXG4iXX0=
|
|
@@ -0,0 +1,6 @@
|
|
|
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=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2YtbG9hZGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3NmLWxvYWRpbmcvc3JjL3NmLWxvYWRpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,92 @@
|
|
|
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 '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { BlockUIModule } from 'primeng/blockui';
|
|
8
|
+
|
|
9
|
+
class SfLoadingComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.enProceso = false;
|
|
12
|
+
}
|
|
13
|
+
ngOnChanges() {
|
|
14
|
+
if (this.block)
|
|
15
|
+
this.ngAfterViewInit();
|
|
16
|
+
}
|
|
17
|
+
ngAfterViewInit() {
|
|
18
|
+
if (this.enProceso) {
|
|
19
|
+
if (this.target) {
|
|
20
|
+
this.target.style.position = "relative";
|
|
21
|
+
this.target.appendChild(this.block.nativeElement);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
if (this.target) {
|
|
26
|
+
const hasBlockChild = this.target.contains(this.block.nativeElement);
|
|
27
|
+
if (hasBlockChild)
|
|
28
|
+
this.target.removeChild(this.block.nativeElement);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
SfLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
SfLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SfLoadingComponent, selector: "sf-loading", inputs: { target: "target", 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 </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:absolute;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.6rem}img.icon-block{width:10%;animation:rotation 1.3s infinite linear}@media screen and (max-width: 765px){img.icon-block{width:25vw}}@keyframes rotation{0%{transform:rotate(0)}50%{transform:rotate(270deg)}to{transform:rotate(360deg)}}\n"], components: [{ type: i1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingComponent, decorators: [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: 'sf-loading',
|
|
39
|
+
templateUrl: 'sf-loading.compontent.html',
|
|
40
|
+
styleUrls: ['sf-loading.component.css']
|
|
41
|
+
}]
|
|
42
|
+
}], ctorParameters: function () { return []; }, propDecorators: { target: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], texto: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], logo: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], enProceso: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], block: [{
|
|
51
|
+
type: ViewChild,
|
|
52
|
+
args: ['block']
|
|
53
|
+
}] } });
|
|
54
|
+
|
|
55
|
+
class SfLoadingModule {
|
|
56
|
+
}
|
|
57
|
+
SfLoadingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
58
|
+
SfLoadingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, declarations: [SfLoadingComponent], imports: [BlockUIModule,
|
|
59
|
+
ProgressSpinnerModule,
|
|
60
|
+
CommonModule], exports: [SfLoadingComponent] });
|
|
61
|
+
SfLoadingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, imports: [[
|
|
62
|
+
BlockUIModule,
|
|
63
|
+
ProgressSpinnerModule,
|
|
64
|
+
CommonModule
|
|
65
|
+
]] });
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SfLoadingModule, decorators: [{
|
|
67
|
+
type: NgModule,
|
|
68
|
+
args: [{
|
|
69
|
+
declarations: [
|
|
70
|
+
SfLoadingComponent
|
|
71
|
+
],
|
|
72
|
+
imports: [
|
|
73
|
+
BlockUIModule,
|
|
74
|
+
ProgressSpinnerModule,
|
|
75
|
+
CommonModule
|
|
76
|
+
],
|
|
77
|
+
exports: [
|
|
78
|
+
SfLoadingComponent
|
|
79
|
+
]
|
|
80
|
+
}]
|
|
81
|
+
}] });
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* Public API Surface of sf-loading
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Generated bundle index. Do not edit.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
export { SfLoadingComponent, SfLoadingModule };
|
|
92
|
+
//# sourceMappingURL=sf-loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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\r\n @Input() target!: HTMLElement;\r\n\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 </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\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 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;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e,EAAA,UAAA,EAAA,CAAA;kBAb3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACZ,qBAAqB;wBACtB,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;AACnB,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
5
|
+
texto: string | undefined;
|
|
6
|
+
logo: string | undefined;
|
|
7
|
+
enProceso: boolean;
|
|
8
|
+
block: ElementRef<HTMLElement>;
|
|
9
|
+
private prevPosition;
|
|
10
|
+
constructor();
|
|
11
|
+
ngOnChanges(): void;
|
|
12
|
+
ngAfterViewInit(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SfLoadingComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SfLoadingComponent, "sf-loading", never, { "target": "target"; "texto": "texto"; "logo": "logo"; "enProceso": "enProceso"; }, {}, never, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 "@angular/common";
|
|
6
|
+
export declare class SfLoadingModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SfLoadingModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SfLoadingModule, [typeof i1.SfLoadingComponent], [typeof i2.BlockUIModule, typeof i3.ProgressSpinnerModule, typeof i4.CommonModule], [typeof i1.SfLoadingComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SfLoadingModule>;
|
|
10
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sf-loading",
|
|
3
|
+
"version": "12.0.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^12.2.0",
|
|
6
|
+
"@angular/core": "^12.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"main": "bundles/sf-loading.umd.js",
|
|
12
|
+
"module": "fesm2015/sf-loading.js",
|
|
13
|
+
"es2015": "fesm2015/sf-loading.js",
|
|
14
|
+
"esm2015": "esm2015/sf-loading.js",
|
|
15
|
+
"fesm2015": "fesm2015/sf-loading.js",
|
|
16
|
+
"typings": "sf-loading.d.ts",
|
|
17
|
+
"sideEffects": false
|
|
18
|
+
}
|
package/public-api.d.ts
ADDED