smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
216 lines (215 loc) • 13.8 kB
TypeScript
import { Gauge } from './../index';
import { GaugeAnalogDisplayType, Animation, GaugeDigitalDisplayPosition, LabelsVisibility, DragMechanicalAction, ScaleMode, GaugeNeedlePosition, GaugeScalePosition, ScaleType, GaugeSizeMode, 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 { GaugeAnalogDisplayType, Animation, GaugeDigitalDisplayPosition, LabelsVisibility, DragMechanicalAction, ScaleMode, GaugeNeedlePosition, GaugeScalePosition, ScaleType, GaugeSizeMode, TicksPosition, TicksVisibility, Validation, WordLength, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { Gauge } from './../index';
export declare class GaugeComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {
constructor(ref: ElementRef<Gauge>);
private eventHandlers;
nativeElement: Gauge;
/** @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 Determines the type of gauge's indicator. */
get analogDisplayType(): GaugeAnalogDisplayType | string;
set analogDisplayType(value: GaugeAnalogDisplayType | string);
/** @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 Sets or gets gauge's animation duration. Applicable only when animation is not 'none'. */
get animationDuration(): number;
set animationDuration(value: number);
/** @description With the coerce property true, the value is 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 Determines the date pattern of the labels 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 digital display of the element. */
get digitalDisplay(): boolean;
set digitalDisplay(value: boolean);
/** @description Sets the position of the digital display inside the element. */
get digitalDisplayPosition(): GaugeDigitalDisplayPosition | string;
set digitalDisplayPosition(value: GaugeDigitalDisplayPosition | string);
/** @description Enables or disables the element. */
get disabled(): boolean;
set disabled(value: boolean);
/** @description Callback function which allows rendering of a custom needle. Applicable only to analogDisplayType needle. */
get drawNeedle(): any;
set drawNeedle(value: any);
/** @description Sets or gets Gauge's end angle. This property specifies the end of the gauge's scale and is measured in degrees. */
get endAngle(): number;
set endAngle(value: number);
/** @description When cooerce property is true, all values coerce to the interval's value. */
get interval(): number;
set interval(value: number);
/** @description Sets the direction of the gauge. If true - the positions of the gauge's start and end are switched. */
get inverted(): boolean;
set inverted(value: boolean);
/** @description A callback function that can be used to format the values displayed inside the gauge labels. */
get labelFormatFunction(): any;
set labelFormatFunction(value: any);
/** @description Determines the visibility of the labels inside the element. */
get labelsVisibility(): LabelsVisibility | string;
set labelsVisibility(value: LabelsVisibility | string);
/** @description Sets or gets the license which unlocks the product. */
get license(): string;
set license(value: string);
/** @description Sets or gets the locale. Used in conjunction with the property messages. */
get locale(): string;
set locale(value: string);
/** @description Callback used to customize the format of the messages that are returned from the Localization Module. */
get localizeFormatFunction(): any;
set localizeFormatFunction(value: any);
/** @description Enables or disables the usage of logarithmic scale in the element. */
get logarithmicScale(): boolean;
set logarithmicScale(value: boolean);
/** @description Determines the maximum value for the scale of the element. */
get max(): number;
set max(value: number);
/** @description Determines when the value of the element is updated. */
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 Determines the minimum value for the scale of the element. */
get min(): number;
set min(value: number);
/** @description Determines whether the element 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 Determines the position of the needle when analogDisplayType is 'needle'. */
get needlePosition(): GaugeNeedlePosition | string;
set needlePosition(value: GaugeNeedlePosition | string);
/** @description Determines the number of digits after the decimal point. Applicable only when scaleType is 'floatingPoint'. */
get precisionDigits(): number;
set precisionDigits(value: number);
/** @description This property represents an array of objects. Each object is a different range. The range is a colored area with specific size. */
get ranges(): {
startValue: number;
endValue: number;
className: string;
}[];
set ranges(value: {
startValue: number;
endValue: number;
className: string;
}[]);
/** @description When the element is read only the users cannot interact with it. */
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. If enabled, the scale is inverted and the labels and digital display are oriented from right to left. */
get rightToLeft(): boolean;
set rightToLeft(value: boolean);
/** @description Determines the position of the scale in the element. */
get scalePosition(): GaugeScalePosition | string;
set scalePosition(value: GaugeScalePosition | string);
/** @description Determines the type of the gauge's value and scale. */
get scaleType(): ScaleType | string;
set scaleType(value: ScaleType | string);
/** @description Enables or disables scientific notation. */
get scientificNotation(): boolean;
set scientificNotation(value: boolean);
/** @description This property indicates whether the gauge ranges are visible or not. */
get showRanges(): boolean;
set showRanges(value: boolean);
/** @description Enables or disables displaying of 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 | null;
set significantDigits(value: number | null);
/** @description Determines how the Gauge will size. */
get sizeMode(): GaugeSizeMode | string;
set sizeMode(value: GaugeSizeMode | string);
/** @description Sets or gets gauge's start angle. This property specifies the beggining of the gauge's scale and is measured in degrees. */
get startAngle(): number;
set startAngle(value: number);
/** @description Sets or gets the element's visual theme. */
get theme(): string;
set theme(value: string);
/** @description Determines the position of the ticks in the Gauge. */
get ticksPosition(): TicksPosition | string;
set ticksPosition(value: TicksPosition | string);
/** @description Determines the visibility of the ticks. */
get ticksVisibility(): TicksVisibility | string;
set ticksVisibility(value: TicksVisibility | 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 for the values on the scale of the element. */
get unit(): string;
set unit(value: string);
/** @description Sets the value's validation by min/max. */
get validation(): Validation | string;
set validation(value: Validation | string);
/** @description Sets or gets the value of the element. The value can be a date only when scaleType is 'date'. */
get value(): string | number | Date;
set value(value: string | number | Date);
/** @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 element is changed.
* @param event. The custom event. Custom event was created with: event.detail( oldValue, value)
* oldValue - The previous value of the element.
* value - The new value of the element.
*/
onChange: EventEmitter<CustomEvent>;
/** @description Focuses the element.
*/
focus(): void;
/** @description Gets the optimal size of the element (the current width and the height based on the plotted internal elements).
* @returns {any}
*/
getOptimalSize(): Promise<any>;
/** @description Get/set the value of the gauge.
* @param {string | number | Date} value?. The value to be set. If no parameter is passed, returns the current value of the gauge. The value can be a date only when <b>scaleType</b> is 'date'.
* @returns {string}
*/
val(value?: any): Promise<any>;
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<GaugeComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<GaugeComponent, "smart-gauge, [smart-gauge]", ["smart-gauge"], { "analogDisplayType": "analogDisplayType"; "animation": "animation"; "animationDuration": "animationDuration"; "coerce": "coerce"; "customInterval": "customInterval"; "customTicks": "customTicks"; "dateLabelFormatString": "dateLabelFormatString"; "decimalSeparator": "decimalSeparator"; "digitalDisplay": "digitalDisplay"; "digitalDisplayPosition": "digitalDisplayPosition"; "disabled": "disabled"; "drawNeedle": "drawNeedle"; "endAngle": "endAngle"; "interval": "interval"; "inverted": "inverted"; "labelFormatFunction": "labelFormatFunction"; "labelsVisibility": "labelsVisibility"; "license": "license"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "logarithmicScale": "logarithmicScale"; "max": "max"; "mechanicalAction": "mechanicalAction"; "messages": "messages"; "min": "min"; "mode": "mode"; "name": "name"; "needlePosition": "needlePosition"; "precisionDigits": "precisionDigits"; "ranges": "ranges"; "readonly": "readonly"; "rightToLeft": "rightToLeft"; "scalePosition": "scalePosition"; "scaleType": "scaleType"; "scientificNotation": "scientificNotation"; "showRanges": "showRanges"; "showUnit": "showUnit"; "significantDigits": "significantDigits"; "sizeMode": "sizeMode"; "startAngle": "startAngle"; "theme": "theme"; "ticksPosition": "ticksPosition"; "ticksVisibility": "ticksVisibility"; "unfocusable": "unfocusable"; "unit": "unit"; "validation": "validation"; "value": "value"; "wordLength": "wordLength"; }, { "onChange": "onChange"; }, never>;
}