ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
93 lines (87 loc) • 4.38 kB
TypeScript
import { Direction } from '@angular/cdk/bidi';
import * as i0 from '@angular/core';
import { OnInit, OnChanges, ElementRef, TemplateRef, EventEmitter, SimpleChanges } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { NzConfigKey } from 'ng-zorro-antd/core/config';
import { NgClassType, OnChangeType, OnTouchedType } from 'ng-zorro-antd/core/types';
/**
* 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 class NzRateComponent implements OnInit, ControlValueAccessor, OnChanges {
readonly _nzModuleName: NzConfigKey;
private readonly ngZone;
private readonly renderer;
private readonly cdr;
private readonly directionality;
private readonly destroyRef;
ulElement: ElementRef<HTMLUListElement>;
nzAllowClear: boolean;
nzAllowHalf: boolean;
nzDisabled: boolean;
nzAutoFocus: boolean;
nzCharacter: TemplateRef<{
$implicit: number;
}>;
nzCount: number;
nzTooltips: string[];
readonly nzOnBlur: EventEmitter<FocusEvent>;
readonly nzOnFocus: EventEmitter<FocusEvent>;
readonly nzOnHoverChange: EventEmitter<number>;
readonly nzOnKeyDown: EventEmitter<KeyboardEvent>;
classMap: NgClassType;
starArray: number[];
starStyleArray: NgClassType[];
dir: Direction;
private hasHalf;
private hoverValue;
private isFocused;
private _value;
private isNzDisableFirstChange;
get nzValue(): number;
set nzValue(input: number);
constructor();
ngOnChanges(changes: SimpleChanges): void;
ngOnInit(): void;
onItemClick(index: number, isHalf: boolean): void;
onItemHover(index: number, isHalf: boolean): void;
onRateLeave(): void;
focus(): void;
blur(): void;
onKeyDown(e: KeyboardEvent): void;
private updateStarArray;
private updateStarStyle;
writeValue(value: number | null): void;
setDisabledState(isDisabled: boolean): void;
registerOnChange(fn: OnChangeType): void;
registerOnTouched(fn: OnTouchedType): void;
onChange: (value: number) => void;
onTouched: () => void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzRateComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzRateComponent, "nz-rate", ["nzRate"], { "nzAllowClear": { "alias": "nzAllowClear"; "required": false; }; "nzAllowHalf": { "alias": "nzAllowHalf"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzAutoFocus": { "alias": "nzAutoFocus"; "required": false; }; "nzCharacter": { "alias": "nzCharacter"; "required": false; }; "nzCount": { "alias": "nzCount"; "required": false; }; "nzTooltips": { "alias": "nzTooltips"; "required": false; }; }, { "nzOnBlur": "nzOnBlur"; "nzOnFocus": "nzOnFocus"; "nzOnHoverChange": "nzOnHoverChange"; "nzOnKeyDown": "nzOnKeyDown"; }, never, never, true, never>;
static ngAcceptInputType_nzAllowClear: unknown;
static ngAcceptInputType_nzAllowHalf: unknown;
static ngAcceptInputType_nzDisabled: unknown;
static ngAcceptInputType_nzAutoFocus: unknown;
static ngAcceptInputType_nzCount: unknown;
}
declare class NzRateItemComponent {
character: TemplateRef<{
$implicit: number;
}>;
index: number;
allowHalf: boolean;
readonly itemHover: EventEmitter<boolean>;
readonly itemClick: EventEmitter<boolean>;
hoverRate(isHalf: boolean): void;
clickRate(isHalf: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzRateItemComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzRateItemComponent, "[nz-rate-item]", ["nzRateItem"], { "character": { "alias": "character"; "required": false; }; "index": { "alias": "index"; "required": false; }; "allowHalf": { "alias": "allowHalf"; "required": false; }; }, { "itemHover": "itemHover"; "itemClick": "itemClick"; }, never, never, true, never>;
static ngAcceptInputType_allowHalf: unknown;
}
declare class NzRateModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzRateModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzRateModule, never, [typeof NzRateComponent, typeof NzRateItemComponent], [typeof NzRateComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzRateModule>;
}
export { NzRateComponent, NzRateItemComponent, NzRateModule };