@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.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.
Files changed (265) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
  4. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
  8. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
  10. package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
  12. package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
  14. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
  16. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
  18. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
  20. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
  22. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
  24. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
  26. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
  28. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
  30. package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
  32. package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
  38. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
  40. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
  44. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
  46. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
  48. package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
  50. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
  52. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
  54. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
  56. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
  58. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
  60. package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
  62. package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
  64. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
  66. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  68. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  70. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  72. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
  74. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  76. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  78. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  80. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  82. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  84. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  86. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  88. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  90. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  92. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
  94. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
  96. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  98. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  100. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  102. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
  104. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  106. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  108. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  110. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  112. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  114. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  116. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  118. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
  120. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  122. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  124. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  126. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  128. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  130. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
  132. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  134. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  136. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  138. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  140. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  142. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  144. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  146. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
  148. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  150. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  152. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
  154. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  156. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  158. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  160. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  162. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  164. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  166. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
  168. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  170. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  171. package/package.json +5 -5
  172. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  173. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  174. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  175. package/schematics/migrations.json +7 -2
  176. package/schematics/utils/removed-inputs.js +0 -0
  177. package/schematics/utils/renamed-inputs.js +175 -0
  178. package/schematics/utils/styleclass.js +24 -8
  179. package/schematics/utils/versions.json +8 -8
  180. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  181. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  182. package/types/exhaustive-ui-core-api.d.ts +2 -3
  183. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  184. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  185. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  186. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  187. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  188. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  189. package/types/exhaustive-ui-core-button.d.ts +57 -89
  190. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  191. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  192. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  193. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  194. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  195. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  196. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  197. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  198. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  199. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  200. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  201. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  202. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  203. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  204. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  205. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  206. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  207. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  208. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  209. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  210. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  211. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  212. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  213. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  214. package/types/exhaustive-ui-core-image.d.ts +35 -68
  215. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  216. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  217. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  218. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  219. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  220. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  221. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  222. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  223. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  224. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  225. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  226. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  227. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  228. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  229. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  230. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  231. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  232. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  233. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  234. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  235. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  236. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  237. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  238. package/types/exhaustive-ui-core-password.d.ts +56 -93
  239. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  240. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  241. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  242. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  243. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  244. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  245. package/types/exhaustive-ui-core-select.d.ts +137 -188
  246. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  247. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  248. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  249. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  250. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  251. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  252. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  253. package/types/exhaustive-ui-core-table.d.ts +349 -453
  254. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  255. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  256. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  257. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  258. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  259. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  260. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  261. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  262. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  263. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  264. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  265. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, InjectionToken, forwardRef, inject, output, signal, booleanAttribute, numberAttribute, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
2
+ import { Injectable, forwardRef, inject, afterEveryRender, input, numberAttribute, booleanAttribute, output, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
4
  import { $dt } from '@exhaustive-ui/styled';
5
5
  import { SharedModule } from '@exhaustive-ui/core/api';
@@ -55,7 +55,6 @@ var KnobClasses;
55
55
  KnobClasses["text"] = "p-knob-text";
56
56
  })(KnobClasses || (KnobClasses = {}));
57
57
 
