checkbox.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { ChangeDetectorRef } from '@angular/core';
  2. import { ControlValueAccessor } from '@angular/forms';
  3. import { NgbButtonLabel } from './label';
  4. /**
  5. * Allows to easily create Bootstrap-style checkbox buttons.
  6. *
  7. * Integrates with forms, so the value of a checked button is bound to the underlying form control
  8. * either in a reactive or template-driven way.
  9. */
  10. export declare class NgbCheckBox implements ControlValueAccessor {
  11. private _label;
  12. private _cd;
  13. checked: any;
  14. /**
  15. * If `true`, the checkbox button will be disabled
  16. */
  17. disabled: boolean;
  18. /**
  19. * The form control value when the checkbox is checked.
  20. */
  21. valueChecked: boolean;
  22. /**
  23. * The form control value when the checkbox is unchecked.
  24. */
  25. valueUnChecked: boolean;
  26. onChange: (_: any) => void;
  27. onTouched: () => void;
  28. focused: boolean;
  29. constructor(_label: NgbButtonLabel, _cd: ChangeDetectorRef);
  30. onInputChange($event: any): void;
  31. registerOnChange(fn: (value: any) => any): void;
  32. registerOnTouched(fn: () => any): void;
  33. setDisabledState(isDisabled: boolean): void;
  34. writeValue(value: any): void;
  35. }