UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

61 lines (60 loc) 2.98 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, HostBinding, Input } from '@angular/core'; import { ContextService } from '../../common/provider.service'; import { LoadingTemplateDirective } from '../loading-template.directive'; import { NgTemplateOutlet } from '@angular/common'; import * as i0 from "@angular/core"; import * as i1 from "../../common/provider.service"; /** * @hidden */ export class LoadingComponent { ctx; hostClass = true; loadingTemplate; get loadingText() { return this.ctx.localization.get('loading'); } constructor(ctx) { this.ctx = ctx; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoadingComponent, deps: [{ token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LoadingComponent, isStandalone: true, selector: "[kendoGridLoading]", inputs: { loadingTemplate: "loadingTemplate" }, host: { properties: { "class.k-loading-mask": "this.hostClass" } }, ngImport: i0, template: ` @if (!loadingTemplate) { <span class="k-loading-text">{{ loadingText }}</span> <div class="k-loading-image"></div> <div class="k-loading-color"></div> } @if (loadingTemplate) { <ng-template [ngTemplateOutlet]="loadingTemplate?.templateRef"> </ng-template> } `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoadingComponent, decorators: [{ type: Component, args: [{ selector: '[kendoGridLoading]', template: ` @if (!loadingTemplate) { <span class="k-loading-text">{{ loadingText }}</span> <div class="k-loading-image"></div> <div class="k-loading-color"></div> } @if (loadingTemplate) { <ng-template [ngTemplateOutlet]="loadingTemplate?.templateRef"> </ng-template> } `, standalone: true, imports: [NgTemplateOutlet] }] }], ctorParameters: () => [{ type: i1.ContextService }], propDecorators: { hostClass: [{ type: HostBinding, args: ['class.k-loading-mask'] }], loadingTemplate: [{ type: Input }] } });