58
- const KNOB_INSTANCE = new InjectionToken('KNOB_INSTANCE');
59
58
  const KNOB_VALUE_ACCESSOR = {
60
59
  provide: NG_VALUE_ACCESSOR,
61
60
  useExisting: forwardRef(() => Knob),
@@ -67,87 +66,87 @@ const KNOB_VALUE_ACCESSOR = {
67
66
  */
68
67
  class Knob extends BaseEditableHolder {
69
68
  componentName = 'Knob';
70
- $pcKnob = inject(KNOB_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
71
69
  bindDirectiveInstance = inject(Bind, { self: true });
72
- onAfterViewChecked() {
73
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
70
+ constructor() {
71
+ super();
72
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
74
73
  }
75
- /**
76
- * Style class of the component.
77
- * @deprecated since v20.0.0, use `class` instead.
78
- * @group Props
79
- */
80
- styleClass;
81
74
  /**
82
75
  * Defines a string that labels the input for accessibility.
83
76
  * @group Props
84
77
  */
85
- ariaLabel;
78
+ ariaLabel = input(/* @ts-ignore */
79
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
86
80
  /**
87
81
  * Specifies one or more IDs in the DOM that labels the input field.
88
82
  * @group Props
89
83
  */
90
- ariaLabelledBy;
84
+ ariaLabelledBy = input(/* @ts-ignore */
85
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
91
86
  /**
92
87
  * Index of the element in tabbing order.
93
88
  * @group Props
94
89
  */
95
- tabindex = 0;
90
+ tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
96
91
  /**
97
92
  * Background of the value.
98
93
  * @group Props
99
94
  */
100
- valueColor = $dt('knob.value.background').variable;
95
+ valueColor = input($dt('knob.value.background').variable, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "valueColor" }] : /* istanbul ignore next */ []));
101
97
  /**
102
98
  * Background color of the range.
103
99
  * @group Props
104
100
  */
105
- rangeColor = $dt('knob.range.background').variable;
101
+ rangeColor = input($dt('knob.range.background').variable, /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "rangeColor" }] : /* istanbul ignore next */ []));
106
103
  /**
107
104
  * Color of the value text.
108
105
  * @group Props
109
106
  */
110
- textColor = $dt('knob.text.color').variable;
107
+ textColor = input($dt('knob.text.color').variable, /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "textColor" }] : /* istanbul ignore next */ []));
111
109
  /**
112
110
  * Template string of the value.
113
111
  * @group Props
114
112
  */
115
- valueTemplate = '{value}';
113
+ valueTemplate = input('{value}', /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "valueTemplate" }] : /* istanbul ignore next */ []));
116
115
  /**
117
116
  * Size of the component in pixels.
118
117
  * @group Props
119
118
  */
120
- size = 100;
119
+ size = input(100, { ...(ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {}), transform: numberAttribute });
121
120
  /**
122
121
  * Mininum boundary value.
123
122
  * @group Props
124
123
  */
125
- min = 0;
124
+ min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
126
125
  /**
127
126
  * Maximum boundary value.
128
127
  * @group Props
129
128
  */
130
- max = 100;
129
+ max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
131
130
  /**
132
131
  * Step factor to increment/decrement the value.
133
132
  * @group Props
134
133
  */
135
- step = 1;
134
+ step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
136
135
  /**
137
136
  * Width of the knob stroke.
138
137
  * @group Props
139
138
  */
140
- strokeWidth = 14;
139
+ strokeWidth = input(14, { ...(ngDevMode ? { debugName: "strokeWidth" } : /* istanbul ignore next */ {}), transform: numberAttribute });
141
140
  /**
142
141
  * Whether the show the value inside the knob.
143
142
  * @group Props
144
143
  */
145
- showValue = true;
144
+ showValue = input(true, { ...(ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
146
145
  /**
147
146
  * When present, it specifies that the component value cannot be edited.
148
147
  * @group Props
149
148
  */
150
- readonly = false;
149
+ readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
151
150
  /**
152
151
  * Callback to invoke on value change.
153
152
  * @param {number} value - New value.
@@ -161,22 +160,26 @@ class Knob extends BaseEditableHolder {
161
160
  maxRadians = -Math.PI / 3;
162
161
  value = signal(0, /* @ts-ignore */
163
162
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
164
- windowMouseMoveListener;
165
- windowMouseUpListener;
166
- windowTouchMoveListener;
167
- windowTouchEndListener;
163
+ windowMouseMoveListener = signal(undefined, /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "windowMouseMoveListener" }] : /* istanbul ignore next */ []));
165
+ windowMouseUpListener = signal(undefined, /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "windowMouseUpListener" }] : /* istanbul ignore next */ []));
167
+ windowTouchMoveListener = signal(undefined, /* @ts-ignore */
168
+ ...(ngDevMode ? [{ debugName: "windowTouchMoveListener" }] : /* istanbul ignore next */ []));
169
+ windowTouchEndListener = signal(undefined, /* @ts-ignore */
170
+ ...(ngDevMode ? [{ debugName: "windowTouchEndListener" }] : /* istanbul ignore next */ []));
168
171
  _componentStyle = inject(KnobStyle);
