179 lines
6.0 KiB
TypeScript
179 lines
6.0 KiB
TypeScript
import { ChangeDetectorRef, ElementRef, EventEmitter, Renderer2 } from '@angular/core';
|
|
import { VoidListener } from 'primeng/ts-helpers';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "@angular/common";
|
|
export declare const KNOB_VALUE_ACCESSOR: any;
|
|
/**
|
|
* Knob is a form component to define number inputs with a dial.
|
|
* @group Components
|
|
*/
|
|
export declare class Knob {
|
|
private document;
|
|
private renderer;
|
|
private cd;
|
|
private el;
|
|
/**
|
|
* Style class of the component.
|
|
* @group Props
|
|
*/
|
|
styleClass: string | undefined;
|
|
/**
|
|
* Inline style of the component.
|
|
* @group Props
|
|
*/
|
|
style: {
|
|
[klass: string]: any;
|
|
} | null | undefined;
|
|
/**
|
|
* Defines a string that labels the input for accessibility.
|
|
* @group Props
|
|
*/
|
|
ariaLabel: string | undefined;
|
|
/**
|
|
* Specifies one or more IDs in the DOM that labels the input field.
|
|
* @group Props
|
|
*/
|
|
ariaLabelledBy: string | undefined;
|
|
/**
|
|
* Index of the element in tabbing order.
|
|
* @group Props
|
|
*/
|
|
tabindex: number;
|
|
/**
|
|
* Background of the value.
|
|
* @group Props
|
|
*/
|
|
valueColor: string;
|
|
/**
|
|
* Background color of the range.
|
|
* @group Props
|
|
*/
|
|
rangeColor: string;
|
|
/**
|
|
* Color of the value text.
|
|
* @group Props
|
|
*/
|
|
textColor: string;
|
|
/**
|
|
* Template string of the value.
|
|
* @group Props
|
|
*/
|
|
valueTemplate: string;
|
|
/**
|
|
* Name of the input element.
|
|
* @group Props
|
|
*/
|
|
name: string | undefined;
|
|
/**
|
|
* Size of the component in pixels.
|
|
* @group Props
|
|
*/
|
|
size: number;
|
|
/**
|
|
* Step factor to increment/decrement the value.
|
|
* @group Props
|
|
*/
|
|
step: number;
|
|
/**
|
|
* Mininum boundary value.
|
|
* @group Props
|
|
*/
|
|
min: number;
|
|
/**
|
|
* Maximum boundary value.
|
|
* @group Props
|
|
*/
|
|
max: number;
|
|
/**
|
|
* Width of the knob stroke.
|
|
* @group Props
|
|
*/
|
|
strokeWidth: number;
|
|
/**
|
|
* When present, it specifies that the component should be disabled.
|
|
* @group Props
|
|
*/
|
|
disabled: boolean | undefined;
|
|
/**
|
|
* Whether the show the value inside the knob.
|
|
* @group Props
|
|
*/
|
|
showValue: boolean;
|
|
/**
|
|
* When present, it specifies that the component value cannot be edited.
|
|
* @group Props
|
|
*/
|
|
readonly: boolean;
|
|
/**
|
|
* Callback to invoke on value change.
|
|
* @param {number} value - New value.
|
|
* @group Emits
|
|
*/
|
|
onChange: EventEmitter<number>;
|
|
radius: number;
|
|
midX: number;
|
|
midY: number;
|
|
minRadians: number;
|
|
maxRadians: number;
|
|
value: number;
|
|
windowMouseMoveListener: VoidListener;
|
|
windowMouseUpListener: VoidListener;
|
|
windowTouchMoveListener: VoidListener;
|
|
windowTouchEndListener: VoidListener;
|
|
onModelChange: Function;
|
|
onModelTouched: Function;
|
|
constructor(document: Document, renderer: Renderer2, cd: ChangeDetectorRef, el: ElementRef);
|
|
mapRange(x: number, inMin: number, inMax: number, outMin: number, outMax: number): number;
|
|
onClick(event: MouseEvent): void;
|
|
updateValue(offsetX: number, offsetY: number): void;
|
|
updateModel(angle: number, start: number): void;
|
|
onMouseDown(event: MouseEvent): void;
|
|
onMouseUp(event: MouseEvent): void;
|
|
onTouchStart(event: TouchEvent): void;
|
|
onTouchEnd(event: TouchEvent): void;
|
|
onMouseMove(event: MouseEvent): void;
|
|
onTouchMove(event: Event): void;
|
|
updateModelValue(newValue: any): void;
|
|
onKeyDown(event: KeyboardEvent): void;
|
|
writeValue(value: any): void;
|
|
registerOnChange(fn: Function): void;
|
|
registerOnTouched(fn: Function): void;
|
|
setDisabledState(val: boolean): void;
|
|
containerClass(): {
|
|
'p-knob p-component': boolean;
|
|
'p-disabled': boolean;
|
|
};
|
|
rangePath(): string;
|
|
valuePath(): string;
|
|
zeroRadians(): number;
|
|
valueRadians(): number;
|
|
minX(): number;
|
|
minY(): number;
|
|
maxX(): number;
|
|
maxY(): number;
|
|
zeroX(): number;
|
|
zeroY(): number;
|
|
valueX(): number;
|
|
valueY(): number;
|
|
largeArc(): 0 | 1;
|
|
sweep(): 0 | 1;
|
|
valueToDisplay(): string;
|
|
get _value(): number;
|
|
static ɵfac: i0.ɵɵFactoryDeclaration<Knob, never>;
|
|
static ɵcmp: i0.ɵɵComponentDeclaration<Knob, "p-knob", never, { "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "valueColor": { "alias": "valueColor"; "required": false; }; "rangeColor": { "alias": "rangeColor"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "valueTemplate": { "alias": "valueTemplate"; "required": false; }; "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "step": { "alias": "step"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showValue": { "alias": "showValue"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
|
|
static ngAcceptInputType_tabindex: unknown;
|
|
static ngAcceptInputType_size: unknown;
|
|
static ngAcceptInputType_step: unknown;
|
|
static ngAcceptInputType_min: unknown;
|
|
static ngAcceptInputType_max: unknown;
|
|
static ngAcceptInputType_strokeWidth: unknown;
|
|
static ngAcceptInputType_disabled: unknown;
|
|
static ngAcceptInputType_showValue: unknown;
|
|
static ngAcceptInputType_readonly: unknown;
|
|
}
|
|
export declare class KnobModule {
|
|
static ɵfac: i0.ɵɵFactoryDeclaration<KnobModule, never>;
|
|
static ɵmod: i0.ɵɵNgModuleDeclaration<KnobModule, [typeof Knob], [typeof i1.CommonModule], [typeof Knob]>;
|
|
static ɵinj: i0.ɵɵInjectorDeclaration<KnobModule>;
|
|
}
|