UNPKG

@tangential/input-widgets

Version:

Input Widgets with persistable, dynamic configuration.

74 lines (73 loc) 3.4 kB
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChange } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { DurationPickerState } from './duration-picker-state'; import * as i0 from "@angular/core"; /** * Provider Expression that allows IconRatingWidget to register as a ControlValueAccessor. * This allows it to support [(ngModel)]. * @docs-private */ export declare const TANJ_DURATION_WIDGET_CONFIG_CONTROL_VALUE_ACCESSOR: any; export declare class DurationPickerWidgetConfigureChange { source: DurationPickerWidgetConfigureComponent; value: number; constructor(source: DurationPickerWidgetConfigureComponent, value: number); } export declare class DurationPickerWidgetConfigureComponent implements OnInit, OnChanges, ControlValueAccessor { private changeDetectorRef; flex: string; flexLayout: string; flexLayoutAlign: string; value: number; valueChange: EventEmitter<number>; labelPosition: 'before' | 'after' | 'below'; disabled: boolean; /** * Configuration Fields */ label: string; labelChange: EventEmitter<string>; defaultValue: number; defaultValueChange: EventEmitter<number>; max: number; maxChange: EventEmitter<number>; showDays: boolean; showDaysChange: EventEmitter<boolean>; showHours: boolean; showHoursChange: EventEmitter<boolean>; showMinutes: boolean; showMinutesChange: EventEmitter<boolean>; showSeconds: boolean; showSecondsChange: EventEmitter<boolean>; showMilliseconds: boolean; showMillisecondsChange: EventEmitter<boolean>; state: DurationPickerState; change: EventEmitter<any>; /** * Called when the spinner is blurred. Needed to properly implement ControlValueAccessor. * @docs-private */ onTouched: () => any; private controlValueAccessorChangeFn; constructor(changeDetectorRef: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: { value: SimpleChange; }): void; private updateFields; emitChangeEvent(): void; /** * Boilerplate / required for Angular * */ 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<DurationPickerWidgetConfigureComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DurationPickerWidgetConfigureComponent, "tanj-duration-picker-widget-configure", never, { "value": "value"; "labelPosition": "labelPosition"; "disabled": "disabled"; "label": "label"; "defaultValue": "defaultValue"; "max": "max"; "showDays": "showDays"; "showHours": "showHours"; "showMinutes": "showMinutes"; "showSeconds": "showSeconds"; "showMilliseconds": "showMilliseconds"; }, { "valueChange": "valueChange"; "labelChange": "labelChange"; "defaultValueChange": "defaultValueChange"; "maxChange": "maxChange"; "showDaysChange": "showDaysChange"; "showHoursChange": "showHoursChange"; "showMinutesChange": "showMinutesChange"; "showSecondsChange": "showSecondsChange"; "showMillisecondsChange": "showMillisecondsChange"; "change": "change"; }, never, never, false>; }