primevue 3.12.3 → 3.12.6

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 (633) hide show
  1. package/accordion/accordion.cjs.js +18 -16
  2. package/accordion/accordion.cjs.min.js +1 -1
  3. package/accordion/accordion.esm.js +20 -18
  4. package/accordion/accordion.esm.min.js +1 -1
  5. package/accordion/accordion.js +19 -17
  6. package/accordion/accordion.min.js +1 -1
  7. package/accordiontab/accordiontab.esm.js +1 -1
  8. package/accordiontab/accordiontab.esm.min.js +1 -1
  9. package/accordiontab/accordiontab.js +1 -1
  10. package/api/api.js +1 -1
  11. package/autocomplete/autocomplete.cjs.js +61 -54
  12. package/autocomplete/autocomplete.cjs.min.js +1 -1
  13. package/autocomplete/autocomplete.esm.js +59 -52
  14. package/autocomplete/autocomplete.esm.min.js +1 -1
  15. package/autocomplete/autocomplete.js +62 -55
  16. package/autocomplete/autocomplete.min.js +1 -1
  17. package/avatar/avatar.cjs.js +9 -6
  18. package/avatar/avatar.cjs.min.js +1 -1
  19. package/avatar/avatar.esm.js +11 -8
  20. package/avatar/avatar.esm.min.js +1 -1
  21. package/avatar/avatar.js +10 -7
  22. package/avatar/avatar.min.js +1 -1
  23. package/avatargroup/avatargroup.cjs.js +1 -1
  24. package/avatargroup/avatargroup.cjs.min.js +1 -1
  25. package/avatargroup/avatargroup.esm.js +3 -3
  26. package/avatargroup/avatargroup.esm.min.js +1 -1
  27. package/avatargroup/avatargroup.js +2 -2
  28. package/avatargroup/avatargroup.min.js +1 -1
  29. package/badge/badge.cjs.js +3 -1
  30. package/badge/badge.cjs.min.js +1 -1
  31. package/badge/badge.esm.js +5 -3
  32. package/badge/badge.esm.min.js +1 -1
  33. package/badge/badge.js +4 -2
  34. package/badge/badge.min.js +1 -1
  35. package/badgedirective/badgedirective.esm.js +1 -1
  36. package/badgedirective/badgedirective.esm.min.js +1 -1
  37. package/badgedirective/badgedirective.js +1 -1
  38. package/blockui/blockui.cjs.js +1 -1
  39. package/blockui/blockui.cjs.min.js +1 -1
  40. package/blockui/blockui.esm.js +3 -3
  41. package/blockui/blockui.esm.min.js +1 -1
  42. package/blockui/blockui.js +2 -2
  43. package/blockui/blockui.min.js +1 -1
  44. package/breadcrumb/breadcrumb.cjs.js +25 -23
  45. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  46. package/breadcrumb/breadcrumb.esm.js +27 -25
  47. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  48. package/breadcrumb/breadcrumb.js +26 -24
  49. package/breadcrumb/breadcrumb.min.js +1 -1
  50. package/button/button.cjs.js +13 -12
  51. package/button/button.cjs.min.js +1 -1
  52. package/button/button.esm.js +14 -13
  53. package/button/button.esm.min.js +1 -1
  54. package/button/button.js +14 -13
  55. package/button/button.min.js +1 -1
  56. package/calendar/calendar.cjs.js +232 -207
  57. package/calendar/calendar.cjs.min.js +1 -1
  58. package/calendar/calendar.esm.js +231 -206
  59. package/calendar/calendar.esm.min.js +1 -1
  60. package/calendar/calendar.js +233 -208
  61. package/calendar/calendar.min.js +1 -1
  62. package/card/card.cjs.js +7 -7
  63. package/card/card.cjs.min.js +1 -1
  64. package/card/card.esm.js +9 -9
  65. package/card/card.esm.min.js +1 -1
  66. package/card/card.js +8 -8
  67. package/card/card.min.js +1 -1
  68. package/carousel/carousel.cjs.js +56 -48
  69. package/carousel/carousel.cjs.min.js +1 -1
  70. package/carousel/carousel.esm.js +57 -49
  71. package/carousel/carousel.esm.min.js +1 -1
  72. package/carousel/carousel.js +57 -49
  73. package/carousel/carousel.min.js +1 -1
  74. package/cascadeselect/cascadeselect.cjs.js +37 -30
  75. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  76. package/cascadeselect/cascadeselect.esm.js +37 -30
  77. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  78. package/cascadeselect/cascadeselect.js +38 -31
  79. package/cascadeselect/cascadeselect.min.js +1 -1
  80. package/chart/chart.cjs.js +7 -8
  81. package/chart/chart.cjs.min.js +1 -1
  82. package/chart/chart.esm.js +7 -6
  83. package/chart/chart.esm.min.js +1 -1
  84. package/chart/chart.js +6 -5
  85. package/chart/chart.min.js +1 -1
  86. package/checkbox/checkbox.cjs.js +16 -14
  87. package/checkbox/checkbox.cjs.min.js +1 -1
  88. package/checkbox/checkbox.esm.js +18 -16
  89. package/checkbox/checkbox.esm.min.js +1 -1
  90. package/checkbox/checkbox.js +17 -15
  91. package/checkbox/checkbox.min.js +1 -1
  92. package/chip/chip.cjs.js +13 -12
  93. package/chip/chip.cjs.min.js +1 -1
  94. package/chip/chip.esm.js +15 -14
  95. package/chip/chip.esm.min.js +1 -1
  96. package/chip/chip.js +14 -13
  97. package/chip/chip.min.js +1 -1
  98. package/chips/chips.cjs.js +22 -20
  99. package/chips/chips.cjs.min.js +1 -1
  100. package/chips/chips.esm.js +24 -22
  101. package/chips/chips.esm.min.js +1 -1
  102. package/chips/chips.js +23 -21
  103. package/chips/chips.min.js +1 -1
  104. package/colorpicker/colorpicker.cjs.js +28 -27
  105. package/colorpicker/colorpicker.cjs.min.js +1 -1
  106. package/colorpicker/colorpicker.esm.js +29 -28
  107. package/colorpicker/colorpicker.esm.min.js +1 -1
  108. package/colorpicker/colorpicker.js +29 -28
  109. package/colorpicker/colorpicker.min.js +1 -1
  110. package/column/column.esm.js +1 -1
  111. package/column/column.esm.min.js +1 -1
  112. package/column/column.js +1 -1
  113. package/columngroup/columngroup.esm.js +1 -1
  114. package/columngroup/columngroup.esm.min.js +1 -1
  115. package/columngroup/columngroup.js +1 -1
  116. package/config/config.cjs.js +1 -1
  117. package/config/config.esm.js +1 -2
  118. package/config/config.esm.min.js +1 -1
  119. package/config/config.js +2 -2
  120. package/confirmationeventbus/confirmationeventbus.esm.js +1 -1
  121. package/confirmationeventbus/confirmationeventbus.esm.min.js +1 -1
  122. package/confirmationeventbus/confirmationeventbus.js +1 -1
  123. package/confirmationoptions/ConfirmationOptions.d.ts +8 -0
  124. package/confirmationservice/confirmationservice.cjs.js +2 -2
  125. package/confirmationservice/confirmationservice.esm.js +1 -1
  126. package/confirmationservice/confirmationservice.esm.min.js +1 -1
  127. package/confirmationservice/confirmationservice.js +3 -3
  128. package/confirmdialog/confirmdialog.cjs.js +15 -13
  129. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  130. package/confirmdialog/confirmdialog.esm.js +11 -9
  131. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  132. package/confirmdialog/confirmdialog.js +16 -14
  133. package/confirmdialog/confirmdialog.min.js +1 -1
  134. package/confirmpopup/confirmpopup.cjs.js +18 -16
  135. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  136. package/confirmpopup/confirmpopup.esm.js +14 -12
  137. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  138. package/confirmpopup/confirmpopup.js +19 -17
  139. package/confirmpopup/confirmpopup.min.js +1 -1
  140. package/contextmenu/contextmenu.cjs.js +33 -30
  141. package/contextmenu/contextmenu.cjs.min.js +1 -1
  142. package/contextmenu/contextmenu.esm.js +34 -31
  143. package/contextmenu/contextmenu.esm.min.js +1 -1
  144. package/contextmenu/contextmenu.js +34 -31
  145. package/contextmenu/contextmenu.min.js +1 -1
  146. package/core/core.js +405 -339
  147. package/core/core.min.js +12 -12
  148. package/datatable/DataTable.d.ts +1 -1
  149. package/datatable/datatable.cjs.js +355 -328
  150. package/datatable/datatable.cjs.min.js +1 -1
  151. package/datatable/datatable.esm.js +345 -318
  152. package/datatable/datatable.esm.min.js +1 -1
  153. package/datatable/datatable.js +356 -329
  154. package/datatable/datatable.min.js +1 -1
  155. package/dataview/dataview.cjs.js +16 -14
  156. package/dataview/dataview.cjs.min.js +1 -1
  157. package/dataview/dataview.esm.js +17 -15
  158. package/dataview/dataview.esm.min.js +1 -1
  159. package/dataview/dataview.js +17 -15
  160. package/dataview/dataview.min.js +1 -1
  161. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +17 -15
  162. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
  163. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -17
  164. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  165. package/dataviewlayoutoptions/dataviewlayoutoptions.js +18 -16
  166. package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
  167. package/deferredcontent/deferredcontent.cjs.js +1 -1
  168. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  169. package/deferredcontent/deferredcontent.esm.js +3 -3
  170. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  171. package/deferredcontent/deferredcontent.js +2 -2
  172. package/deferredcontent/deferredcontent.min.js +1 -1
  173. package/dialog/dialog.cjs.js +33 -27
  174. package/dialog/dialog.cjs.min.js +1 -1
  175. package/dialog/dialog.esm.js +34 -28
  176. package/dialog/dialog.esm.min.js +1 -1
  177. package/dialog/dialog.js +34 -28
  178. package/dialog/dialog.min.js +1 -1
  179. package/divider/divider.cjs.js +3 -3
  180. package/divider/divider.cjs.min.js +1 -1
  181. package/divider/divider.esm.js +5 -5
  182. package/divider/divider.esm.min.js +1 -1
  183. package/divider/divider.js +4 -4
  184. package/divider/divider.min.js +1 -1
  185. package/dock/dock.cjs.js +26 -23
  186. package/dock/dock.cjs.min.js +1 -1
  187. package/dock/dock.esm.js +26 -23
  188. package/dock/dock.esm.min.js +1 -1
  189. package/dock/dock.js +27 -24
  190. package/dock/dock.min.js +1 -1
  191. package/dropdown/dropdown.cjs.js +67 -59
  192. package/dropdown/dropdown.cjs.min.js +1 -1
  193. package/dropdown/dropdown.esm.js +66 -58
  194. package/dropdown/dropdown.esm.min.js +1 -1
  195. package/dropdown/dropdown.js +68 -60
  196. package/dropdown/dropdown.min.js +1 -1
  197. package/editor/editor.cjs.js +22 -22
  198. package/editor/editor.cjs.min.js +1 -1
  199. package/editor/editor.esm.js +23 -23
  200. package/editor/editor.esm.min.js +1 -1
  201. package/editor/editor.js +23 -23
  202. package/editor/editor.min.js +1 -1
  203. package/fieldset/fieldset.cjs.js +22 -17
  204. package/fieldset/fieldset.cjs.min.js +1 -1
  205. package/fieldset/fieldset.esm.js +23 -18
  206. package/fieldset/fieldset.esm.min.js +1 -1
  207. package/fieldset/fieldset.js +23 -18
  208. package/fieldset/fieldset.min.js +1 -1
  209. package/fileupload/FileUpload.d.ts +12 -0
  210. package/fileupload/FileUpload.vue +21 -7
  211. package/fileupload/fileupload.cjs.js +85 -65
  212. package/fileupload/fileupload.cjs.min.js +1 -1
  213. package/fileupload/fileupload.esm.js +83 -63
  214. package/fileupload/fileupload.esm.min.js +1 -1
  215. package/fileupload/fileupload.js +86 -66
  216. package/fileupload/fileupload.min.js +1 -1
  217. package/fullcalendar/fullcalendar.cjs.js +1 -31
  218. package/fullcalendar/fullcalendar.cjs.min.js +1 -1
  219. package/fullcalendar/fullcalendar.esm.js +3 -33
  220. package/fullcalendar/fullcalendar.esm.min.js +1 -1
  221. package/fullcalendar/fullcalendar.js +2 -32
  222. package/fullcalendar/fullcalendar.min.js +1 -1
  223. package/galleria/galleria.cjs.js +92 -78
  224. package/galleria/galleria.cjs.min.js +1 -1
  225. package/galleria/galleria.esm.js +91 -77
  226. package/galleria/galleria.esm.min.js +1 -1
  227. package/galleria/galleria.js +93 -79
  228. package/galleria/galleria.min.js +1 -1
  229. package/image/image.cjs.js +55 -47
  230. package/image/image.cjs.min.js +1 -1
  231. package/image/image.esm.js +57 -49
  232. package/image/image.esm.min.js +1 -1
  233. package/image/image.js +56 -48
  234. package/image/image.min.js +1 -1
  235. package/inlinemessage/inlinemessage.cjs.js +6 -4
  236. package/inlinemessage/inlinemessage.cjs.min.js +1 -1
  237. package/inlinemessage/inlinemessage.esm.js +8 -6
  238. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  239. package/inlinemessage/inlinemessage.js +7 -5
  240. package/inlinemessage/inlinemessage.min.js +1 -1
  241. package/inplace/inplace.cjs.js +12 -9
  242. package/inplace/inplace.cjs.min.js +1 -1
  243. package/inplace/inplace.esm.js +13 -10
  244. package/inplace/inplace.esm.min.js +1 -1
  245. package/inplace/inplace.js +13 -10
  246. package/inplace/inplace.min.js +1 -1
  247. package/inputmask/inputmask.cjs.js +7 -7
  248. package/inputmask/inputmask.cjs.min.js +1 -1
  249. package/inputmask/inputmask.esm.js +9 -9
  250. package/inputmask/inputmask.esm.min.js +1 -1
  251. package/inputmask/inputmask.js +8 -8
  252. package/inputmask/inputmask.min.js +1 -1
  253. package/inputnumber/InputNumber.d.ts +4 -0
  254. package/inputnumber/InputNumber.vue +20 -2
  255. package/inputnumber/inputnumber.cjs.js +27 -8
  256. package/inputnumber/inputnumber.cjs.min.js +1 -1
  257. package/inputnumber/inputnumber.esm.js +27 -8
  258. package/inputnumber/inputnumber.esm.min.js +1 -1
  259. package/inputnumber/inputnumber.js +28 -9
  260. package/inputnumber/inputnumber.min.js +1 -1
  261. package/inputswitch/inputswitch.cjs.js +13 -12
  262. package/inputswitch/inputswitch.cjs.min.js +1 -1
  263. package/inputswitch/inputswitch.esm.js +15 -14
  264. package/inputswitch/inputswitch.esm.min.js +1 -1
  265. package/inputswitch/inputswitch.js +14 -13
  266. package/inputswitch/inputswitch.min.js +1 -1
  267. package/inputtext/inputtext.cjs.js +5 -3
  268. package/inputtext/inputtext.cjs.min.js +1 -1
  269. package/inputtext/inputtext.esm.js +7 -5
  270. package/inputtext/inputtext.esm.min.js +1 -1
  271. package/inputtext/inputtext.js +6 -4
  272. package/inputtext/inputtext.min.js +1 -1
  273. package/knob/knob.cjs.js +21 -14
  274. package/knob/knob.cjs.min.js +1 -1
  275. package/knob/knob.esm.js +23 -16
  276. package/knob/knob.esm.min.js +1 -1
  277. package/knob/knob.js +22 -15
  278. package/knob/knob.min.js +1 -1
  279. package/listbox/listbox.cjs.js +37 -34
  280. package/listbox/listbox.cjs.min.js +1 -1
  281. package/listbox/listbox.esm.js +37 -34
  282. package/listbox/listbox.esm.min.js +1 -1
  283. package/listbox/listbox.js +38 -35
  284. package/listbox/listbox.min.js +1 -1
  285. package/megamenu/megamenu.cjs.js +73 -66
  286. package/megamenu/megamenu.cjs.min.js +1 -1
  287. package/megamenu/megamenu.esm.js +74 -67
  288. package/megamenu/megamenu.esm.min.js +1 -1
  289. package/megamenu/megamenu.js +74 -67
  290. package/megamenu/megamenu.min.js +1 -1
  291. package/menu/Menu.vue +4 -1
  292. package/menu/menu.cjs.js +41 -36
  293. package/menu/menu.cjs.min.js +1 -1
  294. package/menu/menu.esm.js +41 -36
  295. package/menu/menu.esm.min.js +1 -1
  296. package/menu/menu.js +42 -37
  297. package/menu/menu.min.js +1 -1
  298. package/menubar/menubar.cjs.js +47 -40
  299. package/menubar/menubar.cjs.min.js +1 -1
  300. package/menubar/menubar.esm.js +48 -41
  301. package/menubar/menubar.esm.min.js +1 -1
  302. package/menubar/menubar.js +48 -41
  303. package/menubar/menubar.min.js +1 -1
  304. package/message/message.cjs.js +15 -12
  305. package/message/message.cjs.min.js +1 -1
  306. package/message/message.esm.js +16 -13
  307. package/message/message.esm.min.js +1 -1
  308. package/message/message.js +16 -13
  309. package/message/message.min.js +1 -1
  310. package/multiselect/multiselect.cjs.js +106 -94
  311. package/multiselect/multiselect.cjs.min.js +1 -1
  312. package/multiselect/multiselect.esm.js +105 -93
  313. package/multiselect/multiselect.esm.min.js +1 -1
  314. package/multiselect/multiselect.js +107 -95
  315. package/multiselect/multiselect.min.js +1 -1
  316. package/orderlist/orderlist.cjs.js +15 -12
  317. package/orderlist/orderlist.cjs.min.js +1 -1
  318. package/orderlist/orderlist.esm.js +15 -12
  319. package/orderlist/orderlist.esm.min.js +1 -1
  320. package/orderlist/orderlist.js +16 -13
  321. package/orderlist/orderlist.min.js +1 -1
  322. package/organizationchart/organizationchart.cjs.js +42 -37
  323. package/organizationchart/organizationchart.cjs.min.js +1 -1
  324. package/organizationchart/organizationchart.esm.js +44 -39
  325. package/organizationchart/organizationchart.esm.min.js +1 -1
  326. package/organizationchart/organizationchart.js +43 -38
  327. package/organizationchart/organizationchart.min.js +1 -1
  328. package/overlayeventbus/overlayeventbus.esm.js +1 -1
  329. package/overlayeventbus/overlayeventbus.esm.min.js +1 -1
  330. package/overlayeventbus/overlayeventbus.js +1 -1
  331. package/overlaypanel/overlaypanel.cjs.js +18 -16
  332. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  333. package/overlaypanel/overlaypanel.esm.js +15 -13
  334. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  335. package/overlaypanel/overlaypanel.js +19 -17
  336. package/overlaypanel/overlaypanel.min.js +1 -1
  337. package/package.json +1 -1
  338. package/paginator/paginator.cjs.js +59 -54
  339. package/paginator/paginator.cjs.min.js +1 -1
  340. package/paginator/paginator.esm.js +53 -48
  341. package/paginator/paginator.esm.min.js +1 -1
  342. package/paginator/paginator.js +60 -55
  343. package/paginator/paginator.min.js +1 -1
  344. package/panel/panel.cjs.js +21 -16
  345. package/panel/panel.cjs.min.js +1 -1
  346. package/panel/panel.esm.js +22 -17
  347. package/panel/panel.esm.min.js +1 -1
  348. package/panel/panel.js +22 -17
  349. package/panel/panel.min.js +1 -1
  350. package/panelmenu/panelmenu.cjs.js +62 -57
  351. package/panelmenu/panelmenu.cjs.min.js +1 -1
  352. package/panelmenu/panelmenu.esm.js +64 -59
  353. package/panelmenu/panelmenu.esm.min.js +1 -1
  354. package/panelmenu/panelmenu.js +63 -58
  355. package/panelmenu/panelmenu.min.js +1 -1
  356. package/password/Password.vue +1 -1
  357. package/password/password.cjs.js +17 -17
  358. package/password/password.cjs.min.js +1 -1
  359. package/password/password.esm.js +17 -17
  360. package/password/password.esm.min.js +1 -1
  361. package/password/password.js +18 -18
  362. package/password/password.min.js +1 -1
  363. package/picklist/picklist.cjs.js +38 -34
  364. package/picklist/picklist.cjs.min.js +1 -1
  365. package/picklist/picklist.esm.js +38 -34
  366. package/picklist/picklist.esm.min.js +1 -1
  367. package/picklist/picklist.js +39 -35
  368. package/picklist/picklist.min.js +1 -1
  369. package/progressbar/progressbar.cjs.js +14 -12
  370. package/progressbar/progressbar.cjs.min.js +1 -1
  371. package/progressbar/progressbar.esm.js +16 -14
  372. package/progressbar/progressbar.esm.min.js +1 -1
  373. package/progressbar/progressbar.js +15 -13
  374. package/progressbar/progressbar.min.js +1 -1
  375. package/progressspinner/progressspinner.cjs.js +6 -5
  376. package/progressspinner/progressspinner.cjs.min.js +1 -1
  377. package/progressspinner/progressspinner.esm.js +8 -7
  378. package/progressspinner/progressspinner.esm.min.js +1 -1
  379. package/progressspinner/progressspinner.js +7 -6
  380. package/progressspinner/progressspinner.min.js +1 -1
  381. package/radiobutton/radiobutton.cjs.js +18 -15
  382. package/radiobutton/radiobutton.cjs.min.js +1 -1
  383. package/radiobutton/radiobutton.esm.js +20 -17
  384. package/radiobutton/radiobutton.esm.min.js +1 -1
  385. package/radiobutton/radiobutton.js +19 -16
  386. package/radiobutton/radiobutton.min.js +1 -1
  387. package/rating/rating.cjs.js +13 -8
  388. package/rating/rating.cjs.min.js +1 -1
  389. package/rating/rating.esm.js +15 -10
  390. package/rating/rating.esm.min.js +1 -1
  391. package/rating/rating.js +14 -9
  392. package/rating/rating.min.js +1 -1
  393. package/resources/primevue.css +0 -4
  394. package/resources/primevue.min.css +1 -1
  395. package/resources/themes/arya-blue/theme.css +10 -0
  396. package/resources/themes/arya-green/theme.css +10 -0
  397. package/resources/themes/arya-orange/theme.css +10 -0
  398. package/resources/themes/arya-purple/theme.css +10 -0
  399. package/resources/themes/bootstrap4-dark-blue/theme.css +10 -0
  400. package/resources/themes/bootstrap4-dark-purple/theme.css +10 -0
  401. package/resources/themes/bootstrap4-light-blue/theme.css +10 -0
  402. package/resources/themes/bootstrap4-light-purple/theme.css +10 -0
  403. package/resources/themes/fluent-light/theme.css +10 -0
  404. package/resources/themes/lara-dark-blue/theme.css +10 -0
  405. package/resources/themes/lara-dark-indigo/theme.css +10 -0
  406. package/resources/themes/lara-dark-purple/theme.css +10 -0
  407. package/resources/themes/lara-dark-teal/theme.css +10 -0
  408. package/resources/themes/lara-light-blue/theme.css +10 -0
  409. package/resources/themes/lara-light-indigo/theme.css +10 -0
  410. package/resources/themes/lara-light-purple/theme.css +10 -0
  411. package/resources/themes/lara-light-teal/theme.css +10 -0
  412. package/resources/themes/luna-amber/theme.css +10 -0
  413. package/resources/themes/luna-blue/theme.css +10 -0
  414. package/resources/themes/luna-green/theme.css +10 -0
  415. package/resources/themes/luna-pink/theme.css +10 -0
  416. package/resources/themes/md-dark-deeppurple/theme.css +11 -3
  417. package/resources/themes/md-dark-indigo/theme.css +11 -3
  418. package/resources/themes/md-light-deeppurple/theme.css +11 -3
  419. package/resources/themes/md-light-indigo/theme.css +11 -3
  420. package/resources/themes/mdc-dark-deeppurple/theme.css +11 -3
  421. package/resources/themes/mdc-dark-indigo/theme.css +11 -3
  422. package/resources/themes/mdc-light-deeppurple/theme.css +11 -3
  423. package/resources/themes/mdc-light-indigo/theme.css +11 -3
  424. package/resources/themes/nova/theme.css +10 -0
  425. package/resources/themes/nova-accent/theme.css +10 -0
  426. package/resources/themes/nova-alt/theme.css +10 -0
  427. package/resources/themes/nova-vue/theme.css +10 -0
  428. package/resources/themes/rhea/theme.css +10 -0
  429. package/resources/themes/saga-blue/theme.css +10 -0
  430. package/resources/themes/saga-green/theme.css +10 -0
  431. package/resources/themes/saga-orange/theme.css +10 -0
  432. package/resources/themes/saga-purple/theme.css +10 -0
  433. package/resources/themes/tailwind-light/theme.css +10 -0
  434. package/resources/themes/vela-blue/theme.css +10 -0
  435. package/resources/themes/vela-green/theme.css +10 -0
  436. package/resources/themes/vela-orange/theme.css +10 -0
  437. package/resources/themes/vela-purple/theme.css +10 -0
  438. package/ripple/ripple.esm.js +1 -1
  439. package/ripple/ripple.esm.min.js +1 -1
  440. package/ripple/ripple.js +1 -1
  441. package/row/row.esm.js +1 -1
  442. package/row/row.esm.min.js +1 -1
  443. package/row/row.js +1 -1
  444. package/scrollpanel/scrollpanel.cjs.js +9 -9
  445. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  446. package/scrollpanel/scrollpanel.esm.js +11 -11
  447. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  448. package/scrollpanel/scrollpanel.js +10 -10
  449. package/scrollpanel/scrollpanel.min.js +1 -1
  450. package/scrolltop/scrolltop.cjs.js +6 -4
  451. package/scrolltop/scrolltop.cjs.min.js +1 -1
  452. package/scrolltop/scrolltop.esm.js +8 -6
  453. package/scrolltop/scrolltop.esm.min.js +1 -1
  454. package/scrolltop/scrolltop.js +7 -5
  455. package/scrolltop/scrolltop.min.js +1 -1
  456. package/selectbutton/selectbutton.cjs.js +12 -11
  457. package/selectbutton/selectbutton.cjs.min.js +1 -1
  458. package/selectbutton/selectbutton.esm.js +13 -12
  459. package/selectbutton/selectbutton.esm.min.js +1 -1
  460. package/selectbutton/selectbutton.js +13 -12
  461. package/selectbutton/selectbutton.min.js +1 -1
  462. package/sidebar/Sidebar.d.ts +4 -0
  463. package/sidebar/Sidebar.vue +3 -0
  464. package/sidebar/sidebar.cjs.js +26 -14
  465. package/sidebar/sidebar.cjs.min.js +1 -1
  466. package/sidebar/sidebar.esm.js +27 -15
  467. package/sidebar/sidebar.esm.min.js +1 -1
  468. package/sidebar/sidebar.js +27 -15
  469. package/sidebar/sidebar.min.js +1 -1
  470. package/skeleton/skeleton.cjs.js +3 -3
  471. package/skeleton/skeleton.cjs.min.js +1 -1
  472. package/skeleton/skeleton.esm.js +5 -5
  473. package/skeleton/skeleton.esm.min.js +1 -1
  474. package/skeleton/skeleton.js +4 -4
  475. package/skeleton/skeleton.min.js +1 -1
  476. package/slider/slider.cjs.js +33 -29
  477. package/slider/slider.cjs.min.js +1 -1
  478. package/slider/slider.esm.js +35 -31
  479. package/slider/slider.esm.min.js +1 -1
  480. package/slider/slider.js +34 -30
  481. package/slider/slider.min.js +1 -1
  482. package/speeddial/speeddial.cjs.js +23 -21
  483. package/speeddial/speeddial.cjs.min.js +1 -1
  484. package/speeddial/speeddial.esm.js +22 -20
  485. package/speeddial/speeddial.esm.min.js +1 -1
  486. package/speeddial/speeddial.js +24 -22
  487. package/speeddial/speeddial.min.js +1 -1
  488. package/splitbutton/splitbutton.cjs.js +7 -9
  489. package/splitbutton/splitbutton.cjs.min.js +1 -1
  490. package/splitbutton/splitbutton.esm.js +7 -9
  491. package/splitbutton/splitbutton.esm.min.js +1 -1
  492. package/splitbutton/splitbutton.js +8 -10
  493. package/splitbutton/splitbutton.min.js +1 -1
  494. package/splitter/splitter.cjs.js +13 -9
  495. package/splitter/splitter.cjs.min.js +1 -1
  496. package/splitter/splitter.esm.js +15 -11
  497. package/splitter/splitter.esm.min.js +1 -1
  498. package/splitter/splitter.js +14 -10
  499. package/splitter/splitter.min.js +1 -1
  500. package/splitterpanel/splitterpanel.cjs.js +2 -2
  501. package/splitterpanel/splitterpanel.cjs.min.js +1 -1
  502. package/splitterpanel/splitterpanel.esm.js +4 -4
  503. package/splitterpanel/splitterpanel.esm.min.js +1 -1
  504. package/splitterpanel/splitterpanel.js +3 -3
  505. package/splitterpanel/splitterpanel.min.js +1 -1
  506. package/steps/steps.cjs.js +28 -25
  507. package/steps/steps.cjs.min.js +1 -1
  508. package/steps/steps.esm.js +30 -27
  509. package/steps/steps.esm.min.js +1 -1
  510. package/steps/steps.js +29 -26
  511. package/steps/steps.min.js +1 -1
  512. package/styleclass/styleclass.cjs.js +1 -1
  513. package/styleclass/styleclass.cjs.min.js +1 -1
  514. package/styleclass/styleclass.esm.js +2 -2
  515. package/styleclass/styleclass.esm.min.js +1 -1
  516. package/styleclass/styleclass.js +2 -2
  517. package/styleclass/styleclass.min.js +1 -1
  518. package/tabmenu/tabmenu.cjs.js +25 -23
  519. package/tabmenu/tabmenu.cjs.min.js +1 -1
  520. package/tabmenu/tabmenu.esm.js +26 -24
  521. package/tabmenu/tabmenu.esm.min.js +1 -1
  522. package/tabmenu/tabmenu.js +26 -24
  523. package/tabmenu/tabmenu.min.js +1 -1
  524. package/tabpanel/tabpanel.esm.js +1 -1
  525. package/tabpanel/tabpanel.esm.min.js +1 -1
  526. package/tabpanel/tabpanel.js +1 -1
  527. package/tabview/tabview.cjs.js +41 -36
  528. package/tabview/tabview.cjs.min.js +1 -1
  529. package/tabview/tabview.esm.js +42 -37
  530. package/tabview/tabview.esm.min.js +1 -1
  531. package/tabview/tabview.js +42 -37
  532. package/tabview/tabview.min.js +1 -1
  533. package/tag/tag.cjs.js +4 -4
  534. package/tag/tag.cjs.min.js +1 -1
  535. package/tag/tag.esm.js +6 -6
  536. package/tag/tag.esm.min.js +1 -1
  537. package/tag/tag.js +5 -5
  538. package/tag/tag.min.js +1 -1
  539. package/terminal/terminal.cjs.js +17 -17
  540. package/terminal/terminal.cjs.min.js +1 -1
  541. package/terminal/terminal.esm.js +16 -16
  542. package/terminal/terminal.esm.min.js +1 -1
  543. package/terminal/terminal.js +18 -18
  544. package/terminal/terminal.min.js +1 -1
  545. package/terminalservice/terminalservice.esm.js +1 -1
  546. package/terminalservice/terminalservice.esm.min.js +1 -1
  547. package/terminalservice/terminalservice.js +1 -1
  548. package/textarea/textarea.cjs.js +5 -3
  549. package/textarea/textarea.cjs.min.js +1 -1
  550. package/textarea/textarea.esm.js +7 -5
  551. package/textarea/textarea.esm.min.js +1 -1
  552. package/textarea/textarea.js +6 -4
  553. package/textarea/textarea.min.js +1 -1
  554. package/tieredmenu/tieredmenu.cjs.js +35 -32
  555. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  556. package/tieredmenu/tieredmenu.esm.js +35 -32
  557. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  558. package/tieredmenu/tieredmenu.js +36 -33
  559. package/tieredmenu/tieredmenu.min.js +1 -1
  560. package/timeline/Timeline.d.ts +1 -1
  561. package/timeline/timeline.cjs.js +10 -8
  562. package/timeline/timeline.cjs.min.js +1 -1
  563. package/timeline/timeline.esm.js +12 -10
  564. package/timeline/timeline.esm.min.js +1 -1
  565. package/timeline/timeline.js +11 -9
  566. package/timeline/timeline.min.js +1 -1
  567. package/toast/Toast.vue +2 -2
  568. package/toast/toast.cjs.js +29 -26
  569. package/toast/toast.cjs.min.js +1 -1
  570. package/toast/toast.esm.js +25 -22
  571. package/toast/toast.esm.min.js +1 -1
  572. package/toast/toast.js +30 -27
  573. package/toast/toast.min.js +1 -1
  574. package/toasteventbus/toasteventbus.esm.js +1 -1
  575. package/toasteventbus/toasteventbus.esm.min.js +1 -1
  576. package/toasteventbus/toasteventbus.js +1 -1
  577. package/toastservice/toastservice.cjs.js +3 -3
  578. package/toastservice/toastservice.esm.js +1 -1
  579. package/toastservice/toastservice.esm.min.js +1 -1
  580. package/toastservice/toastservice.js +4 -4
  581. package/togglebutton/togglebutton.cjs.js +10 -9
  582. package/togglebutton/togglebutton.cjs.min.js +1 -1
  583. package/togglebutton/togglebutton.esm.js +11 -10
  584. package/togglebutton/togglebutton.esm.min.js +1 -1
  585. package/togglebutton/togglebutton.js +11 -10
  586. package/togglebutton/togglebutton.min.js +1 -1
  587. package/toolbar/toolbar.cjs.js +3 -3
  588. package/toolbar/toolbar.cjs.min.js +1 -1
  589. package/toolbar/toolbar.esm.js +5 -5
  590. package/toolbar/toolbar.esm.min.js +1 -1
  591. package/toolbar/toolbar.js +4 -4
  592. package/toolbar/toolbar.min.js +1 -1
  593. package/tooltip/tooltip.esm.js +1 -1
  594. package/tooltip/tooltip.esm.min.js +1 -1
  595. package/tooltip/tooltip.js +1 -1
  596. package/tree/TreeNode.vue +1 -4
  597. package/tree/tree.cjs.js +57 -45
  598. package/tree/tree.cjs.min.js +1 -1
  599. package/tree/tree.esm.js +58 -46
  600. package/tree/tree.esm.min.js +1 -1
  601. package/tree/tree.js +58 -46
  602. package/tree/tree.min.js +1 -1
  603. package/treeselect/treeselect.cjs.js +38 -35
  604. package/treeselect/treeselect.cjs.min.js +1 -1
  605. package/treeselect/treeselect.esm.js +37 -34
  606. package/treeselect/treeselect.esm.min.js +1 -1
  607. package/treeselect/treeselect.js +39 -36
  608. package/treeselect/treeselect.min.js +1 -1
  609. package/treetable/TreeTable.d.ts +1 -1
  610. package/treetable/treetable.cjs.js +97 -88
  611. package/treetable/treetable.cjs.min.js +1 -1
  612. package/treetable/treetable.esm.js +97 -88
  613. package/treetable/treetable.esm.min.js +1 -1
  614. package/treetable/treetable.js +98 -89
  615. package/treetable/treetable.min.js +1 -1
  616. package/tristatecheckbox/tristatecheckbox.cjs.js +16 -14
  617. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  618. package/tristatecheckbox/tristatecheckbox.esm.js +18 -16
  619. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  620. package/tristatecheckbox/tristatecheckbox.js +17 -15
  621. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  622. package/useconfirm/useconfirm.js +1 -1
  623. package/usetoast/usetoast.js +1 -1
  624. package/utils/utils.js +1 -1
  625. package/vetur-attributes.json +18 -2
  626. package/vetur-tags.json +4 -0
  627. package/virtualscroller/virtualscroller.cjs.js +15 -15
  628. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  629. package/virtualscroller/virtualscroller.esm.js +17 -17
  630. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  631. package/virtualscroller/virtualscroller.js +16 -16
  632. package/virtualscroller/virtualscroller.min.js +1 -1
  633. package/web-types.json +50 -3
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.inputnumber=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e),r=i(t),u={name:"InputNumber",inheritAttrs:!1,emits:["update:modelValue","input","focus","blur"],props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:"pi pi-angle-up"},decrementButtonIcon:{type:String,default:"pi pi-angle-down"},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},style:null,class:null,inputStyle:null,inputClass:null},numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue(e){this.d_modelValue=e},locale(e,t){this.updateConstructParser(e,t)},localeMatcher(e,t){this.updateConstructParser(e,t)},mode(e,t){this.updateConstructParser(e,t)},currency(e,t){this.updateConstructParser(e,t)},currencyDisplay(e,t){this.updateConstructParser(e,t)},useGrouping(e,t){this.updateConstructParser(e,t)},minFractionDigits(e,t){this.updateConstructParser(e,t)},maxFractionDigits(e,t){this.updateConstructParser(e,t)},suffix(e,t){this.updateConstructParser(e,t)},prefix(e,t){this.updateConstructParser(e,t)}},created(){this.constructParser()},methods:{getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}},constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),t=new Map(e.map(((e,t)=>[e,t])));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=e=>t.get(e)},updateConstructParser(e,t){e!==t&&this.constructParser()},escapeRegExp:e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,{...this.getOptions(),useGrouping:!1});return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")},getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")},getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")},getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")},getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")},getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")},formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue(e){let t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;let e=+t;return isNaN(e)?null:e}return null},repeat(e,t,n){let i=t||500;this.clearTimer(),this.timer=setTimeout((()=>{this.repeat(e,40,n)}),i),this.spin(e,n)},spin(e,t){if(this.$refs.input){let n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,s=this.validateValue(i+n);this.updateInput(s,null,"spin"),this.updateModel(e,s),this.handleOnInput(e,i,s)}},onUpButtonMouseDown(e){this.$attrs.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp(){this.$attrs.disabled||this.clearTimer()},onUpButtonMouseLeave(){this.$attrs.disabled||this.clearTimer()},onUpButtonKeyUp(){this.$attrs.disabled||this.clearTimer()},onUpButtonKeyDown(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown(e){this.$attrs.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp(){this.$attrs.disabled||this.clearTimer()},onDownButtonMouseLeave(){this.$attrs.disabled||this.clearTimer()},onDownButtonKeyUp(){this.$attrs.disabled||this.clearTimer()},onDownButtonKeyDown(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown(e){if(this.lastValue=e.target.value,e.shiftKey||e.altKey)return void(this.isSpecialChar=!0);let t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.which){case 38:this.spin(e,1),e.preventDefault();break;case 40:this.spin(e,-1),e.preventDefault();break;case 37:this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case 39:this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case 13:s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case 8:if(e.preventDefault(),t===n){const n=i.charAt(t-1),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const e=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(n))this._decimal.lastIndex=0,e?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(r>0&&t>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<e?"":"0";s=i.slice(0,t-1)+n+i.slice(t)}else 1===u?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case 46:if(e.preventDefault(),t===n){const n=i.charAt(t),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const e=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(n))this._decimal.lastIndex=0,e?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(r>0&&t>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<e?"":"0";s=i.slice(0,t)+n+i.slice(t+1)}else 1===u?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range")}},onInputKeyPress(e){e.preventDefault();let t=e.which||e.keyCode,n=String.fromCharCode(t);const i=this.isDecimalSign(n),s=this.isMinusSign(n);(48<=t&&t<=57||s||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:s})},onPaste(e){e.preventDefault();let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign(){return null===this.min||this.min<0},isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode(){return"decimal"===this.mode},getDecimalCharIndexes(e){let t=e.search(this._decimal);this._decimal.lastIndex=0;const n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes(e){const t=e.search(this._decimal);this._decimal.lastIndex=0;const n=e.search(this._minusSign);this._minusSign.lastIndex=0;const i=e.search(this._suffix);this._suffix.lastIndex=0;const s=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:s}},insert(e,t,n={isDecimalSign:!1,isMinusSign:!1}){const i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==i)return;const s=this.$refs.input.$el.selectionStart,r=this.$refs.input.$el.selectionEnd;let u=this.$refs.input.$el.value.trim();const{decimalCharIndex:l,minusCharIndex:a,suffixCharIndex:o,currencyCharIndex:p}=this.getCharIndexes(u);let h;if(n.isMinusSign)0===s&&(h=u,-1!==a&&0===r||(h=this.insertText(u,t,0,r)),this.updateValue(e,h,t,"insert"));else if(n.isDecimalSign)l>0&&s===l?this.updateValue(e,u,t,"insert"):(l>s&&l<r||-1===l&&this.maxFractionDigits)&&(h=this.insertText(u,t,s,r),this.updateValue(e,h,t,"insert"));else{const n=this.numberFormat.resolvedOptions().maximumFractionDigits,i=s!==r?"range-insert":"insert";if(l>0&&s>l){if(s+t.length-(l+1)<=n){const n=p>=s?p-1:o>=s?o:u.length;h=u.slice(0,s)+t+u.slice(s+t.length,n)+u.slice(n),this.updateValue(e,h,t,i)}}else h=this.insertText(u,t,s,r),this.updateValue(e,h,t,i)}},insertText(e,t,n,i){if(2===("."===t?t:t.split(".")).length){const s=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,s>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):e||this.formatValue(t)}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange(e,t,n){let i;return i=n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n),i},initCursor(){let e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,s=(this.prefixChar||"").length;t=t.replace(this._prefix,""),e-=s;let r=t.charAt(e);if(this.isNumeralChar(r))return e+s;let u=e-1;for(;u>=0;){if(r=t.charAt(u),this.isNumeralChar(r)){i=u+s;break}u--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(u=e;u<n;){if(r=t.charAt(u),this.isNumeralChar(r)){i=u+s;break}u++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick(){this.initCursor()},isNumeralChar(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue(e,t,n,i){let s=this.$refs.input.$el.value,r=null;null!=t&&(r=this.parseValue(t),r=r||this.allowEmpty?r:0,this.updateInput(r,n,i,t),this.handleOnInput(e,s,r))},handleOnInput(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n})},isValueChanged(e,t){if(null===t&&null!==e)return!0;if(null!=t){return t!==("string"==typeof e?this.parseValue(e):e)}return!1},validateValue(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput(e,t,n,i){t=t||"";let s=this.$refs.input.$el.value,r=this.formatValue(e),u=s.length;if(r!==i&&(r=this.concatValues(r,i)),0===u){this.$refs.input.$el.value=r,this.$refs.input.$el.setSelectionRange(0,0);const e=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(e,e)}else{let e=this.$refs.input.$el.selectionStart,i=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=r;let l=r.length;if("range-insert"===n){const n=this.parseValue((s||"").slice(0,e)),u=(null!==n?n.toString():"").split("").join(`(${this.groupChar})?`),l=new RegExp(u,"g");l.test(r);const a=t.split("").join(`(${this.groupChar})?`),o=new RegExp(a,"g");o.test(r.slice(l.lastIndex)),i=l.lastIndex+o.lastIndex,this.$refs.input.$el.setSelectionRange(i,i)}else if(l===u)"insert"===n||"delete-back-single"===n?this.$refs.input.$el.setSelectionRange(i+1,i+1):"delete-single"===n?this.$refs.input.$el.setSelectionRange(i-1,i-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(i,i);else if("delete-back-single"===n){let e=s.charAt(i-1),t=s.charAt(i),n=u-l,r=this._group.test(t);r&&1===n?i+=1:!r&&this.isNumeralChar(e)&&(i+=-1*n+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(i,i)}else if("-"===s&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);const e=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(e,e)}else i+=l-u,this.$refs.input.$el.setSelectionRange(i,i)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues(e,t){if(e&&t){let n=t.search(this._decimal);return this._decimal.lastIndex=0,-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength(e){if(e){const t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus(e){this.focused=!0,this.$emit("focus",e)},onInputBlur(e){this.focused=!1;let t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n)},clearTimer(){this.timer&&clearInterval(this.timer)},maxBoundry(){return this.d_modelValue>=this.max},minBoundry(){return this.d_modelValue<=this.min}},computed:{containerClass(){return["p-inputnumber p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-inputnumber-buttons-stacked":this.showButtons&&"stacked"===this.buttonLayout,"p-inputnumber-buttons-horizontal":this.showButtons&&"horizontal"===this.buttonLayout,"p-inputnumber-buttons-vertical":this.showButtons&&"vertical"===this.buttonLayout}]},upButtonClass(){return["p-inputnumber-button p-inputnumber-button-up",this.incrementButtonClass,{"p-disabled":this.showButtons&&null!==this.max&&this.maxBoundry()}]},downButtonClass(){return["p-inputnumber-button p-inputnumber-button-down",this.decrementButtonClass,{"p-disabled":this.showButtons&&null!==this.min&&this.minBoundry()}]},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners(){return{mousedown:e=>this.onUpButtonMouseDown(e),mouseup:e=>this.onUpButtonMouseUp(e),mouseleave:e=>this.onUpButtonMouseLeave(e),keydown:e=>this.onUpButtonKeyDown(e),keyup:e=>this.onUpButtonKeyUp(e)}},downButtonListeners(){return{mousedown:e=>this.onDownButtonMouseDown(e),mouseup:e=>this.onDownButtonMouseUp(e),mouseleave:e=>this.onDownButtonMouseLeave(e),keydown:e=>this.onDownButtonKeyDown(e),keyup:e=>this.onDownButtonKeyUp(e)}},formattedValue(){const e=this.modelValue||this.allowEmpty?this.modelValue:0;return this.formatValue(e)},getFormatter(){return this.numberFormat}},components:{INInputText:s.default,INButton:r.default}};const l={key:0,class:"p-inputnumber-button-group"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-inputnumber {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-inputnumber-button {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label {\n display: none;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-vertical {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-buttons-vertical .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n text-align: center;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-input {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-fluid .p-inputnumber {\n width: 100%;\n}\n.p-fluid .p-inputnumber .p-inputnumber-input {\n width: 1%;\n}\n.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input {\n width: 100%;\n}\n"),u.render=function(e,t,i,s,r,u){const a=n.resolveComponent("INInputText"),o=n.resolveComponent("INButton");return n.openBlock(),n.createBlock("span",{class:u.containerClass,style:i.style},[n.createVNode(a,n.mergeProps({ref:"input",class:["p-inputnumber-input",i.inputClass],style:i.inputStyle,value:u.formattedValue},e.$attrs,{"aria-valumin":i.min,"aria-valuemax":i.max,onInput:u.onUserInput,onKeydown:u.onInputKeyDown,onKeypress:u.onInputKeyPress,onPaste:u.onPaste,onClick:u.onInputClick,onFocus:u.onInputFocus,onBlur:u.onInputBlur}),null,16,["class","style","value","aria-valumin","aria-valuemax","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur"]),i.showButtons&&"stacked"===i.buttonLayout?(n.openBlock(),n.createBlock("span",l,[n.createVNode(o,n.mergeProps({class:u.upButtonClass,icon:i.incrementButtonIcon},n.toHandlers(u.upButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"]),n.createVNode(o,n.mergeProps({class:u.downButtonClass,icon:i.decrementButtonIcon},n.toHandlers(u.downButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"])])):n.createCommentVNode("",!0),i.showButtons&&"stacked"!==i.buttonLayout?(n.openBlock(),n.createBlock(o,n.mergeProps({key:1,class:u.upButtonClass,icon:i.incrementButtonIcon},n.toHandlers(u.upButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"])):n.createCommentVNode("",!0),i.showButtons&&"stacked"!==i.buttonLayout?(n.openBlock(),n.createBlock(o,n.mergeProps({key:2,class:u.downButtonClass,icon:i.decrementButtonIcon},n.toHandlers(u.downButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"])):n.createCommentVNode("",!0)],6)},u}(primevue.inputtext,primevue.button,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.inputnumber=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e),r=i(t),l={name:"InputNumber",inheritAttrs:!1,emits:["update:modelValue","input","focus","blur"],props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:"pi pi-angle-up"},decrementButtonIcon:{type:String,default:"pi pi-angle-down"},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},style:null,class:null,inputStyle:null,inputClass:null},numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue(e){this.d_modelValue=e},locale(e,t){this.updateConstructParser(e,t)},localeMatcher(e,t){this.updateConstructParser(e,t)},mode(e,t){this.updateConstructParser(e,t)},currency(e,t){this.updateConstructParser(e,t)},currencyDisplay(e,t){this.updateConstructParser(e,t)},useGrouping(e,t){this.updateConstructParser(e,t)},minFractionDigits(e,t){this.updateConstructParser(e,t)},maxFractionDigits(e,t){this.updateConstructParser(e,t)},suffix(e,t){this.updateConstructParser(e,t)},prefix(e,t){this.updateConstructParser(e,t)}},created(){this.constructParser()},methods:{getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}},constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),t=new Map(e.map(((e,t)=>[e,t])));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=e=>t.get(e)},updateConstructParser(e,t){e!==t&&this.constructParser()},escapeRegExp:e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,{...this.getOptions(),useGrouping:!1});return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")},getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")},getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")},getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")},getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")},getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")},formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue(e){let t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;let e=+t;return isNaN(e)?null:e}return null},repeat(e,t,n){if(this.readonly)return;let i=t||500;this.clearTimer(),this.timer=setTimeout((()=>{this.repeat(e,40,n)}),i),this.spin(e,n)},spin(e,t){if(this.$refs.input){let n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,s=this.validateValue(i+n);this.updateInput(s,null,"spin"),this.updateModel(e,s),this.handleOnInput(e,i,s)}},onUpButtonMouseDown(e){this.$attrs.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp(){this.$attrs.disabled||this.clearTimer()},onUpButtonMouseLeave(){this.$attrs.disabled||this.clearTimer()},onUpButtonKeyUp(){this.$attrs.disabled||this.clearTimer()},onUpButtonKeyDown(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown(e){this.$attrs.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp(){this.$attrs.disabled||this.clearTimer()},onDownButtonMouseLeave(){this.$attrs.disabled||this.clearTimer()},onDownButtonKeyUp(){this.$attrs.disabled||this.clearTimer()},onDownButtonKeyDown(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown(e){if(this.readonly)return;if(this.lastValue=e.target.value,e.shiftKey||e.altKey)return void(this.isSpecialChar=!0);let t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.which){case 38:this.spin(e,1),e.preventDefault();break;case 40:this.spin(e,-1),e.preventDefault();break;case 37:this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case 39:this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case 13:s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case 8:if(e.preventDefault(),t===n){const n=i.charAt(t-1),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:l}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const e=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(n))this._decimal.lastIndex=0,e?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(r>0&&t>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<e?"":"0";s=i.slice(0,t-1)+n+i.slice(t)}else 1===l?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case 46:if(e.preventDefault(),t===n){const n=i.charAt(t),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:l}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const e=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(n))this._decimal.lastIndex=0,e?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(r>0&&t>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<e?"":"0";s=i.slice(0,t)+n+i.slice(t+1)}else 1===l?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range")}},onInputKeyPress(e){if(this.readonly)return;e.preventDefault();let t=e.which||e.keyCode,n=String.fromCharCode(t);const i=this.isDecimalSign(n),s=this.isMinusSign(n);(48<=t&&t<=57||s||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:s})},onPaste(e){e.preventDefault();let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign(){return null===this.min||this.min<0},isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode(){return"decimal"===this.mode},getDecimalCharIndexes(e){let t=e.search(this._decimal);this._decimal.lastIndex=0;const n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes(e){const t=e.search(this._decimal);this._decimal.lastIndex=0;const n=e.search(this._minusSign);this._minusSign.lastIndex=0;const i=e.search(this._suffix);this._suffix.lastIndex=0;const s=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:s}},insert(e,t,n={isDecimalSign:!1,isMinusSign:!1}){const i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==i)return;const s=this.$refs.input.$el.selectionStart,r=this.$refs.input.$el.selectionEnd;let l=this.$refs.input.$el.value.trim();const{decimalCharIndex:u,minusCharIndex:a,suffixCharIndex:o,currencyCharIndex:p}=this.getCharIndexes(l);let h;if(n.isMinusSign)0===s&&(h=l,-1!==a&&0===r||(h=this.insertText(l,t,0,r)),this.updateValue(e,h,t,"insert"));else if(n.isDecimalSign)u>0&&s===u?this.updateValue(e,l,t,"insert"):(u>s&&u<r||-1===u&&this.maxFractionDigits)&&(h=this.insertText(l,t,s,r),this.updateValue(e,h,t,"insert"));else{const n=this.numberFormat.resolvedOptions().maximumFractionDigits,i=s!==r?"range-insert":"insert";if(u>0&&s>u){if(s+t.length-(u+1)<=n){const n=p>=s?p-1:o>=s?o:l.length;h=l.slice(0,s)+t+l.slice(s+t.length,n)+l.slice(n),this.updateValue(e,h,t,i)}}else h=this.insertText(l,t,s,r),this.updateValue(e,h,t,i)}},insertText(e,t,n,i){if(2===("."===t?t:t.split(".")).length){const s=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,s>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):e||this.formatValue(t)}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange(e,t,n){let i;return i=n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n),i},initCursor(){let e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,s=(this.prefixChar||"").length;t=t.replace(this._prefix,""),e-=s;let r=t.charAt(e);if(this.isNumeralChar(r))return e+s;let l=e-1;for(;l>=0;){if(r=t.charAt(l),this.isNumeralChar(r)){i=l+s;break}l--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(l=e;l<n;){if(r=t.charAt(l),this.isNumeralChar(r)){i=l+s;break}l++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick(){this.readonly||this.initCursor()},isNumeralChar(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue(e,t,n,i){let s=this.$refs.input.$el.value,r=null;null!=t&&(r=this.parseValue(t),r=r||this.allowEmpty?r:0,this.updateInput(r,n,i,t),this.handleOnInput(e,s,r))},handleOnInput(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n})},isValueChanged(e,t){if(null===t&&null!==e)return!0;if(null!=t){return t!==("string"==typeof e?this.parseValue(e):e)}return!1},validateValue(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput(e,t,n,i){t=t||"";let s=this.$refs.input.$el.value,r=this.formatValue(e),l=s.length;if(r!==i&&(r=this.concatValues(r,i)),0===l){this.$refs.input.$el.value=r,this.$refs.input.$el.setSelectionRange(0,0);const e=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(e,e)}else{let e=this.$refs.input.$el.selectionStart,i=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=r;let u=r.length;if("range-insert"===n){const n=this.parseValue((s||"").slice(0,e)),l=(null!==n?n.toString():"").split("").join(`(${this.groupChar})?`),u=new RegExp(l,"g");u.test(r);const a=t.split("").join(`(${this.groupChar})?`),o=new RegExp(a,"g");o.test(r.slice(u.lastIndex)),i=u.lastIndex+o.lastIndex,this.$refs.input.$el.setSelectionRange(i,i)}else if(u===l)"insert"===n||"delete-back-single"===n?this.$refs.input.$el.setSelectionRange(i+1,i+1):"delete-single"===n?this.$refs.input.$el.setSelectionRange(i-1,i-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(i,i);else if("delete-back-single"===n){let e=s.charAt(i-1),t=s.charAt(i),n=l-u,r=this._group.test(t);r&&1===n?i+=1:!r&&this.isNumeralChar(e)&&(i+=-1*n+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(i,i)}else if("-"===s&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);const e=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(e,e)}else i+=u-l,this.$refs.input.$el.setSelectionRange(i,i)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues(e,t){if(e&&t){let n=t.search(this._decimal);return this._decimal.lastIndex=0,-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength(e){if(e){const t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus(e){this.focused=!0,this.$emit("focus",e)},onInputBlur(e){this.focused=!1;let t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n)},clearTimer(){this.timer&&clearInterval(this.timer)},maxBoundry(){return this.d_modelValue>=this.max},minBoundry(){return this.d_modelValue<=this.min}},computed:{containerClass(){return["p-inputnumber p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-inputnumber-buttons-stacked":this.showButtons&&"stacked"===this.buttonLayout,"p-inputnumber-buttons-horizontal":this.showButtons&&"horizontal"===this.buttonLayout,"p-inputnumber-buttons-vertical":this.showButtons&&"vertical"===this.buttonLayout}]},upButtonClass(){return["p-inputnumber-button p-inputnumber-button-up",this.incrementButtonClass,{"p-disabled":this.showButtons&&null!==this.max&&this.maxBoundry()}]},downButtonClass(){return["p-inputnumber-button p-inputnumber-button-down",this.decrementButtonClass,{"p-disabled":this.showButtons&&null!==this.min&&this.minBoundry()}]},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners(){return{mousedown:e=>this.onUpButtonMouseDown(e),mouseup:e=>this.onUpButtonMouseUp(e),mouseleave:e=>this.onUpButtonMouseLeave(e),keydown:e=>this.onUpButtonKeyDown(e),keyup:e=>this.onUpButtonKeyUp(e)}},downButtonListeners(){return{mousedown:e=>this.onDownButtonMouseDown(e),mouseup:e=>this.onDownButtonMouseUp(e),mouseleave:e=>this.onDownButtonMouseLeave(e),keydown:e=>this.onDownButtonKeyDown(e),keyup:e=>this.onDownButtonKeyUp(e)}},formattedValue(){const e=this.modelValue||this.allowEmpty?this.modelValue:0;return this.formatValue(e)},getFormatter(){return this.numberFormat}},components:{INInputText:s.default,INButton:r.default}};const u={key:0,class:"p-inputnumber-button-group"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-inputnumber {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-inputnumber-button {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label {\n display: none;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-vertical {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-buttons-vertical .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n text-align: center;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-input {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-fluid .p-inputnumber {\n width: 100%;\n}\n.p-fluid .p-inputnumber .p-inputnumber-input {\n width: 1%;\n}\n.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input {\n width: 100%;\n}\n"),l.render=function(e,t,i,s,r,l){const a=n.resolveComponent("INInputText"),o=n.resolveComponent("INButton");return n.openBlock(),n.createElementBlock("span",{class:n.normalizeClass(l.containerClass),style:n.normalizeStyle(i.style)},[n.createVNode(a,n.mergeProps({ref:"input",class:["p-inputnumber-input",i.inputClass],style:i.inputStyle,value:l.formattedValue},e.$attrs,{"aria-valumin":i.min,"aria-valuemax":i.max,readonly:i.readonly,onInput:l.onUserInput,onKeydown:l.onInputKeyDown,onKeypress:l.onInputKeyPress,onPaste:l.onPaste,onClick:l.onInputClick,onFocus:l.onInputFocus,onBlur:l.onInputBlur}),null,16,["class","style","value","aria-valumin","aria-valuemax","readonly","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur"]),i.showButtons&&"stacked"===i.buttonLayout?(n.openBlock(),n.createElementBlock("span",u,[n.createVNode(o,n.mergeProps({class:l.upButtonClass,icon:i.incrementButtonIcon},n.toHandlers(l.upButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"]),n.createVNode(o,n.mergeProps({class:l.downButtonClass,icon:i.decrementButtonIcon},n.toHandlers(l.downButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"])])):n.createCommentVNode("",!0),i.showButtons&&"stacked"!==i.buttonLayout?(n.openBlock(),n.createBlock(o,n.mergeProps({key:1,class:l.upButtonClass,icon:i.incrementButtonIcon},n.toHandlers(l.upButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"])):n.createCommentVNode("",!0),i.showButtons&&"stacked"!==i.buttonLayout?(n.openBlock(),n.createBlock(o,n.mergeProps({key:2,class:l.downButtonClass,icon:i.decrementButtonIcon},n.toHandlers(l.downButtonListeners),{disabled:e.$attrs.disabled}),null,16,["class","icon","disabled"])):n.createCommentVNode("",!0)],6)},l}(primevue.inputtext,primevue.button,Vue);
@@ -64,28 +64,29 @@ var script = {
64
64
  };
65
65
 
66
66
  const _hoisted_1 = { class: "p-hidden-accessible" };
67
- const _hoisted_2 = /*#__PURE__*/vue.createVNode("span", { class: "p-inputswitch-slider" }, null, -1);
67
+ const _hoisted_2 = ["checked", "aria-checked"];
68
+ const _hoisted_3 = /*#__PURE__*/vue.createElementVNode("span", { class: "p-inputswitch-slider" }, null, -1);
68
69
 
69
70
  function render(_ctx, _cache, $props, $setup, $data, $options) {
70
- return (vue.openBlock(), vue.createBlock("div", {
71
- class: $options.containerClass,
72
- onClick: _cache[4] || (_cache[4] = $event => ($options.onClick($event))),
73
- style: $props.style
71
+ return (vue.openBlock(), vue.createElementBlock("div", {
72
+ class: vue.normalizeClass($options.containerClass),
73
+ onClick: _cache[3] || (_cache[3] = $event => ($options.onClick($event))),
74
+ style: vue.normalizeStyle($props.style)
74
75
  }, [
75
- vue.createVNode("div", _hoisted_1, [
76
- vue.createVNode("input", vue.mergeProps({
76
+ vue.createElementVNode("div", _hoisted_1, [
77
+ vue.createElementVNode("input", vue.mergeProps({
77
78
  ref: "input",
78
79
  type: "checkbox",
79
80
  checked: $options.checked
80
81
  }, _ctx.$attrs, {
81
- onFocus: _cache[1] || (_cache[1] = $event => ($options.onFocus($event))),
82
- onBlur: _cache[2] || (_cache[2] = $event => ($options.onBlur($event))),
83
- onKeydown: _cache[3] || (_cache[3] = vue.withKeys(vue.withModifiers($event => ($options.onClick($event)), ["prevent"]), ["enter"])),
82
+ onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
83
+ onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event))),
84
+ onKeydown: _cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers($event => ($options.onClick($event)), ["prevent"]), ["enter"])),
84
85
  role: "switch",
85
86
  "aria-checked": $options.checked
86
- }), null, 16, ["checked", "aria-checked"])
87
+ }), null, 16, _hoisted_2)
87
88
  ]),
88
- _hoisted_2
89
+ _hoisted_3
89
90
  ], 6))
90
91
  }
91
92
 
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),t={name:"InputSwitch",inheritAttrs:!1,emits:["click","update:modelValue","change","input"],props:{modelValue:{type:null,default:!1},class:null,style:null,trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.$attrs.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1}},computed:{containerClass(){return["p-inputswitch p-component",this.class,{"p-inputswitch-checked":this.checked,"p-disabled":this.$attrs.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const n={class:"p-hidden-accessible"},s=e.createVNode("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&s.firstChild?s.insertBefore(i,s.firstChild):s.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: "";\n top: 50%;\n}\n'),t.render=function(t,i,c,l,o,u){return e.openBlock(),e.createBlock("div",{class:u.containerClass,onClick:i[4]||(i[4]=e=>u.onClick(e)),style:c.style},[e.createVNode("div",n,[e.createVNode("input",e.mergeProps({ref:"input",type:"checkbox",checked:u.checked},t.$attrs,{onFocus:i[1]||(i[1]=e=>u.onFocus(e)),onBlur:i[2]||(i[2]=e=>u.onBlur(e)),onKeydown:i[3]||(i[3]=e.withKeys(e.withModifiers((e=>u.onClick(e)),["prevent"]),["enter"])),role:"switch","aria-checked":u.checked}),null,16,["checked","aria-checked"])]),s],6)},module.exports=t;
1
+ "use strict";var e=require("vue"),t={name:"InputSwitch",inheritAttrs:!1,emits:["click","update:modelValue","change","input"],props:{modelValue:{type:null,default:!1},class:null,style:null,trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.$attrs.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1}},computed:{containerClass(){return["p-inputswitch p-component",this.class,{"p-inputswitch-checked":this.checked,"p-disabled":this.$attrs.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const n={class:"p-hidden-accessible"},s=["checked","aria-checked"],i=e.createElementVNode("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&s.firstChild?s.insertBefore(i,s.firstChild):s.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: "";\n top: 50%;\n}\n'),t.render=function(t,l,c,o,u,a){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.containerClass),onClick:l[3]||(l[3]=e=>a.onClick(e)),style:e.normalizeStyle(c.style)},[e.createElementVNode("div",n,[e.createElementVNode("input",e.mergeProps({ref:"input",type:"checkbox",checked:a.checked},t.$attrs,{onFocus:l[0]||(l[0]=e=>a.onFocus(e)),onBlur:l[1]||(l[1]=e=>a.onBlur(e)),onKeydown:l[2]||(l[2]=e.withKeys(e.withModifiers((e=>a.onClick(e)),["prevent"]),["enter"])),role:"switch","aria-checked":a.checked}),null,16,s)]),i],6)},module.exports=t;
@@ -1,4 +1,4 @@
1
- import { openBlock, createBlock, createVNode, mergeProps, withKeys, withModifiers } from 'vue';
1
+ import { openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, mergeProps, withKeys, withModifiers } from 'vue';
2
2
 
3
3
  var script = {
4
4
  name: 'InputSwitch',
@@ -62,28 +62,29 @@ var script = {
62
62
  };
63
63
 
64
64
  const _hoisted_1 = { class: "p-hidden-accessible" };
65
- const _hoisted_2 = /*#__PURE__*/createVNode("span", { class: "p-inputswitch-slider" }, null, -1);
65
+ const _hoisted_2 = ["checked", "aria-checked"];
66
+ const _hoisted_3 = /*#__PURE__*/createElementVNode("span", { class: "p-inputswitch-slider" }, null, -1);
66
67
 
67
68
  function render(_ctx, _cache, $props, $setup, $data, $options) {
68
- return (openBlock(), createBlock("div", {
69
- class: $options.containerClass,
70
- onClick: _cache[4] || (_cache[4] = $event => ($options.onClick($event))),
71
- style: $props.style
69
+ return (openBlock(), createElementBlock("div", {
70
+ class: normalizeClass($options.containerClass),
71
+ onClick: _cache[3] || (_cache[3] = $event => ($options.onClick($event))),
72
+ style: normalizeStyle($props.style)
72
73
  }, [
73
- createVNode("div", _hoisted_1, [
74
- createVNode("input", mergeProps({
74
+ createElementVNode("div", _hoisted_1, [
75
+ createElementVNode("input", mergeProps({
75
76
  ref: "input",
76
77
  type: "checkbox",
77
78
  checked: $options.checked
78
79
  }, _ctx.$attrs, {
79
- onFocus: _cache[1] || (_cache[1] = $event => ($options.onFocus($event))),
80
- onBlur: _cache[2] || (_cache[2] = $event => ($options.onBlur($event))),
81
- onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers($event => ($options.onClick($event)), ["prevent"]), ["enter"])),
80
+ onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
81
+ onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event))),
82
+ onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers($event => ($options.onClick($event)), ["prevent"]), ["enter"])),
82
83
  role: "switch",
83
84
  "aria-checked": $options.checked
84
- }), null, 16, ["checked", "aria-checked"])
85
+ }), null, 16, _hoisted_2)
85
86
  ]),
86
- _hoisted_2
87
+ _hoisted_3
87
88
  ], 6))
88
89
  }
89
90
 
@@ -119,4 +120,4 @@ styleInject(css_248z);
119
120
 
120
121
  script.render = render;
121
122
 
122
- export default script;
123
+ export { script as default };
@@ -1 +1 @@
1
- import{openBlock as e,createBlock as t,createVNode as n,mergeProps as i,withKeys as s,withModifiers as l}from"vue";var c={name:"InputSwitch",inheritAttrs:!1,emits:["click","update:modelValue","change","input"],props:{modelValue:{type:null,default:!1},class:null,style:null,trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.$attrs.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1}},computed:{containerClass(){return["p-inputswitch p-component",this.class,{"p-inputswitch-checked":this.checked,"p-disabled":this.$attrs.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const o={class:"p-hidden-accessible"},u=n("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: "";\n top: 50%;\n}\n'),c.render=function(c,d,a,r,p,h){return e(),t("div",{class:h.containerClass,onClick:d[4]||(d[4]=e=>h.onClick(e)),style:a.style},[n("div",o,[n("input",i({ref:"input",type:"checkbox",checked:h.checked},c.$attrs,{onFocus:d[1]||(d[1]=e=>h.onFocus(e)),onBlur:d[2]||(d[2]=e=>h.onBlur(e)),onKeydown:d[3]||(d[3]=s(l((e=>h.onClick(e)),["prevent"]),["enter"])),role:"switch","aria-checked":h.checked}),null,16,["checked","aria-checked"])]),u],6)};export default c;
1
+ import{openBlock as e,createElementBlock as t,normalizeClass as n,normalizeStyle as s,createElementVNode as i,mergeProps as l,withKeys as c,withModifiers as o}from"vue";var u={name:"InputSwitch",inheritAttrs:!1,emits:["click","update:modelValue","change","input"],props:{modelValue:{type:null,default:!1},class:null,style:null,trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.$attrs.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1}},computed:{containerClass(){return["p-inputswitch p-component",this.class,{"p-inputswitch-checked":this.checked,"p-disabled":this.$attrs.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const a={class:"p-hidden-accessible"},d=["checked","aria-checked"],r=i("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&s.firstChild?s.insertBefore(i,s.firstChild):s.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: "";\n top: 50%;\n}\n'),u.render=function(u,p,h,f,m,k){return e(),t("div",{class:n(k.containerClass),onClick:p[3]||(p[3]=e=>k.onClick(e)),style:s(h.style)},[i("div",a,[i("input",l({ref:"input",type:"checkbox",checked:k.checked},u.$attrs,{onFocus:p[0]||(p[0]=e=>k.onFocus(e)),onBlur:p[1]||(p[1]=e=>k.onBlur(e)),onKeydown:p[2]||(p[2]=c(o((e=>k.onClick(e)),["prevent"]),["enter"])),role:"switch","aria-checked":k.checked}),null,16,d)]),r],6)};export{u as default};
@@ -64,28 +64,29 @@ this.primevue.inputswitch = (function (vue) {
64
64
  };
65
65
 
66
66
  const _hoisted_1 = { class: "p-hidden-accessible" };
67
- const _hoisted_2 = /*#__PURE__*/vue.createVNode("span", { class: "p-inputswitch-slider" }, null, -1);
67
+ const _hoisted_2 = ["checked", "aria-checked"];
68
+ const _hoisted_3 = /*#__PURE__*/vue.createElementVNode("span", { class: "p-inputswitch-slider" }, null, -1);
68
69
 
69
70
  function render(_ctx, _cache, $props, $setup, $data, $options) {
70
- return (vue.openBlock(), vue.createBlock("div", {
71
- class: $options.containerClass,
72
- onClick: _cache[4] || (_cache[4] = $event => ($options.onClick($event))),
73
- style: $props.style
71
+ return (vue.openBlock(), vue.createElementBlock("div", {
72
+ class: vue.normalizeClass($options.containerClass),
73
+ onClick: _cache[3] || (_cache[3] = $event => ($options.onClick($event))),
74
+ style: vue.normalizeStyle($props.style)
74
75
  }, [
75
- vue.createVNode("div", _hoisted_1, [
76
- vue.createVNode("input", vue.mergeProps({
76
+ vue.createElementVNode("div", _hoisted_1, [
77
+ vue.createElementVNode("input", vue.mergeProps({
77
78
  ref: "input",
78
79
  type: "checkbox",
79
80
  checked: $options.checked
80
81
  }, _ctx.$attrs, {
81
- onFocus: _cache[1] || (_cache[1] = $event => ($options.onFocus($event))),
82
- onBlur: _cache[2] || (_cache[2] = $event => ($options.onBlur($event))),
83
- onKeydown: _cache[3] || (_cache[3] = vue.withKeys(vue.withModifiers($event => ($options.onClick($event)), ["prevent"]), ["enter"])),
82
+ onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
83
+ onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event))),
84
+ onKeydown: _cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers($event => ($options.onClick($event)), ["prevent"]), ["enter"])),
84
85
  role: "switch",
85
86
  "aria-checked": $options.checked
86
- }), null, 16, ["checked", "aria-checked"])
87
+ }), null, 16, _hoisted_2)
87
88
  ]),
88
- _hoisted_2
89
+ _hoisted_3
89
90
  ], 6))
90
91
  }
91
92
 
@@ -123,4 +124,4 @@ this.primevue.inputswitch = (function (vue) {
123
124
 
124
125
  return script;
125
126
 
126
- }(Vue));
127
+ })(Vue);
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.inputswitch=function(e){"use strict";var t={name:"InputSwitch",inheritAttrs:!1,emits:["click","update:modelValue","change","input"],props:{modelValue:{type:null,default:!1},class:null,style:null,trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.$attrs.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1}},computed:{containerClass(){return["p-inputswitch p-component",this.class,{"p-inputswitch-checked":this.checked,"p-disabled":this.$attrs.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const i={class:"p-hidden-accessible"},n=e.createVNode("span",{class:"p-inputswitch-slider"},null,-1);return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: "";\n top: 50%;\n}\n'),t.render=function(t,s,c,l,o,u){return e.openBlock(),e.createBlock("div",{class:u.containerClass,onClick:s[4]||(s[4]=e=>u.onClick(e)),style:c.style},[e.createVNode("div",i,[e.createVNode("input",e.mergeProps({ref:"input",type:"checkbox",checked:u.checked},t.$attrs,{onFocus:s[1]||(s[1]=e=>u.onFocus(e)),onBlur:s[2]||(s[2]=e=>u.onBlur(e)),onKeydown:s[3]||(s[3]=e.withKeys(e.withModifiers((e=>u.onClick(e)),["prevent"]),["enter"])),role:"switch","aria-checked":u.checked}),null,16,["checked","aria-checked"])]),n],6)},t}(Vue);
1
+ this.primevue=this.primevue||{},this.primevue.inputswitch=function(e){"use strict";var t={name:"InputSwitch",inheritAttrs:!1,emits:["click","update:modelValue","change","input"],props:{modelValue:{type:null,default:!1},class:null,style:null,trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.$attrs.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1}},computed:{containerClass(){return["p-inputswitch p-component",this.class,{"p-inputswitch-checked":this.checked,"p-disabled":this.$attrs.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const n={class:"p-hidden-accessible"},i=["checked","aria-checked"],s=e.createElementVNode("span",{class:"p-inputswitch-slider"},null,-1);return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: "";\n top: 50%;\n}\n'),t.render=function(t,l,c,o,u,a){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.containerClass),onClick:l[3]||(l[3]=e=>a.onClick(e)),style:e.normalizeStyle(c.style)},[e.createElementVNode("div",n,[e.createElementVNode("input",e.mergeProps({ref:"input",type:"checkbox",checked:a.checked},t.$attrs,{onFocus:l[0]||(l[0]=e=>a.onFocus(e)),onBlur:l[1]||(l[1]=e=>a.onBlur(e)),onKeydown:l[2]||(l[2]=e.withKeys(e.withModifiers((e=>a.onClick(e)),["prevent"]),["enter"])),role:"switch","aria-checked":a.checked}),null,16,i)]),s],6)},t}(Vue);
@@ -20,12 +20,14 @@ var script = {
20
20
  }
21
21
  };
22
22
 
23
+ const _hoisted_1 = ["value"];
24
+
23
25
  function render(_ctx, _cache, $props, $setup, $data, $options) {
24
- return (vue.openBlock(), vue.createBlock("input", vue.mergeProps({
26
+ return (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
25
27
  class: ['p-inputtext p-component', {'p-filled': $options.filled}],
26
28
  value: $props.modelValue,
27
- onInput: _cache[1] || (_cache[1] = (...args) => ($options.onInput && $options.onInput(...args)))
28
- }, _ctx.$attrs), null, 16, ["value"]))
29
+ onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args)))
30
+ }, _ctx.$attrs), null, 16, _hoisted_1))
29
31
  }
30
32
 
31
33
  script.render = render;
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),t={name:"InputText",emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0}}};t.render=function(t,l,u,n,o,p){return e.openBlock(),e.createBlock("input",e.mergeProps({class:["p-inputtext p-component",{"p-filled":p.filled}],value:u.modelValue,onInput:l[1]||(l[1]=(...e)=>p.onInput&&p.onInput(...e))},t.$attrs),null,16,["value"])},module.exports=t;
1
+ "use strict";var e=require("vue"),t={name:"InputText",emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0}}};const l=["value"];t.render=function(t,u,n,o,p,r){return e.openBlock(),e.createElementBlock("input",e.mergeProps({class:["p-inputtext p-component",{"p-filled":r.filled}],value:n.modelValue,onInput:u[0]||(u[0]=(...e)=>r.onInput&&r.onInput(...e))},t.$attrs),null,16,l)},module.exports=t;
@@ -1,4 +1,4 @@
1
- import { openBlock, createBlock, mergeProps } from 'vue';
1
+ import { openBlock, createElementBlock, mergeProps } from 'vue';
2
2
 
3
3
  var script = {
4
4
  name: 'InputText',
@@ -18,14 +18,16 @@ var script = {
18
18
  }
19
19
  };
20
20
 
21
+ const _hoisted_1 = ["value"];
22
+
21
23
  function render(_ctx, _cache, $props, $setup, $data, $options) {
22
- return (openBlock(), createBlock("input", mergeProps({
24
+ return (openBlock(), createElementBlock("input", mergeProps({
23
25
  class: ['p-inputtext p-component', {'p-filled': $options.filled}],
24
26
  value: $props.modelValue,
25
- onInput: _cache[1] || (_cache[1] = (...args) => ($options.onInput && $options.onInput(...args)))
26
- }, _ctx.$attrs), null, 16, ["value"]))
27
+ onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args)))
28
+ }, _ctx.$attrs), null, 16, _hoisted_1))
27
29
  }
28
30
 
29
31
  script.render = render;
30
32
 
31
- export default script;
33
+ export { script as default };
@@ -1 +1 @@
1
- import{openBlock as e,createBlock as t,mergeProps as l}from"vue";var u={name:"InputText",emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0}}};u.render=function(u,n,o,p,a,d){return e(),t("input",l({class:["p-inputtext p-component",{"p-filled":d.filled}],value:o.modelValue,onInput:n[1]||(n[1]=(...e)=>d.onInput&&d.onInput(...e))},u.$attrs),null,16,["value"])};export default u;
1
+ import{openBlock as e,createElementBlock as t,mergeProps as l}from"vue";var u={name:"InputText",emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0}}};const n=["value"];u.render=function(u,o,a,p,d,m){return e(),t("input",l({class:["p-inputtext p-component",{"p-filled":m.filled}],value:a.modelValue,onInput:o[0]||(o[0]=(...e)=>m.onInput&&m.onInput(...e))},u.$attrs),null,16,n)};export{u as default};
@@ -20,16 +20,18 @@ this.primevue.inputtext = (function (vue) {
20
20
  }
21
21
  };
22
22
 
23
+ const _hoisted_1 = ["value"];
24
+
23
25
  function render(_ctx, _cache, $props, $setup, $data, $options) {
24
- return (vue.openBlock(), vue.createBlock("input", vue.mergeProps({
26
+ return (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
25
27
  class: ['p-inputtext p-component', {'p-filled': $options.filled}],
26
28
  value: $props.modelValue,
27
- onInput: _cache[1] || (_cache[1] = (...args) => ($options.onInput && $options.onInput(...args)))
28
- }, _ctx.$attrs), null, 16, ["value"]))
29
+ onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args)))
30
+ }, _ctx.$attrs), null, 16, _hoisted_1))
29
31
  }
30
32
 
31
33
  script.render = render;
32
34
 
33
35
  return script;
34
36
 
35
- }(Vue));
37
+ })(Vue);
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.inputtext=function(e){"use strict";var t={name:"InputText",emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0}}};return t.render=function(t,u,l,n,o,p){return e.openBlock(),e.createBlock("input",e.mergeProps({class:["p-inputtext p-component",{"p-filled":p.filled}],value:l.modelValue,onInput:u[1]||(u[1]=(...e)=>p.onInput&&p.onInput(...e))},t.$attrs),null,16,["value"])},t}(Vue);
1
+ this.primevue=this.primevue||{},this.primevue.inputtext=function(e){"use strict";var t={name:"InputText",emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0}}};const u=["value"];return t.render=function(t,l,n,o,p,i){return e.openBlock(),e.createElementBlock("input",e.mergeProps({class:["p-inputtext p-component",{"p-filled":i.filled}],value:n.modelValue,onInput:l[0]||(l[0]=(...e)=>i.onInput&&i.onInput(...e))},t.$attrs),null,16,u)},t}(Vue);
package/knob/knob.cjs.js CHANGED
@@ -201,41 +201,48 @@ var script = {
201
201
  };
202
202
  //Derived and forked from https://github.com/kramer99/vue-knob-control
203
203
 
204
+ const _hoisted_1 = ["width", "height"];
205
+ const _hoisted_2 = ["d", "stroke-width", "stroke"];
206
+ const _hoisted_3 = ["d", "stroke-width", "stroke"];
207
+ const _hoisted_4 = ["fill"];
208
+
204
209
  function render(_ctx, _cache, $props, $setup, $data, $options) {
205
- return (vue.openBlock(), vue.createBlock("div", { class: $options.containerClass }, [
206
- (vue.openBlock(), vue.createBlock("svg", {
210
+ return (vue.openBlock(), vue.createElementBlock("div", {
211
+ class: vue.normalizeClass($options.containerClass)
212
+ }, [
213
+ (vue.openBlock(), vue.createElementBlock("svg", {
207
214
  viewBox: "0 0 100 100",
208
215
  width: $props.size,
209
216
  height: $props.size,
210
- onClick: _cache[1] || (_cache[1] = (...args) => ($options.onClick && $options.onClick(...args))),
211
- onMousedown: _cache[2] || (_cache[2] = (...args) => ($options.onMouseDown && $options.onMouseDown(...args))),
212
- onMouseup: _cache[3] || (_cache[3] = (...args) => ($options.onMouseUp && $options.onMouseUp(...args))),
213
- onTouchstart: _cache[4] || (_cache[4] = (...args) => ($options.onTouchStart && $options.onTouchStart(...args))),
214
- onTouchend: _cache[5] || (_cache[5] = (...args) => ($options.onTouchEnd && $options.onTouchEnd(...args)))
217
+ onClick: _cache[0] || (_cache[0] = (...args) => ($options.onClick && $options.onClick(...args))),
218
+ onMousedown: _cache[1] || (_cache[1] = (...args) => ($options.onMouseDown && $options.onMouseDown(...args))),
219
+ onMouseup: _cache[2] || (_cache[2] = (...args) => ($options.onMouseUp && $options.onMouseUp(...args))),
220
+ onTouchstart: _cache[3] || (_cache[3] = (...args) => ($options.onTouchStart && $options.onTouchStart(...args))),
221
+ onTouchend: _cache[4] || (_cache[4] = (...args) => ($options.onTouchEnd && $options.onTouchEnd(...args)))
215
222
  }, [
216
- vue.createVNode("path", {
223
+ vue.createElementVNode("path", {
217
224
  d: $options.rangePath,
218
225
  "stroke-width": $props.strokeWidth,
219
226
  stroke: $props.rangeColor,
220
227
  class: "p-knob-range"
221
- }, null, 8, ["d", "stroke-width", "stroke"]),
222
- vue.createVNode("path", {
228
+ }, null, 8, _hoisted_2),
229
+ vue.createElementVNode("path", {
223
230
  d: $options.valuePath,
224
231
  "stroke-width": $props.strokeWidth,
225
232
  stroke: $props.valueColor,
226
233
  class: "p-knob-value"
227
- }, null, 8, ["d", "stroke-width", "stroke"]),
234
+ }, null, 8, _hoisted_3),
228
235
  ($props.showValue)
229
- ? (vue.openBlock(), vue.createBlock("text", {
236
+ ? (vue.openBlock(), vue.createElementBlock("text", {
230
237
  key: 0,
231
238
  x: 50,
232
239
  y: 57,
233
240
  "text-anchor": "middle",
234
241
  fill: $props.textColor,
235
242
  class: "p-knob-text"
236
- }, vue.toDisplayString($options.valueToDisplay), 9, ["fill"]))
243
+ }, vue.toDisplayString($options.valueToDisplay), 9, _hoisted_4))
237
244
  : vue.createCommentVNode("", true)
238
- ], 40, ["width", "height"]))
245
+ ], 40, _hoisted_1))
239
246
  ], 2))
240
247
  }
241
248
 
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),t={name:"Knob",emits:["update:modelValue","change"],data:()=>({radius:40,midX:50,midY:50,minRadians:4*Math.PI/3,maxRadians:-Math.PI/3}),props:{modelValue:{type:Number,default:null},size:{type:Number,default:100},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},step:{type:Number,default:1},min:{type:Number,default:0},max:{type:Number,default:100},valueColor:{type:String,default:"var(--primary-color, Black)"},rangeColor:{type:String,default:"var(--surface-border, LightGray)"},textColor:{type:String,default:"var(--text-color-secondary, Black)"},strokeWidth:{type:Number,default:14},showValue:{type:Boolean,default:!0},valueTemplate:{type:String,default:"{value}"}},methods:{updateValue(e,t){let i=e-this.size/2,a=this.size/2-t,s=Math.atan2(a,i),n=-Math.PI/2-Math.PI/6;this.updateModel(s,n)},updateModel(e,t){let i;if(e>this.maxRadians)i=this.mapRange(e,this.minRadians,this.maxRadians,this.min,this.max);else{if(!(e<t))return;i=this.mapRange(e+2*Math.PI,this.minRadians,this.maxRadians,this.min,this.max)}let a=Math.round((i-this.min)/this.step)*this.step+this.min;this.$emit("update:modelValue",a),this.$emit("change",a)},mapRange:(e,t,i,a,s)=>(e-t)*(s-a)/(i-t)+a,onClick(e){this.disabled||this.readonly||this.updateValue(e.offsetX,e.offsetY)},onMouseDown(e){this.disabled||this.readonly||(window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),e.preventDefault())},onMouseUp(e){this.disabled||this.readonly||(window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),e.preventDefault())},onTouchStart(e){this.disabled||this.readonly||(window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.preventDefault())},onTouchEnd(e){this.disabled||this.readonly||(window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.preventDefault())},onMouseMove(e){this.disabled||this.readonly||(this.updateValue(e.offsetX,e.offsetY),e.preventDefault())},onTouchMove(e){if(!this.disabled&&!this.readonly&&1==e.touches.length){const t=this.$el.getBoundingClientRect(),i=e.targetTouches.item(0),a=i.clientX-t.left,s=i.clientY-t.top;this.updateValue(a,s)}}},computed:{containerClass(){return["p-knob p-component",{"p-disabled":this.disabled}]},rangePath(){return`M ${this.minX} ${this.minY} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX} ${this.maxY}`},valuePath(){return`M ${this.zeroX} ${this.zeroY} A ${this.radius} ${this.radius} 0 ${this.largeArc} ${this.sweep} ${this.valueX} ${this.valueY}`},zeroRadians(){return this.min>0&&this.max>0?this.mapRange(this.min,this.min,this.max,this.minRadians,this.maxRadians):this.mapRange(0,this.min,this.max,this.minRadians,this.maxRadians)},valueRadians(){return this.mapRange(this.modelValue,this.min,this.max,this.minRadians,this.maxRadians)},minX(){return this.midX+Math.cos(this.minRadians)*this.radius},minY(){return this.midY-Math.sin(this.minRadians)*this.radius},maxX(){return this.midX+Math.cos(this.maxRadians)*this.radius},maxY(){return this.midY-Math.sin(this.maxRadians)*this.radius},zeroX(){return this.midX+Math.cos(this.zeroRadians)*this.radius},zeroY(){return this.midY-Math.sin(this.zeroRadians)*this.radius},valueX(){return this.midX+Math.cos(this.valueRadians)*this.radius},valueY(){return this.midY-Math.sin(this.valueRadians)*this.radius},largeArc(){return Math.abs(this.zeroRadians-this.valueRadians)<Math.PI?0:1},sweep(){return this.valueRadians>this.zeroRadians?0:1},valueToDisplay(){return this.valueTemplate.replace(/{value}/g,this.modelValue)}}};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n@-webkit-keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n@keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n.p-knob-range {\n fill: none;\n -webkit-transition: stroke .1s ease-in;\n transition: stroke .1s ease-in;\n}\n.p-knob-value {\n -webkit-animation-name: dash-frame;\n animation-name: dash-frame;\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n fill: none;\n}\n.p-knob-text {\n font-size: 1.3rem;\n text-align: center;\n}\n"),t.render=function(t,i,a,s,n,o){return e.openBlock(),e.createBlock("div",{class:o.containerClass},[(e.openBlock(),e.createBlock("svg",{viewBox:"0 0 100 100",width:a.size,height:a.size,onClick:i[1]||(i[1]=(...e)=>o.onClick&&o.onClick(...e)),onMousedown:i[2]||(i[2]=(...e)=>o.onMouseDown&&o.onMouseDown(...e)),onMouseup:i[3]||(i[3]=(...e)=>o.onMouseUp&&o.onMouseUp(...e)),onTouchstart:i[4]||(i[4]=(...e)=>o.onTouchStart&&o.onTouchStart(...e)),onTouchend:i[5]||(i[5]=(...e)=>o.onTouchEnd&&o.onTouchEnd(...e))},[e.createVNode("path",{d:o.rangePath,"stroke-width":a.strokeWidth,stroke:a.rangeColor,class:"p-knob-range"},null,8,["d","stroke-width","stroke"]),e.createVNode("path",{d:o.valuePath,"stroke-width":a.strokeWidth,stroke:a.valueColor,class:"p-knob-value"},null,8,["d","stroke-width","stroke"]),a.showValue?(e.openBlock(),e.createBlock("text",{key:0,x:50,y:57,"text-anchor":"middle",fill:a.textColor,class:"p-knob-text"},e.toDisplayString(o.valueToDisplay),9,["fill"])):e.createCommentVNode("",!0)],40,["width","height"]))],2)},module.exports=t;
1
+ "use strict";var e=require("vue"),t={name:"Knob",emits:["update:modelValue","change"],data:()=>({radius:40,midX:50,midY:50,minRadians:4*Math.PI/3,maxRadians:-Math.PI/3}),props:{modelValue:{type:Number,default:null},size:{type:Number,default:100},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},step:{type:Number,default:1},min:{type:Number,default:0},max:{type:Number,default:100},valueColor:{type:String,default:"var(--primary-color, Black)"},rangeColor:{type:String,default:"var(--surface-border, LightGray)"},textColor:{type:String,default:"var(--text-color-secondary, Black)"},strokeWidth:{type:Number,default:14},showValue:{type:Boolean,default:!0},valueTemplate:{type:String,default:"{value}"}},methods:{updateValue(e,t){let i=e-this.size/2,a=this.size/2-t,s=Math.atan2(a,i),n=-Math.PI/2-Math.PI/6;this.updateModel(s,n)},updateModel(e,t){let i;if(e>this.maxRadians)i=this.mapRange(e,this.minRadians,this.maxRadians,this.min,this.max);else{if(!(e<t))return;i=this.mapRange(e+2*Math.PI,this.minRadians,this.maxRadians,this.min,this.max)}let a=Math.round((i-this.min)/this.step)*this.step+this.min;this.$emit("update:modelValue",a),this.$emit("change",a)},mapRange:(e,t,i,a,s)=>(e-t)*(s-a)/(i-t)+a,onClick(e){this.disabled||this.readonly||this.updateValue(e.offsetX,e.offsetY)},onMouseDown(e){this.disabled||this.readonly||(window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),e.preventDefault())},onMouseUp(e){this.disabled||this.readonly||(window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),e.preventDefault())},onTouchStart(e){this.disabled||this.readonly||(window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.preventDefault())},onTouchEnd(e){this.disabled||this.readonly||(window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.preventDefault())},onMouseMove(e){this.disabled||this.readonly||(this.updateValue(e.offsetX,e.offsetY),e.preventDefault())},onTouchMove(e){if(!this.disabled&&!this.readonly&&1==e.touches.length){const t=this.$el.getBoundingClientRect(),i=e.targetTouches.item(0),a=i.clientX-t.left,s=i.clientY-t.top;this.updateValue(a,s)}}},computed:{containerClass(){return["p-knob p-component",{"p-disabled":this.disabled}]},rangePath(){return`M ${this.minX} ${this.minY} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX} ${this.maxY}`},valuePath(){return`M ${this.zeroX} ${this.zeroY} A ${this.radius} ${this.radius} 0 ${this.largeArc} ${this.sweep} ${this.valueX} ${this.valueY}`},zeroRadians(){return this.min>0&&this.max>0?this.mapRange(this.min,this.min,this.max,this.minRadians,this.maxRadians):this.mapRange(0,this.min,this.max,this.minRadians,this.maxRadians)},valueRadians(){return this.mapRange(this.modelValue,this.min,this.max,this.minRadians,this.maxRadians)},minX(){return this.midX+Math.cos(this.minRadians)*this.radius},minY(){return this.midY-Math.sin(this.minRadians)*this.radius},maxX(){return this.midX+Math.cos(this.maxRadians)*this.radius},maxY(){return this.midY-Math.sin(this.maxRadians)*this.radius},zeroX(){return this.midX+Math.cos(this.zeroRadians)*this.radius},zeroY(){return this.midY-Math.sin(this.zeroRadians)*this.radius},valueX(){return this.midX+Math.cos(this.valueRadians)*this.radius},valueY(){return this.midY-Math.sin(this.valueRadians)*this.radius},largeArc(){return Math.abs(this.zeroRadians-this.valueRadians)<Math.PI?0:1},sweep(){return this.valueRadians>this.zeroRadians?0:1},valueToDisplay(){return this.valueTemplate.replace(/{value}/g,this.modelValue)}}};const i=["width","height"],a=["d","stroke-width","stroke"],s=["d","stroke-width","stroke"],n=["fill"];!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n@-webkit-keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n@keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n.p-knob-range {\n fill: none;\n -webkit-transition: stroke .1s ease-in;\n transition: stroke .1s ease-in;\n}\n.p-knob-value {\n -webkit-animation-name: dash-frame;\n animation-name: dash-frame;\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n fill: none;\n}\n.p-knob-text {\n font-size: 1.3rem;\n text-align: center;\n}\n"),t.render=function(t,o,h,d,r,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.containerClass)},[(e.openBlock(),e.createElementBlock("svg",{viewBox:"0 0 100 100",width:h.size,height:h.size,onClick:o[0]||(o[0]=(...e)=>l.onClick&&l.onClick(...e)),onMousedown:o[1]||(o[1]=(...e)=>l.onMouseDown&&l.onMouseDown(...e)),onMouseup:o[2]||(o[2]=(...e)=>l.onMouseUp&&l.onMouseUp(...e)),onTouchstart:o[3]||(o[3]=(...e)=>l.onTouchStart&&l.onTouchStart(...e)),onTouchend:o[4]||(o[4]=(...e)=>l.onTouchEnd&&l.onTouchEnd(...e))},[e.createElementVNode("path",{d:l.rangePath,"stroke-width":h.strokeWidth,stroke:h.rangeColor,class:"p-knob-range"},null,8,a),e.createElementVNode("path",{d:l.valuePath,"stroke-width":h.strokeWidth,stroke:h.valueColor,class:"p-knob-value"},null,8,s),h.showValue?(e.openBlock(),e.createElementBlock("text",{key:0,x:50,y:57,"text-anchor":"middle",fill:h.textColor,class:"p-knob-text"},e.toDisplayString(l.valueToDisplay),9,n)):e.createCommentVNode("",!0)],40,i))],2)},module.exports=t;
package/knob/knob.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { openBlock, createBlock, createVNode, toDisplayString, createCommentVNode } from 'vue';
1
+ import { openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
2
2
 
3
3
  var script = {
4
4
  name: 'Knob',
@@ -199,41 +199,48 @@ var script = {
199
199
  };
200
200
  //Derived and forked from https://github.com/kramer99/vue-knob-control
201
201
 
202
+ const _hoisted_1 = ["width", "height"];
203
+ const _hoisted_2 = ["d", "stroke-width", "stroke"];
204
+ const _hoisted_3 = ["d", "stroke-width", "stroke"];
205
+ const _hoisted_4 = ["fill"];
206
+
202
207
  function render(_ctx, _cache, $props, $setup, $data, $options) {
203
- return (openBlock(), createBlock("div", { class: $options.containerClass }, [
204
- (openBlock(), createBlock("svg", {
208
+ return (openBlock(), createElementBlock("div", {
209
+ class: normalizeClass($options.containerClass)
210
+ }, [
211
+ (openBlock(), createElementBlock("svg", {
205
212
  viewBox: "0 0 100 100",
206
213
  width: $props.size,
207
214
  height: $props.size,
208
- onClick: _cache[1] || (_cache[1] = (...args) => ($options.onClick && $options.onClick(...args))),
209
- onMousedown: _cache[2] || (_cache[2] = (...args) => ($options.onMouseDown && $options.onMouseDown(...args))),
210
- onMouseup: _cache[3] || (_cache[3] = (...args) => ($options.onMouseUp && $options.onMouseUp(...args))),
211
- onTouchstart: _cache[4] || (_cache[4] = (...args) => ($options.onTouchStart && $options.onTouchStart(...args))),
212
- onTouchend: _cache[5] || (_cache[5] = (...args) => ($options.onTouchEnd && $options.onTouchEnd(...args)))
215
+ onClick: _cache[0] || (_cache[0] = (...args) => ($options.onClick && $options.onClick(...args))),
216
+ onMousedown: _cache[1] || (_cache[1] = (...args) => ($options.onMouseDown && $options.onMouseDown(...args))),
217
+ onMouseup: _cache[2] || (_cache[2] = (...args) => ($options.onMouseUp && $options.onMouseUp(...args))),
218
+ onTouchstart: _cache[3] || (_cache[3] = (...args) => ($options.onTouchStart && $options.onTouchStart(...args))),
219
+ onTouchend: _cache[4] || (_cache[4] = (...args) => ($options.onTouchEnd && $options.onTouchEnd(...args)))
213
220
  }, [
214
- createVNode("path", {
221
+ createElementVNode("path", {
215
222
  d: $options.rangePath,
216
223
  "stroke-width": $props.strokeWidth,
217
224
  stroke: $props.rangeColor,
218
225
  class: "p-knob-range"
219
- }, null, 8, ["d", "stroke-width", "stroke"]),
220
- createVNode("path", {
226
+ }, null, 8, _hoisted_2),
227
+ createElementVNode("path", {
221
228
  d: $options.valuePath,
222
229
  "stroke-width": $props.strokeWidth,
223
230
  stroke: $props.valueColor,
224
231
  class: "p-knob-value"
225
- }, null, 8, ["d", "stroke-width", "stroke"]),
232
+ }, null, 8, _hoisted_3),
226
233
  ($props.showValue)
227
- ? (openBlock(), createBlock("text", {
234
+ ? (openBlock(), createElementBlock("text", {
228
235
  key: 0,
229
236
  x: 50,
230
237
  y: 57,
231
238
  "text-anchor": "middle",
232
239
  fill: $props.textColor,
233
240
  class: "p-knob-text"
234
- }, toDisplayString($options.valueToDisplay), 9, ["fill"]))
241
+ }, toDisplayString($options.valueToDisplay), 9, _hoisted_4))
235
242
  : createCommentVNode("", true)
236
- ], 40, ["width", "height"]))
243
+ ], 40, _hoisted_1))
237
244
  ], 2))
238
245
  }
239
246
 
@@ -269,4 +276,4 @@ styleInject(css_248z);
269
276
 
270
277
  script.render = render;
271
278
 
272
- export default script;
279
+ export { script as default };
@@ -1 +1 @@
1
- import{openBlock as e,createBlock as t,createVNode as i,toDisplayString as a,createCommentVNode as s}from"vue";var n={name:"Knob",emits:["update:modelValue","change"],data:()=>({radius:40,midX:50,midY:50,minRadians:4*Math.PI/3,maxRadians:-Math.PI/3}),props:{modelValue:{type:Number,default:null},size:{type:Number,default:100},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},step:{type:Number,default:1},min:{type:Number,default:0},max:{type:Number,default:100},valueColor:{type:String,default:"var(--primary-color, Black)"},rangeColor:{type:String,default:"var(--surface-border, LightGray)"},textColor:{type:String,default:"var(--text-color-secondary, Black)"},strokeWidth:{type:Number,default:14},showValue:{type:Boolean,default:!0},valueTemplate:{type:String,default:"{value}"}},methods:{updateValue(e,t){let i=e-this.size/2,a=this.size/2-t,s=Math.atan2(a,i),n=-Math.PI/2-Math.PI/6;this.updateModel(s,n)},updateModel(e,t){let i;if(e>this.maxRadians)i=this.mapRange(e,this.minRadians,this.maxRadians,this.min,this.max);else{if(!(e<t))return;i=this.mapRange(e+2*Math.PI,this.minRadians,this.maxRadians,this.min,this.max)}let a=Math.round((i-this.min)/this.step)*this.step+this.min;this.$emit("update:modelValue",a),this.$emit("change",a)},mapRange:(e,t,i,a,s)=>(e-t)*(s-a)/(i-t)+a,onClick(e){this.disabled||this.readonly||this.updateValue(e.offsetX,e.offsetY)},onMouseDown(e){this.disabled||this.readonly||(window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),e.preventDefault())},onMouseUp(e){this.disabled||this.readonly||(window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),e.preventDefault())},onTouchStart(e){this.disabled||this.readonly||(window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.preventDefault())},onTouchEnd(e){this.disabled||this.readonly||(window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.preventDefault())},onMouseMove(e){this.disabled||this.readonly||(this.updateValue(e.offsetX,e.offsetY),e.preventDefault())},onTouchMove(e){if(!this.disabled&&!this.readonly&&1==e.touches.length){const t=this.$el.getBoundingClientRect(),i=e.targetTouches.item(0),a=i.clientX-t.left,s=i.clientY-t.top;this.updateValue(a,s)}}},computed:{containerClass(){return["p-knob p-component",{"p-disabled":this.disabled}]},rangePath(){return`M ${this.minX} ${this.minY} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX} ${this.maxY}`},valuePath(){return`M ${this.zeroX} ${this.zeroY} A ${this.radius} ${this.radius} 0 ${this.largeArc} ${this.sweep} ${this.valueX} ${this.valueY}`},zeroRadians(){return this.min>0&&this.max>0?this.mapRange(this.min,this.min,this.max,this.minRadians,this.maxRadians):this.mapRange(0,this.min,this.max,this.minRadians,this.maxRadians)},valueRadians(){return this.mapRange(this.modelValue,this.min,this.max,this.minRadians,this.maxRadians)},minX(){return this.midX+Math.cos(this.minRadians)*this.radius},minY(){return this.midY-Math.sin(this.minRadians)*this.radius},maxX(){return this.midX+Math.cos(this.maxRadians)*this.radius},maxY(){return this.midY-Math.sin(this.maxRadians)*this.radius},zeroX(){return this.midX+Math.cos(this.zeroRadians)*this.radius},zeroY(){return this.midY-Math.sin(this.zeroRadians)*this.radius},valueX(){return this.midX+Math.cos(this.valueRadians)*this.radius},valueY(){return this.midY-Math.sin(this.valueRadians)*this.radius},largeArc(){return Math.abs(this.zeroRadians-this.valueRadians)<Math.PI?0:1},sweep(){return this.valueRadians>this.zeroRadians?0:1},valueToDisplay(){return this.valueTemplate.replace(/{value}/g,this.modelValue)}}};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n@-webkit-keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n@keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n.p-knob-range {\n fill: none;\n -webkit-transition: stroke .1s ease-in;\n transition: stroke .1s ease-in;\n}\n.p-knob-value {\n -webkit-animation-name: dash-frame;\n animation-name: dash-frame;\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n fill: none;\n}\n.p-knob-text {\n font-size: 1.3rem;\n text-align: center;\n}\n"),n.render=function(n,o,h,d,r,u){return e(),t("div",{class:u.containerClass},[(e(),t("svg",{viewBox:"0 0 100 100",width:h.size,height:h.size,onClick:o[1]||(o[1]=(...e)=>u.onClick&&u.onClick(...e)),onMousedown:o[2]||(o[2]=(...e)=>u.onMouseDown&&u.onMouseDown(...e)),onMouseup:o[3]||(o[3]=(...e)=>u.onMouseUp&&u.onMouseUp(...e)),onTouchstart:o[4]||(o[4]=(...e)=>u.onTouchStart&&u.onTouchStart(...e)),onTouchend:o[5]||(o[5]=(...e)=>u.onTouchEnd&&u.onTouchEnd(...e))},[i("path",{d:u.rangePath,"stroke-width":h.strokeWidth,stroke:h.rangeColor,class:"p-knob-range"},null,8,["d","stroke-width","stroke"]),i("path",{d:u.valuePath,"stroke-width":h.strokeWidth,stroke:h.valueColor,class:"p-knob-value"},null,8,["d","stroke-width","stroke"]),h.showValue?(e(),t("text",{key:0,x:50,y:57,"text-anchor":"middle",fill:h.textColor,class:"p-knob-text"},a(u.valueToDisplay),9,["fill"])):s("",!0)],40,["width","height"]))],2)};export default n;
1
+ import{openBlock as e,createElementBlock as t,normalizeClass as i,createElementVNode as a,toDisplayString as s,createCommentVNode as n}from"vue";var o={name:"Knob",emits:["update:modelValue","change"],data:()=>({radius:40,midX:50,midY:50,minRadians:4*Math.PI/3,maxRadians:-Math.PI/3}),props:{modelValue:{type:Number,default:null},size:{type:Number,default:100},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},step:{type:Number,default:1},min:{type:Number,default:0},max:{type:Number,default:100},valueColor:{type:String,default:"var(--primary-color, Black)"},rangeColor:{type:String,default:"var(--surface-border, LightGray)"},textColor:{type:String,default:"var(--text-color-secondary, Black)"},strokeWidth:{type:Number,default:14},showValue:{type:Boolean,default:!0},valueTemplate:{type:String,default:"{value}"}},methods:{updateValue(e,t){let i=e-this.size/2,a=this.size/2-t,s=Math.atan2(a,i),n=-Math.PI/2-Math.PI/6;this.updateModel(s,n)},updateModel(e,t){let i;if(e>this.maxRadians)i=this.mapRange(e,this.minRadians,this.maxRadians,this.min,this.max);else{if(!(e<t))return;i=this.mapRange(e+2*Math.PI,this.minRadians,this.maxRadians,this.min,this.max)}let a=Math.round((i-this.min)/this.step)*this.step+this.min;this.$emit("update:modelValue",a),this.$emit("change",a)},mapRange:(e,t,i,a,s)=>(e-t)*(s-a)/(i-t)+a,onClick(e){this.disabled||this.readonly||this.updateValue(e.offsetX,e.offsetY)},onMouseDown(e){this.disabled||this.readonly||(window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),e.preventDefault())},onMouseUp(e){this.disabled||this.readonly||(window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),e.preventDefault())},onTouchStart(e){this.disabled||this.readonly||(window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.preventDefault())},onTouchEnd(e){this.disabled||this.readonly||(window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.preventDefault())},onMouseMove(e){this.disabled||this.readonly||(this.updateValue(e.offsetX,e.offsetY),e.preventDefault())},onTouchMove(e){if(!this.disabled&&!this.readonly&&1==e.touches.length){const t=this.$el.getBoundingClientRect(),i=e.targetTouches.item(0),a=i.clientX-t.left,s=i.clientY-t.top;this.updateValue(a,s)}}},computed:{containerClass(){return["p-knob p-component",{"p-disabled":this.disabled}]},rangePath(){return`M ${this.minX} ${this.minY} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX} ${this.maxY}`},valuePath(){return`M ${this.zeroX} ${this.zeroY} A ${this.radius} ${this.radius} 0 ${this.largeArc} ${this.sweep} ${this.valueX} ${this.valueY}`},zeroRadians(){return this.min>0&&this.max>0?this.mapRange(this.min,this.min,this.max,this.minRadians,this.maxRadians):this.mapRange(0,this.min,this.max,this.minRadians,this.maxRadians)},valueRadians(){return this.mapRange(this.modelValue,this.min,this.max,this.minRadians,this.maxRadians)},minX(){return this.midX+Math.cos(this.minRadians)*this.radius},minY(){return this.midY-Math.sin(this.minRadians)*this.radius},maxX(){return this.midX+Math.cos(this.maxRadians)*this.radius},maxY(){return this.midY-Math.sin(this.maxRadians)*this.radius},zeroX(){return this.midX+Math.cos(this.zeroRadians)*this.radius},zeroY(){return this.midY-Math.sin(this.zeroRadians)*this.radius},valueX(){return this.midX+Math.cos(this.valueRadians)*this.radius},valueY(){return this.midY-Math.sin(this.valueRadians)*this.radius},largeArc(){return Math.abs(this.zeroRadians-this.valueRadians)<Math.PI?0:1},sweep(){return this.valueRadians>this.zeroRadians?0:1},valueToDisplay(){return this.valueTemplate.replace(/{value}/g,this.modelValue)}}};const h=["width","height"],d=["d","stroke-width","stroke"],r=["d","stroke-width","stroke"],u=["fill"];!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n@-webkit-keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n@keyframes dash-frame {\n100% {\n stroke-dashoffset: 0;\n}\n}\n.p-knob-range {\n fill: none;\n -webkit-transition: stroke .1s ease-in;\n transition: stroke .1s ease-in;\n}\n.p-knob-value {\n -webkit-animation-name: dash-frame;\n animation-name: dash-frame;\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n fill: none;\n}\n.p-knob-text {\n font-size: 1.3rem;\n text-align: center;\n}\n"),o.render=function(o,l,m,p,c,f){return e(),t("div",{class:i(f.containerClass)},[(e(),t("svg",{viewBox:"0 0 100 100",width:m.size,height:m.size,onClick:l[0]||(l[0]=(...e)=>f.onClick&&f.onClick(...e)),onMousedown:l[1]||(l[1]=(...e)=>f.onMouseDown&&f.onMouseDown(...e)),onMouseup:l[2]||(l[2]=(...e)=>f.onMouseUp&&f.onMouseUp(...e)),onTouchstart:l[3]||(l[3]=(...e)=>f.onTouchStart&&f.onTouchStart(...e)),onTouchend:l[4]||(l[4]=(...e)=>f.onTouchEnd&&f.onTouchEnd(...e))},[a("path",{d:f.rangePath,"stroke-width":m.strokeWidth,stroke:m.rangeColor,class:"p-knob-range"},null,8,d),a("path",{d:f.valuePath,"stroke-width":m.strokeWidth,stroke:m.valueColor,class:"p-knob-value"},null,8,r),m.showValue?(e(),t("text",{key:0,x:50,y:57,"text-anchor":"middle",fill:m.textColor,class:"p-knob-text"},s(f.valueToDisplay),9,u)):n("",!0)],40,h))],2)};export{o as default};