UNPKG

@tangential/input-widgets

Version:

Input Widgets with persistable, dynamic configuration.

60 lines (59 loc) 2.48 kB
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; /** * Provider Expression that allows this widget to register as a ControlValueAccessor. * This allows it to support [(ngModel)]. * @docs-private */ export declare const TANJ_NUMBER_SLIDER_WIDGET_VIEW_CONTROL_VALUE_ACCESSOR: any; export declare class NumberSliderWidgetChange { source: NumberSliderWidgetComponent; value: number; constructor(source: NumberSliderWidgetComponent, value: number); } export declare class NumberSliderWidgetComponent implements ControlValueAccessor, OnChanges, OnInit { private changeDetectorRef; flex: string; flexLayout: string; flexLayoutAlign: string; value: number; valueChange: EventEmitter<number>; labelPosition: 'before' | 'after' | 'below'; disabled: boolean; hideLabel: boolean; onlyLabel: boolean; /** * Configuration Fields */ label: string; defaultValue: number; max: number; min: number; step: number; decimalPlaces: number; tickInterval: number; vertical: boolean; change: EventEmitter<any>; onTouched: () => any; private controlValueAccessorChangeFn; constructor(changeDetectorRef: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; handleValueChange(value: number): void; /** * Boilerplate / required for Angular * */ private emitChangeEvent; writeValue(value: number): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; /** * Sets the input's disabled state. Implemented as a part of ControlValueAccessor. * @param isDisabled Whether the input should be disabled. */ setDisabledState(isDisabled: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<NumberSliderWidgetComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NumberSliderWidgetComponent, "tanj-number-slider-widget", never, { "value": "value"; "labelPosition": "labelPosition"; "disabled": "disabled"; "hideLabel": "hideLabel"; "onlyLabel": "onlyLabel"; "label": "label"; "defaultValue": "defaultValue"; "max": "max"; "min": "min"; "step": "step"; "decimalPlaces": "decimalPlaces"; "tickInterval": "tickInterval"; "vertical": "vertical"; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, false>; }