button-checkbox.directive.d.ts 982 B

1234567891011121314151617181920212223242526
  1. import { OnInit, Provider } from '@angular/core';
  2. import { ControlValueAccessor } from '@angular/forms';
  3. export declare const CHECKBOX_CONTROL_VALUE_ACCESSOR: Provider;
  4. /**
  5. * Add checkbox functionality to any element
  6. */
  7. export declare class ButtonCheckboxDirective implements ControlValueAccessor, OnInit {
  8. /** Truthy value, will be set to ngModel */
  9. btnCheckboxTrue: boolean;
  10. /** Falsy value, will be set to ngModel */
  11. btnCheckboxFalse: boolean;
  12. state: boolean;
  13. protected value: boolean | string;
  14. protected isDisabled: boolean;
  15. protected onChange: Function;
  16. protected onTouched: Function;
  17. onClick(): void;
  18. ngOnInit(): void;
  19. protected readonly trueValue: boolean;
  20. protected readonly falseValue: boolean;
  21. toggle(state: boolean): void;
  22. writeValue(value: boolean | string | null): void;
  23. setDisabledState(isDisabled: boolean): void;
  24. registerOnChange(fn: () => {}): void;
  25. registerOnTouched(fn: () => {}): void;
  26. }