ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
99 lines (92 loc) • 4.45 kB
TypeScript
import { Direction } from '@angular/cdk/bidi';
import * as i0 from '@angular/core';
import { OnInit, OnChanges, SimpleChanges, AfterViewInit, ElementRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { OnChangeType, OnTouchedType, NzSizeLDSType, NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzFormStatusService } from 'ng-zorro-antd/core/form';
import { ReplaySubject, Subject } from 'rxjs';
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
type NzRadioButtonStyle = 'outline' | 'solid';
declare class NzRadioGroupComponent implements OnInit, ControlValueAccessor, OnChanges {
private readonly cdr;
private readonly nzRadioService;
private readonly directionality;
private readonly destroyRef;
private value;
private isNzDisableFirstChange;
onChange: OnChangeType;
onTouched: OnTouchedType;
nzDisabled: boolean;
nzButtonStyle: NzRadioButtonStyle;
nzSize: NzSizeLDSType;
nzName: string | null;
dir: Direction;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
writeValue(value: NzSafeAny): void;
registerOnChange(fn: OnChangeType): void;
registerOnTouched(fn: OnTouchedType): void;
setDisabledState(isDisabled: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzRadioGroupComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzRadioGroupComponent, "nz-radio-group", ["nzRadioGroup"], { "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzButtonStyle": { "alias": "nzButtonStyle"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzName": { "alias": "nzName"; "required": false; }; }, {}, never, ["*"], true, never>;
static ngAcceptInputType_nzDisabled: unknown;
}
declare class NzRadioComponent implements ControlValueAccessor, AfterViewInit, OnInit {
private readonly directionality;
private readonly nzRadioService;
private readonly ngZone;
private readonly elementRef;
private readonly cdr;
private readonly focusMonitor;
private readonly destroyRef;
readonly nzFormStatusService: NzFormStatusService | null;
private isNgModel;
private isNzDisableFirstChange;
isChecked: boolean;
name: string | null;
onChange: OnChangeType;
onTouched: OnTouchedType;
inputElement: ElementRef<HTMLInputElement>;
nzValue: NzSafeAny | null;
nzDisabled: boolean;
nzAutoFocus: boolean;
isRadioButton: boolean;
dir: Direction;
focus(): void;
blur(): void;
constructor();
setDisabledState(disabled: boolean): void;
writeValue(value: boolean): void;
registerOnChange(fn: OnChangeType): void;
registerOnTouched(fn: OnTouchedType): void;
ngOnInit(): void;
ngAfterViewInit(): void;
private setupClickListener;
static ɵfac: i0.ɵɵFactoryDeclaration<NzRadioComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzRadioComponent, "[nz-radio],[nz-radio-button]", ["nzRadio"], { "nzValue": { "alias": "nzValue"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzAutoFocus": { "alias": "nzAutoFocus"; "required": false; }; "isRadioButton": { "alias": "nz-radio-button"; "required": false; }; }, {}, never, ["*"], true, never>;
static ngAcceptInputType_nzDisabled: unknown;
static ngAcceptInputType_nzAutoFocus: unknown;
static ngAcceptInputType_isRadioButton: unknown;
}
declare class NzRadioService {
selected$: ReplaySubject<any>;
touched$: Subject<void>;
disabled$: ReplaySubject<boolean>;
name$: ReplaySubject<string>;
touch(): void;
select(value: NzSafeAny): void;
setDisabled(value: boolean): void;
setName(value: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzRadioService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NzRadioService>;
}
declare class NzRadioModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzRadioModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzRadioModule, never, [typeof NzRadioComponent, typeof NzRadioGroupComponent], [typeof NzRadioComponent, typeof NzRadioGroupComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzRadioModule>;
}
export { NzRadioComponent, NzRadioGroupComponent, NzRadioModule, NzRadioService };
export type { NzRadioButtonStyle };