@ruc-lib/knob 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,107 +2,157 @@
2
2
 
3
3
  A component for creating a custom knob with different shapes like arc, vertical slider & horizontal slider where user can adjust the value by sliding a handle on arc or by sliding a handle on vertical or horizonatl slider.
4
4
 
5
- # Features
6
-
7
- - User is allowed to add the knob of their choise from any of these: Arc, Vertical or Horizontal slider.
8
- - User is allowed to adjust the width (stroke) of the arc or slider line.
9
- - User is allowed to set size, color and width of the knob.
10
- - User is allowed to set the font-size, weight and color of value text.
11
- - User is allowed to set min and max value of range.
12
- - User is allowed to custom text before and after the value.
13
- - User is allowed to toggle the visibility of custom buttons to increment and decrement the value.
14
- - User is allowed to toggle the readonly and disabled mode.
15
- - User is allowed to toggle the visibility of tooltip.
16
- - User is allowed to adjust the value by using arrow keys of keyboard.
17
- - User is allowed to do some actions on these events onBlur, onFocus, onChange, onDragStart & onDragEnd.
18
-
19
-
20
5
  # Installation guide
21
6
 
22
- # Install complete library
23
-
24
- `npm install @uxpractice/ruc-lib`
25
-
26
- # Install individual component
27
-
28
- If users only need the knob component, they can install it separately
29
- `npm install @ruc-lib/knob`
30
-
31
- # Usage
32
-
33
- here path of the scss file is subject to change as per choice of the installation
7
+ To use the Knob component, you can install the entire RUC library or just this specific component.
34
8
 
35
- for library
36
- `@import "../node_modules/@ruc-lib/knob/lib/knob.scss";`
37
-
38
- for seperate package
39
- `@import "../node_modules/@uxpractice/ruc-lib/knob/lib/knob.scss";`
9
+ ### Install the Entire Library
10
+ ```bash
11
+ npm install @uxpractice/ruc-lib
12
+ ```
40
13
 
41
- # import required modules
14
+ ### Install Individual Component
42
15
 
43
- for library
44
- `import { RuclibKnobModule } from '@uxpractice/ruc-lib/knob';`
16
+ If you only need the Knob component
17
+ ```bash
18
+ npm install @ruc-lib/knob
19
+ ```
45
20
 
46
- for seperate package
47
- `import { RuclibKnobModule } from '@ruc-lib/knob';`
21
+ ## Usage
22
+ ### 1. Import the Module
23
+ In your Angular module file (e.g., `app.module.ts`), import the `RuclibKnobModule`:
24
+
25
+ ```typescript
26
+ // For Complete Library
27
+ import { RuclibKnobModule } from '@uxpractice/ruc-lib/knob';
28
+
29
+ // For Individual Package
30
+ import { RuclibKnobModule } from '@ruc-lib/knob';
31
+
32
+ import { AppComponent } from './app.component';
33
+ import { NgModule } from '@angular/core';
34
+ import { BrowserModule } from '@angular/platform-browser';
35
+
36
+ @NgModule({
37
+ declarations: [AppComponent],
38
+ imports: [
39
+ BrowserModule,
40
+ RuclibKnobModule
41
+ ],
42
+ providers: [],
43
+ bootstrap: [AppComponent]
44
+ })
45
+ export class AppModule {}
46
+ ```
48
47
 
49
- # use component selector
48
+ ### 2. Use the Component
49
+ In your component's template, use the `<uxp-ruclib-knob>` selector and pass the configuration object to the `rucInputData` input.
50
50
 
51
+ ```html
52
+ <uxp-ruclib-knob
53
+ [rucInputData]="knobConfig"
54
+ [customTheme]="customTheme"
55
+ (rucEvent)="passEvent($event)">
56
+ </uxp-ruclib-knob>
51
57
  ```
