@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
53 lines • 1.97 kB
TypeScript
import { EventEmitter, SimpleChanges } from '@angular/core';
import { CheckboxControlValueAccessor } from '@angular/forms';
import { ElementRef, Renderer2 } from '@angular/core';
import * as i0 from "@angular/core";
/**
* A component to display checkboxes in a c8y-li. Use it with content projection. It
* can be used standalone or with an ngModel.
*
* ```html
* <c8y-li>
* <c8y-li-checkbox></c8y-li-checkbox>
* </c8y-li>
* ```
*/
export declare class ListItemCheckboxComponent extends CheckboxControlValueAccessor {
private renderer;
private elementRef;
/**
* Indicates if the checkbox is selected.
*/
selected: boolean;
/**
* Sets the checkbox into the indeterminate state.
*/
indeterminate?: boolean;
/**
* Indicates if the checkbox is disabled.
*/
disabled: boolean;
/**
* An event emitted as soon as the checkbox is selected.
*/
onSelect: EventEmitter<boolean>;
/**
* Allows to display the chceckbox as a switch
*/
displayAsSwitch: boolean;
constructor(renderer: Renderer2, elementRef: ElementRef);
/**
* @ignore
*/
ngOnChanges(changes: SimpleChanges): void;
/**
* Selects the checkbox.
* @param value The value to pass.
*/
select(value: any): void;
writeValue(value: boolean): void;
setDisabledState(isDisabled: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ListItemCheckboxComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ListItemCheckboxComponent, "c8y-list-item-checkbox, c8y-li-checkbox", never, { "selected": { "alias": "selected"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "displayAsSwitch": { "alias": "displayAsSwitch"; "required": false; }; }, { "onSelect": "onSelect"; }, never, ["*"], true, never>;
}
//# sourceMappingURL=list-item-checkbox.component.d.ts.map