import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; import 'round-slider'; import { IBaseEventData, IBaseHandleEventData, IBaseMoveEventData, IBeforeValueChangeEventData, ISliderEvents, ISliderOptions, ISliderProperties, IUpdateEventData, IValueChangeEventData } from '../../models/interfaces'; import { SliderId, SliderPropertyValue } from '../../models/types'; import * as i0 from "@angular/core"; /** * Slider component that allows the user to select a value or range of values. * * {@link https://roundsliderui.com/ JQuery Plugin} which implemented as Angular component. */ export declare class NgRoundSliderComponent implements ISliderProperties, Pick, OnInit, AfterViewInit, OnChanges, OnDestroy { /** Slider div id */ id: SliderId; /** * Enables or disables the handle movement animation. * * As the control uses the CSS3 animation, so you can use any CSS3 transition effects to customize the animation type and speed. To know how to use custom animation check here {@link https://roundsliderui.com/demos.html#custom-animation here}. */ animation: ISliderOptions['animation']; /** Indicates the width (or thickness) of the slider. */ width: ISliderOptions['width']; /** Indicates the circle shape to be render. The available circle shapes are: * * full * * half-top * * half-bottom * * half-left * * half-right * * quarter-top-left * * quarter-top-right * * quarter-bottom-right * * quarter-bottom-left * * pie * * custom-half * * custom-quarter */ circleShape: ISliderOptions['circleShape']; /** * Sets the disable state or enable state of the control. While the control in the disable state we can't interact with this. * * And in disable mode the control looks like in the blured state. */ disabled: ISliderOptions['disabled']; /** Enables the editable option of tooltip. When this property set as true, we can change the value by editing the tooltip. */ editableTooltip: ISliderOptions['editableTooltip']; /** * Indicates the end point of the slider. * * Multiple format supported: * * **180** : Sets the fixed value, where the endAngle is 180°. * * **"+180"** : This is dependent to startAngle property. If the startAngle is 90° then the endAngle considered as 270°. * * **"-90"** : This is also dependent to startAngle property. If the startAngle is 180° then the endAngle considered as 90°. * * The endAngle property is applicable for "full" circle shape only. */ endAngle: ISliderOptions['endAngle']; /** * The handleSize property mentions the size of the handle. * * Multiple format supported: * * **22** : Sets the fixed size, where the handle's height and width considered as 22. * * **"30,10"** : Sets the fixed size, where the handle's height considered as 30 and width considered as 10. * * **"+4"** : This is dependent to width property. If the width is 20 then the handleSize considered as 24. * * **"-4"** : This is also dependent to width property. If the width is 20 then the handleSize considered as 16. */ handleSize: ISliderOptions['handleSize']; /** * The handleShape property mentions the shape of the handle. Currently the following types are available: * * **round** * * **dot** * * **square** * * In addition you can make your own handle shape by customizing this. Please check {@link https://roundsliderui.com/demos.html#custom-handle-shape here} for handle customization. */ handleShape: ISliderOptions['handleShape']; /** * Enables or disables the keyboard functionality. * * The slider value can be changed through the keyboard by using the arrow keys (Up, Down, Left, Right) and Home, Down keys. */ keyboardAction: ISliderOptions['keyboardAction']; /** * The lineCap property mentions the shape at the end part of the path. This is not applicable for the "full" circle shape, except this all other circle shapes supports lineCap. * * The possible inputs for this property is: * * **square** * * **round** * * **butt** */ lineCap: ISliderOptions['lineCap']; /** The max property indicates the maximum value of the slider. */ max: ISliderOptions['max']; /** The min property indicates the minimum value of the slider. */ min: ISliderOptions['min']; /** * Enables or disables the mouse scroll functionality. * * The slider value can be changed through the mouse scrolling. */ mouseScrollAction: ISliderOptions['mouseScrollAction']; /** * The radius property indicates the radius of the slider's circle. * * Note : The height and width of the control considered as (2 * radius). */ radius: ISliderOptions['radius']; /** This enables the control into the readOnly mode, so we can can't interact with the control when readOnly enabled. */ readOnly: ISliderOptions['readOnly']; /** Enables or disables the tooltip inside the slider. */ showTooltip: ISliderOptions['showTooltip']; /** * Indicates the slider type to be render. The available slider types are: * * **default** * * **min-range** * * **range** */ sliderType: ISliderOptions['sliderType']; /** * Indicates the starting point of the slider. * * The startAngle property is applicable for "full", "custom-half", "custom-quarter" and "pie" circle shapes only. */ startAngle: ISliderOptions['startAngle']; /** * This property decides at which point the slider should start. Otherwise, by default the slider starts with min value. * * This is mainly used for min-range slider, where you can customize the min-range start position. */ startValue: ISliderOptions['startValue']; /** Decides the number of steps or value should take while we move the handle. */ step: ISliderOptions['step']; /** * Sets or gets the value of the slider. * * For default and min-range slider the property allows a single value (ex: value - 10) * For range slider the property allows two values separated by comma (ex: value - "30,60"). */ value: ISliderOptions['value']; /** * This will enables the slider into the SVG mode. * * Through SVG mode you can do a lot of customization, and it will resolve all the legacy issues. * * Note : It is recommended to use the SVG mode for better usability and customization. */ svgMode: ISliderOptions['svgMode']; /** * Indicates the border width of the slider. * * Note : This is only applicable for {@link https://roundsliderui.com/document.html#svgMode SVG mode} */ borderWidth: ISliderOptions['borderWidth']; /** Sets the border color of the slider. */ borderColor: ISliderOptions['borderColor']; /** Sets the path color of the slider. */ pathColor: ISliderOptions['pathColor']; /** Sets the range color of the slider. */ rangeColor: ISliderOptions['rangeColor']; /** Sets the tooltip color of the slider. */ tooltipColor: ISliderOptions['tooltipColor']; /** * This event will act as a callback. So you can customize the tooltip template by returning with the custom values here. * * Check the below demo for better understanding: * * {@link https://roundsliderui.com/demos.html#custom-tooltip Custom Tooltip} */ tooltipFormat: ISliderEvents['tooltipFormat']; /** * This event triggered before the control will initialize. * * At this point we can change the control's settings. And also this event can be cancellable, so we can prevent the control creation by 'return false'. */ readonly beforeCreate: EventEmitter>; /** This event triggered after the control creation or initialization. */ readonly create: EventEmitter>; /** This event triggered when the user starts to drag the handle. */ readonly start: EventEmitter>; /** This event triggered when the user stops from sliding the handle / when releasing the handle. */ readonly stop: EventEmitter>; /** * This event will be triggered before the value change happens. * * And this event can be cancellable. So whenever you want to restrict the slider for particular values at that time this will be useful. */ readonly beforeValueChange: EventEmitter; /** This event triggered when the user moving the handle. On each mouse move the drag event will trigger. */ readonly drag: EventEmitter>; /** This event triggered when the slider's value gets change. */ readonly change: EventEmitter>; /** * This event is the combination of 'drag' and 'change' events. * * Simply, whenever the slider value gets updated through the user interaction at that time it will be triggered. */ readonly update: EventEmitter; /** This event is similar to 'update' event, in addition it will trigger even the value was changed through programmatically also. */ readonly valueChange: EventEmitter; /** Slider element */ private get sliderElement(); /** Slider control */ private get sliderControl(); /** Initialization */ private init; /** Updating properties according to changes */ private refresh; ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; ngAfterViewInit(): void; /** Receiving property value */ getProperty(property: keyof ISliderProperties): SliderPropertyValue | undefined; /** Setting property value */ setProperty(property: keyof ISliderProperties, value: SliderPropertyValue): void; /** * This method is used to set the value to the slider control. * * Note : This method accepts the following possible parameters. * * **setValue(value)** : This will set the corresponding value to the slider handle. * * **setValue(value, index)** : This is only applicable for range slider, which sets the value to the corresponding handle.Here the possible value of index is 1 or 2 only. */ setValue(value: number | string, index?: number): void; /** * This method is used to get the value from the slider control. * * Note : This method accepts the following possible parameters. * * **getValue()** : Without any parameter, it will return the current slider value. * * **getValue(index)** : This is only applicable for range slider, which returns the value of the corresponding handle. Here the possible value of index is 1 or 2 only. */ getValue(index?: number): ISliderOptions['value'] | undefined; /** * This method is used to refresh the tooltip position, when it is misaligned. * * Mostly when you render the slider at 'display: none' mode then the tooltip may misaligned. At this point, if needed then you can refresh the tooltip once when the slider become 'display: block'. * * Hint : * * More likely, with the above mentioned situation, when you are using tooltip as custom template then only you may need to think about this. * Rest of the times you don't need to worry about this. */ refreshTooltip(): void; /** * Disables the slider control. * * Note : This method does not accept any parameters. */ disable(): void; /** * Enables the slider control. * * Note : This method does not accept any parameters. */ enable(): void; /** * Destroys the slider control and reverts the control element to the initial state. * * Note : This method does not accept any parameters. */ destroy(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }