@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
71 lines (70 loc) • 3.55 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 { 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';
}
hostAriaLive = 'polite';
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: "18.2.14", ngImport: i0, type: StatusBarComponent, deps: [{ token: i1.CellSelectionAggregateService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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", "attr.aria-live": "this.hostAriaLive" } }, ngImport: i0, template: `
@if (statusBarTemplate) {
<ng-template
[ngTemplateOutlet]="statusBarTemplate?.templateRef"
[ngTemplateOutletContext]="{ aggregates: aggregates }">
</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: StatusBarComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-grid-status-bar',
template: `
@if (statusBarTemplate) {
<ng-template
[ngTemplateOutlet]="statusBarTemplate?.templateRef"
[ngTemplateOutletContext]="{ aggregates: aggregates }">
</ng-template>
}
`,
standalone: true,
imports: [NgTemplateOutlet]
}]
}], ctorParameters: () => [{ 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']
}], hostAriaLive: [{
type: HostBinding,
args: ['attr.aria-live']
}], statusBarTemplate: [{
type: Input
}] } });