52
- <uxp-ruclib-knob [rucInputData]="knobConfig" [customTheme]="customTheme"
53
- (rucEvent)="passEvent($event)"></uxp-ruclib-knob>
54
- ```
55
-
56
58
 
57
- # Input and Output
58
-
59
- # Inputs
60
- rucInputData -> It is the configuration input to configure the knob
61
-
62
- customTheme -> It is the name of the theme.
63
-
64
- # Output
65
-
66
- rucEvent -> is the event which will be fired when any change is made in knob component
67
-
68
- # rucInputData (sample object)
69
-
70
- # Detail definition of the each property can be found in type definition file.
71
-
72
- ```
73
- knobConfig = {
74
- min:<number> 0,
75
- max:<number> 100,
76
- step:<number> 1,
77
- size:<number> 150,
78
- valueColor:<string> '',
79
- strokeBackground:<string> 'lightblue',
80
- progressBackground: <string | string[]> 'blue', // 'green' | ['green'] | ['red', 'blue', 'green', 'black', 'orange'],
81
- strokeWidth:<number> 15,
82
- valueSize:<number> 20,
83
- valueWeight:<string> 'normal',
84
- showHandle:<boolean> true,
85
- handleBackground:<string> 'lightblue',
86
- handleBorderColor:<string> 'blue',
87
- handleBorderWidth:<number> 4,
88
- roundedCorner:<boolean> true,
89
- valuePrefix:<string> '',
90
- valueSuffix:<string> '',
91
- readOnly:<boolean> false,
92
- disabled:<boolean> false,
93
- enableTooltip:<boolean> false,
94
- animateOnHover:<boolean> false,
95
- isRangeMode:<boolean> false,
96
- rangeStartValue:<number> 25,
97
- rangeEndValue:<number> 75,
98
- showButtons:<boolean> false,
99
- knobType:<'horizontal' | 'vertical' | 'arc'> 'arc' // 'horizontal' | 'vertical' | 'arc'
59
+ ## API Reference
60
+
61
+ ### Component Inputs
62
+ | Input | Type | Description |
63
+ |----------------|--------------------|---------------------------------------------------|
64
+ | `rucInputData` | `knobConfig` | The main configuration object for the knob. |
65
+ | `customTheme` | `string` | An optional CSS class for custom theming. |
66
+
67
+ ### Component Outputs
68
+ | Output | Type | Description |
69
+ |-----------|-----------|---------------------------------------------------|
70
+ | `rucEvent`| `any` | Emits events related to knob actions. |
71
+
72
+
73
+ ### knobConfig
74
+
75
+ This is the main configuration object for the Knob component.
76
+ | Property | Type | Description |
77
+ |-----------------------|-------------------------|----------------------------------------------------------------------------------------|
78
+ | `min` | `number` | Sets the minimum value of the knob. |
79
+ | `max` | `number` | Sets the maximum value of the knob. |
80
+ | `step` | `number` | Sets the increment/decrement step for the knob's value. |
81
+ | `size` | `number` | Sets the overall size (width and height) of the knob in pixels. |
82
+ | `valueColor` | `string` | Sets the color of the displayed value text. |
83
+ | `strokeBackground` | `string` | Sets the background color of the knob's track (the non-progress part). |
84
+ | `progressBackground` | `string \| string[]` | Sets the color of the progress indicator. Can be a single color or an array of colors. |
85
+ | `strokeWidth` | `number` | Sets the width of the knob's track and progress indicator. |
86
+ | `valueSize` | `number` | Sets the font size of the displayed value text. |
87
+ | `valueWeight` | `string` | Sets the font weight of the displayed value text (e.g., 'normal', 'bold'). |
88
+ | `showHandle` | `boolean` | Toggles the visibility of the knob's handle. |
89
+ | `handleBackground` | `string` | Sets the background color of the knob's handle. |
90
+ | `handleBorderColor` | `string` | Sets the border color of the knob's handle. |
91
+ | `handleBorderWidth` | `number` | Sets the border width of the knob's handle. |
92
+ | `roundedCorner` | `boolean` | Applies rounded corners to the knob's track and progress. |
93
+ | `valuePrefix` | `string` | Text to display before the value. |
94
+ | `valueSuffix` | `string` | Text to display after the value. |
95
+ | `readOnly` | `boolean` | If true, the knob's value cannot be changed by user interaction. |
96
+ | `disabled` | `boolean` | If true, the knob is completely inactive and unchangeable. |
97
+ | `enableTooltip` | `boolean` | Toggles the visibility of a tooltip displaying the current value on hover/drag. |
98
+ | `animateOnHover` | `boolean` | Enables a subtle animation effect when the user hovers over the knob. |
99
+ | `isRangeMode` | `boolean` | If true, the knob operates in a range selection mode with two handles. |
100
+ | `rangeStartValue` | `number` | Sets the starting value for the range when `isRangeMode` is true. |
101
+ | `rangeEndValue` | `number` | Sets the ending value for the range when `isRangeMode` is true. |
102
+ | `showButtons` | `boolean` | Toggles the visibility of increment and decrement buttons. |
103
+
104
+ ## Example Configuration
105
+
106
+ Here's an example of how to configure the Knob component in your component's TypeScript file.
107
+
108
+ ```typescript
109
+ import { Component } from '@angular/core';
110
+
111
+ // For Complete Library
112
+ import { KnobConfig } from '@uxpractice/ruc-lib/knob';
113
+
114
+ // For Individual package
115
+ import { KnobConfig } from '@ruclib/knob';
116
+
117
+ @Component({
118
+ selector: 'app-root',
119
+ templateUrl: './app.component.html',
120
+ })
121
+ export class AppComponent {
122
+ knobConfig: KnobConfig = {
123
+ min: 0,
124
+ max: 100,
125
+ step: 1,
126
+ size: 200,
127
+ strokeWidth: 20,
128
+ valueWeight: 'bold',
129
+ showHandle: true,
130
+ handleBackground: '#fff',
131
+ handleBorderColor: '#007bff',
132
+ handleBorderWidth: 2,
133
+ roundedCorner: true,
134
+ valuePrefix: '$',
135
+ valueSuffix: '',
136
+ readOnly: false,
137
+ disabled: false,
138
+ enableTooltip: true,
139
+ animateOnHover: true,
140
+ isRangeMode: false,
141
+ rangeStartValue: 0,
142
+ rangeEndValue:100,
143
+ showButtons: true,
100
144
  };
145
+
146
+ passEvent(event: any) {
147
+ console.log('Knob Event:', event);
148
+ }
149
+ }
101
150
  ```
102
151
 
152
+ ## Contribution
103
153
 
104
- # Contribution
105
154
  Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.
106
155
 
107
- # Acknowledgements
108
- Thank you for choosing the Knob Component Library. If you have any feedback or suggestions, please let us know!
156
+ ## Acknowledgements
157
+
158
+ Thank you for choosing the Knob component. If you have any feedback or suggestions, please let us know!
@@ -1,3 +1,3 @@
1
1
  ;
2
2
  export {};
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia25vYi5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3J1Y2xpYi9rbm9iL3NyYy9tb2RlbHMva25vYi5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEJDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBpbnRlcmZhY2UgZm9yIHJldXNhYmxlIGtub2IgY29tcG9uZW50XHJcbmV4cG9ydCBpbnRlcmZhY2UgS25vYkNvbmZpZyB7XHJcbiAgbWluPzogbnVtYmVyO1xyXG4gIG1heD86IG51bWJlcjtcclxuICBzdGVwPzogbnVtYmVyO1xyXG4gIHNpemU/OiBudW1iZXI7XHJcbiAgdmFsdWVDb2xvcj86IHN0cmluZztcclxuICB2YWx1ZVdlaWdodD86IHN0cmluZztcclxuICB2YWx1ZVNpemU/OiBudW1iZXI7XHJcbiAgc3Ryb2tlQmFja2dyb3VuZD86IHN0cmluZztcclxuICBwcm9ncmVzc0JhY2tncm91bmQ/OiBzdHJpbmcgfCBzdHJpbmdbXTtcclxuICBzdHJva2VXaWR0aD86IG51b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XBlIHsnYXJjJyB8ICdob3Jpem9udGFsJyB8ICd2ZXJ0aWNhbCd9XHJcbiAgICogQGRlZmF1bHQgJ2FyYydcclxuICAgKi9cclxuICBrbm9iVHlwZT86ICdhcmMnIHwgJ2hvcml6b250YWwnIHwgJ3ZlcnRpY2FsJztcclxufTtcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgS25vYlJhbmdlVmFsdWUgeyBzdGFydDogbnVtYmVyLCBlbmQ6IG51bWJlciB9XHJcbiJdfQ==
@@ -1 +1 @@
1
- {"version":3,"file":"ruc-lib-knob.mjs","sources":["../../../../../libs/ruclib/knob/src/models/knob-config.model.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.html","../../../../../libs/ruclib/knob/src/lib/ruclib-knob.module.ts","../../../../../libs/ruclib/knob/src/models/knob.interface.ts","../../../../../libs/ruclib/knob/src/ruc-lib-knob.ts"],"sourcesContent":["export const DefaultKnobConfig = {\r\n min:<number> 0,\r\n max:<number> 100,\r\n step:<number> 1,\r\n size:<number> 150,\r\n valueColor:<string> '',\r\n strokeBackground:<string> 'lightblue',\r\n progressBackground: <string | string[]> 'blue', // 'green' | ['green'] | ['red', 'blue', 'green', 'black', 'orange'],\r\n strokeWidth:<number> 15,\r\n valueSize:<number> 20,\r\n valueWeight:<string> 'normal',\r\n showHandle:<boolean> true,\r\n handleBackground:<string> 'lightblue',\r\n handleBorderColor:<string> 'blue',\r\n handleBorderWidth:<number> 4,\r\n roundedCorner:<boolean> true,\r\n valuePrefix:<string> '',\r\n valueSuffix:<string> '',\r\n readOnly:<boolean> false,\r\n disabled:<boolean> false,\r\n enableTooltip:<boolean> false,\r\n animateOnHover:<boolean> false,\r\n isRangeMode:<boolean> false,\r\n rangeStartValue:<number> 25,\r\n rangeEndValue:<number> 75,\r\n showButtons:<boolean> false,\r\n knobType:<'horizontal' | 'vertical' | 'arc'> 'arc' // 'horizontal' | 'vertical' | 'arc'\r\n }\r\n\r\n export const DEFAULT_LABELS = {\r\n incrementButton:<string> 'Increment Value',\r\n decrementButton:<string> 'Decrement Value'\r\n }","import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { KnobConfig } from '../../models/knob.interface';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DEFAULT_LABELS, DefaultKnobConfig } from '../../models/knob-config.model';\r\n\r\n@Component({\r\n selector: 'uxp-ruclib-knob',\r\n templateUrl: './ruclib-knob.component.html',\r\n styleUrls: ['./ruclib-knob.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => RuclibKnobComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class RuclibKnobComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\r\n\r\n @ViewChild('bgArc') bgArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('progressArc') progressArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('handle') handleRef!: ElementRef<SVGCircleElement>;\r\n @ViewChild('horizontalLine') horizontalLineRef!: ElementRef<SVGLineElement>;\r\n @ViewChild('verticalLine') verticalLineRef!: ElementRef<SVGLineElement>;\r\n\r\n @Output() rucEvent = new EventEmitter<any>();\r\n\r\n @Input() customTheme?: string = '';\r\n @Input() rucInputData!: KnobConfig;\r\n\r\n activeHandle: 'start' | 'end' | '' = '';\r\n value: number = 0;\r\n dragging:boolean = false;\r\n centerX:number = 0;\r\n centerY:number = 0;\r\n radius:number = 0;\r\n startAngle:number = 210;\r\n endAngle:number = 510;\r\n arcLength:number = 300;\r\n changeColorAfter:number = 0;\r\n tooltipX:number = 0;\r\n tooltipY:number = 0;\r\n showTooltip: boolean = false;\r\n hovering:boolean = false;\r\n\r\n config = DefaultKnobConfig;\r\n\r\n private onTouched = () => { };\r\n private onChange = (value: number) => { };\r\n\r\n constructor(private cdr: ChangeDetectorRef) {\r\n }\r\n\r\n /**\r\n * handling form control binding to write value\r\n * @param val \r\n */\r\n writeValue(val: number): void {\r\n this.value = val;\r\n }\r\n\r\n /**\r\n * registering onChange method to use as form control\r\n * @param fn \r\n */\r\n registerOnChange(fn: () => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n /**\r\n * registering onTouch method to use as form control\r\n * @param fn \r\n */\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n /**\r\n * registering disabled state\r\n * @param isDisabled \r\n */\r\n setDisabledState(isDisabled: boolean): void {\r\n this.config.disabled = isDisabled;\r\n }\r\n\r\n /**\r\n * handling input data changes\r\n * updating default config with user provided config\r\n * @param changes \r\n */\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes && changes['rucInputData'] && changes['rucInputData'].currentValue) {\r\n this.config = { ...this.config, ...changes['rucInputData'].currentValue }\r\n }\r\n }\r\n\r\n /**\r\n * handling change on component initilization\r\n */\r\n ngOnInit() {\r\n this.adjustDefaultValue();\r\n if (this.config.knobType != 'arc') {\r\n this.config.isRangeMode = false;\r\n this.config.enableTooltip = false;\r\n }\r\n if (Array.isArray(this.config.progressBackground)) {\r\n this.changeColorAfter = Math.round(100 / this.config.progressBackground.length);\r\n }\r\n }\r\n\r\n /**\r\n * handling change after view initilization\r\n */\r\n ngAfterViewInit() {\r\n this.centerX = this.config.size / 2;\r\n this.centerY = this.config.size / 2;\r\n this.radius = this.config.size / 2 - 20;\r\n\r\n this.bgArcRef?.nativeElement.setAttribute('d',\r\n this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, this.endAngle));\r\n this.updateArc();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n /**\r\n * handling change when dragin on svg\r\n * @returns \r\n */\r\n startDrag() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.dragging = true;\r\n this.showTooltip = true;\r\n this.rucEvent.emit({ eventName: 'dragStart', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * rounding value to increment or decrement based on provide config value for step\r\n * @param value \r\n * @returns \r\n */\r\n roundToStep(value: number): number {\r\n const stepped = Math.round((value - this.config.min) / this.config.step) * this.config.step + this.config.min;\r\n return this.clamp(stepped, this.config.min, this.config.max);\r\n }\r\n\r\n /**\r\n * adjusting default value within min & max value when its provide out of range\r\n */\r\n adjustDefaultValue() {\r\n if (this.value < this.config.min) {\r\n this.value = this.config.min;\r\n }\r\n if (this.value > this.config.max) {\r\n this.value = this.config.max;\r\n }\r\n if (this.config.isRangeMode) {\r\n if (this.config.rangeStartValue < this.config.min || this.config.rangeStartValue > this.config.max) {\r\n this.config.rangeStartValue = this.config.min;\r\n }\r\n if (this.config.rangeEndValue > this.config.max || this.config.rangeEndValue < this.config.min) {\r\n this.config.rangeEndValue = this.config.max;\r\n }\r\n }\r\n this.updateArc();\r\n }\r\n\r\n /**\r\n * handle changes on mouseUp and touchEnd event\r\n */\r\n @HostListener('window:mouseup')\r\n @HostListener('window:touchend')\r\n stopDrag() {\r\n this.dragging = false;\r\n this.showTooltip = false;\r\n this.rucEvent.emit({ eventName: 'dragEnd', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * handle changes on mouseMove and touch event\r\n * @param event \r\n * @returns \r\n */\r\n @HostListener('window:mousemove', ['$event'])\r\n @HostListener('window:touchmove', ['$event'])\r\n onMove(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || !this.dragging) return;\r\n event.preventDefault();\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * handling change on main svg click\r\n * @param event \r\n * @returns \r\n */\r\n onSvgClick(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || this.config.isRangeMode) return;\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * get ref of active svg element for different type of knobs\r\n * @returns \r\n */\r\n getTargetSvg(): SVGElement | null {\r\n if (this.config.knobType === 'horizontal') {\r\n return this.horizontalLineRef.nativeElement.closest('svg');\r\n } else\r\n if (this.config.knobType === 'vertical') {\r\n return this.verticalLineRef.nativeElement.closest('svg');\r\n }\r\n return this.bgArcRef.nativeElement.closest('svg');\r\n\r\n }\r\n\r\n /**\r\n * updating progrees value while dragging the handle on stroke bar\r\n * @param e \r\n * @returns \r\n */\r\n setProgressFromEvent(e: MouseEvent | TouchEvent) {\r\n const svg = this.getTargetSvg();\r\n if (!svg) {\r\n return;\r\n }\r\n const rect = svg.getBoundingClientRect();\r\n const clientX = (e instanceof TouchEvent) ? e.touches[0].clientX : e.clientX;\r\n const clientY = (e instanceof TouchEvent) ? e.touches[0].clientY : e.clientY;\r\n\r\n const x = clientX - rect.left;\r\n const y = clientY - rect.top;\r\n\r\n let rawPercent: number;\r\n if (this.config.knobType === 'horizontal') {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = ((x - this.config.strokeWidth) / usableWidth) * 100;\r\n } else if (this.config.knobType === 'vertical') {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = (1 - (y - this.config.strokeWidth) / usableHeight) * 100;\r\n } else {\r\n const angle = this.getAngleFromPoint(x, y);\r\n if (angle === null) return;\r\n rawPercent = ((angle - this.startAngle) / this.arcLength) * 100;\r\n }\r\n\r\n const clampedPercent = this.clamp(rawPercent, 0, 100);\r\n let absolutePercent = this.config.min + (clampedPercent / 100) * (this.config.max - this.config.min);\r\n absolutePercent = this.roundToStep(absolutePercent);\r\n\r\n if (this.config.isRangeMode) {\r\n if (this.activeHandle === 'start') {\r\n if (absolutePercent > this.config.rangeEndValue) {\r\n absolutePercent = this.config.rangeEndValue;\r\n }\r\n this.config.rangeStartValue = absolutePercent;\r\n } else {\r\n if (absolutePercent < this.config.rangeStartValue) {\r\n absolutePercent = this.config.rangeStartValue;\r\n }\r\n this.config.rangeEndValue = absolutePercent;\r\n }\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: { start: this.config.rangeStartValue, end: this.config.rangeEndValue } })\r\n } else {\r\n this.value = absolutePercent;\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: this.value });\r\n }\r\n\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * updating svg progress based on value changes\r\n * @returns \r\n */\r\n updateArc() {\r\n if (this.config.knobType !== 'arc') {\r\n return\r\n }\r\n\r\n const scaled = (this.value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n\r\n const path = this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, angle);\r\n this.progressArcRef?.nativeElement.setAttribute('d', path);\r\n\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n this.handleRef?.nativeElement.setAttribute('cx', pos.x.toString());\r\n this.handleRef?.nativeElement.setAttribute('cy', pos.y.toString());\r\n\r\n // for tooltip\r\n const angleRad = (angle - 90) * Math.PI / 180;\r\n const tooltipRadius = this.radius + this.config.strokeWidth / 2 + 10;\r\n this.tooltipX = this.centerX + tooltipRadius * Math.cos(angleRad);\r\n this.tooltipY = this.centerY + tooltipRadius * Math.sin(angleRad);\r\n }\r\n\r\n /**\r\n * return maximum value out of min & max range\r\n * @param val \r\n * @param min \r\n * @param max \r\n * @returns \r\n */\r\n clamp(val: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, val));\r\n }\r\n\r\n /**\r\n * getting calulated point from polar coordinates to cartesian coordinates\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param angleDeg \r\n * @returns \r\n */\r\n polarToCartesian(cx: number, cy: number, r: number, angleDeg: number) {\r\n const angleRad = (angleDeg - 90) * Math.PI / 180;\r\n return {\r\n x: cx + r * Math.cos(angleRad),\r\n y: cy + r * Math.sin(angleRad)\r\n };\r\n }\r\n\r\n /**\r\n * getting radius for arc handle based on stroke width \r\n * @returns \r\n */\r\n getRadius() {\r\n return this.config.strokeWidth ? (this.config.strokeWidth / 2) - ((this.config.handleBorderWidth ?? 0) / 2) : 4;\r\n }\r\n\r\n /**\r\n * getting svg box size based on different knob shapes\r\n * @returns \r\n */\r\n getSvgViewBoxSize() {\r\n let width = this.config.size, height = this.config.size;\r\n if (this.config.knobType === 'horizontal') {\r\n height = this.config.strokeWidth + 40;\r\n }\r\n if (this.config.knobType === 'vertical') {\r\n height = this.config.size / 4 + 5\r\n width = this.config.strokeWidth + 40;\r\n }\r\n return '0 0 ' + width + ' ' + height\r\n }\r\n\r\n /**\r\n * geeting dynamic bg color for progress stroke based on provide config for \"progressBackground\"\r\n */\r\n get progressColor(): string {\r\n if (typeof this.config.progressBackground === 'string') {\r\n return this.config.progressBackground;\r\n } else\r\n if ((this.config.progressBackground as string[])?.length == 1) {\r\n return this.config.progressBackground[0];\r\n } else\r\n if ((this.config.progressBackground as string[]).length > 1) {\r\n return this.config.progressBackground[Math.ceil(this.value / this.changeColorAfter) - 1]\r\n } else {\r\n return 'green'\r\n }\r\n }\r\n\r\n /**\r\n * getting coordinates for arc based on provided inputs\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param start \r\n * @param end \r\n * @returns \r\n */\r\n describeArc(cx: number, cy: number, r: number, start: number, end: number): string {\r\n const startPos = this.polarToCartesian(cx, cy, r, end);\r\n const endPos = this.polarToCartesian(cx, cy, r, start);\r\n const largeArc = end - start <= 180 ? 0 : 1;\r\n\r\n return [\r\n \"M\", startPos.x, startPos.y,\r\n \"A\", r, r, 0, largeArc, 0, endPos.x, endPos.y\r\n ].join(\" \");\r\n }\r\n\r\n /**\r\n * getting calculated angle for arc progress based on provided input\r\n * @param x \r\n * @param y \r\n * @returns \r\n */\r\n getAngleFromPoint(x: number, y: number): number | null {\r\n const dx = x - this.centerX;\r\n if (dx === 0) {\r\n return null;\r\n }\r\n const dy = y - this.centerY;\r\n\r\n let angle = Math.atan2(dy, dx) * 180 / Math.PI + 90;\r\n if (angle < 0) angle += 360;\r\n\r\n const normalizedStart = this.startAngle % 360;\r\n let delta = angle - normalizedStart;\r\n if (delta < 0) delta += 360;\r\n\r\n if (delta > this.arcLength) return null;\r\n\r\n return this.startAngle + delta;\r\n }\r\n\r\n /**\r\n * increment value on click on button\r\n * @returns \r\n */\r\n increment() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value + this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * decrement value on click on button\r\n * @returns \r\n */\r\n decrement() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value - this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n /**\r\n * change value using arrow keys for accessibility\r\n * @param event \r\n * @returns \r\n */\r\n onKeyDown(event: KeyboardEvent) {\r\n if (this.config.readOnly || this.config.disabled) return;\r\n\r\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\r\n this.increment();\r\n event.preventDefault();\r\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\r\n this.decrement();\r\n event.preventDefault();\r\n }\r\n }\r\n /**\r\n * geeting arc coordinated for range selection mode\r\n * @returns \r\n */\r\n getRangeArcPath(): string {\r\n const startAngle = this.startAngle + (this.config.rangeStartValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n const endAngle = this.startAngle + (this.config.rangeEndValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n return this.describeArc(this.centerX, this.centerY, this.radius, startAngle, endAngle);\r\n }\r\n\r\n /**\r\n * handling mousedown when range mode is enabled \r\n * @param event \r\n * @param handleType \r\n * @returns \r\n */\r\n onHandleMouseDown(event: MouseEvent, handleType: 'start' | 'end') {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.activeHandle = handleType;\r\n this.startDrag();\r\n }\r\n\r\n /**\r\n * getting x & y to update handle position when dragging\r\n * @param value \r\n * @returns \r\n */\r\n getHandlePosition(value: number): { x: number, y: number } {\r\n const scaled = (value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n return pos;\r\n }\r\n\r\n /**\r\n * geeting handle position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalHandleX(value: number): number {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableWidth * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineStartX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeStartValue : this.config.min);\r\n }\r\n\r\n /**\r\n * geeting end position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineEndX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * geeting handle position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalHandleY(value: number): number {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = 1 - (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableHeight * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalLineStartY(): number {\r\n return this.getVerticalHandleY(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * get output to be emitted based on range mode\r\n * @returns \r\n */\r\n getEventOutput() {\r\n if (this.config.isRangeMode) {\r\n return { start: this.config.rangeStartValue, end: this.config.rangeEndValue };\r\n }\r\n return this.value;\r\n }\r\n\r\n /**\r\n * get correct page label from object\r\n * @param labelName \r\n * @returns string\r\n */\r\n getLabel(labelName: string): string {\r\n return (DEFAULT_LABELS as any)[labelName] || '';\r\n }\r\n\r\n\r\n // component end\r\n}\r\n","<div class=\"knob-container {{customTheme}}\" [style.width.px]=\"config.size\">\r\n <svg [ngClass]=\"{ 'hover-animate': config.animateOnHover }\" [attr.viewBox]=\"getSvgViewBoxSize()\"\r\n (click)=\"onSvgClick($event)\" [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : 'pointer'\"\r\n [class.disabled]=\"config.disabled\" [class.read-only]=\"config.readOnly\"\r\n (mouseenter)=\"showTooltip = true; hovering=true; rucEvent.emit({eventName: 'hover'})\"\r\n (mouseleave)=\"showTooltip = false; hovering=false\" (focus)=\"rucEvent.emit({eventName: 'focus'})\"\r\n (blur)=\"rucEvent.emit({eventName: 'blur'})\" (keydown)=\"onKeyDown($event)\" [attr.role]=\"'slider'\"\r\n [attr.aria-valuemin]=\"config.min\" [attr.aria-valuemax]=\"config.max\" [attr.aria-valuenow]=\"value\"\r\n [attr.aria-disabled]=\"config.disabled\" [ngSwitch]=\"config.knobType\">\r\n\r\n <!-- arc knob -->\r\n <ng-container *ngSwitchCase=\"'arc'\">\r\n\r\n <!-- glow effect -->\r\n <defs>\r\n <filter id=\"glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feDropShadow dx=\"0\" dy=\"0\" stdDeviation=\"4\" [attr.flood-color]=\"config.strokeBackground\"\r\n flood-opacity=\"0.75\" />\r\n </filter>\r\n </defs>\r\n\r\n <!-- arc main stroke -->\r\n <path #bgArc fill=\"none\" class=\"main-path\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc progress stroke - single handle -->\r\n <path *ngIf=\"!config.isRangeMode\" #progressArc fill=\"none\" class=\"progress-path\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc - single handle -->\r\n <circle *ngIf=\"!config.isRangeMode\" #handle class=\"handle\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.showHandle ? config.handleBackground : 'transparent'\"\r\n [attr.stroke-width]=\"config.showHandle ? config.handleBorderWidth : 0\"\r\n [attr.stroke]=\"config.showHandle ? config.handleBorderColor : 'transparent'\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n\r\n <!-- arc progress stroke - dual handle for range -->\r\n <path *ngIf=\"config.isRangeMode\" [attr.d]=\"getRangeArcPath()\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" fill=\"none\" stroke-linecap=\"round\" />\r\n\r\n <!-- arc dual handle - start -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeStartValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeStartValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'start')\" />\r\n\r\n <!-- arc dual handle - end -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeEndValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeEndValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'end')\" />\r\n </ng-container>\r\n\r\n <!-- horizontal line -->\r\n <ng-container *ngSwitchCase=\"'horizontal'\">\r\n <line #horizontalLine [attr.x1]=\"config.strokeWidth\" [attr.x2]=\"config.size\" [attr.y1]=\"config.strokeWidth + 10\"\r\n [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for horizontal line -->\r\n <line [attr.x1]=\"getHorizontalLineStartX()\" [attr.x2]=\"getHorizontalLineEndX()\"\r\n [attr.y1]=\"config.strokeWidth + 10\" [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" />\r\n\r\n <!-- handle for horizontal line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.x]=\"getHorizontalHandleX(value)\"\r\n [attr.y]=\"config.strokeWidth + 10 - getRadius()-1\" [attr.width]=\"config.strokeWidth\"\r\n [attr.height]=\"config.strokeWidth\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n\r\n <!-- vertical line -->\r\n <ng-container *ngSwitchCase=\"'vertical'\">\r\n <line #verticalLine [attr.y1]=\"config.strokeWidth/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth/4\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for vertical line -->\r\n <line [attr.y1]=\"getVerticalLineStartY()/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\" [attr.stroke-width]=\"config.strokeWidth/4\" />\r\n\r\n <!-- Handle for vertical line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.y]=\"getVerticalHandleY(value)/4\" [attr.x]=\"config.strokeWidth + 7.5\"\r\n [attr.width]=\"config.strokeWidth/4\" [attr.height]=\"config.strokeWidth/4\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n </svg>\r\n\r\n <!-- tooltip -->\r\n <div class=\"tooltip\" *ngIf=\"config.enableTooltip && !config.isRangeMode\" [class.show]=\"showTooltip\"\r\n [style.left.px]=\"tooltipX\" [style.top.px]=\"tooltipY\">\r\n {{ value}}\r\n </div>\r\n\r\n <!-- progress value -->\r\n <div class=\"progress-value {{config.knobType}}\" [style.maxWidth.px]=\"config.size * 2 - 50\"\r\n [style.color]=\"config.valueColor\" [style.fontSize.px]=\"config.valueSize\" [style.fontWeight]=\"config.valueWeight\"\r\n [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : ''\" [class.disabled]=\"config.disabled\"\r\n [class.read-only]=\"config.readOnly\" title=\"{{config.valuePrefix +''+value+''+config.valueSuffix}}\">\r\n <ng-container *ngIf=\"!config.isRangeMode\">\r\n <span class=\"value-prefix\">{{config.valuePrefix}}</span>\r\n <span class=\"value\">{{ value }}</span>\r\n <span class=\"value-suffix\">{{config.valueSuffix}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"config.isRangeMode\">\r\n <span class=\"value\">{{config.rangeStartValue}} : {{config.rangeEndValue}}</span>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- increment-decrement button -->\r\n <div class=\"arc-buttons\" *ngIf=\"!config.isRangeMode && config.showButtons\">\r\n <button mat-mini-fab color=\"secondary\" (click)=\"decrement()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('decrementButton')\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n \r\n <button mat-mini-fab color=\"secondary\" (click)=\"increment()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('incrementButton')\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n \r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RuclibKnobComponent } from './ruclib-knob/ruclib-knob.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule\r\n ],\r\n declarations: [\r\n RuclibKnobComponent\r\n ],\r\n exports: [RuclibKnobComponent],\r\n})\r\nexport class RuclibKnobModule { }\r\n","// interface for reusable knob component\r\nexport interface KnobConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n size?: number;\r\n valueColor?: string;\r\n valueWeight?: string;\r\n valueSize?: number;\r\n strokeBackground?: string;\r\n progressBackground?: string | string[];\r\n strokeWidth?: number;\r\n roundedCorner?: boolean;\r\n showHandle?: boolean;\r\n handleBackground?: string;\r\n handleBorderColor?: string;\r\n handleBorderWidth?: number;\r\n valuePrefix?: string;\r\n valueSuffix?: string;\r\n readOnly?: boolean;\r\n disabled?: boolean;\r\n enableTooltip?: boolean;\r\n animateOnHover?: boolean;\r\n isRangeMode?: boolean;\r\n rangeStartValue?: number;\r\n rangeEndValue?: number;\r\n showButtons?: boolean;\r\n knobType?: 'arc' | 'horizontal' | 'vertical';\r\n};\r\n\r\nexport interface KnobRangeValue { start: number, end: number }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG;AAC7B,IAAA,GAAG,EAAU,CAAC;AACd,IAAA,GAAG,EAAU,GAAG;AAChB,IAAA,IAAI,EAAU,CAAC;AACf,IAAA,IAAI,EAAU,GAAG;AACjB,IAAA,UAAU,EAAU,EAAE;AACtB,IAAA,gBAAgB,EAAU,WAAW;AACrC,IAAA,kBAAkB,EAAsB,MAAM;AAC9C,IAAA,WAAW,EAAU,EAAE;AACvB,IAAA,SAA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,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAXzB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;4FAOJ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAb5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,aAAa;AACd,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;AACpB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;iBAC/B,CAAA;;;ACQA;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ruc-lib-knob.mjs","sources":["../../../../../libs/ruclib/knob/src/models/knob-config.model.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.html","../../../../../libs/ruclib/knob/src/lib/ruclib-knob.module.ts","../../../../../libs/ruclib/knob/src/models/knob.interface.ts","../../../../../libs/ruclib/knob/src/ruc-lib-knob.ts"],"sourcesContent":["export const DefaultKnobConfig = {\r\n min:<number> 0,\r\n max:<number> 100,\r\n step:<number> 1,\r\n size:<number> 150,\r\n valueColor:<string> '',\r\n strokeBackground:<string> 'lightblue',\r\n progressBackground: <string | string[]> 'blue', // 'green' | ['green'] | ['red', 'blue', 'green', 'black', 'orange'],\r\n strokeWidth:<number> 15,\r\n valueSize:<number> 20,\r\n valueWeight:<string> 'normal',\r\n showHandle:<boolean> true,\r\n handleBackground:<string> 'lightblue',\r\n handleBorderColor:<string> 'blue',\r\n handleBorderWidth:<number> 4,\r\n roundedCorner:<boolean> true,\r\n valuePrefix:<string> '',\r\n valueSuffix:<string> '',\r\n readOnly:<boolean> false,\r\n disabled:<boolean> false,\r\n enableTooltip:<boolean> false,\r\n animateOnHover:<boolean> false,\r\n isRangeMode:<boolean> false,\r\n rangeStartValue:<number> 25,\r\n rangeEndValue:<number> 75,\r\n showButtons:<boolean> false,\r\n knobType:<'horizontal' | 'vertical' | 'arc'> 'arc' // 'horizontal' | 'vertical' | 'arc'\r\n }\r\n\r\n export const DEFAULT_LABELS = {\r\n incrementButton:<string> 'Increment Value',\r\n decrementButton:<string> 'Decrement Value'\r\n }","import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { KnobConfig } from '../../models/knob.interface';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DEFAULT_LABELS, DefaultKnobConfig } from '../../models/knob-config.model';\r\n\r\n@Component({\r\n selector: 'uxp-ruclib-knob',\r\n templateUrl: './ruclib-knob.component.html',\r\n styleUrls: ['./ruclib-knob.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => RuclibKnobComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class RuclibKnobComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\r\n\r\n @ViewChild('bgArc') bgArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('progressArc') progressArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('handle') handleRef!: ElementRef<SVGCircleElement>;\r\n @ViewChild('horizontalLine') horizontalLineRef!: ElementRef<SVGLineElement>;\r\n @ViewChild('verticalLine') verticalLineRef!: ElementRef<SVGLineElement>;\r\n\r\n @Output() rucEvent = new EventEmitter<any>();\r\n\r\n @Input() customTheme?: string = '';\r\n @Input() rucInputData!: KnobConfig;\r\n\r\n activeHandle: 'start' | 'end' | '' = '';\r\n value: number = 0;\r\n dragging:boolean = false;\r\n centerX:number = 0;\r\n centerY:number = 0;\r\n radius:number = 0;\r\n startAngle:number = 210;\r\n endAngle:number = 510;\r\n arcLength:number = 300;\r\n changeColorAfter:number = 0;\r\n tooltipX:number = 0;\r\n tooltipY:number = 0;\r\n showTooltip: boolean = false;\r\n hovering:boolean = false;\r\n\r\n config = DefaultKnobConfig;\r\n\r\n private onTouched = () => { };\r\n private onChange = (value: number) => { };\r\n\r\n constructor(private cdr: ChangeDetectorRef) {\r\n }\r\n\r\n /**\r\n * handling form control binding to write value\r\n * @param val \r\n */\r\n writeValue(val: number): void {\r\n this.value = val;\r\n }\r\n\r\n /**\r\n * registering onChange method to use as form control\r\n * @param fn \r\n */\r\n registerOnChange(fn: () => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n /**\r\n * registering onTouch method to use as form control\r\n * @param fn \r\n */\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n /**\r\n * registering disabled state\r\n * @param isDisabled \r\n */\r\n setDisabledState(isDisabled: boolean): void {\r\n this.config.disabled = isDisabled;\r\n }\r\n\r\n /**\r\n * handling input data changes\r\n * updating default config with user provided config\r\n * @param changes \r\n */\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes && changes['rucInputData'] && changes['rucInputData'].currentValue) {\r\n this.config = { ...this.config, ...changes['rucInputData'].currentValue }\r\n }\r\n }\r\n\r\n /**\r\n * handling change on component initilization\r\n */\r\n ngOnInit() {\r\n this.adjustDefaultValue();\r\n if (this.config.knobType != 'arc') {\r\n this.config.isRangeMode = false;\r\n this.config.enableTooltip = false;\r\n }\r\n if (Array.isArray(this.config.progressBackground)) {\r\n this.changeColorAfter = Math.round(100 / this.config.progressBackground.length);\r\n }\r\n }\r\n\r\n /**\r\n * handling change after view initilization\r\n */\r\n ngAfterViewInit() {\r\n this.centerX = this.config.size / 2;\r\n this.centerY = this.config.size / 2;\r\n this.radius = this.config.size / 2 - 20;\r\n\r\n this.bgArcRef?.nativeElement.setAttribute('d',\r\n this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, this.endAngle));\r\n this.updateArc();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n /**\r\n * handling change when dragin on svg\r\n * @returns \r\n */\r\n startDrag() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.dragging = true;\r\n this.showTooltip = true;\r\n this.rucEvent.emit({ eventName: 'dragStart', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * rounding value to increment or decrement based on provide config value for step\r\n * @param value \r\n * @returns \r\n */\r\n roundToStep(value: number): number {\r\n const stepped = Math.round((value - this.config.min) / this.config.step) * this.config.step + this.config.min;\r\n return this.clamp(stepped, this.config.min, this.config.max);\r\n }\r\n\r\n /**\r\n * adjusting default value within min & max value when its provide out of range\r\n */\r\n adjustDefaultValue() {\r\n if (this.value < this.config.min) {\r\n this.value = this.config.min;\r\n }\r\n if (this.value > this.config.max) {\r\n this.value = this.config.max;\r\n }\r\n if (this.config.isRangeMode) {\r\n if (this.config.rangeStartValue < this.config.min || this.config.rangeStartValue > this.config.max) {\r\n this.config.rangeStartValue = this.config.min;\r\n }\r\n if (this.config.rangeEndValue > this.config.max || this.config.rangeEndValue < this.config.min) {\r\n this.config.rangeEndValue = this.config.max;\r\n }\r\n }\r\n this.updateArc();\r\n }\r\n\r\n /**\r\n * handle changes on mouseUp and touchEnd event\r\n */\r\n @HostListener('window:mouseup')\r\n @HostListener('window:touchend')\r\n stopDrag() {\r\n this.dragging = false;\r\n this.showTooltip = false;\r\n this.rucEvent.emit({ eventName: 'dragEnd', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * handle changes on mouseMove and touch event\r\n * @param event \r\n * @returns \r\n */\r\n @HostListener('window:mousemove', ['$event'])\r\n @HostListener('window:touchmove', ['$event'])\r\n onMove(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || !this.dragging) return;\r\n event.preventDefault();\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * handling change on main svg click\r\n * @param event \r\n * @returns \r\n */\r\n onSvgClick(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || this.config.isRangeMode) return;\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * get ref of active svg element for different type of knobs\r\n * @returns \r\n */\r\n getTargetSvg(): SVGElement | null {\r\n if (this.config.knobType === 'horizontal') {\r\n return this.horizontalLineRef.nativeElement.closest('svg');\r\n } else\r\n if (this.config.knobType === 'vertical') {\r\n return this.verticalLineRef.nativeElement.closest('svg');\r\n }\r\n return this.bgArcRef.nativeElement.closest('svg');\r\n\r\n }\r\n\r\n /**\r\n * updating progrees value while dragging the handle on stroke bar\r\n * @param e \r\n * @returns \r\n */\r\n setProgressFromEvent(e: MouseEvent | TouchEvent) {\r\n const svg = this.getTargetSvg();\r\n if (!svg) {\r\n return;\r\n }\r\n const rect = svg.getBoundingClientRect();\r\n const clientX = (e instanceof TouchEvent) ? e.touches[0].clientX : e.clientX;\r\n const clientY = (e instanceof TouchEvent) ? e.touches[0].clientY : e.clientY;\r\n\r\n const x = clientX - rect.left;\r\n const y = clientY - rect.top;\r\n\r\n let rawPercent: number;\r\n if (this.config.knobType === 'horizontal') {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = ((x - this.config.strokeWidth) / usableWidth) * 100;\r\n } else if (this.config.knobType === 'vertical') {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = (1 - (y - this.config.strokeWidth) / usableHeight) * 100;\r\n } else {\r\n const angle = this.getAngleFromPoint(x, y);\r\n if (angle === null) return;\r\n rawPercent = ((angle - this.startAngle) / this.arcLength) * 100;\r\n }\r\n\r\n const clampedPercent = this.clamp(rawPercent, 0, 100);\r\n let absolutePercent = this.config.min + (clampedPercent / 100) * (this.config.max - this.config.min);\r\n absolutePercent = this.roundToStep(absolutePercent);\r\n\r\n if (this.config.isRangeMode) {\r\n if (this.activeHandle === 'start') {\r\n if (absolutePercent > this.config.rangeEndValue) {\r\n absolutePercent = this.config.rangeEndValue;\r\n }\r\n this.config.rangeStartValue = absolutePercent;\r\n } else {\r\n if (absolutePercent < this.config.rangeStartValue) {\r\n absolutePercent = this.config.rangeStartValue;\r\n }\r\n this.config.rangeEndValue = absolutePercent;\r\n }\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: { start: this.config.rangeStartValue, end: this.config.rangeEndValue } })\r\n } else {\r\n this.value = absolutePercent;\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: this.value });\r\n }\r\n\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * updating svg progress based on value changes\r\n * @returns \r\n */\r\n updateArc() {\r\n if (this.config.knobType !== 'arc') {\r\n return\r\n }\r\n\r\n const scaled = (this.value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n\r\n const path = this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, angle);\r\n this.progressArcRef?.nativeElement.setAttribute('d', path);\r\n\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n this.handleRef?.nativeElement.setAttribute('cx', pos.x.toString());\r\n this.handleRef?.nativeElement.setAttribute('cy', pos.y.toString());\r\n\r\n // for tooltip\r\n const angleRad = (angle - 90) * Math.PI / 180;\r\n const tooltipRadius = this.radius + this.config.strokeWidth / 2 + 10;\r\n this.tooltipX = this.centerX + tooltipRadius * Math.cos(angleRad);\r\n this.tooltipY = this.centerY + tooltipRadius * Math.sin(angleRad);\r\n }\r\n\r\n /**\r\n * return maximum value out of min & max range\r\n * @param val \r\n * @param min \r\n * @param max \r\n * @returns \r\n */\r\n clamp(val: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, val));\r\n }\r\n\r\n /**\r\n * getting calulated point from polar coordinates to cartesian coordinates\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param angleDeg \r\n * @returns \r\n */\r\n polarToCartesian(cx: number, cy: number, r: number, angleDeg: number) {\r\n const angleRad = (angleDeg - 90) * Math.PI / 180;\r\n return {\r\n x: cx + r * Math.cos(angleRad),\r\n y: cy + r * Math.sin(angleRad)\r\n };\r\n }\r\n\r\n /**\r\n * getting radius for arc handle based on stroke width \r\n * @returns \r\n */\r\n getRadius() {\r\n return this.config.strokeWidth ? (this.config.strokeWidth / 2) - ((this.config.handleBorderWidth ?? 0) / 2) : 4;\r\n }\r\n\r\n /**\r\n * getting svg box size based on different knob shapes\r\n * @returns \r\n */\r\n getSvgViewBoxSize() {\r\n let width = this.config.size, height = this.config.size;\r\n if (this.config.knobType === 'horizontal') {\r\n height = this.config.strokeWidth + 40;\r\n }\r\n if (this.config.knobType === 'vertical') {\r\n height = this.config.size / 4 + 5\r\n width = this.config.strokeWidth + 40;\r\n }\r\n return '0 0 ' + width + ' ' + height\r\n }\r\n\r\n /**\r\n * geeting dynamic bg color for progress stroke based on provide config for \"progressBackground\"\r\n */\r\n get progressColor(): string {\r\n if (typeof this.config.progressBackground === 'string') {\r\n return this.config.progressBackground;\r\n } else\r\n if ((this.config.progressBackground as string[])?.length == 1) {\r\n return this.config.progressBackground[0];\r\n } else\r\n if ((this.config.progressBackground as string[]).length > 1) {\r\n return this.config.progressBackground[Math.ceil(this.value / this.changeColorAfter) - 1]\r\n } else {\r\n return 'green'\r\n }\r\n }\r\n\r\n /**\r\n * getting coordinates for arc based on provided inputs\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param start \r\n * @param end \r\n * @returns \r\n */\r\n describeArc(cx: number, cy: number, r: number, start: number, end: number): string {\r\n const startPos = this.polarToCartesian(cx, cy, r, end);\r\n const endPos = this.polarToCartesian(cx, cy, r, start);\r\n const largeArc = end - start <= 180 ? 0 : 1;\r\n\r\n return [\r\n \"M\", startPos.x, startPos.y,\r\n \"A\", r, r, 0, largeArc, 0, endPos.x, endPos.y\r\n ].join(\" \");\r\n }\r\n\r\n /**\r\n * getting calculated angle for arc progress based on provided input\r\n * @param x \r\n * @param y \r\n * @returns \r\n */\r\n getAngleFromPoint(x: number, y: number): number | null {\r\n const dx = x - this.centerX;\r\n if (dx === 0) {\r\n return null;\r\n }\r\n const dy = y - this.centerY;\r\n\r\n let angle = Math.atan2(dy, dx) * 180 / Math.PI + 90;\r\n if (angle < 0) angle += 360;\r\n\r\n const normalizedStart = this.startAngle % 360;\r\n let delta = angle - normalizedStart;\r\n if (delta < 0) delta += 360;\r\n\r\n if (delta > this.arcLength) return null;\r\n\r\n return this.startAngle + delta;\r\n }\r\n\r\n /**\r\n * increment value on click on button\r\n * @returns \r\n */\r\n increment() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value + this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * decrement value on click on button\r\n * @returns \r\n */\r\n decrement() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value - this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n /**\r\n * change value using arrow keys for accessibility\r\n * @param event \r\n * @returns \r\n */\r\n onKeyDown(event: KeyboardEvent) {\r\n if (this.config.readOnly || this.config.disabled) return;\r\n\r\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\r\n this.increment();\r\n event.preventDefault();\r\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\r\n this.decrement();\r\n event.preventDefault();\r\n }\r\n }\r\n /**\r\n * geeting arc coordinated for range selection mode\r\n * @returns \r\n */\r\n getRangeArcPath(): string {\r\n const startAngle = this.startAngle + (this.config.rangeStartValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n const endAngle = this.startAngle + (this.config.rangeEndValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n return this.describeArc(this.centerX, this.centerY, this.radius, startAngle, endAngle);\r\n }\r\n\r\n /**\r\n * handling mousedown when range mode is enabled \r\n * @param event \r\n * @param handleType \r\n * @returns \r\n */\r\n onHandleMouseDown(event: MouseEvent, handleType: 'start' | 'end') {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.activeHandle = handleType;\r\n this.startDrag();\r\n }\r\n\r\n /**\r\n * getting x & y to update handle position when dragging\r\n * @param value \r\n * @returns \r\n */\r\n getHandlePosition(value: number): { x: number, y: number } {\r\n const scaled = (value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n return pos;\r\n }\r\n\r\n /**\r\n * geeting handle position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalHandleX(value: number): number {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableWidth * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineStartX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeStartValue : this.config.min);\r\n }\r\n\r\n /**\r\n * geeting end position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineEndX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * geeting handle position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalHandleY(value: number): number {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = 1 - (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableHeight * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalLineStartY(): number {\r\n return this.getVerticalHandleY(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * get output to be emitted based on range mode\r\n * @returns \r\n */\r\n getEventOutput() {\r\n if (this.config.isRangeMode) {\r\n return { start: this.config.rangeStartValue, end: this.config.rangeEndValue };\r\n }\r\n return this.value;\r\n }\r\n\r\n /**\r\n * get correct page label from object\r\n * @param labelName \r\n * @returns string\r\n */\r\n getLabel(labelName: string): string {\r\n return (DEFAULT_LABELS as any)[labelName] || '';\r\n }\r\n\r\n\r\n // component end\r\n}\r\n","<div class=\"knob-container {{customTheme}}\" [style.width.px]=\"config.size\">\r\n <svg [ngClass]=\"{ 'hover-animate': config.animateOnHover }\" [attr.viewBox]=\"getSvgViewBoxSize()\"\r\n (click)=\"onSvgClick($event)\" [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : 'pointer'\"\r\n [class.disabled]=\"config.disabled\" [class.read-only]=\"config.readOnly\"\r\n (mouseenter)=\"showTooltip = true; hovering=true; rucEvent.emit({eventName: 'hover'})\"\r\n (mouseleave)=\"showTooltip = false; hovering=false\" (focus)=\"rucEvent.emit({eventName: 'focus'})\"\r\n (blur)=\"rucEvent.emit({eventName: 'blur'})\" (keydown)=\"onKeyDown($event)\" [attr.role]=\"'slider'\"\r\n [attr.aria-valuemin]=\"config.min\" [attr.aria-valuemax]=\"config.max\" [attr.aria-valuenow]=\"value\"\r\n [attr.aria-disabled]=\"config.disabled\" [ngSwitch]=\"config.knobType\">\r\n\r\n <!-- arc knob -->\r\n <ng-container *ngSwitchCase=\"'arc'\">\r\n\r\n <!-- glow effect -->\r\n <defs>\r\n <filter id=\"glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feDropShadow dx=\"0\" dy=\"0\" stdDeviation=\"4\" [attr.flood-color]=\"config.strokeBackground\"\r\n flood-opacity=\"0.75\" />\r\n </filter>\r\n </defs>\r\n\r\n <!-- arc main stroke -->\r\n <path #bgArc fill=\"none\" class=\"main-path\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc progress stroke - single handle -->\r\n <path *ngIf=\"!config.isRangeMode\" #progressArc fill=\"none\" class=\"progress-path\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc - single handle -->\r\n <circle *ngIf=\"!config.isRangeMode\" #handle class=\"handle\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.showHandle ? config.handleBackground : 'transparent'\"\r\n [attr.stroke-width]=\"config.showHandle ? config.handleBorderWidth : 0\"\r\n [attr.stroke]=\"config.showHandle ? config.handleBorderColor : 'transparent'\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n\r\n <!-- arc progress stroke - dual handle for range -->\r\n <path *ngIf=\"config.isRangeMode\" [attr.d]=\"getRangeArcPath()\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" fill=\"none\" stroke-linecap=\"round\" />\r\n\r\n <!-- arc dual handle - start -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeStartValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeStartValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'start')\" />\r\n\r\n <!-- arc dual handle - end -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeEndValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeEndValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'end')\" />\r\n </ng-container>\r\n\r\n <!-- horizontal line -->\r\n <ng-container *ngSwitchCase=\"'horizontal'\">\r\n <line #horizontalLine [attr.x1]=\"config.strokeWidth\" [attr.x2]=\"config.size\" [attr.y1]=\"config.strokeWidth + 10\"\r\n [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for horizontal line -->\r\n <line [attr.x1]=\"getHorizontalLineStartX()\" [attr.x2]=\"getHorizontalLineEndX()\"\r\n [attr.y1]=\"config.strokeWidth + 10\" [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" />\r\n\r\n <!-- handle for horizontal line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.x]=\"getHorizontalHandleX(value)\"\r\n [attr.y]=\"config.strokeWidth + 10 - getRadius()-1\" [attr.width]=\"config.strokeWidth\"\r\n [attr.height]=\"config.strokeWidth\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n\r\n <!-- vertical line -->\r\n <ng-container *ngSwitchCase=\"'vertical'\">\r\n <line #verticalLine [attr.y1]=\"config.strokeWidth/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth/4\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for vertical line -->\r\n <line [attr.y1]=\"getVerticalLineStartY()/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\" [attr.stroke-width]=\"config.strokeWidth/4\" />\r\n\r\n <!-- Handle for vertical line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.y]=\"getVerticalHandleY(value)/4\" [attr.x]=\"config.strokeWidth + 7.5\"\r\n [attr.width]=\"config.strokeWidth/4\" [attr.height]=\"config.strokeWidth/4\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n </svg>\r\n\r\n <!-- tooltip -->\r\n <div class=\"tooltip\" *ngIf=\"config.enableTooltip && !config.isRangeMode\" [class.show]=\"showTooltip\"\r\n [style.left.px]=\"tooltipX\" [style.top.px]=\"tooltipY\">\r\n {{ value}}\r\n </div>\r\n\r\n <!-- progress value -->\r\n <div class=\"progress-value {{config.knobType}}\" [style.maxWidth.px]=\"config.size * 2 - 50\"\r\n [style.color]=\"config.valueColor\" [style.fontSize.px]=\"config.valueSize\" [style.fontWeight]=\"config.valueWeight\"\r\n [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : ''\" [class.disabled]=\"config.disabled\"\r\n [class.read-only]=\"config.readOnly\" title=\"{{config.valuePrefix +''+value+''+config.valueSuffix}}\">\r\n <ng-container *ngIf=\"!config.isRangeMode\">\r\n <span class=\"value-prefix\">{{config.valuePrefix}}</span>\r\n <span class=\"value\">{{ value }}</span>\r\n <span class=\"value-suffix\">{{config.valueSuffix}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"config.isRangeMode\">\r\n <span class=\"value\">{{config.rangeStartValue}} : {{config.rangeEndValue}}</span>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- increment-decrement button -->\r\n <div class=\"arc-buttons\" *ngIf=\"!config.isRangeMode && config.showButtons\">\r\n <button mat-mini-fab color=\"secondary\" (click)=\"decrement()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('decrementButton')\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n \r\n <button mat-mini-fab color=\"secondary\" (click)=\"increment()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('incrementButton')\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n \r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RuclibKnobComponent } from './ruclib-knob/ruclib-knob.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule\r\n ],\r\n declarations: [\r\n RuclibKnobComponent\r\n ],\r\n exports: [RuclibKnobComponent],\r\n})\r\nexport class RuclibKnobModule { }\r\n","// interface for reusable knob component\r\nexport interface KnobConfig {\r\n\r\n /**\r\n * Defines the minimum value of the knob.\r\n * @type {number}\r\n * @default 0\r\n */\r\n min?: number;\r\n\r\n /**\r\n * Defines the maximum value of the knob.\r\n * @type {number}\r\n * @default 100\r\n */\r\n max?: number;\r\n\r\n /**\r\n * Defines the step size for incrementing/decrementing the knob value.\r\n * @type {number}\r\n * @default 1\r\n */\r\n step?: number;\r\n\r\n /**\r\n * Defines the size (width and height) of the knob in pixels.\r\n * @type {number}\r\n * @default 150\r\n */\r\n size?: number;\r\n\r\n /**\r\n * Defines the color of the displayed value.\r\n * @type {string}\r\n * @default ''\r\n */\r\n valueColor?: string;\r\n\r\n /**\r\n * Defines the font weight of the displayed value.\r\n * @type {string}\r\n * @default 'normal'\r\n */\r\n valueWeight?: string;\r\n\r\n /**\r\n * Defines the font size of the displayed value in pixels.\r\n * @type {number}\r\n * @default 20\r\n */\r\n valueSize?: number;\r\n\r\n /**\r\n * Defines the background color of the knob's stroke.\r\n * @type {string}\r\n * @default 'lightblue'\r\n */\r\n strokeBackground?: string;\r\n\r\n /**\r\n * Defines the background color of the progress stroke. Can be a single color or an array of colors for gradient.\r\n * @type {string | string[]}\r\n * @default 'blue'\r\n */\r\n progressBackground?: string | string[];\r\n\r\n /**\r\n * Defines the width of the knob's stroke in pixels.\r\n * @type {number}\r\n * @default 15\r\n */\r\n strokeWidth?: number;\r\n\r\n /**\r\n * Specifies whether the corners of the progress stroke should be rounded.\r\n * @type {boolean}\r\n * @default true\r\n */\r\n roundedCorner?: boolean;\r\n\r\n /**\r\n * Specifies whether a handle should be displayed on the knob.\r\n * @type {boolean}\r\n * @default true\r\n */\r\n showHandle?: boolean;\r\n\r\n /* Defines the background color of the handle.\r\n * @type {string}\r\n * @default 'lightblue'\r\n */\r\n handleBackground?: string;\r\n\r\n /**\r\n * Defines the border color of the handle.\r\n * @type {string}\r\n * @default 'blue'\r\n */\r\n handleBorderColor?: string;\r\n\r\n /**\r\n * Defines the border width of the handle.\r\n * @type {number}\r\n * @default 4\r\n */\r\n handleBorderWidth?: number;\r\n\r\n\r\n /**\r\n * Defines the prefix for the displayed value (e.g., '$').\r\n * @type {string}\r\n * @default ''\r\n */\r\n valuePrefix?: string;\r\n\r\n /**\r\n * Defines the suffix for the displayed value (e.g., '%').\r\n * @type {string}\r\n * @default ''\r\n */\r\n valueSuffix?: string;\r\n\r\n /**\r\n * Specifies whether the knob is read-only.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n readOnly?: boolean;\r\n\r\n\r\n /**\r\n * Specifies whether the knob is disabled.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Specifies whether a tooltip should be enabled for the knob.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n enableTooltip?: boolean;\r\n\r\n /**\r\n * Specifies whether the knob animates on hover.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n animateOnHover?: boolean;\r\n\r\n /**\r\n * Specifies whether the knob operates in range mode, allowing selection of a value range.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n isRangeMode?: boolean;\r\n\r\n /**\r\n * Defines the starting value for the range when `isRangeMode` is true.\r\n * @type {number}\r\n * @default 25\r\n */\r\n rangeStartValue?: number;\r\n\r\n /**\r\n * Defines the ending value for the range when `isRangeMode` is true.\r\n * @type {number}\r\n * @default 75\r\n */\r\n rangeEndValue?: number;\r\n\r\n /**\r\n * Specifies whether increment/decrement buttons should be shown.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n showButtons?: boolean;\r\n\r\n /**\r\n * Defines the type of knob.\r\n * @type {'arc' | 'horizontal' | 'vertical'}\r\n * @default 'arc'\r\n */\r\n knobType?: 'arc' | 'horizontal' | 'vertical';\r\n};\r\n\r\nexport interface KnobRangeValue { start: number, end: number }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG;AAC7B,IAAA,GAAG,EAAU,CAAC;AACd,IAAA,GAAG,EAAU,GAAG;AAChB,IAAA,IAAI,EAAU,CAAC;AACf,IAAA,IAAI,EAAU,GAAG;AACjB,IAAA,UAAU,EAAU,EAAE;AACtB,IAAA,gBAAgB,EAAU,WAAW;AACrC,IAAA,kBAAkB,EAAsB,MAAM;AAC9C,IAAA,WAAW,EAAU,EAAE;AACvB,IAAA,SAAS,EAAU,EAAE;AACrB,IAAA,WAAW,EAAU,QAAQ;AAC7B,IAAA,UAAU,EAAW,IAAI;AACzB,IAAA,gBAAgB,EAAU,WAAW;AACrC,IAAA,iBAAiB,EAAU,MAAM;AACjC,IAAA,iBAAiB,EAAU,CAAC;AAC5B,IAAA,aAAa,EAAW,IAAI;AAC5B,IAAA,WAAW,EAAU,EAAE;AACvB,IAAA,WAAW,EAAU,EAAE;AACvB,IAAA,QAAQ,EAAW,KAAK;AACxB,IAAA,QAAQ,EAAW,KAAK;AACxB,IAAA,aAAa,EAAW,KAAK;AA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ACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,aAAa;AACd,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;AACpB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;iBAC/B,CAAA;;;ACqKA;;ACzLD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ruc-lib-knob.mjs","sources":["../../../../../libs/ruclib/knob/src/models/knob-config.model.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.html","../../../../../libs/ruclib/knob/src/lib/ruclib-knob.module.ts","../../../../../libs/ruclib/knob/src/models/knob.interface.ts","../../../../../libs/ruclib/knob/src/ruc-lib-knob.ts"],"sourcesContent":["export const DefaultKnobConfig = {\r\n min:<number> 0,\r\n max:<number> 100,\r\n step:<number> 1,\r\n size:<number> 150,\r\n valueColor:<string> '',\r\n strokeBackground:<string> 'lightblue',\r\n progressBackground: <string | string[]> 'blue', // 'green' | ['green'] | ['red', 'blue', 'green', 'black', 'orange'],\r\n strokeWidth:<number> 15,\r\n valueSize:<number> 20,\r\n valueWeight:<string> 'normal',\r\n showHandle:<boolean> true,\r\n handleBackground:<string> 'lightblue',\r\n handleBorderColor:<string> 'blue',\r\n handleBorderWidth:<number> 4,\r\n roundedCorner:<boolean> true,\r\n valuePrefix:<string> '',\r\n valueSuffix:<string> '',\r\n readOnly:<boolean> false,\r\n disabled:<boolean> false,\r\n enableTooltip:<boolean> false,\r\n animateOnHover:<boolean> false,\r\n isRangeMode:<boolean> false,\r\n rangeStartValue:<number> 25,\r\n rangeEndValue:<number> 75,\r\n showButtons:<boolean> false,\r\n knobType:<'horizontal' | 'vertical' | 'arc'> 'arc' // 'horizontal' | 'vertical' | 'arc'\r\n }\r\n\r\n export const DEFAULT_LABELS = {\r\n incrementButton:<string> 'Increment Value',\r\n decrementButton:<string> 'Decrement Value'\r\n }","import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { KnobConfig } from '../../models/knob.interface';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DEFAULT_LABELS, DefaultKnobConfig } from '../../models/knob-config.model';\r\n\r\n@Component({\r\n selector: 'uxp-ruclib-knob',\r\n templateUrl: './ruclib-knob.component.html',\r\n styleUrls: ['./ruclib-knob.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => RuclibKnobComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class RuclibKnobComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\r\n\r\n @ViewChild('bgArc') bgArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('progressArc') progressArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('handle') handleRef!: ElementRef<SVGCircleElement>;\r\n @ViewChild('horizontalLine') horizontalLineRef!: ElementRef<SVGLineElement>;\r\n @ViewChild('verticalLine') verticalLineRef!: ElementRef<SVGLineElement>;\r\n\r\n @Output() rucEvent = new EventEmitter<any>();\r\n\r\n @Input() customTheme?: string = '';\r\n @Input() rucInputData!: KnobConfig;\r\n\r\n activeHandle: 'start' | 'end' | '' = '';\r\n value: number = 0;\r\n dragging:boolean = false;\r\n centerX:number = 0;\r\n centerY:number = 0;\r\n radius:number = 0;\r\n startAngle:number = 210;\r\n endAngle:number = 510;\r\n arcLength:number = 300;\r\n changeColorAfter:number = 0;\r\n tooltipX:number = 0;\r\n tooltipY:number = 0;\r\n showTooltip: boolean = false;\r\n hovering:boolean = false;\r\n\r\n config = DefaultKnobConfig;\r\n\r\n private onTouched = () => { };\r\n private onChange = (value: number) => { };\r\n\r\n constructor(private cdr: ChangeDetectorRef) {\r\n }\r\n\r\n /**\r\n * handling form control binding to write value\r\n * @param val \r\n */\r\n writeValue(val: number): void {\r\n this.value = val;\r\n }\r\n\r\n /**\r\n * registering onChange method to use as form control\r\n * @param fn \r\n */\r\n registerOnChange(fn: () => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n /**\r\n * registering onTouch method to use as form control\r\n * @param fn \r\n */\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n /**\r\n * registering disabled state\r\n * @param isDisabled \r\n */\r\n setDisabledState(isDisabled: boolean): void {\r\n this.config.disabled = isDisabled;\r\n }\r\n\r\n /**\r\n * handling input data changes\r\n * updating default config with user provided config\r\n * @param changes \r\n */\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes && changes['rucInputData'] && changes['rucInputData'].currentValue) {\r\n this.config = { ...this.config, ...changes['rucInputData'].currentValue }\r\n }\r\n }\r\n\r\n /**\r\n * handling change on component initilization\r\n */\r\n ngOnInit() {\r\n this.adjustDefaultValue();\r\n if (this.config.knobType != 'arc') {\r\n this.config.isRangeMode = false;\r\n this.config.enableTooltip = false;\r\n }\r\n if (Array.isArray(this.config.progressBackground)) {\r\n this.changeColorAfter = Math.round(100 / this.config.progressBackground.length);\r\n }\r\n }\r\n\r\n /**\r\n * handling change after view initilization\r\n */\r\n ngAfterViewInit() {\r\n this.centerX = this.config.size / 2;\r\n this.centerY = this.config.size / 2;\r\n this.radius = this.config.size / 2 - 20;\r\n\r\n this.bgArcRef?.nativeElement.setAttribute('d',\r\n this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, this.endAngle));\r\n this.updateArc();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n /**\r\n * handling change when dragin on svg\r\n * @returns \r\n */\r\n startDrag() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.dragging = true;\r\n this.showTooltip = true;\r\n this.rucEvent.emit({ eventName: 'dragStart', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * rounding value to increment or decrement based on provide config value for step\r\n * @param value \r\n * @returns \r\n */\r\n roundToStep(value: number): number {\r\n const stepped = Math.round((value - this.config.min) / this.config.step) * this.config.step + this.config.min;\r\n return this.clamp(stepped, this.config.min, this.config.max);\r\n }\r\n\r\n /**\r\n * adjusting default value within min & max value when its provide out of range\r\n */\r\n adjustDefaultValue() {\r\n if (this.value < this.config.min) {\r\n this.value = this.config.min;\r\n }\r\n if (this.value > this.config.max) {\r\n this.value = this.config.max;\r\n }\r\n if (this.config.isRangeMode) {\r\n if (this.config.rangeStartValue < this.config.min || this.config.rangeStartValue > this.config.max) {\r\n this.config.rangeStartValue = this.config.min;\r\n }\r\n if (this.config.rangeEndValue > this.config.max || this.config.rangeEndValue < this.config.min) {\r\n this.config.rangeEndValue = this.config.max;\r\n }\r\n }\r\n this.updateArc();\r\n }\r\n\r\n /**\r\n * handle changes on mouseUp and touchEnd event\r\n */\r\n @HostListener('window:mouseup')\r\n @HostListener('window:touchend')\r\n stopDrag() {\r\n this.dragging = false;\r\n this.showTooltip = false;\r\n this.rucEvent.emit({ eventName: 'dragEnd', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * handle changes on mouseMove and touch event\r\n * @param event \r\n * @returns \r\n */\r\n @HostListener('window:mousemove', ['$event'])\r\n @HostListener('window:touchmove', ['$event'])\r\n onMove(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || !this.dragging) return;\r\n event.preventDefault();\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * handling change on main svg click\r\n * @param event \r\n * @returns \r\n */\r\n onSvgClick(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || this.config.isRangeMode) return;\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * get ref of active svg element for different type of knobs\r\n * @returns \r\n */\r\n getTargetSvg(): SVGElement | null {\r\n if (this.config.knobType === 'horizontal') {\r\n return this.horizontalLineRef.nativeElement.closest('svg');\r\n } else\r\n if (this.config.knobType === 'vertical') {\r\n return this.verticalLineRef.nativeElement.closest('svg');\r\n }\r\n return this.bgArcRef.nativeElement.closest('svg');\r\n\r\n }\r\n\r\n /**\r\n * updating progrees value while dragging the handle on stroke bar\r\n * @param e \r\n * @returns \r\n */\r\n setProgressFromEvent(e: MouseEvent | TouchEvent) {\r\n const svg = this.getTargetSvg();\r\n if (!svg) {\r\n return;\r\n }\r\n const rect = svg.getBoundingClientRect();\r\n const clientX = (e instanceof TouchEvent) ? e.touches[0].clientX : e.clientX;\r\n const clientY = (e instanceof TouchEvent) ? e.touches[0].clientY : e.clientY;\r\n\r\n const x = clientX - rect.left;\r\n const y = clientY - rect.top;\r\n\r\n let rawPercent: number;\r\n if (this.config.knobType === 'horizontal') {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = ((x - this.config.strokeWidth) / usableWidth) * 100;\r\n } else if (this.config.knobType === 'vertical') {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = (1 - (y - this.config.strokeWidth) / usableHeight) * 100;\r\n } else {\r\n const angle = this.getAngleFromPoint(x, y);\r\n if (angle === null) return;\r\n rawPercent = ((angle - this.startAngle) / this.arcLength) * 100;\r\n }\r\n\r\n const clampedPercent = this.clamp(rawPercent, 0, 100);\r\n let absolutePercent = this.config.min + (clampedPercent / 100) * (this.config.max - this.config.min);\r\n absolutePercent = this.roundToStep(absolutePercent);\r\n\r\n if (this.config.isRangeMode) {\r\n if (this.activeHandle === 'start') {\r\n if (absolutePercent > this.config.rangeEndValue) {\r\n absolutePercent = this.config.rangeEndValue;\r\n }\r\n this.config.rangeStartValue = absolutePercent;\r\n } else {\r\n if (absolutePercent < this.config.rangeStartValue) {\r\n absolutePercent = this.config.rangeStartValue;\r\n }\r\n this.config.rangeEndValue = absolutePercent;\r\n }\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: { start: this.config.rangeStartValue, end: this.config.rangeEndValue } })\r\n } else {\r\n this.value = absolutePercent;\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: this.value });\r\n }\r\n\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * updating svg progress based on value changes\r\n * @returns \r\n */\r\n updateArc() {\r\n if (this.config.knobType !== 'arc') {\r\n return\r\n }\r\n\r\n const scaled = (this.value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n\r\n const path = this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, angle);\r\n this.progressArcRef?.nativeElement.setAttribute('d', path);\r\n\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n this.handleRef?.nativeElement.setAttribute('cx', pos.x.toString());\r\n this.handleRef?.nativeElement.setAttribute('cy', pos.y.toString());\r\n\r\n // for tooltip\r\n const angleRad = (angle - 90) * Math.PI / 180;\r\n const tooltipRadius = this.radius + this.config.strokeWidth / 2 + 10;\r\n this.tooltipX = this.centerX + tooltipRadius * Math.cos(angleRad);\r\n this.tooltipY = this.centerY + tooltipRadius * Math.sin(angleRad);\r\n }\r\n\r\n /**\r\n * return maximum value out of min & max range\r\n * @param val \r\n * @param min \r\n * @param max \r\n * @returns \r\n */\r\n clamp(val: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, val));\r\n }\r\n\r\n /**\r\n * getting calulated point from polar coordinates to cartesian coordinates\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param angleDeg \r\n * @returns \r\n */\r\n polarToCartesian(cx: number, cy: number, r: number, angleDeg: number) {\r\n const angleRad = (angleDeg - 90) * Math.PI / 180;\r\n return {\r\n x: cx + r * Math.cos(angleRad),\r\n y: cy + r * Math.sin(angleRad)\r\n };\r\n }\r\n\r\n /**\r\n * getting radius for arc handle based on stroke width \r\n * @returns \r\n */\r\n getRadius() {\r\n return this.config.strokeWidth ? (this.config.strokeWidth / 2) - ((this.config.handleBorderWidth ?? 0) / 2) : 4;\r\n }\r\n\r\n /**\r\n * getting svg box size based on different knob shapes\r\n * @returns \r\n */\r\n getSvgViewBoxSize() {\r\n let width = this.config.size, height = this.config.size;\r\n if (this.config.knobType === 'horizontal') {\r\n height = this.config.strokeWidth + 40;\r\n }\r\n if (this.config.knobType === 'vertical') {\r\n height = this.config.size / 4 + 5\r\n width = this.config.strokeWidth + 40;\r\n }\r\n return '0 0 ' + width + ' ' + height\r\n }\r\n\r\n /**\r\n * geeting dynamic bg color for progress stroke based on provide config for \"progressBackground\"\r\n */\r\n get progressColor(): string {\r\n if (typeof this.config.progressBackground === 'string') {\r\n return this.config.progressBackground;\r\n } else\r\n if ((this.config.progressBackground as string[])?.length == 1) {\r\n return this.config.progressBackground[0];\r\n } else\r\n if ((this.config.progressBackground as string[]).length > 1) {\r\n return this.config.progressBackground[Math.ceil(this.value / this.changeColorAfter) - 1]\r\n } else {\r\n return 'green'\r\n }\r\n }\r\n\r\n /**\r\n * getting coordinates for arc based on provided inputs\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param start \r\n * @param end \r\n * @returns \r\n */\r\n describeArc(cx: number, cy: number, r: number, start: number, end: number): string {\r\n const startPos = this.polarToCartesian(cx, cy, r, end);\r\n const endPos = this.polarToCartesian(cx, cy, r, start);\r\n const largeArc = end - start <= 180 ? 0 : 1;\r\n\r\n return [\r\n \"M\", startPos.x, startPos.y,\r\n \"A\", r, r, 0, largeArc, 0, endPos.x, endPos.y\r\n ].join(\" \");\r\n }\r\n\r\n /**\r\n * getting calculated angle for arc progress based on provided input\r\n * @param x \r\n * @param y \r\n * @returns \r\n */\r\n getAngleFromPoint(x: number, y: number): number | null {\r\n const dx = x - this.centerX;\r\n if (dx === 0) {\r\n return null;\r\n }\r\n const dy = y - this.centerY;\r\n\r\n let angle = Math.atan2(dy, dx) * 180 / Math.PI + 90;\r\n if (angle < 0) angle += 360;\r\n\r\n const normalizedStart = this.startAngle % 360;\r\n let delta = angle - normalizedStart;\r\n if (delta < 0) delta += 360;\r\n\r\n if (delta > this.arcLength) return null;\r\n\r\n return this.startAngle + delta;\r\n }\r\n\r\n /**\r\n * increment value on click on button\r\n * @returns \r\n */\r\n increment() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value + this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * decrement value on click on button\r\n * @returns \r\n */\r\n decrement() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value - this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n /**\r\n * change value using arrow keys for accessibility\r\n * @param event \r\n * @returns \r\n */\r\n onKeyDown(event: KeyboardEvent) {\r\n if (this.config.readOnly || this.config.disabled) return;\r\n\r\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\r\n this.increment();\r\n event.preventDefault();\r\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\r\n this.decrement();\r\n event.preventDefault();\r\n }\r\n }\r\n /**\r\n * geeting arc coordinated for range selection mode\r\n * @returns \r\n */\r\n getRangeArcPath(): string {\r\n const startAngle = this.startAngle + (this.config.rangeStartValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n const endAngle = this.startAngle + (this.config.rangeEndValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n return this.describeArc(this.centerX, this.centerY, this.radius, startAngle, endAngle);\r\n }\r\n\r\n /**\r\n * handling mousedown when range mode is enabled \r\n * @param event \r\n * @param handleType \r\n * @returns \r\n */\r\n onHandleMouseDown(event: MouseEvent, handleType: 'start' | 'end') {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.activeHandle = handleType;\r\n this.startDrag();\r\n }\r\n\r\n /**\r\n * getting x & y to update handle position when dragging\r\n * @param value \r\n * @returns \r\n */\r\n getHandlePosition(value: number): { x: number, y: number } {\r\n const scaled = (value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n return pos;\r\n }\r\n\r\n /**\r\n * geeting handle position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalHandleX(value: number): number {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableWidth * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineStartX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeStartValue : this.config.min);\r\n }\r\n\r\n /**\r\n * geeting end position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineEndX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * geeting handle position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalHandleY(value: number): number {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = 1 - (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableHeight * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalLineStartY(): number {\r\n return this.getVerticalHandleY(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * get output to be emitted based on range mode\r\n * @returns \r\n */\r\n getEventOutput() {\r\n if (this.config.isRangeMode) {\r\n return { start: this.config.rangeStartValue, end: this.config.rangeEndValue };\r\n }\r\n return this.value;\r\n }\r\n\r\n /**\r\n * get correct page label from object\r\n * @param labelName \r\n * @returns string\r\n */\r\n getLabel(labelName: string): string {\r\n return (DEFAULT_LABELS as any)[labelName] || '';\r\n }\r\n\r\n\r\n // component end\r\n}\r\n","<div class=\"knob-container {{customTheme}}\" [style.width.px]=\"config.size\">\r\n <svg [ngClass]=\"{ 'hover-animate': config.animateOnHover }\" [attr.viewBox]=\"getSvgViewBoxSize()\"\r\n (click)=\"onSvgClick($event)\" [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : 'pointer'\"\r\n [class.disabled]=\"config.disabled\" [class.read-only]=\"config.readOnly\"\r\n (mouseenter)=\"showTooltip = true; hovering=true; rucEvent.emit({eventName: 'hover'})\"\r\n (mouseleave)=\"showTooltip = false; hovering=false\" (focus)=\"rucEvent.emit({eventName: 'focus'})\"\r\n (blur)=\"rucEvent.emit({eventName: 'blur'})\" (keydown)=\"onKeyDown($event)\" [attr.role]=\"'slider'\"\r\n [attr.aria-valuemin]=\"config.min\" [attr.aria-valuemax]=\"config.max\" [attr.aria-valuenow]=\"value\"\r\n [attr.aria-disabled]=\"config.disabled\" [ngSwitch]=\"config.knobType\">\r\n\r\n <!-- arc knob -->\r\n <ng-container *ngSwitchCase=\"'arc'\">\r\n\r\n <!-- glow effect -->\r\n <defs>\r\n <filter id=\"glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feDropShadow dx=\"0\" dy=\"0\" stdDeviation=\"4\" [attr.flood-color]=\"config.strokeBackground\"\r\n flood-opacity=\"0.75\" />\r\n </filter>\r\n </defs>\r\n\r\n <!-- arc main stroke -->\r\n <path #bgArc fill=\"none\" class=\"main-path\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc progress stroke - single handle -->\r\n <path *ngIf=\"!config.isRangeMode\" #progressArc fill=\"none\" class=\"progress-path\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc - single handle -->\r\n <circle *ngIf=\"!config.isRangeMode\" #handle class=\"handle\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.showHandle ? config.handleBackground : 'transparent'\"\r\n [attr.stroke-width]=\"config.showHandle ? config.handleBorderWidth : 0\"\r\n [attr.stroke]=\"config.showHandle ? config.handleBorderColor : 'transparent'\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n\r\n <!-- arc progress stroke - dual handle for range -->\r\n <path *ngIf=\"config.isRangeMode\" [attr.d]=\"getRangeArcPath()\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" fill=\"none\" stroke-linecap=\"round\" />\r\n\r\n <!-- arc dual handle - start -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeStartValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeStartValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'start')\" />\r\n\r\n <!-- arc dual handle - end -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeEndValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeEndValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'end')\" />\r\n </ng-container>\r\n\r\n <!-- horizontal line -->\r\n <ng-container *ngSwitchCase=\"'horizontal'\">\r\n <line #horizontalLine [attr.x1]=\"config.strokeWidth\" [attr.x2]=\"config.size\" [attr.y1]=\"config.strokeWidth + 10\"\r\n [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for horizontal line -->\r\n <line [attr.x1]=\"getHorizontalLineStartX()\" [attr.x2]=\"getHorizontalLineEndX()\"\r\n [attr.y1]=\"config.strokeWidth + 10\" [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" />\r\n\r\n <!-- handle for horizontal line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.x]=\"getHorizontalHandleX(value)\"\r\n [attr.y]=\"config.strokeWidth + 10 - getRadius()-1\" [attr.width]=\"config.strokeWidth\"\r\n [attr.height]=\"config.strokeWidth\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n\r\n <!-- vertical line -->\r\n <ng-container *ngSwitchCase=\"'vertical'\">\r\n <line #verticalLine [attr.y1]=\"config.strokeWidth/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth/4\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for vertical line -->\r\n <line [attr.y1]=\"getVerticalLineStartY()/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\" [attr.stroke-width]=\"config.strokeWidth/4\" />\r\n\r\n <!-- Handle for vertical line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.y]=\"getVerticalHandleY(value)/4\" [attr.x]=\"config.strokeWidth + 7.5\"\r\n [attr.width]=\"config.strokeWidth/4\" [attr.height]=\"config.strokeWidth/4\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n </svg>\r\n\r\n <!-- tooltip -->\r\n <div class=\"tooltip\" *ngIf=\"config.enableTooltip && !config.isRangeMode\" [class.show]=\"showTooltip\"\r\n [style.left.px]=\"tooltipX\" [style.top.px]=\"tooltipY\">\r\n {{ value}}\r\n </div>\r\n\r\n <!-- progress value -->\r\n <div class=\"progress-value {{config.knobType}}\" [style.maxWidth.px]=\"config.size * 2 - 50\"\r\n [style.color]=\"config.valueColor\" [style.fontSize.px]=\"config.valueSize\" [style.fontWeight]=\"config.valueWeight\"\r\n [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : ''\" [class.disabled]=\"config.disabled\"\r\n [class.read-only]=\"config.readOnly\" title=\"{{config.valuePrefix +''+value+''+config.valueSuffix}}\">\r\n <ng-container *ngIf=\"!config.isRangeMode\">\r\n <span class=\"value-prefix\">{{config.valuePrefix}}</span>\r\n <span class=\"value\">{{ value }}</span>\r\n <span class=\"value-suffix\">{{config.valueSuffix}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"config.isRangeMode\">\r\n <span class=\"value\">{{config.rangeStartValue}} : {{config.rangeEndValue}}</span>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- increment-decrement button -->\r\n <div class=\"arc-buttons\" *ngIf=\"!config.isRangeMode && config.showButtons\">\r\n <button mat-mini-fab color=\"secondary\" (click)=\"decrement()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('decrementButton')\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n \r\n <button mat-mini-fab color=\"secondary\" (click)=\"increment()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('incrementButton')\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n \r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RuclibKnobComponent } from './ruclib-knob/ruclib-knob.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule\r\n ],\r\n declarations: [\r\n RuclibKnobComponent\r\n ],\r\n exports: [RuclibKnobComponent],\r\n})\r\nexport class RuclibKnobModule { }\r\n","// interface for reusable knob component\r\nexport interface KnobConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n size?: number;\r\n valueColor?: string;\r\n valueWeight?: string;\r\n valueSize?: number;\r\n strokeBackground?: string;\r\n progressBackground?: string | string[];\r\n strokeWidth?: number;\r\n roundedCorner?: boolean;\r\n showHandle?: boolean;\r\n handleBackground?: string;\r\n handleBorderColor?: string;\r\n handleBorderWidth?: number;\r\n valuePrefix?: string;\r\n valueSuffix?: string;\r\n readOnly?: boolean;\r\n disabled?: boolean;\r\n enableTooltip?: boolean;\r\n animateOnHover?: boolean;\r\n isRangeMode?: boolean;\r\n rangeStartValue?: number;\r\n rangeEndValue?: number;\r\n showButtons?: boolean;\r\n knobType?: 'arc' | 'horizontal' | 'vertical';\r\n};\r\n\r\nexport interface KnobRangeValue { start: number, end: number }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG;AAC7B,IAAA,GAAG,EAAU,CAAC;AACd,IAAA,GAAG,EAAU,GAAG;AAChB,IAAA,IAAI,EAAU,CAAC;AACf,IAAA,IAAI,EAAU,GAAG;AACjB,IAAA,UAAU,EAAU,EAAE;AACtB,IAAA,gBAAgB,EAAU,WAAW;AACrC,IAAA,kBAAkB,EAAsB,MAAM;AAC9C,IAAA,WAAW,EAAU,EAAE;AACvB,IAAA,SAAS,EAAU,EAAE;AACrB,IAAA,WAAW,EAAU,QAAQ;AAC7B,IAAA,UAAU,EAAW,IAAI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sBAFP,YAAY;uBAAC,gBAAgB,CAAA;;sBAC7B,YAAY;uBAAC,iBAAiB,CAAA;gBAc/B,MAAM,EAAA,CAAA;sBAFL,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,CAAA;;sBAC3C,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,CAAA;;;MElKjC,gBAAgB,CAAA;;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAhB,gBAAgB,EAAA,YAAA,EAAA,CAJzB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAPnB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,eAAe;AACf,QAAA,aAAa,aAKL,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAXzB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;4FAOJ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAb5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,aAAa;AACd,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;AACpB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA,CAAA;;;ACQA;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ruc-lib-knob.mjs","sources":["../../../../../libs/ruclib/knob/src/models/knob-config.model.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.ts","../../../../../libs/ruclib/knob/src/lib/ruclib-knob/ruclib-knob.component.html","../../../../../libs/ruclib/knob/src/lib/ruclib-knob.module.ts","../../../../../libs/ruclib/knob/src/models/knob.interface.ts","../../../../../libs/ruclib/knob/src/ruc-lib-knob.ts"],"sourcesContent":["export const DefaultKnobConfig = {\r\n min:<number> 0,\r\n max:<number> 100,\r\n step:<number> 1,\r\n size:<number> 150,\r\n valueColor:<string> '',\r\n strokeBackground:<string> 'lightblue',\r\n progressBackground: <string | string[]> 'blue', // 'green' | ['green'] | ['red', 'blue', 'green', 'black', 'orange'],\r\n strokeWidth:<number> 15,\r\n valueSize:<number> 20,\r\n valueWeight:<string> 'normal',\r\n showHandle:<boolean> true,\r\n handleBackground:<string> 'lightblue',\r\n handleBorderColor:<string> 'blue',\r\n handleBorderWidth:<number> 4,\r\n roundedCorner:<boolean> true,\r\n valuePrefix:<string> '',\r\n valueSuffix:<string> '',\r\n readOnly:<boolean> false,\r\n disabled:<boolean> false,\r\n enableTooltip:<boolean> false,\r\n animateOnHover:<boolean> false,\r\n isRangeMode:<boolean> false,\r\n rangeStartValue:<number> 25,\r\n rangeEndValue:<number> 75,\r\n showButtons:<boolean> false,\r\n knobType:<'horizontal' | 'vertical' | 'arc'> 'arc' // 'horizontal' | 'vertical' | 'arc'\r\n }\r\n\r\n export const DEFAULT_LABELS = {\r\n incrementButton:<string> 'Increment Value',\r\n decrementButton:<string> 'Decrement Value'\r\n }","import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { KnobConfig } from '../../models/knob.interface';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DEFAULT_LABELS, DefaultKnobConfig } from '../../models/knob-config.model';\r\n\r\n@Component({\r\n selector: 'uxp-ruclib-knob',\r\n templateUrl: './ruclib-knob.component.html',\r\n styleUrls: ['./ruclib-knob.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => RuclibKnobComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class RuclibKnobComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\r\n\r\n @ViewChild('bgArc') bgArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('progressArc') progressArcRef!: ElementRef<SVGPathElement>;\r\n @ViewChild('handle') handleRef!: ElementRef<SVGCircleElement>;\r\n @ViewChild('horizontalLine') horizontalLineRef!: ElementRef<SVGLineElement>;\r\n @ViewChild('verticalLine') verticalLineRef!: ElementRef<SVGLineElement>;\r\n\r\n @Output() rucEvent = new EventEmitter<any>();\r\n\r\n @Input() customTheme?: string = '';\r\n @Input() rucInputData!: KnobConfig;\r\n\r\n activeHandle: 'start' | 'end' | '' = '';\r\n value: number = 0;\r\n dragging:boolean = false;\r\n centerX:number = 0;\r\n centerY:number = 0;\r\n radius:number = 0;\r\n startAngle:number = 210;\r\n endAngle:number = 510;\r\n arcLength:number = 300;\r\n changeColorAfter:number = 0;\r\n tooltipX:number = 0;\r\n tooltipY:number = 0;\r\n showTooltip: boolean = false;\r\n hovering:boolean = false;\r\n\r\n config = DefaultKnobConfig;\r\n\r\n private onTouched = () => { };\r\n private onChange = (value: number) => { };\r\n\r\n constructor(private cdr: ChangeDetectorRef) {\r\n }\r\n\r\n /**\r\n * handling form control binding to write value\r\n * @param val \r\n */\r\n writeValue(val: number): void {\r\n this.value = val;\r\n }\r\n\r\n /**\r\n * registering onChange method to use as form control\r\n * @param fn \r\n */\r\n registerOnChange(fn: () => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n /**\r\n * registering onTouch method to use as form control\r\n * @param fn \r\n */\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n /**\r\n * registering disabled state\r\n * @param isDisabled \r\n */\r\n setDisabledState(isDisabled: boolean): void {\r\n this.config.disabled = isDisabled;\r\n }\r\n\r\n /**\r\n * handling input data changes\r\n * updating default config with user provided config\r\n * @param changes \r\n */\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes && changes['rucInputData'] && changes['rucInputData'].currentValue) {\r\n this.config = { ...this.config, ...changes['rucInputData'].currentValue }\r\n }\r\n }\r\n\r\n /**\r\n * handling change on component initilization\r\n */\r\n ngOnInit() {\r\n this.adjustDefaultValue();\r\n if (this.config.knobType != 'arc') {\r\n this.config.isRangeMode = false;\r\n this.config.enableTooltip = false;\r\n }\r\n if (Array.isArray(this.config.progressBackground)) {\r\n this.changeColorAfter = Math.round(100 / this.config.progressBackground.length);\r\n }\r\n }\r\n\r\n /**\r\n * handling change after view initilization\r\n */\r\n ngAfterViewInit() {\r\n this.centerX = this.config.size / 2;\r\n this.centerY = this.config.size / 2;\r\n this.radius = this.config.size / 2 - 20;\r\n\r\n this.bgArcRef?.nativeElement.setAttribute('d',\r\n this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, this.endAngle));\r\n this.updateArc();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n /**\r\n * handling change when dragin on svg\r\n * @returns \r\n */\r\n startDrag() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.dragging = true;\r\n this.showTooltip = true;\r\n this.rucEvent.emit({ eventName: 'dragStart', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * rounding value to increment or decrement based on provide config value for step\r\n * @param value \r\n * @returns \r\n */\r\n roundToStep(value: number): number {\r\n const stepped = Math.round((value - this.config.min) / this.config.step) * this.config.step + this.config.min;\r\n return this.clamp(stepped, this.config.min, this.config.max);\r\n }\r\n\r\n /**\r\n * adjusting default value within min & max value when its provide out of range\r\n */\r\n adjustDefaultValue() {\r\n if (this.value < this.config.min) {\r\n this.value = this.config.min;\r\n }\r\n if (this.value > this.config.max) {\r\n this.value = this.config.max;\r\n }\r\n if (this.config.isRangeMode) {\r\n if (this.config.rangeStartValue < this.config.min || this.config.rangeStartValue > this.config.max) {\r\n this.config.rangeStartValue = this.config.min;\r\n }\r\n if (this.config.rangeEndValue > this.config.max || this.config.rangeEndValue < this.config.min) {\r\n this.config.rangeEndValue = this.config.max;\r\n }\r\n }\r\n this.updateArc();\r\n }\r\n\r\n /**\r\n * handle changes on mouseUp and touchEnd event\r\n */\r\n @HostListener('window:mouseup')\r\n @HostListener('window:touchend')\r\n stopDrag() {\r\n this.dragging = false;\r\n this.showTooltip = false;\r\n this.rucEvent.emit({ eventName: 'dragEnd', eventOutput: { value: this.getEventOutput() } })\r\n }\r\n\r\n /**\r\n * handle changes on mouseMove and touch event\r\n * @param event \r\n * @returns \r\n */\r\n @HostListener('window:mousemove', ['$event'])\r\n @HostListener('window:touchmove', ['$event'])\r\n onMove(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || !this.dragging) return;\r\n event.preventDefault();\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * handling change on main svg click\r\n * @param event \r\n * @returns \r\n */\r\n onSvgClick(event: MouseEvent | TouchEvent) {\r\n if (this.config.disabled || this.config.readOnly || this.config.isRangeMode) return;\r\n this.setProgressFromEvent(event);\r\n }\r\n\r\n /**\r\n * get ref of active svg element for different type of knobs\r\n * @returns \r\n */\r\n getTargetSvg(): SVGElement | null {\r\n if (this.config.knobType === 'horizontal') {\r\n return this.horizontalLineRef.nativeElement.closest('svg');\r\n } else\r\n if (this.config.knobType === 'vertical') {\r\n return this.verticalLineRef.nativeElement.closest('svg');\r\n }\r\n return this.bgArcRef.nativeElement.closest('svg');\r\n\r\n }\r\n\r\n /**\r\n * updating progrees value while dragging the handle on stroke bar\r\n * @param e \r\n * @returns \r\n */\r\n setProgressFromEvent(e: MouseEvent | TouchEvent) {\r\n const svg = this.getTargetSvg();\r\n if (!svg) {\r\n return;\r\n }\r\n const rect = svg.getBoundingClientRect();\r\n const clientX = (e instanceof TouchEvent) ? e.touches[0].clientX : e.clientX;\r\n const clientY = (e instanceof TouchEvent) ? e.touches[0].clientY : e.clientY;\r\n\r\n const x = clientX - rect.left;\r\n const y = clientY - rect.top;\r\n\r\n let rawPercent: number;\r\n if (this.config.knobType === 'horizontal') {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = ((x - this.config.strokeWidth) / usableWidth) * 100;\r\n } else if (this.config.knobType === 'vertical') {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n rawPercent = (1 - (y - this.config.strokeWidth) / usableHeight) * 100;\r\n } else {\r\n const angle = this.getAngleFromPoint(x, y);\r\n if (angle === null) return;\r\n rawPercent = ((angle - this.startAngle) / this.arcLength) * 100;\r\n }\r\n\r\n const clampedPercent = this.clamp(rawPercent, 0, 100);\r\n let absolutePercent = this.config.min + (clampedPercent / 100) * (this.config.max - this.config.min);\r\n absolutePercent = this.roundToStep(absolutePercent);\r\n\r\n if (this.config.isRangeMode) {\r\n if (this.activeHandle === 'start') {\r\n if (absolutePercent > this.config.rangeEndValue) {\r\n absolutePercent = this.config.rangeEndValue;\r\n }\r\n this.config.rangeStartValue = absolutePercent;\r\n } else {\r\n if (absolutePercent < this.config.rangeStartValue) {\r\n absolutePercent = this.config.rangeStartValue;\r\n }\r\n this.config.rangeEndValue = absolutePercent;\r\n }\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: { start: this.config.rangeStartValue, end: this.config.rangeEndValue } })\r\n } else {\r\n this.value = absolutePercent;\r\n this.rucEvent.emit({ eventName: 'valueChange', eventOutput: this.value });\r\n }\r\n\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * updating svg progress based on value changes\r\n * @returns \r\n */\r\n updateArc() {\r\n if (this.config.knobType !== 'arc') {\r\n return\r\n }\r\n\r\n const scaled = (this.value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n\r\n const path = this.describeArc(this.centerX, this.centerY, this.radius, this.startAngle, angle);\r\n this.progressArcRef?.nativeElement.setAttribute('d', path);\r\n\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n this.handleRef?.nativeElement.setAttribute('cx', pos.x.toString());\r\n this.handleRef?.nativeElement.setAttribute('cy', pos.y.toString());\r\n\r\n // for tooltip\r\n const angleRad = (angle - 90) * Math.PI / 180;\r\n const tooltipRadius = this.radius + this.config.strokeWidth / 2 + 10;\r\n this.tooltipX = this.centerX + tooltipRadius * Math.cos(angleRad);\r\n this.tooltipY = this.centerY + tooltipRadius * Math.sin(angleRad);\r\n }\r\n\r\n /**\r\n * return maximum value out of min & max range\r\n * @param val \r\n * @param min \r\n * @param max \r\n * @returns \r\n */\r\n clamp(val: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, val));\r\n }\r\n\r\n /**\r\n * getting calulated point from polar coordinates to cartesian coordinates\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param angleDeg \r\n * @returns \r\n */\r\n polarToCartesian(cx: number, cy: number, r: number, angleDeg: number) {\r\n const angleRad = (angleDeg - 90) * Math.PI / 180;\r\n return {\r\n x: cx + r * Math.cos(angleRad),\r\n y: cy + r * Math.sin(angleRad)\r\n };\r\n }\r\n\r\n /**\r\n * getting radius for arc handle based on stroke width \r\n * @returns \r\n */\r\n getRadius() {\r\n return this.config.strokeWidth ? (this.config.strokeWidth / 2) - ((this.config.handleBorderWidth ?? 0) / 2) : 4;\r\n }\r\n\r\n /**\r\n * getting svg box size based on different knob shapes\r\n * @returns \r\n */\r\n getSvgViewBoxSize() {\r\n let width = this.config.size, height = this.config.size;\r\n if (this.config.knobType === 'horizontal') {\r\n height = this.config.strokeWidth + 40;\r\n }\r\n if (this.config.knobType === 'vertical') {\r\n height = this.config.size / 4 + 5\r\n width = this.config.strokeWidth + 40;\r\n }\r\n return '0 0 ' + width + ' ' + height\r\n }\r\n\r\n /**\r\n * geeting dynamic bg color for progress stroke based on provide config for \"progressBackground\"\r\n */\r\n get progressColor(): string {\r\n if (typeof this.config.progressBackground === 'string') {\r\n return this.config.progressBackground;\r\n } else\r\n if ((this.config.progressBackground as string[])?.length == 1) {\r\n return this.config.progressBackground[0];\r\n } else\r\n if ((this.config.progressBackground as string[]).length > 1) {\r\n return this.config.progressBackground[Math.ceil(this.value / this.changeColorAfter) - 1]\r\n } else {\r\n return 'green'\r\n }\r\n }\r\n\r\n /**\r\n * getting coordinates for arc based on provided inputs\r\n * @param cx \r\n * @param cy \r\n * @param r \r\n * @param start \r\n * @param end \r\n * @returns \r\n */\r\n describeArc(cx: number, cy: number, r: number, start: number, end: number): string {\r\n const startPos = this.polarToCartesian(cx, cy, r, end);\r\n const endPos = this.polarToCartesian(cx, cy, r, start);\r\n const largeArc = end - start <= 180 ? 0 : 1;\r\n\r\n return [\r\n \"M\", startPos.x, startPos.y,\r\n \"A\", r, r, 0, largeArc, 0, endPos.x, endPos.y\r\n ].join(\" \");\r\n }\r\n\r\n /**\r\n * getting calculated angle for arc progress based on provided input\r\n * @param x \r\n * @param y \r\n * @returns \r\n */\r\n getAngleFromPoint(x: number, y: number): number | null {\r\n const dx = x - this.centerX;\r\n if (dx === 0) {\r\n return null;\r\n }\r\n const dy = y - this.centerY;\r\n\r\n let angle = Math.atan2(dy, dx) * 180 / Math.PI + 90;\r\n if (angle < 0) angle += 360;\r\n\r\n const normalizedStart = this.startAngle % 360;\r\n let delta = angle - normalizedStart;\r\n if (delta < 0) delta += 360;\r\n\r\n if (delta > this.arcLength) return null;\r\n\r\n return this.startAngle + delta;\r\n }\r\n\r\n /**\r\n * increment value on click on button\r\n * @returns \r\n */\r\n increment() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value + this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * decrement value on click on button\r\n * @returns \r\n */\r\n decrement() {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.value = this.clamp((this.value - this.config.step), this.config.min, this.config.max);\r\n this.updateArc();\r\n this.onChange(this.value);\r\n this.onTouched();\r\n }\r\n /**\r\n * change value using arrow keys for accessibility\r\n * @param event \r\n * @returns \r\n */\r\n onKeyDown(event: KeyboardEvent) {\r\n if (this.config.readOnly || this.config.disabled) return;\r\n\r\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\r\n this.increment();\r\n event.preventDefault();\r\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\r\n this.decrement();\r\n event.preventDefault();\r\n }\r\n }\r\n /**\r\n * geeting arc coordinated for range selection mode\r\n * @returns \r\n */\r\n getRangeArcPath(): string {\r\n const startAngle = this.startAngle + (this.config.rangeStartValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n const endAngle = this.startAngle + (this.config.rangeEndValue / (this.config.max - this.config.min)) * (this.endAngle - this.startAngle);\r\n return this.describeArc(this.centerX, this.centerY, this.radius, startAngle, endAngle);\r\n }\r\n\r\n /**\r\n * handling mousedown when range mode is enabled \r\n * @param event \r\n * @param handleType \r\n * @returns \r\n */\r\n onHandleMouseDown(event: MouseEvent, handleType: 'start' | 'end') {\r\n if (this.config.disabled || this.config.readOnly) return;\r\n this.activeHandle = handleType;\r\n this.startDrag();\r\n }\r\n\r\n /**\r\n * getting x & y to update handle position when dragging\r\n * @param value \r\n * @returns \r\n */\r\n getHandlePosition(value: number): { x: number, y: number } {\r\n const scaled = (value - this.config.min) / (this.config.max - this.config.min);\r\n const angle = this.startAngle + scaled * this.arcLength;\r\n const pos = this.polarToCartesian(this.centerX, this.centerY, this.radius, angle);\r\n return pos;\r\n }\r\n\r\n /**\r\n * geeting handle position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalHandleX(value: number): number {\r\n const usableWidth = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableWidth * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineStartX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeStartValue : this.config.min);\r\n }\r\n\r\n /**\r\n * geeting end position for horizontal line\r\n * @param value \r\n * @returns \r\n */\r\n getHorizontalLineEndX(): number {\r\n return this.getHorizontalHandleX(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * geeting handle position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalHandleY(value: number): number {\r\n const usableHeight = this.config.size - 2 * this.config.strokeWidth;\r\n const ratio = 1 - (value - this.config.min) / (this.config.max - this.config.min);\r\n return this.config.strokeWidth + usableHeight * ratio;\r\n }\r\n\r\n /**\r\n * geeting start position for vertical line\r\n * @param value \r\n * @returns \r\n */\r\n getVerticalLineStartY(): number {\r\n return this.getVerticalHandleY(this.config.isRangeMode ? this.config.rangeEndValue : this.value);\r\n }\r\n\r\n /**\r\n * get output to be emitted based on range mode\r\n * @returns \r\n */\r\n getEventOutput() {\r\n if (this.config.isRangeMode) {\r\n return { start: this.config.rangeStartValue, end: this.config.rangeEndValue };\r\n }\r\n return this.value;\r\n }\r\n\r\n /**\r\n * get correct page label from object\r\n * @param labelName \r\n * @returns string\r\n */\r\n getLabel(labelName: string): string {\r\n return (DEFAULT_LABELS as any)[labelName] || '';\r\n }\r\n\r\n\r\n // component end\r\n}\r\n","<div class=\"knob-container {{customTheme}}\" [style.width.px]=\"config.size\">\r\n <svg [ngClass]=\"{ 'hover-animate': config.animateOnHover }\" [attr.viewBox]=\"getSvgViewBoxSize()\"\r\n (click)=\"onSvgClick($event)\" [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : 'pointer'\"\r\n [class.disabled]=\"config.disabled\" [class.read-only]=\"config.readOnly\"\r\n (mouseenter)=\"showTooltip = true; hovering=true; rucEvent.emit({eventName: 'hover'})\"\r\n (mouseleave)=\"showTooltip = false; hovering=false\" (focus)=\"rucEvent.emit({eventName: 'focus'})\"\r\n (blur)=\"rucEvent.emit({eventName: 'blur'})\" (keydown)=\"onKeyDown($event)\" [attr.role]=\"'slider'\"\r\n [attr.aria-valuemin]=\"config.min\" [attr.aria-valuemax]=\"config.max\" [attr.aria-valuenow]=\"value\"\r\n [attr.aria-disabled]=\"config.disabled\" [ngSwitch]=\"config.knobType\">\r\n\r\n <!-- arc knob -->\r\n <ng-container *ngSwitchCase=\"'arc'\">\r\n\r\n <!-- glow effect -->\r\n <defs>\r\n <filter id=\"glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feDropShadow dx=\"0\" dy=\"0\" stdDeviation=\"4\" [attr.flood-color]=\"config.strokeBackground\"\r\n flood-opacity=\"0.75\" />\r\n </filter>\r\n </defs>\r\n\r\n <!-- arc main stroke -->\r\n <path #bgArc fill=\"none\" class=\"main-path\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc progress stroke - single handle -->\r\n <path *ngIf=\"!config.isRangeMode\" #progressArc fill=\"none\" class=\"progress-path\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.stroke-linecap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- arc - single handle -->\r\n <circle *ngIf=\"!config.isRangeMode\" #handle class=\"handle\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.showHandle ? config.handleBackground : 'transparent'\"\r\n [attr.stroke-width]=\"config.showHandle ? config.handleBorderWidth : 0\"\r\n [attr.stroke]=\"config.showHandle ? config.handleBorderColor : 'transparent'\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n\r\n <!-- arc progress stroke - dual handle for range -->\r\n <path *ngIf=\"config.isRangeMode\" [attr.d]=\"getRangeArcPath()\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" fill=\"none\" stroke-linecap=\"round\" />\r\n\r\n <!-- arc dual handle - start -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeStartValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeStartValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'start')\" />\r\n\r\n <!-- arc dual handle - end -->\r\n <circle *ngIf=\"config.isRangeMode\" [attr.cx]=\"getHandlePosition(config.rangeEndValue).x\"\r\n [attr.cy]=\"getHandlePosition(config.rangeEndValue).y\" [attr.r]=\"getRadius()\"\r\n [attr.fill]=\"config.handleBackground\" [attr.stroke-width]=\"config.handleBorderWidth\"\r\n [attr.stroke]=\"config.handleBorderColor\" (mousedown)=\"onHandleMouseDown($event, 'end')\" />\r\n </ng-container>\r\n\r\n <!-- horizontal line -->\r\n <ng-container *ngSwitchCase=\"'horizontal'\">\r\n <line #horizontalLine [attr.x1]=\"config.strokeWidth\" [attr.x2]=\"config.size\" [attr.y1]=\"config.strokeWidth + 10\"\r\n [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for horizontal line -->\r\n <line [attr.x1]=\"getHorizontalLineStartX()\" [attr.x2]=\"getHorizontalLineEndX()\"\r\n [attr.y1]=\"config.strokeWidth + 10\" [attr.y2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\"\r\n [attr.stroke-width]=\"config.strokeWidth\" />\r\n\r\n <!-- handle for horizontal line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.x]=\"getHorizontalHandleX(value)\"\r\n [attr.y]=\"config.strokeWidth + 10 - getRadius()-1\" [attr.width]=\"config.strokeWidth\"\r\n [attr.height]=\"config.strokeWidth\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n\r\n <!-- vertical line -->\r\n <ng-container *ngSwitchCase=\"'vertical'\">\r\n <line #verticalLine [attr.y1]=\"config.strokeWidth/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"config.strokeBackground\"\r\n [attr.stroke-width]=\"config.strokeWidth/4\" [attr.line-cap]=\"config.roundedCorner ? 'round' : ''\" />\r\n\r\n <!-- progress for vertical line -->\r\n <line [attr.y1]=\"getVerticalLineStartY()/4\" [attr.y2]=\"config.size/4\" [attr.x1]=\"config.strokeWidth + 10\"\r\n [attr.x2]=\"config.strokeWidth + 10\" [attr.stroke]=\"progressColor\" [attr.stroke-width]=\"config.strokeWidth/4\" />\r\n\r\n <!-- Handle for vertical line -->\r\n <rect *ngIf=\"!config.isRangeMode\" [attr.y]=\"getVerticalHandleY(value)/4\" [attr.x]=\"config.strokeWidth + 7.5\"\r\n [attr.width]=\"config.strokeWidth/4\" [attr.height]=\"config.strokeWidth/4\"\r\n [attr.fill]=\"config.handleBackground ? config.handleBackground : progressColor\" (mousedown)=\"startDrag()\"\r\n (touchstart)=\"startDrag()\" />\r\n </ng-container>\r\n </svg>\r\n\r\n <!-- tooltip -->\r\n <div class=\"tooltip\" *ngIf=\"config.enableTooltip && !config.isRangeMode\" [class.show]=\"showTooltip\"\r\n [style.left.px]=\"tooltipX\" [style.top.px]=\"tooltipY\">\r\n {{ value}}\r\n </div>\r\n\r\n <!-- progress value -->\r\n <div class=\"progress-value {{config.knobType}}\" [style.maxWidth.px]=\"config.size * 2 - 50\"\r\n [style.color]=\"config.valueColor\" [style.fontSize.px]=\"config.valueSize\" [style.fontWeight]=\"config.valueWeight\"\r\n [style.cursor]=\"(config.readOnly || config.disabled) ? 'not-allowed' : ''\" [class.disabled]=\"config.disabled\"\r\n [class.read-only]=\"config.readOnly\" title=\"{{config.valuePrefix +''+value+''+config.valueSuffix}}\">\r\n <ng-container *ngIf=\"!config.isRangeMode\">\r\n <span class=\"value-prefix\">{{config.valuePrefix}}</span>\r\n <span class=\"value\">{{ value }}</span>\r\n <span class=\"value-suffix\">{{config.valueSuffix}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"config.isRangeMode\">\r\n <span class=\"value\">{{config.rangeStartValue}} : {{config.rangeEndValue}}</span>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- increment-decrement button -->\r\n <div class=\"arc-buttons\" *ngIf=\"!config.isRangeMode && config.showButtons\">\r\n <button mat-mini-fab color=\"secondary\" (click)=\"decrement()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('decrementButton')\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n \r\n <button mat-mini-fab color=\"secondary\" (click)=\"increment()\" [disabled]=\"config.disabled || config.readOnly\" (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-label]=\"getLabel('incrementButton')\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n \r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RuclibKnobComponent } from './ruclib-knob/ruclib-knob.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule\r\n ],\r\n declarations: [\r\n RuclibKnobComponent\r\n ],\r\n exports: [RuclibKnobComponent],\r\n})\r\nexport class RuclibKnobModule { }\r\n","// interface for reusable knob component\r\nexport interface KnobConfig {\r\n\r\n /**\r\n * Defines the minimum value of the knob.\r\n * @type {number}\r\n * @default 0\r\n */\r\n min?: number;\r\n\r\n /**\r\n * Defines the maximum value of the knob.\r\n * @type {number}\r\n * @default 100\r\n */\r\n max?: number;\r\n\r\n /**\r\n * Defines the step size for incrementing/decrementing the knob value.\r\n * @type {number}\r\n * @default 1\r\n */\r\n step?: number;\r\n\r\n /**\r\n * Defines the size (width and height) of the knob in pixels.\r\n * @type {number}\r\n * @default 150\r\n */\r\n size?: number;\r\n\r\n /**\r\n * Defines the color of the displayed value.\r\n * @type {string}\r\n * @default ''\r\n */\r\n valueColor?: string;\r\n\r\n /**\r\n * Defines the font weight of the displayed value.\r\n * @type {string}\r\n * @default 'normal'\r\n */\r\n valueWeight?: string;\r\n\r\n /**\r\n * Defines the font size of the displayed value in pixels.\r\n * @type {number}\r\n * @default 20\r\n */\r\n valueSize?: number;\r\n\r\n /**\r\n * Defines the background color of the knob's stroke.\r\n * @type {string}\r\n * @default 'lightblue'\r\n */\r\n strokeBackground?: string;\r\n\r\n /**\r\n * Defines the background color of the progress stroke. Can be a single color or an array of colors for gradient.\r\n * @type {string | string[]}\r\n * @default 'blue'\r\n */\r\n progressBackground?: string | string[];\r\n\r\n /**\r\n * Defines the width of the knob's stroke in pixels.\r\n * @type {number}\r\n * @default 15\r\n */\r\n strokeWidth?: number;\r\n\r\n /**\r\n * Specifies whether the corners of the progress stroke should be rounded.\r\n * @type {boolean}\r\n * @default true\r\n */\r\n roundedCorner?: boolean;\r\n\r\n /**\r\n * Specifies whether a handle should be displayed on the knob.\r\n * @type {boolean}\r\n * @default true\r\n */\r\n showHandle?: boolean;\r\n\r\n /* Defines the background color of the handle.\r\n * @type {string}\r\n * @default 'lightblue'\r\n */\r\n handleBackground?: string;\r\n\r\n /**\r\n * Defines the border color of the handle.\r\n * @type {string}\r\n * @default 'blue'\r\n */\r\n handleBorderColor?: string;\r\n\r\n /**\r\n * Defines the border width of the handle.\r\n * @type {number}\r\n * @default 4\r\n */\r\n handleBorderWidth?: number;\r\n\r\n\r\n /**\r\n * Defines the prefix for the displayed value (e.g., '$').\r\n * @type {string}\r\n * @default ''\r\n */\r\n valuePrefix?: string;\r\n\r\n /**\r\n * Defines the suffix for the displayed value (e.g., '%').\r\n * @type {string}\r\n * @default ''\r\n */\r\n valueSuffix?: string;\r\n\r\n /**\r\n * Specifies whether the knob is read-only.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n readOnly?: boolean;\r\n\r\n\r\n /**\r\n * Specifies whether the knob is disabled.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Specifies whether a tooltip should be enabled for the knob.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n enableTooltip?: boolean;\r\n\r\n /**\r\n * Specifies whether the knob animates on hover.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n animateOnHover?: boolean;\r\n\r\n /**\r\n * Specifies whether the knob operates in range mode, allowing selection of a value range.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n isRangeMode?: boolean;\r\n\r\n /**\r\n * Defines the starting value for the range when `isRangeMode` is true.\r\n * @type {number}\r\n * @default 25\r\n */\r\n rangeStartValue?: number;\r\n\r\n /**\r\n * Defines the ending value for the range when `isRangeMode` is true.\r\n * @type {number}\r\n * @default 75\r\n */\r\n rangeEndValue?: number;\r\n\r\n /**\r\n * Specifies whether increment/decrement buttons should be shown.\r\n * @type {boolean}\r\n * @default false\r\n */\r\n showButtons?: boolean;\r\n\r\n /**\r\n * Defines the type of knob.\r\n * @type {'arc' | 'horizontal' | 'vertical'}\r\n * @default 'arc'\r\n */\r\n knobType?: 'arc' | 'horizontal' | 'vertical';\r\n};\r\n\r\nexport interface KnobRangeValue { start: number, end: number }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG;AAC7B,IAAA,GAAG,EAAU,CAAC;AACd,IAAA,GAAG,EAAU,GAAG;AAChB,IAAA,IAAI,EAAU,CAAC;AACf,IAAA,IAAI,EAAU,GAAG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AA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA,CAAA;;;ACqKA;;ACzLD;;AAEG;;;;"}
@@ -1,29 +1,154 @@
1
1
  export interface KnobConfig {
2
+ /**
3
+ * Defines the minimum value of the knob.
4
+ * @type {number}
5
+ * @default 0
6
+ */
2
7
  min?: number;
8
+ /**
9
+ * Defines the maximum value of the knob.
10
+ * @type {number}
11
+ * @default 100
12
+ */
3
13
  max?: number;
14
+ /**
15
+ * Defines the step size for incrementing/decrementing the knob value.
16
+ * @type {number}
17
+ * @default 1
18
+ */
4
19
  step?: number;
20
+ /**
21
+ * Defines the size (width and height) of the knob in pixels.
22
+ * @type {number}
23
+ * @default 150
24
+ */
5
25
  size?: number;
26
+ /**
27
+ * Defines the color of the displayed value.
28
+ * @type {string}
29
+ * @default ''
30
+ */
6
31
  valueColor?: string;
32
+ /**
33
+ * Defines the font weight of the displayed value.
34
+ * @type {string}
35
+ * @default 'normal'
36
+ */
7
37
  valueWeight?: string;
38
+ /**
39
+ * Defines the font size of the displayed value in pixels.
40
+ * @type {number}
41
+ * @default 20
42
+ */
8
43
  valueSize?: number;
44
+ /**
45
+ * Defines the background color of the knob's stroke.
46
+ * @type {string}
47
+ * @default 'lightblue'
48
+ */
9
49
  strokeBackground?: string;
50
+ /**
51
+ * Defines the background color of the progress stroke. Can be a single color or an array of colors for gradient.
52
+ * @type {string | string[]}
53
+ * @default 'blue'
54
+ */
10
55
  progressBackground?: string | string[];
56
+ /**
57
+ * Defines the width of the knob's stroke in pixels.
58
+ * @type {number}
59
+ * @default 15
60
+ */
11
61
  strokeWidth?: number;
62
+ /**
63
+ * Specifies whether the corners of the progress stroke should be rounded.
64
+ * @type {boolean}
65
+ * @default true
66
+ */
12
67
  roundedCorner?: boolean;
68
+ /**
69
+ * Specifies whether a handle should be displayed on the knob.
70
+ * @type {boolean}
71
+ * @default true
72
+ */
13
73
  showHandle?: boolean;
14
74
  handleBackground?: string;
75
+ /**
76
+ * Defines the border color of the handle.
77
+ * @type {string}
78
+ * @default 'blue'
79
+ */
15
80
  handleBorderColor?: string;
81
+ /**
82
+ * Defines the border width of the handle.
83
+ * @type {number}
84
+ * @default 4
85
+ */
16
86
  handleBorderWidth?: number;
87
+ /**
88
+ * Defines the prefix for the displayed value (e.g., '$').
89
+ * @type {string}
90
+ * @default ''
91
+ */
17
92
  valuePrefix?: string;
93
+ /**
94
+ * Defines the suffix for the displayed value (e.g., '%').
95
+ * @type {string}
96
+ * @default ''
97
+ */
18
98
  valueSuffix?: string;
99
+ /**
100
+ * Specifies whether the knob is read-only.
101
+ * @type {boolean}
102
+ * @default false
103
+ */
19
104
  readOnly?: boolean;
105
+ /**
106
+ * Specifies whether the knob is disabled.
107
+ * @type {boolean}
108
+ * @default false
109
+ */
20
110
  disabled?: boolean;
111
+ /**
112
+ * Specifies whether a tooltip should be enabled for the knob.
113
+ * @type {boolean}
114
+ * @default false
115
+ */
21
116
  enableTooltip?: boolean;
117
+ /**
118
+ * Specifies whether the knob animates on hover.
119
+ * @type {boolean}
120
+ * @default false
121
+ */
22
122
  animateOnHover?: boolean;
123
+ /**
124
+ * Specifies whether the knob operates in range mode, allowing selection of a value range.
125
+ * @type {boolean}
126
+ * @default false
127
+ */
23
128
  isRangeMode?: boolean;
129
+ /**
130
+ * Defines the starting value for the range when `isRangeMode` is true.
131
+ * @type {number}
132
+ * @default 25
133
+ */
24
134
  rangeStartValue?: number;
135
+ /**
136
+ * Defines the ending value for the range when `isRangeMode` is true.
137
+ * @type {number}
138
+ * @default 75
139
+ */
25
140
  rangeEndValue?: number;
141
+ /**
142
+ * Specifies whether increment/decrement buttons should be shown.
143
+ * @type {boolean}
144
+ * @default false
145
+ */
26
146
  showButtons?: boolean;
147
+ /**
148
+ * Defines the type of knob.
149
+ * @type {'arc' | 'horizontal' | 'vertical'}
150
+ * @default 'arc'
151
+ */
27
152
  knobType?: 'arc' | 'horizontal' | 'vertical';
28
153
  }
29
154
  export interface KnobRangeValue {
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@ruc-lib/knob",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
- "@angular/common": "^17.0.0 || ^16.0.0 || ^15.0.0",
7
- "@angular/core": "^17.0.0 || ^16.0.0 || ^15.0.0",
8
- "@angular/material": "^15.2.9 || ^14.0.0 || ^13.0.0",
9
- "@angular/forms": "15.2.10"
6
+ "@angular/material": "^15.2.0",
7
+ "@angular/animations": ">=15.0.0 <18.0.0",
8
+ "@angular/core": ">=15.0.0 <18.0.0",
9
+ "@angular/common": ">=15.0.0 <18.0.0",
10
+ "@angular/forms": ">=15.0.0 <18.0.0",
11
+ "ngx-pagination": "^6.0.3",
12
+ "rxjs": ">=6.5.0 <8.0.0",
13
+ "zone.js": ">=0.11.4 <0.14.0"
10
14
  },
11
15
  "dependencies": {
12
16
  "tslib": "^2.3.0"
@@ -34,4 +38,4 @@
34
38
  "default": "./fesm2020/ruc-lib-knob.mjs"
35
39
  }
36
40
  }
37
- }
41
+ }