@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
57 lines (56 loc) • 3.13 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* 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 { NgIf, 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: "16.2.12", ngImport: i0, type: LoadingComponent, deps: [{ token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LoadingComponent, isStandalone: true, selector: "[kendoGridLoading]", inputs: { loadingTemplate: "loadingTemplate" }, host: { properties: { "class.k-loading-mask": "this.hostClass" } }, ngImport: i0, template: `
<ng-container *ngIf="!loadingTemplate">
<span class="k-loading-text">{{ loadingText }}</span>
<div class="k-loading-image"></div>
<div class="k-loading-color"></div>
</ng-container>
<ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate?.templateRef">
</ng-template>
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingComponent, decorators: [{
type: Component,
args: [{
selector: '[kendoGridLoading]',
template: `
<ng-container *ngIf="!loadingTemplate">
<span class="k-loading-text">{{ loadingText }}</span>
<div class="k-loading-image"></div>
<div class="k-loading-color"></div>
</ng-container>
<ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate?.templateRef">
</ng-template>
`,
standalone: true,
imports: [NgIf, NgTemplateOutlet]
}]
}], ctorParameters: function () { return [{ type: i1.ContextService }]; }, propDecorators: { hostClass: [{
type: HostBinding,
args: ['class.k-loading-mask']
}], loadingTemplate: [{
type: Input
}] } });