import { ElementRef, Renderer2, OnInit, EventEmitter, AfterViewInit } from '@angular/core'; import { CheckboxColumnItem } from '../models'; /** * Directive for checkbox column - check all * * For parent checkbox, use directive: * * @example * * * * // For children checkboxes, convert list into a CheckboxListColumn, to be used in interator: * this.items = CheckboxListColumn.create(listItems); * * // Then, use change method of directive on component: *
* * *
* */ export declare class CheckboxColumnDirective> implements OnInit, AfterViewInit { private elementRef; private renderer; /** * HTMLInputElement of parent checkbox */ private parent; /** * Emitter for check/uncheck of parent checkbox */ checkboxColumnChange: EventEmitter; /** * Array of children items of specified type */ private _items; /** * Input for children items */ set items(items: Array); /** * Get children items */ get items(): Array; /** * @ignore */ constructor(elementRef: ElementRef, renderer: Renderer2); /** * Set initials configurations */ ngOnInit(): void; /** * Set configurations after view is initializes */ ngAfterViewInit(): void; /** * Method on change of item of list. * Emitts the new value of item, and call function to change the parent status. * * @param event true | false * @param item class item */ changeItem(event: boolean, item: T): void; /** * Uncheck all items */ uncheckAll(): void; /** * Check all items */ checkAll(): void; /** * Toggle check on parent click * @param checked true | false */ private toggleCheck; /** * Host listener for change selection of parent */ private changeSelection; /** * Set the status of children, based on parent selection */ private toggleColumnSelection; /** * On children click, change status of parent element */ private changeColumnSelection; /** * Count the selected items */ private countItemsSelected; }