smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
204 lines (203 loc) • 13 kB
TypeScript
import { Slider } from './../index';
import { Animation, LabelsVisibility, DragMechanicalAction, ScaleMode, Orientation, ScalePosition, ScaleType, Position, TicksPosition, TicksVisibility, Validation, WordLength } from './../index';
import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core';
import { BaseElement } from './smart.element';
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
export { Animation, LabelsVisibility, DragMechanicalAction, ScaleMode, Orientation, ScalePosition, ScaleType, Position, TicksPosition, TicksVisibility, Validation, WordLength, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { Slider } from './../index';
export declare class SliderComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {
constructor(ref: ElementRef<Slider>);
private eventHandlers;
nativeElement: Slider;
/** @description Creates the component on demand.
* @param properties An optional object of properties, which will be added to the template binded ones.
*/
createComponent(properties?: {}): any;
/**
* @description
* The registered callback function called when a change event occurs on the form elements.
*/
_onChange: (value: any) => void;
/**
* @description
* The registered callback function called when a blur event occurs on the form elements.
*/
_onTouched: () => any;
/** @description Sets or gets the animation mode. Animation is disabled when the property is set to 'none' */
get animation(): Animation | string;
set animation(value: Animation | string);
/** @description With the coerce property true and clicking the track, the thumb and value are moved and set to the nearest value allowed by the interval property. */
get coerce(): boolean;
set coerce(value: boolean);
/** @description Sets or gets whether custom ticks at (possibly) uneven interval will be plotted. The ticks to be plotted are defined with the property customTicks. */
get customInterval(): boolean;
set customInterval(value: boolean);
/** @description If customInterval is enabled, sets a list of ticks to be plotted. If coerce is set to true, the value will snap to these ticks. */
get customTicks(): number[];
set customTicks(value: number[]);
/** @description Sets or gets the pattern which labels are displayed in when mode is 'date'. */
get dateLabelFormatString(): string;
set dateLabelFormatString(value: string);
/** @description Sets or gets the char to use as the decimal separator in numeric values. */
get decimalSeparator(): string;
set decimalSeparator(value: string);
/** @description Enables or disables the widget. */
get disabled(): boolean;
set disabled(value: boolean);
/** @description Enables or disables incrementing/decrementing the value using the mouse wheel in jqxSlider. */
get enableMouseWheelAction(): boolean;
set enableMouseWheelAction(value: boolean);
/** @description Determines what values the thumb snaps to. */
get interval(): string | number;
set interval(value: string | number);
/** @description Sets the direction of the slider. If is true - positions of the slider's begin and end are changed. */
get inverted(): boolean;
set inverted(value: boolean);
/** @description A callback function that can be used to format the values displayed on the slider labels and tooltip. */
get labelFormatFunction(): any;
set labelFormatFunction(value: any);
/** @description Sets or gets the widget's label visibility. */
get labelsVisibility(): LabelsVisibility | string;
set labelsVisibility(value: LabelsVisibility | string);
/** @description Sets or gets the unlockKey which unlocks the product. */
get unlockKey(): string;
set unlockKey(value: string);
/** @description Sets or gets the locale. Used in conjunction with the property messages. */
get locale(): string;
set locale(value: string);
/** @description Callback, related to localization module. */
get localizeFormatFunction(): any;
set localizeFormatFunction(value: any);
/** @description Enables or disables the usage of logarithmic scale in the widget. */
get logarithmicScale(): boolean;
set logarithmicScale(value: boolean);
/** @description Sets or gets the maximum value of the widget. */
get max(): string | number;
set max(value: string | number);
/** @description Sets or gets the type of used mechanical action. */
get mechanicalAction(): DragMechanicalAction | string;
set mechanicalAction(value: DragMechanicalAction | string);
/** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */
get messages(): any;
set messages(value: any);
/** @description Sets or gets the minimum value of the widget. */
get min(): string | number;
set min(value: string | number);
/** @description Sets or gets whether the widget works with numbers or dates. */
get mode(): ScaleMode | string;
set mode(value: ScaleMode | string);
/** @description Sets or gets the element's name, which is used as a reference when the data is submitted. */
get name(): string;
set name(value: string);
/** @description Sets the orientation of the widget. */
get orientation(): Orientation | string;
set orientation(value: Orientation | string);
/** @description Determines the number of digits after the decimal point. Applicable only when scaleType is 'integer'. */
get precisionDigits(): number;
set precisionDigits(value: number);
/** @description Enables or disables the slider to be in range mode. If is set to true, the range is represented between two thumbs. */
get rangeSlider(): boolean;
set rangeSlider(value: boolean);
/** @description When the slider is read only the users cannot drag or click in the fill of the slider. */
get readonly(): boolean;
set readonly(value: boolean);
/** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */
get rightToLeft(): boolean;
set rightToLeft(value: boolean);
/** @description Sets the position of the widget's scales. */
get scalePosition(): ScalePosition | string;
set scalePosition(value: ScalePosition | string);
/** @description Sets the type of the slider's scale. */
get scaleType(): ScaleType | string;
set scaleType(value: ScaleType | string);
/** @description Enables or disables scientific notation. */
get scientificNotation(): boolean;
set scientificNotation(value: boolean);
/** @description Enables or disables displaying of the buttons. */
get showButtons(): boolean;
set showButtons(value: boolean);
/** @description Enables or disables displaying of the thumb label. */
get showThumbLabel(): boolean;
set showThumbLabel(value: boolean);
/** @description Enables or disables displaying of the tooltip. */
get showTooltip(): boolean;
set showTooltip(value: boolean);
/** @description Enables or disables displaying of the units. */
get showUnit(): boolean;
set showUnit(value: boolean);
/** @description Determining how many significant digits are in a number. Applicable only when scaleType is 'integer'. */
get significantDigits(): number;
set significantDigits(value: number);
/** @description Sets or gets the element's visual theme. */
get theme(): string;
set theme(value: string);
/** @description Sets or gets the position of the thumb label. */
get thumbLabelPosition(): Position | string;
set thumbLabelPosition(value: Position | string);
/** @description Sets or gets the position of the ticks in jqxSlider widget. */
get ticksPosition(): TicksPosition | string;
set ticksPosition(value: TicksPosition | string);
/** @description Sets or gets the visibility of the ticks. */
get ticksVisibility(): TicksVisibility | string;
set ticksVisibility(value: TicksVisibility | string);
/** @description Sets or gets the position of the tooltip in jqxSlider widget. */
get tooltipPosition(): Position | string;
set tooltipPosition(value: Position | string);
/** @description Sets or gets if the element can be focused. */
get unfocusable(): boolean;
set unfocusable(value: boolean);
/** @description Sets or gets the name of unit used in jqxSlider widget. */
get unit(): string;
set unit(value: string);
/** @description Sets the value's validation by min/max. If 'strict' is applied, the value is always validated by min and max. If 'interaction' is applied, programmatic value changes are not coerced to min/max and if min/max are changed, resulting in the current value being out of range, the value is not coerced, and no change event is fired. */
get validation(): Validation | string;
set validation(value: Validation | string);
/** @description Sets or gets the value of the jqxSlider widget. The property is used when the rangeSlider property is set to false. */
get value(): any;
set value(value: any);
/** @description Sets or gets the value of the jqxSlider widget. The property is used when the rangeSlider property is set to true. */
get values(): number[];
set values(value: number[]);
/** @description Sets or gets the word length. Applicable only when scaleType is 'integer'. */
get wordLength(): WordLength | string;
set wordLength(value: WordLength | string);
/** @description This event is triggered when the value of the slider is changed.
* @param event. The custom event. Custom event was created with: event.detail( value, oldValue)
* value - A numeric value indicating the scroll position.
* oldValue - A numeric value indicating the previous scroll position.
*/
onChange: EventEmitter<CustomEvent>;
/** @description Focuses the slider.
*/
focus(): void;
/** @description Gets the optimal size of the widget.
* @returns {any}
*/
getOptimalSize(): Promise<any>;
getOptimalSizeSync(): any;
/** @description Get/set the value of the slider.
* @param {string | number | number[] | string[]} value?. The value to be set. If no parameter is passed, returns the displayed value of the slider.
* @returns {string}
*/
val(value?: any): Promise<any>;
valSync(value?: any): string;
get isRendered(): boolean;
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
_initialChange: boolean;
get ngValue(): any;
set ngValue(value: any);
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
ngOnChanges(changes: SimpleChanges): void;
/** @description Add event listeners. */
private listen;
/** @description Remove event listeners. */
private unlisten;
static ɵfac: i0.ɵɵFactoryDeclaration<SliderComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SliderComponent, "smart-slider, [smart-slider]", ["smart-slider"], { "animation": "animation"; "coerce": "coerce"; "customInterval": "customInterval"; "customTicks": "customTicks"; "dateLabelFormatString": "dateLabelFormatString"; "decimalSeparator": "decimalSeparator"; "disabled": "disabled"; "enableMouseWheelAction": "enableMouseWheelAction"; "interval": "interval"; "inverted": "inverted"; "labelFormatFunction": "labelFormatFunction"; "labelsVisibility": "labelsVisibility"; "unlockKey": "unlockKey"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "logarithmicScale": "logarithmicScale"; "max": "max"; "mechanicalAction": "mechanicalAction"; "messages": "messages"; "min": "min"; "mode": "mode"; "name": "name"; "orientation": "orientation"; "precisionDigits": "precisionDigits"; "rangeSlider": "rangeSlider"; "readonly": "readonly"; "rightToLeft": "rightToLeft"; "scalePosition": "scalePosition"; "scaleType": "scaleType"; "scientificNotation": "scientificNotation"; "showButtons": "showButtons"; "showThumbLabel": "showThumbLabel"; "showTooltip": "showTooltip"; "showUnit": "showUnit"; "significantDigits": "significantDigits"; "theme": "theme"; "thumbLabelPosition": "thumbLabelPosition"; "ticksPosition": "ticksPosition"; "ticksVisibility": "ticksVisibility"; "tooltipPosition": "tooltipPosition"; "unfocusable": "unfocusable"; "unit": "unit"; "validation": "validation"; "value": "value"; "values": "values"; "wordLength": "wordLength"; }, { "onChange": "onChange"; }, never>;
}