169
172
  mapRange(x, inMin, inMax, outMin, outMax) {
170
173
  return ((x - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
171
174
  }
172
175
  onClick(event) {
173
- if (!this.$disabled() && !this.readonly) {
176
+ if (!this.$disabled() && !this.readonly()) {
174
177
  this.updateValue(event.offsetX, event.offsetY);
175
178
  }
176
179
  }
177
180
  updateValue(offsetX, offsetY) {
178
- let dx = offsetX - this.size / 2;
179
- let dy = this.size / 2 - offsetY;
181
+ let dx = offsetX - this.size() / 2;
182
+ let dy = this.size() / 2 - offsetY;
180
183
  let angle = Math.atan2(dy, dx);
181
184
  let start = -Math.PI / 2 - Math.PI / 6;
182
185
  this.updateModel(angle, start);
@@ -184,67 +187,71 @@ class Knob extends BaseEditableHolder {
184
187
  updateModel(angle, start) {
185
188
  let mappedValue;
186
189
  if (angle > this.maxRadians)
187
- mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.min, this.max);
190
+ mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.min(), this.max());
188
191
  else if (angle < start)
189
- mappedValue = this.mapRange(angle + 2 * Math.PI, this.minRadians, this.maxRadians, this.min, this.max);
192
+ mappedValue = this.mapRange(angle + 2 * Math.PI, this.minRadians, this.maxRadians, this.min(), this.max());
190
193
  else
191
194
  return;
192
- let newValue = Math.round((mappedValue - this.min) / this.step) * this.step + this.min;
195
+ let newValue = Math.round((mappedValue - this.min()) / this.step()) * this.step() + this.min();
193
196
  this.value.set(newValue);
194
197
  this.writeModelValue(this.value());
195
198
  this.onModelChange(this.value());
196
199
  this.onChange.emit(this.value());
197
200
  }
198
201
  onMouseDown(event) {
199
- if (!this.$disabled() && !this.readonly) {
202
+ if (!this.$disabled() && !this.readonly()) {
200
203
  const window = this.document.defaultView || 'window';
201
- this.windowMouseMoveListener = this.renderer.listen(window, 'mousemove', this.onMouseMove.bind(this));
202
- this.windowMouseUpListener = this.renderer.listen(window, 'mouseup', this.onMouseUp.bind(this));
204
+ this.windowMouseMoveListener.set(this.renderer.listen(window, 'mousemove', this.onMouseMove.bind(this)));
205
+ this.windowMouseUpListener.set(this.renderer.listen(window, 'mouseup', this.onMouseUp.bind(this)));
203
206
  event.preventDefault();
204
207
  }
205
208
  }
206
209
  onMouseUp(event) {
207
- if (!this.$disabled() && !this.readonly) {
208
- if (this.windowMouseMoveListener) {
209
- this.windowMouseMoveListener();
210
- this.windowMouseUpListener = null;
210
+ if (!this.$disabled() && !this.readonly()) {
211
+ const windowMouseMoveListener = this.windowMouseMoveListener();
212
+ if (windowMouseMoveListener) {
213
+ windowMouseMoveListener();
214
+ this.windowMouseMoveListener.set(null);
211
215
  }
212
- if (this.windowMouseUpListener) {
213
- this.windowMouseUpListener();
214
- this.windowMouseMoveListener = null;
216
+ const windowMouseUpListener = this.windowMouseUpListener();
217
+ if (windowMouseUpListener) {
218
+ windowMouseUpListener();
219
+ this.windowMouseUpListener.set(null);
215
220
  }
216
221
  event.preventDefault();
217
222
  }
218
223
  }
219
224
  onTouchStart(event) {
220
- if (!this.$disabled() && !this.readonly) {
225
+ if (!this.$disabled() && !this.readonly()) {
221
226
  const window = this.document.defaultView || 'window';
222
- this.windowTouchMoveListener = this.renderer.listen(window, 'touchmove', this.onTouchMove.bind(this));
223
- this.windowTouchEndListener = this.renderer.listen(window, 'touchend', this.onTouchEnd.bind(this));
227
+ this.windowTouchMoveListener.set(this.renderer.listen(window, 'touchmove', this.onTouchMove.bind(this)));
228
+ this.windowTouchEndListener.set(this.renderer.listen(window, 'touchend', this.onTouchEnd.bind(this)));
224
229
  event.preventDefault();
225
230
  }
226
231
  }
227
232
  onTouchEnd(event) {
228
- if (!this.$disabled() && !this.readonly) {
229
- if (this.windowTouchMoveListener) {
230
- this.windowTouchMoveListener();
233
+ if (!this.$disabled() && !this.readonly()) {
234
+ const windowTouchMoveListener = this.windowTouchMoveListener();
235
+ if (windowTouchMoveListener) {
236
+ windowTouchMoveListener();
231
237
  }
232
- if (this.windowTouchEndListener) {
233
- this.windowTouchEndListener();
238
+ const windowTouchEndListener = this.windowTouchEndListener();
239
+ if (windowTouchEndListener) {
240
+ windowTouchEndListener();
234
241
  }
235
- this.windowTouchMoveListener = null;
236
- this.windowTouchEndListener = null;
242
+ this.windowTouchMoveListener.set(null);
243
+ this.windowTouchEndListener.set(null);
237
244
  event.preventDefault();
238
245
  }
239
246
  }
240
247
  onMouseMove(event) {
241
- if (!this.$disabled() && !this.readonly) {
248
+ if (!this.$disabled() && !this.readonly()) {
242
249
  this.updateValue(event.offsetX, event.offsetY);
243
250
  event.preventDefault();
244
251
  }
245
252
  }
246
253
  onTouchMove(event) {
247
- if (!this.$disabled() && !this.readonly && event instanceof TouchEvent && event.touches.length === 1) {
254
+ if (!this.$disabled() && !this.readonly() && event instanceof TouchEvent && event.touches.length === 1) {
248
255
  const rect = this.el.nativeElement.children[0].getBoundingClientRect();
249
256
  const touch = event.targetTouches.item(0);
250
257
  if (touch) {
@@ -255,10 +262,10 @@ class Knob extends BaseEditableHolder {
255
262
  }
256
263
  }
257
264
  updateModelValue(newValue) {
258
- if (newValue > this.max)
259
- this.value.set(this.max);
260
- else if (newValue < this.min)
261
- this.value.set(this.min);
265
+ if (newValue > this.max())
266
+ this.value.set(this.max());
267
+ else if (newValue < this.min())
268
+ this.value.set(this.min());
262
269
  else
263
270
  this.value.set(newValue);
264
271
  this.writeModelValue(this.value());
@@ -266,94 +273,80 @@ class Knob extends BaseEditableHolder {
266
273
  this.onChange.emit(this.value());
267
274
  }
268
275
  onKeyDown(event) {
269
- if (!this.$disabled() && !this.readonly) {
276
+ if (!this.$disabled() && !this.readonly()) {
270
277
  switch (event.code) {
271
278
  case 'ArrowRight':
272
279
  case 'ArrowUp': {
273
280
  event.preventDefault();
274
- this.updateModelValue(this._value + 1);
281
+ this.updateModelValue(this._value() + 1);
275
282
  break;
276
283
  }
277
284
  case 'ArrowLeft':
278
285
  case 'ArrowDown': {
279
286
  event.preventDefault();
280
- this.updateModelValue(this._value - 1);
287
+ this.updateModelValue(this._value() - 1);
281
288
  break;
282
289
  }
283
290
  case 'Home': {
284
291
  event.preventDefault();
285
- this.updateModelValue(this.min);
292
+ this.updateModelValue(this.min());
286
293
  break;
287
294
  }
288
295
  case 'End': {
289
296
  event.preventDefault();
290
- this.updateModelValue(this.max);
297
+ this.updateModelValue(this.max());
291
298
  break;
292
299
  }
293
300
  case 'PageUp': {
294
301
  event.preventDefault();
295
- this.updateModelValue(this._value + 10);
302
+ this.updateModelValue(this._value() + 10);
296
303
  break;
297
304
  }
298
305
  case 'PageDown': {
299
306
  event.preventDefault();
300
- this.updateModelValue(this._value - 10);
307
+ this.updateModelValue(this._value() - 10);
301
308
  break;
302
309
  }
303
310
  }
304
311
  }
305
312
  }
306
- rangePath() {
307
- return `M ${this.minX()} ${this.minY()} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX()} ${this.maxY()}`;
308
- }
309
- valuePath() {
310
- return `M ${this.zeroX()} ${this.zeroY()} A ${this.radius} ${this.radius} 0 ${this.largeArc()} ${this.sweep()} ${this.valueX()} ${this.valueY()}`;
311
- }
312
- zeroRadians() {
313
- if (this.min > 0 && this.max > 0)
314
- return this.mapRange(this.min, this.min, this.max, this.minRadians, this.maxRadians);
313
+ rangePath = computed(() => `M ${this.minX()} ${this.minY()} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX()} ${this.maxY()}`, /* @ts-ignore */
314
+ ...(ngDevMode ? [{ debugName: "rangePath" }] : /* istanbul ignore next */ []));
315
+ valuePath = computed(() => `M ${this.zeroX()} ${this.zeroY()} A ${this.radius} ${this.radius} 0 ${this.largeArc()} ${this.sweep()} ${this.valueX()} ${this.valueY()}`, /* @ts-ignore */
316
+ ...(ngDevMode ? [{ debugName: "valuePath" }] : /* istanbul ignore next */ []));
317
+ zeroRadians = computed(() => {
318
+ if (this.min() > 0 && this.max() > 0)
319
+ return this.mapRange(this.min(), this.min(), this.max(), this.minRadians, this.maxRadians);
315
320
  else
316
- return this.mapRange(0, this.min, this.max, this.minRadians, this.maxRadians);
317
- }
318
- valueRadians() {
319
- return this.mapRange(this._value, this.min, this.max, this.minRadians, this.maxRadians);
320
- }
321
- minX() {
322
- return this.midX + Math.cos(this.minRadians) * this.radius;
323
- }
324
- minY() {
325
- return this.midY - Math.sin(this.minRadians) * this.radius;
326
- }
327
- maxX() {
328
- return this.midX + Math.cos(this.maxRadians) * this.radius;
329
- }
330
- maxY() {
331
- return this.midY - Math.sin(this.maxRadians) * this.radius;
332
- }
333
- zeroX() {
334
- return this.midX + Math.cos(this.zeroRadians()) * this.radius;
335
- }
336
- zeroY() {
337
- return this.midY - Math.sin(this.zeroRadians()) * this.radius;
338
- }
339
- valueX() {
340
- return this.midX + Math.cos(this.valueRadians()) * this.radius;
341
- }
342
- valueY() {
343
- return this.midY - Math.sin(this.valueRadians()) * this.radius;
344
- }
345
- largeArc() {
346
- return Math.abs(this.zeroRadians() - this.valueRadians()) < Math.PI ? 0 : 1;
347
- }
348
- sweep() {
349
- return this.valueRadians() > this.zeroRadians() ? 0 : 1;
350
- }
351
- valueToDisplay() {
352
- return this.valueTemplate.replace('{value}', this._value.toString());
353
- }
354
- get _value() {
355
- return this.value() != null ? this.value() : this.min;
356
- }
321
+ return this.mapRange(0, this.min(), this.max(), this.minRadians, this.maxRadians);
322
+ }, /* @ts-ignore */
323
+ ...(ngDevMode ? [{ debugName: "zeroRadians" }] : /* istanbul ignore next */ []));
324
+ valueRadians = computed(() => this.mapRange(this._value(), this.min(), this.max(), this.minRadians, this.maxRadians), /* @ts-ignore */
325
+ ...(ngDevMode ? [{ debugName: "valueRadians" }] : /* istanbul ignore next */ []));
326
+ minX = computed(() => this.midX + Math.cos(this.minRadians) * this.radius, /* @ts-ignore */
327
+ ...(ngDevMode ? [{ debugName: "minX" }] : /* istanbul ignore next */ []));
328
+ minY = computed(() => this.midY - Math.sin(this.minRadians) * this.radius, /* @ts-ignore */
329
+ ...(ngDevMode ? [{ debugName: "minY" }] : /* istanbul ignore next */ []));
330
+ maxX = computed(() => this.midX + Math.cos(this.maxRadians) * this.radius, /* @ts-ignore */
331
+ ...(ngDevMode ? [{ debugName: "maxX" }] : /* istanbul ignore next */ []));
332
+ maxY = computed(() => this.midY - Math.sin(this.maxRadians) * this.radius, /* @ts-ignore */
333
+ ...(ngDevMode ? [{ debugName: "maxY" }] : /* istanbul ignore next */ []));
334
+ zeroX = computed(() => this.midX + Math.cos(this.zeroRadians()) * this.radius, /* @ts-ignore */
335
+ ...(ngDevMode ? [{ debugName: "zeroX" }] : /* istanbul ignore next */ []));
336
+ zeroY = computed(() => this.midY - Math.sin(this.zeroRadians()) * this.radius, /* @ts-ignore */
337
+ ...(ngDevMode ? [{ debugName: "zeroY" }] : /* istanbul ignore next */ []));
338
+ valueX = computed(() => this.midX + Math.cos(this.valueRadians()) * this.radius, /* @ts-ignore */
339
+ ...(ngDevMode ? [{ debugName: "valueX" }] : /* istanbul ignore next */ []));
340
+ valueY = computed(() => this.midY - Math.sin(this.valueRadians()) * this.radius, /* @ts-ignore */
341
+ ...(ngDevMode ? [{ debugName: "valueY" }] : /* istanbul ignore next */ []));
342
+ largeArc = computed(() => (Math.abs(this.zeroRadians() - this.valueRadians()) < Math.PI ? 0 : 1), /* @ts-ignore */
343
+ ...(ngDevMode ? [{ debugName: "largeArc" }] : /* istanbul ignore next */ []));
344
+ sweep = computed(() => (this.valueRadians() > this.zeroRadians() ? 0 : 1), /* @ts-ignore */
345
+ ...(ngDevMode ? [{ debugName: "sweep" }] : /* istanbul ignore next */ []));
346
+ valueToDisplay = computed(() => this.valueTemplate().replace('{value}', this._value().toString()), /* @ts-ignore */
347
+ ...(ngDevMode ? [{ debugName: "valueToDisplay" }] : /* istanbul ignore next */ []));
348
+ _value = computed(() => (this.value() != null ? this.value() : this.min()), /* @ts-ignore */
349
+ ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
357
350
  /**
358
351
  * @override
359
352
  *
@@ -363,34 +356,33 @@ class Knob extends BaseEditableHolder {
363
356
  writeControlValue(value, setModelValue) {
364
357
  this.value.set(value);
365
358
  setModelValue(this.value());
366
- this.cd.markForCheck();
367
359
  }
368
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Knob, deps: null, target: i0.ɵɵFactoryTarget.Component });
369
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Knob, isStandalone: true, selector: "p-knob", inputs: { styleClass: "styleClass", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", tabindex: ["tabindex", "tabindex", numberAttribute], valueColor: "valueColor", rangeColor: "rangeColor", textColor: "textColor", valueTemplate: "valueTemplate", size: ["size", "size", numberAttribute], min: ["min", "min", numberAttribute], max: ["max", "max", numberAttribute], step: ["step", "step", numberAttribute], strokeWidth: ["strokeWidth", "strokeWidth", numberAttribute], showValue: ["showValue", "showValue", booleanAttribute], readonly: ["readonly", "readonly", booleanAttribute] }, outputs: { onChange: "onChange" }, host: { properties: { "class": "cn(cx('root'), styleClass)" } }, providers: [KNOB_VALUE_ACCESSOR, KnobStyle, { provide: KNOB_INSTANCE, useExisting: Knob }, { provide: PARENT_INSTANCE, useExisting: Knob }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
360
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Knob, deps: [], target: i0.ɵɵFactoryTarget.Component });
361
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Knob, isStandalone: true, selector: "p-knob", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, valueColor: { classPropertyName: "valueColor", publicName: "valueColor", isSignal: true, isRequired: false, transformFunction: null }, rangeColor: { classPropertyName: "rangeColor", publicName: "rangeColor", isSignal: true, isRequired: false, transformFunction: null }, textColor: { classPropertyName: "textColor", publicName: "textColor", isSignal: true, isRequired: false, transformFunction: null }, valueTemplate: { classPropertyName: "valueTemplate", publicName: "valueTemplate", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class": "cx('root')" } }, providers: [KNOB_VALUE_ACCESSOR, KnobStyle, { provide: PARENT_INSTANCE, useExisting: Knob }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
370
362
  <svg
371
363
  viewBox="0 0 100 100"
372
364
  role="slider"
373
- [style.width]="size + 'px'"
374
- [style.height]="size + 'px'"
365
+ [style.width]="size() + 'px'"
366
+ [style.height]="size() + 'px'"
375
367
  (click)="onClick($event)"
376
368
  (keydown)="onKeyDown($event)"
377
369
  (mousedown)="onMouseDown($event)"
378
370
  (mouseup)="onMouseUp($event)"
379
371
  (touchstart)="onTouchStart($event)"
380
372
  (touchend)="onTouchEnd($event)"
381
- [attr.aria-valuemin]="min"
382
- [attr.aria-valuemax]="max"
373
+ [attr.aria-valuemin]="min()"
374
+ [attr.aria-valuemax]="max()"
383
375
  [attr.required]="required() ? '' : undefined"
384
- [attr.aria-valuenow]="_value"
385
- [attr.aria-labelledby]="ariaLabelledBy"
386
- [attr.aria-label]="ariaLabel"
387
- [attr.tabindex]="readonly || $disabled() ? -1 : tabindex"
376
+ [attr.aria-valuenow]="_value()"
377
+ [attr.aria-labelledby]="ariaLabelledBy()"
378
+ [attr.aria-label]="ariaLabel()"
379
+ [attr.tabindex]="readonly() || $disabled() ? -1 : tabindex()"
388
380
  [pBind]="ptm('svg')"
389
381
  >
390
- <path [attr.d]="rangePath()" [attr.stroke-width]="strokeWidth" [attr.stroke]="rangeColor" [class]="cx('range')" [pBind]="ptm('range')"></path>
391
- <path [attr.d]="valuePath()" [attr.stroke-width]="strokeWidth" [attr.stroke]="valueColor" [class]="cx('value')" [pBind]="ptm('value')"></path>
392
- @if (showValue) {
393
- <text [attr.x]="50" [attr.y]="57" text-anchor="middle" [attr.fill]="textColor" [class]="cx('text')" [attr.name]="name()" [pBind]="ptm('text')">
382
+ <path [attr.d]="rangePath()" [attr.stroke-width]="strokeWidth()" [attr.stroke]="rangeColor()" [class]="cx('range')" [pBind]="ptm('range')"></path>
383
+ <path [attr.d]="valuePath()" [attr.stroke-width]="strokeWidth()" [attr.stroke]="valueColor()" [class]="cx('value')" [pBind]="ptm('value')"></path>
384
+ @if (showValue()) {
385
+ <text [attr.x]="50" [attr.y]="57" text-anchor="middle" [attr.fill]="textColor()" [class]="cx('text')" [attr.name]="name()" [pBind]="ptm('text')">
394
386
  {{ valueToDisplay() }}
395
387
  </text>
396
388
  }
@@ -401,85 +393,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
401
393
  type: Component,
402
394
  args: [{
403
395
  selector: 'p-knob',
404
- standalone: true,
405
396
  imports: [SharedModule, BindModule],
406
397
  template: `
407
398
  <svg
408
399
  viewBox="0 0 100 100"
409
400
  role="slider"
410
- [style.width]="size + 'px'"
411
- [style.height]="size + 'px'"
401
+ [style.width]="size() + 'px'"
402
+ [style.height]="size() + 'px'"
412
403
  (click)="onClick($event)"
413
404
  (keydown)="onKeyDown($event)"
414
405
  (mousedown)="onMouseDown($event)"
415
406
  (mouseup)="onMouseUp($event)"
416
407
  (touchstart)="onTouchStart($event)"
417
408
  (touchend)="onTouchEnd($event)"
418
- [attr.aria-valuemin]="min"
419
- [attr.aria-valuemax]="max"
409
+ [attr.aria-valuemin]="min()"
410
+ [attr.aria-valuemax]="max()"
420
411
  [attr.required]="required() ? '' : undefined"
421
- [attr.aria-valuenow]="_value"
422
- [attr.aria-labelledby]="ariaLabelledBy"
423
- [attr.aria-label]="ariaLabel"
424
- [attr.tabindex]="readonly || $disabled() ? -1 : tabindex"
412
+ [attr.aria-valuenow]="_value()"
413
+ [attr.aria-labelledby]="ariaLabelledBy()"
414
+ [attr.aria-label]="ariaLabel()"
415
+ [attr.tabindex]="readonly() || $disabled() ? -1 : tabindex()"
425
416
  [pBind]="ptm('svg')"
426
417
  >
427
- <path [attr.d]="rangePath()" [attr.stroke-width]="strokeWidth" [attr.stroke]="rangeColor" [class]="cx('range')" [pBind]="ptm('range')"></path>
428
- <path [attr.d]="valuePath()" [attr.stroke-width]="strokeWidth" [attr.stroke]="valueColor" [class]="cx('value')" [pBind]="ptm('value')"></path>
429
- @if (showValue) {
430
- <text [attr.x]="50" [attr.y]="57" text-anchor="middle" [attr.fill]="textColor" [class]="cx('text')" [attr.name]="name()" [pBind]="ptm('text')">
418
+ <path [attr.d]="rangePath()" [attr.stroke-width]="strokeWidth()" [attr.stroke]="rangeColor()" [class]="cx('range')" [pBind]="ptm('range')"></path>
419
+ <path [attr.d]="valuePath()" [attr.stroke-width]="strokeWidth()" [attr.stroke]="valueColor()" [class]="cx('value')" [pBind]="ptm('value')"></path>
420
+ @if (showValue()) {
421
+ <text [attr.x]="50" [attr.y]="57" text-anchor="middle" [attr.fill]="textColor()" [class]="cx('text')" [attr.name]="name()" [pBind]="ptm('text')">
431
422
  {{ valueToDisplay() }}
432
423
  </text>
433
424
  }
434
425
  </svg>
435
426
  `,
436
- providers: [KNOB_VALUE_ACCESSOR, KnobStyle, { provide: KNOB_INSTANCE, useExisting: Knob }, { provide: PARENT_INSTANCE, useExisting: Knob }],
427
+ providers: [KNOB_VALUE_ACCESSOR, KnobStyle, { provide: PARENT_INSTANCE, useExisting: Knob }],
437
428
  changeDetection: ChangeDetectionStrategy.OnPush,
438
429
  encapsulation: ViewEncapsulation.None,
439
430
  host: {
440
- '[class]': "cn(cx('root'), styleClass)"
431
+ '[class]': "cx('root')"
441
432
  },
442
433
  hostDirectives: [Bind]
443
434
  }]
444
- }], propDecorators: { styleClass: [{
445
- type: Input
446
- }], ariaLabel: [{
447
- type: Input
448
- }], ariaLabelledBy: [{
449
- type: Input
450
- }], tabindex: [{
451
- type: Input,
452
- args: [{ transform: numberAttribute }]
453
- }], valueColor: [{
454
- type: Input
455
- }], rangeColor: [{
456
- type: Input
457
- }], textColor: [{
458
- type: Input
459
- }], valueTemplate: [{
460
- type: Input
461
- }], size: [{
462
- type: Input,
463
- args: [{ transform: numberAttribute }]
464
- }], min: [{
465
- type: Input,
466
- args: [{ transform: numberAttribute }]
467
- }], max: [{
468
- type: Input,
469
- args: [{ transform: numberAttribute }]
470
- }], step: [{
471
- type: Input,
472
- args: [{ transform: numberAttribute }]
473
- }], strokeWidth: [{
474
- type: Input,
475
- args: [{ transform: numberAttribute }]
476
- }], showValue: [{
477
- type: Input,
478
- args: [{ transform: booleanAttribute }]
479
- }], readonly: [{
480
- type: Input,
481
- args: [{ transform: booleanAttribute }]
482
- }], onChange: [{ type: i0.Output, args: ["onChange"] }] } });
435
+ }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], valueColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueColor", required: false }] }], rangeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeColor", required: false }] }], textColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "textColor", required: false }] }], valueTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTemplate", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }] } });
483
436
  class KnobModule {
484
437
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: KnobModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
485
438
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: KnobModule, imports: [Knob, SharedModule], exports: [Knob, SharedModule] });