@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
65 lines (64 loc) • 3.47 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 { StatusBarTemplateDirective } from './status-bar-template.directive';
import { CellSelectionAggregateService } from './selection-aggregate.service';
import { NgIf, NgTemplateOutlet } from '@angular/common';
import * as i0 from "@angular/core";
import * as i1 from "./selection-aggregate.service";
/**
* @hidden
*/
export class StatusBarComponent {
aggregateService;
hostClasses = true;
get isStatusBarTemplate() {
return this.statusBarTemplate ? '' : 'none';
}
statusBarTemplate;
constructor(aggregateService) {
this.aggregateService = aggregateService;
}
ngOnInit() {
this.aggregateService.init();
}
get aggregates() {
return this.aggregateService.aggregates;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: StatusBarComponent, deps: [{ token: i1.CellSelectionAggregateService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: StatusBarComponent, isStandalone: true, selector: "kendo-grid-status-bar", inputs: { statusBarTemplate: "statusBarTemplate" }, host: { properties: { "class.k-selection-aggregates": "this.hostClasses", "class.k-grid-selection-aggregates": "this.hostClasses", "style.display": "this.isStatusBarTemplate" } }, ngImport: i0, template: `
<ng-template
*ngIf="statusBarTemplate"
[ngTemplateOutlet]="statusBarTemplate?.templateRef"
[ngTemplateOutletContext]="{ aggregates: aggregates }">
</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: StatusBarComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-grid-status-bar',
template: `
<ng-template
*ngIf="statusBarTemplate"
[ngTemplateOutlet]="statusBarTemplate?.templateRef"
[ngTemplateOutletContext]="{ aggregates: aggregates }">
</ng-template>
`,
standalone: true,
imports: [NgIf, NgTemplateOutlet]
}]
}], ctorParameters: function () { return [{ type: i1.CellSelectionAggregateService }]; }, propDecorators: { hostClasses: [{
type: HostBinding,
args: ['class.k-selection-aggregates']
}, {
type: HostBinding,
args: ['class.k-grid-selection-aggregates']
}], isStatusBarTemplate: [{
type: HostBinding,
args: ['style.display']
}], statusBarTemplate: [{
type: Input
}] } });