UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

57 lines (53 loc) 2.8 kB
import * as i0 from '@angular/core'; import { AfterViewInit, OnInit, OnChanges, ElementRef, TemplateRef, SimpleChanges } from '@angular/core'; import * as _angular_cdk_bidi from '@angular/cdk/bidi'; import { ControlValueAccessor } from '@angular/forms'; import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config'; import { OnChangeType, OnTouchedType, NzSizeDSType } from 'ng-zorro-antd/core/types'; declare class NzSwitchComponent implements ControlValueAccessor, AfterViewInit, OnInit, OnChanges { readonly _nzModuleName: NzConfigKey; nzConfigService: NzConfigService; private el; private ngZone; private cdr; private focusMonitor; private destroyRef; isChecked: boolean; onChange: OnChangeType; onTouched: OnTouchedType; switchElement: ElementRef<HTMLElement>; nzLoading: boolean; nzDisabled: boolean; nzControl: boolean; nzCheckedChildren: string | TemplateRef<void> | null; nzUnCheckedChildren: string | TemplateRef<void> | null; nzSize: NzSizeDSType; nzId: string | null; protected readonly dir: i0.WritableSignal<_angular_cdk_bidi.Direction>; private isNzDisableFirstChange; private readonly size; private readonly formSize; protected readonly finalSize: i0.Signal<"default" | "small" | "large">; updateValue(value: boolean): void; focus(): void; blur(): void; constructor(); ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; ngAfterViewInit(): void; writeValue(value: boolean): void; registerOnChange(fn: OnChangeType): void; registerOnTouched(fn: OnTouchedType): void; setDisabledState(disabled: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<NzSwitchComponent, never>; 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>; static ngAcceptInputType_nzLoading: unknown; static ngAcceptInputType_nzDisabled: unknown; static ngAcceptInputType_nzControl: unknown; } declare class NzSwitchModule { static ɵfac: i0.ɵɵFactoryDeclaration<NzSwitchModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NzSwitchModule, never, [typeof NzSwitchComponent], [typeof NzSwitchComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<NzSwitchModule>; } export { NzSwitchComponent, NzSwitchModule };