UNPKG

ng-zorro-antd

Version:

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

114 lines (105 loc) 5.76 kB
import * as _angular_cdk_bidi from '@angular/cdk/bidi'; import { Direction } from '@angular/cdk/bidi'; import * as i0 from '@angular/core'; import { OnInit, AfterViewInit, ElementRef, EventEmitter, InjectionToken } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { OnChangeType, OnTouchedType, NzSafeAny } from 'ng-zorro-antd/core/types'; import * as ng_zorro_antd_checkbox from 'ng-zorro-antd/checkbox'; import { NzFormStatusService } from 'ng-zorro-antd/core/form'; interface NzCheckboxOption { label: string; value: string | number; disabled?: boolean; } declare class NzCheckboxGroupComponent implements ControlValueAccessor { private onChange; private onTouched; private isDisabledFirstChange; private readonly directionality; readonly nzName: i0.InputSignal<string | null>; readonly nzDisabled: i0.InputSignalWithTransform<boolean, unknown>; readonly nzOptions: i0.InputSignal<NzCheckboxOption[] | string[] | number[]>; readonly value: i0.WritableSignal<(string | number)[] | null>; readonly finalDisabled: i0.WritableSignal<boolean>; protected readonly dir: i0.Signal<_angular_cdk_bidi.Direction>; protected readonly normalizedOptions: i0.Signal<NzCheckboxOption[]>; constructor(); writeValue(value: Array<string | number> | null): void; registerOnChange(fn: OnChangeType): void; registerOnTouched(fn: OnTouchedType): void; setDisabledState(disabled: boolean): void; onCheckedChange(optionValue: NzCheckboxOption['value'], checked: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<NzCheckboxGroupComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzCheckboxGroupComponent, "nz-checkbox-group", ["nzCheckboxGroup"], { "nzName": { "alias": "nzName"; "required": false; "isSignal": true; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; "isSignal": true; }; "nzOptions": { "alias": "nzOptions"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>; } declare class NzCheckboxComponent implements OnInit, ControlValueAccessor, AfterViewInit { private ngZone; private elementRef; private cdr; private focusMonitor; private directionality; private destroyRef; protected checkboxGroupComponent: ng_zorro_antd_checkbox.NzCheckboxGroupComponent | null; protected nzFormStatusService: NzFormStatusService | null; /** @deprecated */ private nzCheckboxWrapperComponent; dir: Direction; private destroy$; private isNzDisableFirstChange; onChange: OnChangeType; onTouched: OnTouchedType; inputElement: ElementRef<HTMLInputElement>; readonly nzCheckedChange: EventEmitter<boolean>; nzValue: NzSafeAny | null; nzAutoFocus: boolean; nzDisabled: boolean; nzIndeterminate: boolean; nzChecked: boolean; nzId: string | null; nzName: string | null; innerCheckedChange(checked: boolean): void; writeValue(value: boolean): void; registerOnChange(fn: OnChangeType): void; registerOnTouched(fn: OnTouchedType): void; setDisabledState(disabled: boolean): void; focus(): void; blur(): void; constructor(); ngOnInit(): void; ngAfterViewInit(): void; private setValue; static ɵfac: i0.ɵɵFactoryDeclaration<NzCheckboxComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzCheckboxComponent, "[nz-checkbox]", ["nzCheckbox"], { "nzValue": { "alias": "nzValue"; "required": false; }; "nzAutoFocus": { "alias": "nzAutoFocus"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzIndeterminate": { "alias": "nzIndeterminate"; "required": false; }; "nzChecked": { "alias": "nzChecked"; "required": false; }; "nzId": { "alias": "nzId"; "required": false; }; "nzName": { "alias": "nzName"; "required": false; }; }, { "nzCheckedChange": "nzCheckedChange"; }, never, ["*"], true, never>; static ngAcceptInputType_nzAutoFocus: unknown; static ngAcceptInputType_nzDisabled: unknown; static ngAcceptInputType_nzIndeterminate: unknown; static ngAcceptInputType_nzChecked: unknown; } /** * 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 */ /** * @deprecated Will be removed in v21. It is recommended to use `<nz-checkbox-group>`. */ declare class NzCheckboxWrapperComponent { readonly nzOnChange: EventEmitter<any[]>; private checkboxList; addCheckbox(value: NzCheckboxComponent): void; removeCheckbox(value: NzCheckboxComponent): void; onChange(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NzCheckboxWrapperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzCheckboxWrapperComponent, "nz-checkbox-wrapper", ["nzCheckboxWrapper"], {}, { "nzOnChange": "nzOnChange"; }, never, ["*"], true, never>; } declare class NzCheckboxModule { static ɵfac: i0.ɵɵFactoryDeclaration<NzCheckboxModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NzCheckboxModule, never, [typeof NzCheckboxComponent, typeof NzCheckboxGroupComponent, typeof NzCheckboxWrapperComponent], [typeof NzCheckboxComponent, typeof NzCheckboxGroupComponent, typeof NzCheckboxWrapperComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<NzCheckboxModule>; } /** * 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 */ declare const NZ_CHECKBOX_GROUP: InjectionToken<NzCheckboxGroupComponent>; export { NZ_CHECKBOX_GROUP, NzCheckboxComponent, NzCheckboxGroupComponent, NzCheckboxModule, NzCheckboxWrapperComponent }; export type { NzCheckboxOption };