switch.component.d.ts 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { FocusMonitor } from '@angular/cdk/a11y';
  6. import { Direction, Directionality } from '@angular/cdk/bidi';
  7. import { AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, OnDestroy, OnInit, TemplateRef } from '@angular/core';
  8. import { ControlValueAccessor } from '@angular/forms';
  9. import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
  10. import { NzSizeDSType, OnChangeType, OnTouchedType } from 'ng-zorro-antd/core/types';
  11. import * as i0 from "@angular/core";
  12. export declare class NzSwitchComponent implements ControlValueAccessor, AfterViewInit, OnDestroy, OnInit {
  13. nzConfigService: NzConfigService;
  14. private host;
  15. private ngZone;
  16. private cdr;
  17. private focusMonitor;
  18. private directionality;
  19. readonly _nzModuleName: NzConfigKey;
  20. isChecked: boolean;
  21. onChange: OnChangeType;
  22. onTouched: OnTouchedType;
  23. switchElement: ElementRef<HTMLElement>;
  24. nzLoading: boolean;
  25. nzDisabled: boolean;
  26. nzControl: boolean;
  27. nzCheckedChildren: string | TemplateRef<void> | null;
  28. nzUnCheckedChildren: string | TemplateRef<void> | null;
  29. nzSize: NzSizeDSType;
  30. nzId: string | null;
  31. dir: Direction;
  32. private destroy$;
  33. private isNzDisableFirstChange;
  34. updateValue(value: boolean): void;
  35. focus(): void;
  36. blur(): void;
  37. constructor(nzConfigService: NzConfigService, host: ElementRef<HTMLElement>, ngZone: NgZone, cdr: ChangeDetectorRef, focusMonitor: FocusMonitor, directionality: Directionality);
  38. ngOnInit(): void;
  39. ngAfterViewInit(): void;
  40. ngOnDestroy(): void;
  41. writeValue(value: boolean): void;
  42. registerOnChange(fn: OnChangeType): void;
  43. registerOnTouched(fn: OnTouchedType): void;
  44. setDisabledState(disabled: boolean): void;
  45. static ɵfac: i0.ɵɵFactoryDeclaration<NzSwitchComponent, never>;
  46. static ɵcmp: i0.ɵɵComponentDeclaration<NzSwitchComponent, "nz-switch", ["nzSwitch"], { "nzLoading": { "alias": "nzLoading"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzControl": { "alias": "nzControl"; "required": false; }; "nzCheckedChildren": { "alias": "nzCheckedChildren"; "required": false; }; "nzUnCheckedChildren": { "alias": "nzUnCheckedChildren"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzId": { "alias": "nzId"; "required": false; }; }, {}, never, never, true, never>;
  47. static ngAcceptInputType_nzLoading: unknown;
  48. static ngAcceptInputType_nzDisabled: unknown;
  49. static ngAcceptInputType_nzControl: unknown;
  50. }