@tangential/input-widgets
Version:
Input Widgets with persistable, dynamic configuration.
66 lines (65 loc) • 2.92 kB
TypeScript
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
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_ICON_RATING_WIDGET_CONFIG_CONTROL_VALUE_ACCESSOR: any;
export declare class IconRatingWidgetConfigureChange {
source: IconRatingWidgetConfigureComponent;
value: number;
constructor(source: IconRatingWidgetConfigureComponent, value: number);
}
export declare class IconRatingWidgetConfigureComponent implements OnInit, ControlValueAccessor {
private changeDetectorRef;
flex: string;
flexLayout: string;
flexLayoutAlign: string;
value: number;
valueChange: EventEmitter<number>;
labelPosition: 'before' | 'after' | 'below';
disabled: boolean;
/**
* Configuration Fields
*/
label: string;
defaultValue: number;
max: number;
iconFont: string | undefined;
offIconNames: string[];
onIconNames: string[];
labelChange: EventEmitter<string>;
defaultValueChange: EventEmitter<number>;
maxChange: EventEmitter<number>;
iconFontChange: EventEmitter<number>;
offIconNamesChange: EventEmitter<number>;
onIconNamesChange: EventEmitter<number>;
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;
emitChangeEvent(): void;
swipeRight(event: any): void;
swipeLeft(event: any): 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<IconRatingWidgetConfigureComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IconRatingWidgetConfigureComponent, "tanj-icon-rating-widget-configure", never, { "value": "value"; "labelPosition": "labelPosition"; "disabled": "disabled"; "label": "label"; "defaultValue": "defaultValue"; "max": "max"; "iconFont": "iconFont"; "offIconNames": "offIconNames"; "onIconNames": "onIconNames"; }, { "valueChange": "valueChange"; "labelChange": "labelChange"; "defaultValueChange": "defaultValueChange"; "maxChange": "maxChange"; "iconFontChange": "iconFontChange"; "offIconNamesChange": "offIconNamesChange"; "onIconNamesChange": "onIconNamesChange"; "change": "change"; }, never, never, false>;
}