UNPKG

gentics-ui-core

Version:

This is the common core framework for the Gentics CMS and Mesh UI, and other Angular applications.

103 lines (102 loc) 3.05 kB
import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; /** * The Range wraps the native `<input type="range">` form element. * * ```html * <gtx-range [(ngModel)]="latitude" step="5" min="-180" max="180"></gtx-range> * ``` */ export declare class Range implements ControlValueAccessor { private elementRef; private changeDetector; /** * Sets the input field to be auto-focused. Handled by `AutofocusDirective`. */ autofocus: boolean; /** * Sets the disabled state of the input. */ disabled: boolean; /** * Sets a label for the slider. */ label: string; /** * Maximum allowed value. */ max: number; /** * Minimum allowed value. */ min: number; /** * Name of the input. */ name: string; /** * Sets the required state. */ required: boolean; /** * Amount to increment by when sliding. */ step: number; /** * Sets the value of the slider. */ value: number; /** * Sets an id for the slider. */ id: string; /** * Set to false to not show the thumb label. Defaults to true. */ get thumbLabel(): boolean; set thumbLabel(value: boolean); /** * Blur event */ blur: EventEmitter<number>; /** * Focus event */ focus: EventEmitter<number>; /** * Change event */ change: EventEmitter<number>; active: boolean; thumbLeft: string; currentValue: number; private showThumbLabel; private inputElement; private get canModify(); onChange: (value: any) => void; onTouched: () => void; constructor(elementRef: ElementRef, changeDetector: ChangeDetectorRef); ngOnInit(): void; onBlur(e: FocusEvent): void; /** * IE11 only fires the 'change' event rather than the 'input' event as the range input value is changed. */ onChangeEvent(e: Event): void | boolean; onFocus(e: FocusEvent): void; /** * Browsers other than IE11 fire 'input' continuously as the range value is changed, and fires 'change' on mouseup. */ onInput(e: Event): void; onMousedown(e: MouseEvent): void; onMouseup(): void; onMousemove(e: MouseEvent): void; writeValue(value: any): void; registerOnChange(fn: (newValue: number) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(disabled: boolean): void; private getValueFromEvent; private setThumbPosition; static ɵfac: i0.ɵɵFactoryDeclaration<Range, never>; static ɵcmp: i0.ɵɵComponentDeclaration<Range, "gtx-range", never, { "autofocus": "autofocus"; "disabled": "disabled"; "label": "label"; "max": "max"; "min": "min"; "name": "name"; "required": "required"; "step": "step"; "value": "value"; "id": "id"; "thumbLabel": "thumbLabel"; }, { "blur": "blur"; "focus": "focus"; "change": "change"; }, never, never>; }