UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

79 lines 2.22 kB
import { OnDestroy, TemplateRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { RangeDirective } from './range.directive'; import * as i0 from "@angular/core"; /** * A component to render a range slider in Cumulocity UI. You need to wrap the default range * input in this component, then use one of the four available options for the value display mode: * `pop`, `start`, `end`, and `inline` * * ```html * <c8y-range valueDisplayMode="inline"> * <input id="range" type="range" min="0" max="100000" value="0" step="1"> * </c8y-range> * ``` */ export declare class RangeComponent implements OnDestroy, ControlValueAccessor { /** * Value display mode, available options: `pop`, `start`, `end`, and `inline` (fallback) */ valueDisplayMode: 'pop' | 'inline' | 'end' | 'start'; /** * The range input */ range: RangeDirective; /** * The range value slider */ rangeValue: TemplateRef<unknown>; /** * The current value. */ value: number; /** * The current position of the tooltip from left */ left: string; /** * @ignore */ onChange: (value: number) => void; /** * @ignore */ onTouched: () => void; /** * @ignore * @param obj The value to update */ writeValue(obj: () => void): void; /** * @ignore * @param fn The function to register for changes */ registerOnChange(fn: () => void): void; /** * @ignore * @param fn The function to register for changes */ registerOnTouched(fn: () => void): void; /** * @ignore */ ngAfterContentInit(): void; /** * @ignore */ ngOnDestroy(): void; /** * @ignore */ updateValue(): void; /** * Updates the position of the slider */ updatePosition(): void; static ɵfac: i0.ɵɵFactoryDeclaration<RangeComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<RangeComponent, "c8y-range", never, { "valueDisplayMode": { "alias": "valueDisplayMode"; "required": false; }; }, {}, ["range", "rangeValue"], ["*"], true, never>; } //# sourceMappingURL=range.component.d.ts.map