UNPKG

@progress/kendo-angular-grid

Version:

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

46 lines (45 loc) 2.54 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ContentChild, Directive, ElementRef, HostBinding, Input } from '@angular/core'; import { CheckBoxComponent } from '@progress/kendo-angular-inputs'; import { Subscription } from 'rxjs'; import * as i0 from "@angular/core"; /** * @hidden */ export class ColumnMenuChooserItemCheckedDirective { host; kendoColumnMenuChooserItemChecked; checkbox; checkedChangeSub = new Subscription(); constructor(host) { this.host = host; } ngAfterViewInit() { this.checkedChangeSub.add(this.checkbox.checkedStateChange.subscribe(() => { this.kendoColumnMenuChooserItemChecked = this.checkbox.checkedState === true; })); } ngOnDestroy() { this.checkedChangeSub.unsubscribe(); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuChooserItemCheckedDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnMenuChooserItemCheckedDirective, isStandalone: true, selector: "[kendoColumnMenuChooserItemChecked]", inputs: { kendoColumnMenuChooserItemChecked: "kendoColumnMenuChooserItemChecked" }, host: { properties: { "attr.aria-checked": "this.kendoColumnMenuChooserItemChecked" } }, queries: [{ propertyName: "checkbox", first: true, predicate: CheckBoxComponent, descendants: true }], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuChooserItemCheckedDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoColumnMenuChooserItemChecked]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { kendoColumnMenuChooserItemChecked: [{ type: HostBinding, args: ['attr.aria-checked'] }, { type: Input }], checkbox: [{ type: ContentChild, args: [CheckBoxComponent] }] } });