ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
52 lines (51 loc) • 2.7 kB
TypeScript
/**
* 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
*/
import { Direction, Directionality } from '@angular/cdk/bidi';
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { ThumbAnimationProps } from 'ng-zorro-antd/core/animation';
import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
import { NzSafeAny, NzSizeLDSType, OnChangeType, OnTouchedType } from 'ng-zorro-antd/core/types';
import { NzNormalizedOptions, NzSegmentedOption, NzSegmentedOptions } from './types';
import * as i0 from "@angular/core";
export declare class NzSegmentedComponent implements OnChanges, ControlValueAccessor {
readonly nzConfigService: NzConfigService;
private readonly cdr;
private readonly directionality;
readonly _nzModuleName: NzConfigKey;
listOfOptions: QueryList<ElementRef>;
nzBlock: boolean;
nzDisabled: boolean;
nzOptions: NzSegmentedOptions;
nzSize: NzSizeLDSType;
nzLabelTemplate: TemplateRef<{
$implicit: NzSegmentedOption;
index: number;
}> | null;
readonly nzValueChange: EventEmitter<number>;
dir: Direction;
selectedIndex: number;
transitionedToIndex: number;
animationState: null | {
value: string;
params: ThumbAnimationProps;
};
normalizedOptions: NzNormalizedOptions;
private destroy$;
onChange: OnChangeType;
onTouched: OnTouchedType;
constructor(nzConfigService: NzConfigService, cdr: ChangeDetectorRef, directionality: Directionality);
ngOnChanges(changes: SimpleChanges): void;
handleOptionClick(index: number): void;
handleThumbAnimationDone(e: NzSafeAny): void;
writeValue(value: number | null): void;
registerOnChange(fn: OnChangeType): void;
registerOnTouched(fn: OnTouchedType): void;
private changeSelectedIndex;
static ɵfac: i0.ɵɵFactoryDeclaration<NzSegmentedComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzSegmentedComponent, "nz-segmented", ["nzSegmented"], { "nzBlock": { "alias": "nzBlock"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzOptions": { "alias": "nzOptions"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzLabelTemplate": { "alias": "nzLabelTemplate"; "required": false; }; }, { "nzValueChange": "nzValueChange"; }, never, never, true, never>;
static ngAcceptInputType_nzBlock: unknown;
static ngAcceptInputType_nzDisabled: unknown;
}