UNPKG

@siemens/ngx-datatable

Version:

ngx-datatable is an Angular table grid component for presenting large and complex data.

20 lines 5.91 kB
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; export class DataTableGhostLoaderComponent { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: DataTableGhostLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: DataTableGhostLoaderComponent, selector: "ghost-loader", inputs: { columns: "columns", pageSize: "pageSize", rowHeight: "rowHeight", ghostBodyHeight: "ghostBodyHeight" }, ngImport: i0, template: "<div [style.height]=\"ghostBodyHeight + 'px'\" class=\"ghost-loader ghost-cell-container\">\n <div [style.height]=\"rowHeight + 'px'\" class=\"ghost-element\" *ngFor=\"let item of [].constructor(pageSize)\">\n <ng-container *ngFor=\"let col of columns\">\n <div class=\"line ghost-cell-strip\" *ngIf=\"!col.ghostCellTemplate else ghostCellTemplate;\" [style.width]=\"col?.width + 'px'\" >\n </div>\n <ng-template\n #ghostCellTemplate\n [ngTemplateOutlet]=\"col.ghostCellTemplate\"\n >\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: ["@keyframes ghost{0%{background-position:0vw 0}to{background-position:100vw 0}}.ghost-loader{overflow:hidden}.ghost-loader .line{width:100%;height:12px;animation-name:ghost;animation-iteration-count:infinite;animation-timing-function:linear}.ghost-loader .ghost-element{display:flex}:host.ghost-overlay{position:sticky;top:20px}:host.ghost-overlay .ghost-loader .line{margin:.9rem 1.2rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: DataTableGhostLoaderComponent, decorators: [{ type: Component, args: [{ selector: `ghost-loader`, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"ghostBodyHeight + 'px'\" class=\"ghost-loader ghost-cell-container\">\n <div [style.height]=\"rowHeight + 'px'\" class=\"ghost-element\" *ngFor=\"let item of [].constructor(pageSize)\">\n <ng-container *ngFor=\"let col of columns\">\n <div class=\"line ghost-cell-strip\" *ngIf=\"!col.ghostCellTemplate else ghostCellTemplate;\" [style.width]=\"col?.width + 'px'\" >\n </div>\n <ng-template\n #ghostCellTemplate\n [ngTemplateOutlet]=\"col.ghostCellTemplate\"\n >\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: ["@keyframes ghost{0%{background-position:0vw 0}to{background-position:100vw 0}}.ghost-loader{overflow:hidden}.ghost-loader .line{width:100%;height:12px;animation-name:ghost;animation-iteration-count:infinite;animation-timing-function:linear}.ghost-loader .ghost-element{display:flex}:host.ghost-overlay{position:sticky;top:20px}:host.ghost-overlay .ghost-loader .line{margin:.9rem 1.2rem}\n"] }] }], propDecorators: { columns: [{ type: Input }], pageSize: [{ type: Input }], rowHeight: [{ type: Input }], ghostBodyHeight: [{ type: Input }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2hvc3QtbG9hZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1kYXRhdGFibGUvc3JjL2xpYi9jb21wb25lbnRzL2JvZHkvZ2hvc3QtbG9hZGVyL2dob3N0LWxvYWRlci5jb21wb25lbnQudHMiLCIuLi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