UNPKG

bitcitawebfrontlib-ibsalut

Version:

Angular CLI project used by other Angular projects in the bitcita web project.<br />

49 lines 2.61 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var general_utils_service_1 = require("../service/general-utils.service"); var BitLoadingBitcitawebComponent = /** @class */ (function () { function BitLoadingBitcitawebComponent(generalUtils) { var _this = this; //console.log("Constructor bitloading"); this.inProgressCount = 0; this.subscription = generalUtils.observableLoading.subscribe(function (status) { if (status === "start") _this.inProgressCount++; if (status === "stop") { if (_this.inProgressCount > 0) _this.inProgressCount--; } _this.loading = _this.inProgressCount > 0; console.log("loading", status, _this.inProgressCount); }); } BitLoadingBitcitawebComponent.prototype.ngOnDestroy = function () { this.loading = false; if (this.subscription != null) this.subscription.unsubscribe(); }; __decorate([ core_1.Input("source"), __metadata("design:type", String) ], BitLoadingBitcitawebComponent.prototype, "imageSource", void 0); BitLoadingBitcitawebComponent = __decorate([ core_1.Component({ selector: "bit-loading-bitcitaweb", template: "\n <div class=\"loading\" *ngIf=\"loading\">\n <img class=\"icono-loading\" [src]=\"imageSource\" />\n </div>\n " }), __metadata("design:paramtypes", [general_utils_service_1.GeneralUtils]) ], BitLoadingBitcitawebComponent); return BitLoadingBitcitawebComponent; }()); exports.BitLoadingBitcitawebComponent = BitLoadingBitcitawebComponent; //# sourceMappingURL=bci-loading-bitcitaweb.component.js.map