UNPKG

@manthanankolekar/ng-loader

Version:

A loader for Angular applications

59 lines (53 loc) 3.09 kB
import * as i0 from '@angular/core'; import { Injectable, Component, Input } from '@angular/core'; class NgLoaderService { constructor() { } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NgLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NgLoaderService, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NgLoaderService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], ctorParameters: () => [] }); class NgLoaderComponent { loading = false; loaderMessage; static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NgLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: NgLoaderComponent, isStandalone: true, selector: "ng-loader", inputs: { loading: "loading", loaderMessage: "loaderMessage" }, ngImport: i0, template: ` @if (loading) { <div class="loader-overlay"> <div class="loader"></div> @if (loaderMessage) { <div class="loader-message">{{ loaderMessage }}</div> } </div> } `, isInline: true, styles: [".loader-overlay{position:fixed;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#00000080}.loader{border:16px solid #f3f3f3;border-radius:50%;border-top:16px solid #3498db;width:120px;height:120px;animation:spin 2s linear infinite}.loader-message{margin-top:15px;color:#fff;font-size:1.2rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NgLoaderComponent, decorators: [{ type: Component, args: [{ selector: 'ng-loader', template: ` @if (loading) { <div class="loader-overlay"> <div class="loader"></div> @if (loaderMessage) { <div class="loader-message">{{ loaderMessage }}</div> } </div> } `, styles: [".loader-overlay{position:fixed;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#00000080}.loader{border:16px solid #f3f3f3;border-radius:50%;border-top:16px solid #3498db;width:120px;height:120px;animation:spin 2s linear infinite}.loader-message{margin-top:15px;color:#fff;font-size:1.2rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }] }], propDecorators: { loading: [{ type: Input }], loaderMessage: [{ type: Input }] } }); /* * Public API Surface of ng-loader */ /** * Generated bundle index. Do not edit. */ export { NgLoaderComponent, NgLoaderService }; //# sourceMappingURL=manthanankolekar-ng-loader.mjs.map