primereact 8.7.2 → 8.7.3

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 (566) hide show
  1. package/accordion/accordion.cjs.js +56 -57
  2. package/accordion/accordion.cjs.min.js +1 -1
  3. package/accordion/accordion.esm.js +56 -57
  4. package/accordion/accordion.esm.min.js +1 -1
  5. package/accordion/accordion.js +56 -57
  6. package/accordion/accordion.min.js +1 -1
  7. package/api/api.cjs.js +30 -68
  8. package/api/api.cjs.min.js +1 -1
  9. package/api/api.esm.js +30 -68
  10. package/api/api.esm.min.js +1 -1
  11. package/api/api.js +30 -68
  12. package/api/api.min.js +1 -1
  13. package/autocomplete/autocomplete.cjs.js +82 -154
  14. package/autocomplete/autocomplete.cjs.min.js +1 -1
  15. package/autocomplete/autocomplete.esm.js +82 -154
  16. package/autocomplete/autocomplete.esm.min.js +1 -1
  17. package/autocomplete/autocomplete.js +82 -154
  18. package/autocomplete/autocomplete.min.js +1 -1
  19. package/avatar/avatar.cjs.js +86 -14
  20. package/avatar/avatar.cjs.min.js +1 -1
  21. package/avatar/avatar.d.ts +5 -4
  22. package/avatar/avatar.esm.js +86 -14
  23. package/avatar/avatar.esm.min.js +1 -1
  24. package/avatar/avatar.js +86 -14
  25. package/avatar/avatar.min.js +1 -1
  26. package/avatargroup/avatargroup.cjs.js +0 -2
  27. package/avatargroup/avatargroup.esm.js +0 -2
  28. package/avatargroup/avatargroup.js +0 -2
  29. package/badge/badge.cjs.js +27 -3
  30. package/badge/badge.cjs.min.js +1 -1
  31. package/badge/badge.esm.js +27 -3
  32. package/badge/badge.esm.min.js +1 -1
  33. package/badge/badge.js +27 -3
  34. package/badge/badge.min.js +1 -1
  35. package/blockui/blockui.cjs.js +40 -54
  36. package/blockui/blockui.cjs.min.js +1 -1
  37. package/blockui/blockui.d.ts +5 -3
  38. package/blockui/blockui.esm.js +40 -54
  39. package/blockui/blockui.esm.min.js +1 -1
  40. package/blockui/blockui.js +40 -54
  41. package/blockui/blockui.min.js +1 -1
  42. package/breadcrumb/breadcrumb.cjs.js +6 -29
  43. package/breadcrumb/breadcrumb.esm.js +6 -29
  44. package/breadcrumb/breadcrumb.js +6 -29
  45. package/button/button.cjs.js +29 -11
  46. package/button/button.cjs.min.js +1 -1
  47. package/button/button.esm.js +29 -11
  48. package/button/button.esm.min.js +1 -1
  49. package/button/button.js +29 -11
  50. package/button/button.min.js +1 -1
  51. package/calendar/calendar.cjs.js +186 -664
  52. package/calendar/calendar.cjs.min.js +1 -1
  53. package/calendar/calendar.d.ts +6 -4
  54. package/calendar/calendar.esm.js +186 -664
  55. package/calendar/calendar.esm.min.js +1 -1
  56. package/calendar/calendar.js +186 -664
  57. package/calendar/calendar.min.js +1 -1
  58. package/captcha/captcha.cjs.js +0 -15
  59. package/captcha/captcha.esm.js +0 -15
  60. package/captcha/captcha.js +0 -15
  61. package/card/card.cjs.js +0 -6
  62. package/card/card.esm.js +0 -6
  63. package/card/card.js +0 -6
  64. package/carousel/carousel.cjs.js +42 -130
  65. package/carousel/carousel.cjs.min.js +1 -1
  66. package/carousel/carousel.esm.js +42 -130
  67. package/carousel/carousel.esm.min.js +1 -1
  68. package/carousel/carousel.js +42 -130
  69. package/carousel/carousel.min.js +1 -1
  70. package/cascadeselect/cascadeselect.cjs.js +47 -132
  71. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  72. package/cascadeselect/cascadeselect.esm.js +47 -132
  73. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  74. package/cascadeselect/cascadeselect.js +47 -132
  75. package/cascadeselect/cascadeselect.min.js +1 -1
  76. package/chart/chart.cjs.js +6 -7
  77. package/chart/chart.cjs.min.js +1 -1
  78. package/chart/chart.esm.js +6 -7
  79. package/chart/chart.esm.min.js +1 -1
  80. package/chart/chart.js +6 -7
  81. package/chart/chart.min.js +1 -1
  82. package/checkbox/checkbox.cjs.js +26 -40
  83. package/checkbox/checkbox.cjs.min.js +1 -1
  84. package/checkbox/checkbox.esm.js +26 -40
  85. package/checkbox/checkbox.esm.min.js +1 -1
  86. package/checkbox/checkbox.js +26 -40
  87. package/checkbox/checkbox.min.css +1 -1
  88. package/checkbox/checkbox.min.js +1 -1
  89. package/chip/chip.cjs.js +26 -41
  90. package/chip/chip.cjs.min.js +1 -1
  91. package/chip/chip.esm.js +26 -41
  92. package/chip/chip.esm.min.js +1 -1
  93. package/chip/chip.js +26 -41
  94. package/chip/chip.min.js +1 -1
  95. package/chips/chips.cjs.js +29 -72
  96. package/chips/chips.cjs.min.js +1 -1
  97. package/chips/chips.esm.js +29 -72
  98. package/chips/chips.esm.min.js +1 -1
  99. package/chips/chips.js +29 -72
  100. package/chips/chips.min.js +1 -1
  101. package/colorpicker/colorpicker.cjs.js +75 -143
  102. package/colorpicker/colorpicker.cjs.min.js +1 -1
  103. package/colorpicker/colorpicker.d.ts +8 -6
  104. package/colorpicker/colorpicker.esm.js +75 -143
  105. package/colorpicker/colorpicker.esm.min.js +1 -1
  106. package/colorpicker/colorpicker.js +75 -143
  107. package/colorpicker/colorpicker.min.js +1 -1
  108. package/confirmdialog/confirmdialog.cjs.js +60 -60
  109. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  110. package/confirmdialog/confirmdialog.esm.js +60 -60
  111. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  112. package/confirmdialog/confirmdialog.js +60 -60
  113. package/confirmdialog/confirmdialog.min.js +1 -1
  114. package/confirmpopup/confirmpopup.cjs.js +74 -94
  115. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  116. package/confirmpopup/confirmpopup.esm.js +74 -94
  117. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  118. package/confirmpopup/confirmpopup.js +74 -94
  119. package/confirmpopup/confirmpopup.min.js +1 -1
  120. package/contextmenu/contextmenu.cjs.js +75 -120
  121. package/contextmenu/contextmenu.cjs.min.js +1 -1
  122. package/contextmenu/contextmenu.esm.js +75 -120
  123. package/contextmenu/contextmenu.esm.min.js +1 -1
  124. package/contextmenu/contextmenu.js +75 -120
  125. package/contextmenu/contextmenu.min.js +1 -1
  126. package/core/core.js +970 -2021
  127. package/core/core.min.js +15 -15
  128. package/csstransition/csstransition.cjs.js +27 -13
  129. package/csstransition/csstransition.cjs.min.js +1 -1
  130. package/csstransition/csstransition.esm.js +27 -13
  131. package/csstransition/csstransition.esm.min.js +1 -1
  132. package/csstransition/csstransition.js +27 -13
  133. package/csstransition/csstransition.min.js +1 -1
  134. package/datascroller/datascroller.cjs.js +32 -64
  135. package/datascroller/datascroller.cjs.min.js +1 -1
  136. package/datascroller/datascroller.esm.js +32 -64
  137. package/datascroller/datascroller.esm.min.js +1 -1
  138. package/datascroller/datascroller.js +32 -64
  139. package/datascroller/datascroller.min.js +1 -1
  140. package/datatable/datatable.cjs.js +318 -1077
  141. package/datatable/datatable.cjs.min.js +1 -1
  142. package/datatable/datatable.d.ts +6 -1
  143. package/datatable/datatable.esm.js +318 -1077
  144. package/datatable/datatable.esm.min.js +1 -1
  145. package/datatable/datatable.js +318 -1077
  146. package/datatable/datatable.min.js +1 -1
  147. package/dataview/dataview.cjs.js +56 -68
  148. package/dataview/dataview.cjs.min.js +1 -1
  149. package/dataview/dataview.esm.js +56 -68
  150. package/dataview/dataview.esm.min.js +1 -1
  151. package/dataview/dataview.js +56 -68
  152. package/dataview/dataview.min.js +1 -1
  153. package/deferredcontent/deferredcontent.cjs.js +37 -46
  154. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  155. package/deferredcontent/deferredcontent.esm.js +37 -46
  156. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  157. package/deferredcontent/deferredcontent.js +37 -46
  158. package/deferredcontent/deferredcontent.min.js +1 -1
  159. package/dialog/dialog.cjs.js +89 -175
  160. package/dialog/dialog.cjs.min.js +1 -1
  161. package/dialog/dialog.esm.js +89 -175
  162. package/dialog/dialog.esm.min.js +1 -1
  163. package/dialog/dialog.js +89 -175
  164. package/dialog/dialog.min.css +1 -1
  165. package/dialog/dialog.min.js +1 -1
  166. package/divider/divider.cjs.js +0 -2
  167. package/divider/divider.esm.js +0 -2
  168. package/divider/divider.js +0 -2
  169. package/dock/dock.cjs.js +31 -53
  170. package/dock/dock.cjs.min.js +1 -1
  171. package/dock/dock.esm.js +31 -53
  172. package/dock/dock.esm.min.js +1 -1
  173. package/dock/dock.js +31 -53
  174. package/dock/dock.min.js +1 -1
  175. package/dropdown/dropdown.cjs.js +72 -199
  176. package/dropdown/dropdown.cjs.min.js +1 -1
  177. package/dropdown/dropdown.d.ts +39 -38
  178. package/dropdown/dropdown.esm.js +72 -199
  179. package/dropdown/dropdown.esm.min.js +1 -1
  180. package/dropdown/dropdown.js +72 -199
  181. package/dropdown/dropdown.min.js +1 -1
  182. package/editor/editor.cjs.js +31 -22
  183. package/editor/editor.cjs.min.js +1 -1
  184. package/editor/editor.esm.js +31 -22
  185. package/editor/editor.esm.min.js +1 -1
  186. package/editor/editor.js +31 -22
  187. package/editor/editor.min.js +1 -1
  188. package/fieldset/fieldset.cjs.js +29 -51
  189. package/fieldset/fieldset.cjs.min.js +1 -1
  190. package/fieldset/fieldset.esm.js +29 -51
  191. package/fieldset/fieldset.esm.min.js +1 -1
  192. package/fieldset/fieldset.js +29 -51
  193. package/fieldset/fieldset.min.js +1 -1
  194. package/fileupload/fileupload.cjs.js +45 -128
  195. package/fileupload/fileupload.cjs.min.js +1 -1
  196. package/fileupload/fileupload.esm.js +45 -128
  197. package/fileupload/fileupload.esm.min.js +1 -1
  198. package/fileupload/fileupload.js +45 -128
  199. package/fileupload/fileupload.min.js +1 -1
  200. package/galleria/galleria.cjs.js +54 -165
  201. package/galleria/galleria.cjs.min.js +1 -1
  202. package/galleria/galleria.esm.js +54 -165
  203. package/galleria/galleria.esm.min.js +1 -1
  204. package/galleria/galleria.js +54 -165
  205. package/galleria/galleria.min.js +1 -1
  206. package/gmap/gmap.cjs.js +2 -23
  207. package/gmap/gmap.esm.js +2 -23
  208. package/gmap/gmap.js +2 -23
  209. package/hooks/hooks.cjs.js +102 -131
  210. package/hooks/hooks.cjs.min.js +1 -1
  211. package/hooks/hooks.esm.js +102 -131
  212. package/hooks/hooks.esm.min.js +1 -1
  213. package/hooks/hooks.js +102 -131
  214. package/hooks/hooks.min.js +1 -1
  215. package/image/image.cjs.js +41 -67
  216. package/image/image.cjs.min.js +1 -1
  217. package/image/image.d.ts +1 -1
  218. package/image/image.esm.js +41 -67
  219. package/image/image.esm.min.js +1 -1
  220. package/image/image.js +41 -67
  221. package/image/image.min.js +1 -1
  222. package/inplace/inplace.cjs.js +26 -45
  223. package/inplace/inplace.cjs.min.js +1 -1
  224. package/inplace/inplace.esm.js +26 -45
  225. package/inplace/inplace.esm.min.js +1 -1
  226. package/inplace/inplace.js +26 -45
  227. package/inplace/inplace.min.js +1 -1
  228. package/inputmask/inputmask.cjs.js +16 -108
  229. package/inputmask/inputmask.d.ts +1 -1
  230. package/inputmask/inputmask.esm.js +16 -108
  231. package/inputmask/inputmask.js +16 -108
  232. package/inputnumber/inputnumber.cjs.js +82 -234
  233. package/inputnumber/inputnumber.cjs.min.js +1 -1
  234. package/inputnumber/inputnumber.d.ts +1 -1
  235. package/inputnumber/inputnumber.esm.js +82 -234
  236. package/inputnumber/inputnumber.esm.min.js +1 -1
  237. package/inputnumber/inputnumber.js +82 -234
  238. package/inputnumber/inputnumber.min.js +1 -1
  239. package/inputswitch/inputswitch.cjs.js +26 -37
  240. package/inputswitch/inputswitch.cjs.min.js +1 -1
  241. package/inputswitch/inputswitch.esm.js +26 -37
  242. package/inputswitch/inputswitch.esm.min.js +1 -1
  243. package/inputswitch/inputswitch.js +26 -37
  244. package/inputswitch/inputswitch.min.js +1 -1
  245. package/inputtext/inputtext.cjs.js +0 -11
  246. package/inputtext/inputtext.d.ts +1 -3
  247. package/inputtext/inputtext.esm.js +0 -11
  248. package/inputtext/inputtext.js +0 -11
  249. package/inputtextarea/inputtextarea.cjs.js +0 -20
  250. package/inputtextarea/inputtextarea.d.ts +1 -3
  251. package/inputtextarea/inputtextarea.esm.js +0 -20
  252. package/inputtextarea/inputtextarea.js +0 -20
  253. package/keyfilter/keyfilter.cjs.js +4 -15
  254. package/keyfilter/keyfilter.esm.js +4 -15
  255. package/keyfilter/keyfilter.js +4 -15
  256. package/knob/knob.cjs.js +74 -106
  257. package/knob/knob.cjs.min.js +1 -1
  258. package/knob/knob.esm.js +74 -106
  259. package/knob/knob.esm.min.js +1 -1
  260. package/knob/knob.js +74 -106
  261. package/knob/knob.min.js +1 -1
  262. package/listbox/listbox.cjs.js +94 -125
  263. package/listbox/listbox.cjs.min.js +1 -1
  264. package/listbox/listbox.d.ts +6 -0
  265. package/listbox/listbox.esm.js +95 -126
  266. package/listbox/listbox.esm.min.js +1 -1
  267. package/listbox/listbox.js +94 -125
  268. package/listbox/listbox.min.js +1 -1
  269. package/megamenu/megamenu.cjs.js +36 -99
  270. package/megamenu/megamenu.cjs.min.js +1 -1
  271. package/megamenu/megamenu.esm.js +36 -99
  272. package/megamenu/megamenu.esm.min.js +1 -1
  273. package/megamenu/megamenu.js +36 -99
  274. package/megamenu/megamenu.min.js +1 -1
  275. package/mention/mention.cjs.js +82 -138
  276. package/mention/mention.cjs.min.js +1 -1
  277. package/mention/mention.d.ts +1 -1
  278. package/mention/mention.esm.js +82 -138
  279. package/mention/mention.esm.min.js +1 -1
  280. package/mention/mention.js +82 -138
  281. package/mention/mention.min.js +1 -1
  282. package/menu/menu.cjs.js +38 -72
  283. package/menu/menu.cjs.min.js +1 -1
  284. package/menu/menu.esm.js +38 -72
  285. package/menu/menu.esm.min.js +1 -1
  286. package/menu/menu.js +38 -72
  287. package/menu/menu.min.css +1 -1
  288. package/menu/menu.min.js +1 -1
  289. package/menubar/menubar.cjs.js +49 -99
  290. package/menubar/menubar.cjs.min.js +1 -1
  291. package/menubar/menubar.esm.js +49 -99
  292. package/menubar/menubar.esm.min.js +1 -1
  293. package/menubar/menubar.js +49 -99
  294. package/menubar/menubar.min.js +1 -1
  295. package/message/message.cjs.js +0 -7
  296. package/message/message.esm.js +0 -7
  297. package/message/message.js +0 -7
  298. package/messages/messages.cjs.js +39 -67
  299. package/messages/messages.cjs.min.js +1 -1
  300. package/messages/messages.esm.js +39 -67
  301. package/messages/messages.esm.min.js +1 -1
  302. package/messages/messages.js +39 -67
  303. package/messages/messages.min.js +1 -1
  304. package/multiselect/multiselect.cjs.js +137 -210
  305. package/multiselect/multiselect.cjs.min.js +1 -1
  306. package/multiselect/multiselect.d.ts +46 -41
  307. package/multiselect/multiselect.esm.js +137 -210
  308. package/multiselect/multiselect.esm.min.js +1 -1
  309. package/multiselect/multiselect.js +137 -210
  310. package/multiselect/multiselect.min.css +1 -1
  311. package/multiselect/multiselect.min.js +1 -1
  312. package/multistatecheckbox/multistatecheckbox.cjs.js +58 -53
  313. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  314. package/multistatecheckbox/multistatecheckbox.esm.js +58 -53
  315. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  316. package/multistatecheckbox/multistatecheckbox.js +58 -53
  317. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  318. package/orderlist/orderlist.cjs.js +38 -103
  319. package/orderlist/orderlist.cjs.min.js +1 -1
  320. package/orderlist/orderlist.esm.js +38 -103
  321. package/orderlist/orderlist.esm.min.js +1 -1
  322. package/orderlist/orderlist.js +38 -103
  323. package/orderlist/orderlist.min.css +1 -1
  324. package/orderlist/orderlist.min.js +1 -1
  325. package/organizationchart/organizationchart.cjs.js +26 -52
  326. package/organizationchart/organizationchart.cjs.min.js +1 -1
  327. package/organizationchart/organizationchart.esm.js +26 -52
  328. package/organizationchart/organizationchart.esm.min.js +1 -1
  329. package/organizationchart/organizationchart.js +26 -52
  330. package/organizationchart/organizationchart.min.js +1 -1
  331. package/overlaypanel/overlaypanel.cjs.js +40 -79
  332. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  333. package/overlaypanel/overlaypanel.esm.js +40 -79
  334. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  335. package/overlaypanel/overlaypanel.js +40 -79
  336. package/overlaypanel/overlaypanel.min.css +1 -1
  337. package/overlaypanel/overlaypanel.min.js +1 -1
  338. package/package.json +1 -1
  339. package/paginator/paginator.cjs.js +46 -87
  340. package/paginator/paginator.cjs.min.js +1 -1
  341. package/paginator/paginator.esm.js +46 -87
  342. package/paginator/paginator.esm.min.js +1 -1
  343. package/paginator/paginator.js +46 -87
  344. package/paginator/paginator.min.js +1 -1
  345. package/panel/panel.cjs.js +29 -50
  346. package/panel/panel.cjs.min.js +1 -1
  347. package/panel/panel.esm.js +29 -50
  348. package/panel/panel.esm.min.js +1 -1
  349. package/panel/panel.js +29 -50
  350. package/panel/panel.min.js +1 -1
  351. package/panelmenu/panelmenu.cjs.js +35 -81
  352. package/panelmenu/panelmenu.cjs.min.js +1 -1
  353. package/panelmenu/panelmenu.esm.js +35 -81
  354. package/panelmenu/panelmenu.esm.min.js +1 -1
  355. package/panelmenu/panelmenu.js +35 -81
  356. package/panelmenu/panelmenu.min.js +1 -1
  357. package/password/password.cjs.js +54 -107
  358. package/password/password.cjs.min.js +1 -1
  359. package/password/password.d.ts +1 -1
  360. package/password/password.esm.js +54 -107
  361. package/password/password.esm.min.js +1 -1
  362. package/password/password.js +54 -107
  363. package/password/password.min.js +1 -1
  364. package/picklist/picklist.cjs.js +48 -159
  365. package/picklist/picklist.cjs.min.js +1 -1
  366. package/picklist/picklist.esm.js +48 -159
  367. package/picklist/picklist.esm.min.js +1 -1
  368. package/picklist/picklist.js +48 -159
  369. package/picklist/picklist.min.js +1 -1
  370. package/portal/portal.cjs.js +26 -31
  371. package/portal/portal.cjs.min.js +1 -1
  372. package/portal/portal.esm.js +26 -31
  373. package/portal/portal.esm.min.js +1 -1
  374. package/portal/portal.js +26 -31
  375. package/portal/portal.min.js +1 -1
  376. package/primereact.all.cjs.js +2246 -7336
  377. package/primereact.all.cjs.min.js +1 -1
  378. package/primereact.all.esm.js +2246 -7336
  379. package/primereact.all.esm.min.js +1 -1
  380. package/primereact.all.js +2246 -7336
  381. package/primereact.all.min.js +1 -1
  382. package/progressbar/progressbar.cjs.js +0 -7
  383. package/progressbar/progressbar.esm.js +0 -7
  384. package/progressbar/progressbar.js +0 -7
  385. package/progressspinner/progressspinner.cjs.js +0 -2
  386. package/progressspinner/progressspinner.esm.js +0 -2
  387. package/progressspinner/progressspinner.js +0 -2
  388. package/radiobutton/radiobutton.cjs.js +30 -40
  389. package/radiobutton/radiobutton.cjs.min.js +1 -1
  390. package/radiobutton/radiobutton.esm.js +30 -40
  391. package/radiobutton/radiobutton.esm.min.js +1 -1
  392. package/radiobutton/radiobutton.js +30 -40
  393. package/radiobutton/radiobutton.min.js +1 -1
  394. package/rating/rating.cjs.js +27 -14
  395. package/rating/rating.cjs.min.js +1 -1
  396. package/rating/rating.esm.js +27 -14
  397. package/rating/rating.esm.min.js +1 -1
  398. package/rating/rating.js +27 -14
  399. package/rating/rating.min.js +1 -1
  400. package/resources/primereact.css +47 -1
  401. package/resources/primereact.min.css +1 -1
  402. package/ripple/ripple.cjs.js +0 -12
  403. package/ripple/ripple.esm.js +0 -12
  404. package/ripple/ripple.js +0 -12
  405. package/row/row.cjs.js +0 -2
  406. package/row/row.esm.js +0 -2
  407. package/row/row.js +0 -2
  408. package/scrollpanel/scrollpanel.cjs.js +2 -16
  409. package/scrollpanel/scrollpanel.esm.js +2 -16
  410. package/scrollpanel/scrollpanel.js +2 -16
  411. package/scrolltop/scrolltop.cjs.js +44 -57
  412. package/scrolltop/scrolltop.cjs.min.js +1 -1
  413. package/scrolltop/scrolltop.esm.js +44 -57
  414. package/scrolltop/scrolltop.esm.min.js +1 -1
  415. package/scrolltop/scrolltop.js +44 -57
  416. package/scrolltop/scrolltop.min.js +1 -1
  417. package/selectbutton/selectbutton.cjs.js +26 -53
  418. package/selectbutton/selectbutton.cjs.min.js +1 -1
  419. package/selectbutton/selectbutton.esm.js +26 -53
  420. package/selectbutton/selectbutton.esm.min.js +1 -1
  421. package/selectbutton/selectbutton.js +26 -53
  422. package/selectbutton/selectbutton.min.js +1 -1
  423. package/sidebar/sidebar.cjs.js +52 -83
  424. package/sidebar/sidebar.cjs.min.js +1 -1
  425. package/sidebar/sidebar.esm.js +52 -83
  426. package/sidebar/sidebar.esm.min.js +1 -1
  427. package/sidebar/sidebar.js +52 -83
  428. package/sidebar/sidebar.min.css +1 -1
  429. package/sidebar/sidebar.min.js +1 -1
  430. package/skeleton/skeleton.cjs.js +0 -2
  431. package/skeleton/skeleton.esm.js +0 -2
  432. package/skeleton/skeleton.js +0 -2
  433. package/slidemenu/slidemenu.cjs.js +73 -87
  434. package/slidemenu/slidemenu.cjs.min.js +1 -1
  435. package/slidemenu/slidemenu.esm.js +73 -87
  436. package/slidemenu/slidemenu.esm.min.js +1 -1
  437. package/slidemenu/slidemenu.js +73 -87
  438. package/slidemenu/slidemenu.min.js +1 -1
  439. package/slider/slider.cjs.js +61 -96
  440. package/slider/slider.cjs.min.js +1 -1
  441. package/slider/slider.esm.js +61 -96
  442. package/slider/slider.esm.min.js +1 -1
  443. package/slider/slider.js +61 -96
  444. package/slider/slider.min.js +1 -1
  445. package/speeddial/speeddial.cjs.js +70 -89
  446. package/speeddial/speeddial.cjs.min.js +1 -1
  447. package/speeddial/speeddial.esm.js +70 -89
  448. package/speeddial/speeddial.esm.min.js +1 -1
  449. package/speeddial/speeddial.js +70 -89
  450. package/speeddial/speeddial.min.js +1 -1
  451. package/splitbutton/splitbutton.cjs.js +46 -80
  452. package/splitbutton/splitbutton.cjs.min.js +1 -1
  453. package/splitbutton/splitbutton.esm.js +46 -80
  454. package/splitbutton/splitbutton.esm.min.js +1 -1
  455. package/splitbutton/splitbutton.js +46 -80
  456. package/splitbutton/splitbutton.min.js +1 -1
  457. package/splitter/splitter.cjs.js +72 -85
  458. package/splitter/splitter.cjs.min.js +1 -1
  459. package/splitter/splitter.esm.js +72 -85
  460. package/splitter/splitter.esm.min.js +1 -1
  461. package/splitter/splitter.js +72 -85
  462. package/splitter/splitter.min.js +1 -1
  463. package/steps/steps.cjs.js +0 -14
  464. package/steps/steps.esm.js +0 -14
  465. package/steps/steps.js +0 -14
  466. package/styleclass/styleclass.cjs.js +75 -111
  467. package/styleclass/styleclass.cjs.min.js +1 -1
  468. package/styleclass/styleclass.esm.js +75 -111
  469. package/styleclass/styleclass.esm.min.js +1 -1
  470. package/styleclass/styleclass.js +75 -111
  471. package/styleclass/styleclass.min.js +1 -1
  472. package/tabmenu/tabmenu.cjs.js +33 -54
  473. package/tabmenu/tabmenu.cjs.min.js +1 -1
  474. package/tabmenu/tabmenu.esm.js +33 -54
  475. package/tabmenu/tabmenu.esm.min.js +1 -1
  476. package/tabmenu/tabmenu.js +33 -54
  477. package/tabmenu/tabmenu.min.js +1 -1
  478. package/tabview/tabview.cjs.js +83 -102
  479. package/tabview/tabview.cjs.min.js +1 -1
  480. package/tabview/tabview.esm.js +83 -102
  481. package/tabview/tabview.esm.min.js +1 -1
  482. package/tabview/tabview.js +83 -102
  483. package/tabview/tabview.min.js +1 -1
  484. package/tag/tag.cjs.js +27 -4
  485. package/tag/tag.cjs.min.js +1 -1
  486. package/tag/tag.esm.js +27 -4
  487. package/tag/tag.esm.min.js +1 -1
  488. package/tag/tag.js +27 -4
  489. package/tag/tag.min.js +1 -1
  490. package/terminal/terminal.cjs.js +37 -63
  491. package/terminal/terminal.cjs.min.js +1 -1
  492. package/terminal/terminal.esm.js +37 -63
  493. package/terminal/terminal.esm.min.js +1 -1
  494. package/terminal/terminal.js +37 -63
  495. package/terminal/terminal.min.js +1 -1
  496. package/tieredmenu/tieredmenu.cjs.js +65 -110
  497. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  498. package/tieredmenu/tieredmenu.esm.js +65 -110
  499. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  500. package/tieredmenu/tieredmenu.js +65 -110
  501. package/tieredmenu/tieredmenu.min.js +1 -1
  502. package/timeline/timeline.cjs.js +27 -7
  503. package/timeline/timeline.cjs.min.js +1 -1
  504. package/timeline/timeline.esm.js +27 -7
  505. package/timeline/timeline.esm.min.js +1 -1
  506. package/timeline/timeline.js +27 -7
  507. package/timeline/timeline.min.js +1 -1
  508. package/toast/toast.cjs.js +81 -99
  509. package/toast/toast.cjs.min.js +1 -1
  510. package/toast/toast.esm.js +81 -99
  511. package/toast/toast.esm.min.js +1 -1
  512. package/toast/toast.js +81 -99
  513. package/toast/toast.min.js +1 -1
  514. package/togglebutton/togglebutton.cjs.js +0 -7
  515. package/togglebutton/togglebutton.esm.js +0 -7
  516. package/togglebutton/togglebutton.js +0 -7
  517. package/toolbar/toolbar.cjs.js +0 -2
  518. package/toolbar/toolbar.esm.js +0 -2
  519. package/toolbar/toolbar.js +0 -2
  520. package/tooltip/tooltip.cjs.js +111 -164
  521. package/tooltip/tooltip.cjs.min.js +1 -1
  522. package/tooltip/tooltip.esm.js +111 -164
  523. package/tooltip/tooltip.esm.min.js +1 -1
  524. package/tooltip/tooltip.js +111 -164
  525. package/tooltip/tooltip.min.css +1 -1
  526. package/tooltip/tooltip.min.js +1 -1
  527. package/tooltip/tooltipoptions.d.ts +13 -13
  528. package/tree/tree.cjs.js +68 -223
  529. package/tree/tree.cjs.min.js +1 -1
  530. package/tree/tree.esm.js +68 -223
  531. package/tree/tree.esm.min.js +1 -1
  532. package/tree/tree.js +68 -223
  533. package/tree/tree.min.js +1 -1
  534. package/treenode/treenode.d.ts +1 -0
  535. package/treeselect/treeselect.cjs.js +117 -167
  536. package/treeselect/treeselect.cjs.min.js +1 -1
  537. package/treeselect/treeselect.d.ts +30 -29
  538. package/treeselect/treeselect.esm.js +117 -167
  539. package/treeselect/treeselect.esm.min.js +1 -1
  540. package/treeselect/treeselect.js +117 -167
  541. package/treeselect/treeselect.min.js +1 -1
  542. package/treetable/treetable.cjs.js +140 -460
  543. package/treetable/treetable.cjs.min.js +1 -1
  544. package/treetable/treetable.esm.js +140 -460
  545. package/treetable/treetable.esm.min.js +1 -1
  546. package/treetable/treetable.js +140 -460
  547. package/treetable/treetable.min.js +1 -1
  548. package/tristatecheckbox/tristatecheckbox.cjs.js +29 -39
  549. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  550. package/tristatecheckbox/tristatecheckbox.esm.js +29 -39
  551. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  552. package/tristatecheckbox/tristatecheckbox.js +29 -39
  553. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  554. package/utils/utils.cjs.js +110 -328
  555. package/utils/utils.cjs.min.js +1 -1
  556. package/utils/utils.esm.js +110 -328
  557. package/utils/utils.esm.min.js +1 -1
  558. package/utils/utils.js +110 -328
  559. package/utils/utils.min.js +1 -1
  560. package/virtualscroller/virtualscroller.cjs.js +108 -204
  561. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  562. package/virtualscroller/virtualscroller.esm.js +108 -204
  563. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  564. package/virtualscroller/virtualscroller.js +108 -204
  565. package/virtualscroller/virtualscroller.min.js +1 -1
  566. package/web-types.json +152 -38
@@ -33,20 +33,45 @@ function _extends() {
33
33
  _extends = Object.assign ? Object.assign.bind() : function (target) {
34
34
  for (var i = 1; i < arguments.length; i++) {
35
35
  var source = arguments[i];
36
-
37
36
  for (var key in source) {
38
37
  if (Object.prototype.hasOwnProperty.call(source, key)) {
39
38
  target[key] = source[key];
40
39
  }
41
40
  }
42
41
  }
43
-
44
42
  return target;
45
43
  };
46
44
  return _extends.apply(this, arguments);
47
45
  }
48
46
 
47
+ function _typeof(obj) {
48
+ "@babel/helpers - typeof";
49
+
50
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
51
+ return typeof obj;
52
+ } : function (obj) {
53
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
54
+ }, _typeof(obj);
55
+ }
56
+
57
+ function _toPrimitive(input, hint) {
58
+ if (_typeof(input) !== "object" || input === null) return input;
59
+ var prim = input[Symbol.toPrimitive];
60
+ if (prim !== undefined) {
61
+ var res = prim.call(input, hint || "default");
62
+ if (_typeof(res) !== "object") return res;
63
+ throw new TypeError("@@toPrimitive must return a primitive value.");
64
+ }
65
+ return (hint === "string" ? String : Number)(input);
66
+ }
67
+
68
+ function _toPropertyKey(arg) {
69
+ var key = _toPrimitive(arg, "string");
70
+ return _typeof(key) === "symbol" ? key : String(key);
71
+ }
72
+
49
73
  function _defineProperty(obj, key, value) {
74
+ key = _toPropertyKey(key);
50
75
  if (key in obj) {
51
76
  Object.defineProperty(obj, key, {
52
77
  value: value,
@@ -57,17 +82,14 @@ function _defineProperty(obj, key, value) {
57
82
  } else {
58
83
  obj[key] = value;
59
84
  }
60
-
61
85
  return obj;
62
86
  }
63
87
 
64
88
  function _arrayLikeToArray(arr, len) {
65
89
  if (len == null || len > arr.length) len = arr.length;
66
-
67
90
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
68
91
  arr2[i] = arr[i];
69
92
  }
70
-
71
93
  return arr2;
72
94
  }
73
95
 
@@ -101,33 +123,33 @@ function _arrayWithHoles(arr) {
101
123
  }
102
124
 
103
125
  function _iterableToArrayLimit(arr, i) {
104
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
105
-
106
- if (_i == null) return;
107
- var _arr = [];
108
- var _n = true;
109
- var _d = false;
110
-
111
- var _s, _e;
112
-
113
- try {
114
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
115
- _arr.push(_s.value);
116
-
117
- if (i && _arr.length === i) break;
118
- }
119
- } catch (err) {
120
- _d = true;
121
- _e = err;
122
- } finally {
126
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
127
+ if (null != _i) {
128
+ var _s,
129
+ _e,
130
+ _x,
131
+ _r,
132
+ _arr = [],
133
+ _n = !0,
134
+ _d = !1;
123
135
  try {
124
- if (!_n && _i["return"] != null) _i["return"]();
136
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
137
+ if (Object(_i) !== _i) return;
138
+ _n = !1;
139
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
140
+ ;
141
+ }
142
+ } catch (err) {
143
+ _d = !0, _e = err;
125
144
  } finally {
126
- if (_d) throw _e;
145
+ try {
146
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
147
+ } finally {
148
+ if (_d) throw _e;
149
+ }
127
150
  }
151
+ return _arr;
128
152
  }
129
-
130
- return _arr;
131
153
  }
132
154
 
133
155
  function _nonIterableRest() {
@@ -139,14 +161,12 @@ function _slicedToArray(arr, i) {
139
161
  }
140
162
 
141
163
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
142
-
143
164
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
144
165
  var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
145
166
  var _React$useState = React__namespace.useState(false),
146
- _React$useState2 = _slicedToArray(_React$useState, 2),
147
- focusedState = _React$useState2[0],
148
- setFocusedState = _React$useState2[1];
149
-
167
+ _React$useState2 = _slicedToArray(_React$useState, 2),
168
+ focusedState = _React$useState2[0],
169
+ setFocusedState = _React$useState2[1];
150
170
  var elementRef = React__namespace.useRef(null);
151
171
  var inputRef = React__namespace.useRef(null);
152
172
  var timer = React__namespace.useRef(null);
@@ -156,28 +176,18 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
156
176
  var prefixChar = React__namespace.useRef(null);
157
177
  var suffixChar = React__namespace.useRef(null);
158
178
  var isSpecialChar = React__namespace.useRef(null);
159
-
160
179
  var _numeral = React__namespace.useRef(null);
161
-
162
180
  var _group = React__namespace.useRef(null);
163
-
164
181
  var _minusSign = React__namespace.useRef(null);
165
-
166
182
  var _currency = React__namespace.useRef(null);
167
-
168
183
  var _decimal = React__namespace.useRef(null);
169
-
170
184
  var _suffix = React__namespace.useRef(null);
171
-
172
185
  var _prefix = React__namespace.useRef(null);
173
-
174
186
  var _index = React__namespace.useRef(null);
175
-
176
187
  var stacked = props.showButtons && props.buttonLayout === 'stacked';
177
188
  var horizontal = props.showButtons && props.buttonLayout === 'horizontal';
178
189
  var vertical = props.showButtons && props.buttonLayout === 'vertical';
179
190
  var inputMode = props.inputMode || (props.mode === 'decimal' && !props.minFractionDigits ? 'numeric' : 'decimal');
180
-
181
191
  var getOptions = function getOptions() {
182
192
  return {
183
193
  localeMatcher: props.localeMatcher,
@@ -189,14 +199,11 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
189
199
  maximumFractionDigits: props.maxFractionDigits
190
200
  };
191
201
  };
192
-
193
202
  var constructParser = function constructParser() {
194
203
  numberFormat.current = new Intl.NumberFormat(props.locale, getOptions());
195
-
196
204
  var numerals = _toConsumableArray(new Intl.NumberFormat(props.locale, {
197
205
  useGrouping: false
198
206
  }).format(9876543210)).reverse();
199
-
200
207
  var index = new Map(numerals.map(function (d, i) {
201
208
  return [d, i];
202
209
  }));
@@ -207,23 +214,19 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
207
214
  _decimal.current = getDecimalExpression();
208
215
  _suffix.current = getSuffixExpression();
209
216
  _prefix.current = getPrefixExpression();
210
-
211
217
  _index.current = function (d) {
212
218
  return index.get(d);
213
219
  };
214
220
  };
215
-
216
221
  var escapeRegExp = function escapeRegExp(text) {
217
222
  return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
218
223
  };
219
-
220
224
  var getDecimalExpression = function getDecimalExpression() {
221
225
  var formatter = new Intl.NumberFormat(props.locale, _objectSpread(_objectSpread({}, getOptions()), {}, {
222
226
  useGrouping: false
223
227
  }));
224
228
  return new RegExp("[".concat(formatter.format(1.1).replace(_currency.current, '').trim().replace(_numeral.current, ''), "]"), 'g');
225
229
  };
226
-
227
230
  var getGroupingExpression = function getGroupingExpression() {
228
231
  var formatter = new Intl.NumberFormat(props.locale, {
229
232
  useGrouping: true
@@ -231,14 +234,12 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
231
234
  groupChar.current = formatter.format(1000000).trim().replace(_numeral.current, '').charAt(0);
232
235
  return new RegExp("[".concat(groupChar.current, "]"), 'g');
233
236
  };
234
-
235
237
  var getMinusSignExpression = function getMinusSignExpression() {
236
238
  var formatter = new Intl.NumberFormat(props.locale, {
237
239
  useGrouping: false
238
240
  });
239
241
  return new RegExp("[".concat(formatter.format(-1).trim().replace(_numeral.current, ''), "]"), 'g');
240
242
  };
241
-
242
243
  var getCurrencyExpression = function getCurrencyExpression() {
243
244
  if (props.currency) {
244
245
  var formatter = new Intl.NumberFormat(props.locale, {
@@ -250,10 +251,8 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
250
251
  });
251
252
  return new RegExp("[".concat(formatter.format(1).replace(/\s/g, '').replace(_numeral.current, '').replace(_group.current, ''), "]"), 'g');
252
253
  }
253
-
254
254
  return new RegExp("[]", 'g');
255
255
  };
256
-
257
256
  var getPrefixExpression = function getPrefixExpression() {
258
257
  if (props.prefix) {
259
258
  prefixChar.current = props.prefix;
@@ -265,10 +264,8 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
265
264
  });
266
265
  prefixChar.current = formatter.format(1).split('1')[0];
267
266
  }
268
-
269
267
  return new RegExp("".concat(escapeRegExp(prefixChar.current || '')), 'g');
270
268
  };
271
-
272
269
  var getSuffixExpression = function getSuffixExpression() {
273
270
  if (props.suffix) {
274
271
  suffixChar.current = props.suffix;
@@ -282,52 +279,40 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
282
279
  });
283
280
  suffixChar.current = formatter.format(1).split('1')[1];
284
281
  }
285
-
286
282
  return new RegExp("".concat(escapeRegExp(suffixChar.current || '')), 'g');
287
283
  };
288
-
289
284
  var formatValue = function formatValue(value) {
290
285
  if (value != null) {
291
286
  if (value === '-') {
292
287
  // Minus sign
293
288
  return value;
294
289
  }
295
-
296
290
  if (props.format) {
297
291
  var formatter = new Intl.NumberFormat(props.locale, getOptions());
298
-
299
292
  var _formattedValue = formatter.format(value);
300
-
301
293
  if (props.prefix) {
302
294
  _formattedValue = props.prefix + _formattedValue;
303
295
  }
304
-
305
296
  if (props.suffix) {
306
297
  _formattedValue = _formattedValue + props.suffix;
307
298
  }
308
-
309
299
  return _formattedValue;
310
300
  }
311
-
312
301
  return value.toString();
313
302
  }
314
-
315
303
  return '';
316
304
  };
317
-
318
305
  var parseValue = function parseValue(text) {
319
306
  var filteredText = text.replace(_suffix.current, '').replace(_prefix.current, '').trim().replace(/\s/g, '').replace(_currency.current, '').replace(_group.current, '').replace(_minusSign.current, '-').replace(_decimal.current, '.').replace(_numeral.current, _index.current);
320
-
321
307
  if (filteredText) {
322
- if (filteredText === '-') // Minus sign
308
+ if (filteredText === '-')
309
+ // Minus sign
323
310
  return filteredText;
324
311
  var parsedValue = +filteredText;
325
312
  return isNaN(parsedValue) ? null : parsedValue;
326
313
  }
327
-
328
314
  return null;
329
315
  };
330
-
331
316
  var repeat = function repeat(event, interval, dir) {
332
317
  var i = interval || 500;
333
318
  clearTimer();
@@ -336,31 +321,27 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
336
321
  }, i);
337
322
  spin(event, dir);
338
323
  };
339
-
340
324
  var spin = function spin(event, dir) {
341
325
  if (inputRef.current) {
342
326
  var step = props.step * dir;
343
327
  var currentValue = parseValue(inputRef.current.value) || 0;
344
328
  var newValue = validateValue(currentValue + step);
345
-
346
329
  if (props.maxLength && props.maxLength < formatValue(newValue).length) {
347
330
  return;
348
- } // touch devices trigger the keyboard to display because of setSelectionRange
349
-
331
+ }
350
332
 
333
+ // touch devices trigger the keyboard to display because of setSelectionRange
351
334
  !utils.DomHandler.isTouchDevice() && updateInput(newValue, null, 'spin');
352
335
  updateModel(event, newValue);
353
336
  handleOnChange(event, currentValue, newValue);
354
337
  }
355
338
  };
356
-
357
339
  var onUpButtonTouchStart = function onUpButtonTouchStart(event) {
358
340
  if (!props.disabled && !props.readOnly) {
359
341
  repeat(event, null, 1);
360
342
  event.preventDefault();
361
343
  }
362
344
  };
363
-
364
345
  var onUpButtonMouseDown = function onUpButtonMouseDown(event) {
365
346
  if (!props.disabled && !props.readOnly) {
366
347
  props.autoFocus && utils.DomHandler.focus(inputRef.current, props.autoFocus);
@@ -368,52 +349,42 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
368
349
  event.preventDefault();
369
350
  }
370
351
  };
371
-
372
352
  var onUpButtonTouchEnd = function onUpButtonTouchEnd() {
373
353
  if (!props.disabled && !props.readOnly) {
374
354
  clearTimer();
375
- event.preventDefault();
376
355
  }
377
356
  };
378
-
379
357
  var onUpButtonMouseUp = function onUpButtonMouseUp() {
380
358
  if (!props.disabled && !props.readOnly) {
381
359
  clearTimer();
382
360
  }
383
361
  };
384
-
385
362
  var onUpButtonMouseLeave = function onUpButtonMouseLeave() {
386
363
  if (!props.disabled && !props.readOnly) {
387
364
  clearTimer();
388
365
  }
389
366
  };
390
-
391
367
  var onUpButtonKeyUp = function onUpButtonKeyUp() {
392
368
  if (!props.disabled && !props.readOnly) {
393
369
  clearTimer();
394
370
  }
395
371
  };
396
-
397
372
  var onUpButtonKeyDown = function onUpButtonKeyDown(event) {
398
373
  if (!props.disabled && !props.readOnly && (event.keyCode === 32 || event.keyCode === 13)) {
399
374
  repeat(event, null, 1);
400
375
  }
401
376
  };
402
-
403
377
  var onDownButtonTouchStart = function onDownButtonTouchStart(event) {
404
378
  if (!props.disabled && !props.readOnly) {
405
379
  repeat(event, null, -1);
406
380
  event.preventDefault();
407
381
  }
408
382
  };
409
-
410
383
  var onDownButtonTouchEnd = function onDownButtonTouchEnd() {
411
384
  if (!props.disabled && !props.readOnly) {
412
385
  clearTimer();
413
- event.preventDefault();
414
386
  }
415
387
  };
416
-
417
388
  var onDownButtonMouseDown = function onDownButtonMouseDown(event) {
418
389
  if (!props.disabled && !props.readOnly) {
419
390
  props.autoFocus && utils.DomHandler.focus(inputRef.current, props.autoFocus);
@@ -421,94 +392,79 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
421
392
  event.preventDefault();
422
393
  }
423
394
  };
424
-
425
395
  var onDownButtonMouseUp = function onDownButtonMouseUp() {
426
396
  if (!props.disabled && !props.readOnly) {
427
397
  clearTimer();
428
398
  }
429
399
  };
430
-
431
400
  var onDownButtonMouseLeave = function onDownButtonMouseLeave() {
432
401
  if (!props.disabled && !props.readOnly) {
433
402
  clearTimer();
434
403
  }
435
404
  };
436
-
437
405
  var onDownButtonKeyUp = function onDownButtonKeyUp() {
438
406
  if (!props.disabled && !props.readOnly) {
439
407
  clearTimer();
440
408
  }
441
409
  };
442
-
443
410
  var onDownButtonKeyDown = function onDownButtonKeyDown(event) {
444
411
  if (!props.disabled && !props.readOnly && (event.keyCode === 32 || event.keyCode === 13)) {
445
412
  repeat(event, null, -1);
446
413
  }
447
414
  };
448
-
449
415
  var onInput = function onInput(event) {
450
416
  if (props.disabled || props.readOnly) {
451
417
  return;
452
418
  }
453
-
454
419
  if (isSpecialChar.current) {
455
420
  event.target.value = lastValue.current;
456
421
  }
457
-
458
422
  isSpecialChar.current = false;
459
423
  };
460
-
461
424
  var onInputKeyDown = function onInputKeyDown(event) {
462
425
  if (props.disabled || props.readOnly) {
463
426
  return;
464
427
  }
465
-
466
428
  lastValue.current = event.target.value;
467
-
468
429
  if (event.shiftKey || event.altKey) {
469
430
  isSpecialChar.current = true;
470
431
  return;
471
432
  }
472
-
473
433
  var selectionStart = event.target.selectionStart;
474
434
  var selectionEnd = event.target.selectionEnd;
475
435
  var inputValue = event.target.value;
476
436
  var newValueStr = null;
477
-
478
437
  if (event.altKey) {
479
438
  event.preventDefault();
480
439
  }
481
-
482
440
  switch (event.which) {
483
441
  //up
484
442
  case 38:
485
443
  spin(event, 1);
486
444
  event.preventDefault();
487
445
  break;
488
- //down
489
446
 
447
+ //down
490
448
  case 40:
491
449
  spin(event, -1);
492
450
  event.preventDefault();
493
451
  break;
494
- //left
495
452
 
453
+ //left
496
454
  case 37:
497
455
  if (!isNumeralChar(inputValue.charAt(selectionStart - 1))) {
498
456
  event.preventDefault();
499
457
  }
500
-
501
458
  break;
502
- //right
503
459
 
460
+ //right
504
461
  case 39:
505
462
  if (!isNumeralChar(inputValue.charAt(selectionStart))) {
506
463
  event.preventDefault();
507
464
  }
508
-
509
465
  break;
510
- //enter and tab
511
466
 
467
+ //enter and tab
512
468
  case 13:
513
469
  case 9:
514
470
  newValueStr = validateValue(parseValue(inputValue));
@@ -516,27 +472,22 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
516
472
  inputRef.current.setAttribute('aria-valuenow', newValueStr);
517
473
  updateModel(event, newValueStr);
518
474
  break;
519
- //backspace
520
475
 
476
+ //backspace
521
477
  case 8:
522
478
  event.preventDefault();
523
-
524
479
  if (selectionStart === selectionEnd) {
525
480
  var deleteChar = inputValue.charAt(selectionStart - 1);
526
-
527
481
  var _getDecimalCharIndexe = getDecimalCharIndexes(inputValue),
528
- decimalCharIndex = _getDecimalCharIndexe.decimalCharIndex,
529
- decimalCharIndexWithoutPrefix = _getDecimalCharIndexe.decimalCharIndexWithoutPrefix;
530
-
482
+ decimalCharIndex = _getDecimalCharIndexe.decimalCharIndex,
483
+ decimalCharIndexWithoutPrefix = _getDecimalCharIndexe.decimalCharIndexWithoutPrefix;
531
484
  if (isNumeralChar(deleteChar)) {
532
485
  var decimalLength = getDecimalLength(inputValue);
533
-
534
486
  if (_group.current.test(deleteChar)) {
535
487
  _group.current.lastIndex = 0;
536
488
  newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);
537
489
  } else if (_decimal.current.test(deleteChar)) {
538
490
  _decimal.current.lastIndex = 0;
539
-
540
491
  if (decimalLength) {
541
492
  inputRef.current.setSelectionRange(selectionStart - 1, selectionStart - 1);
542
493
  } else {
@@ -552,35 +503,28 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
552
503
  newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);
553
504
  }
554
505
  }
555
-
556
506
  updateValue(event, newValueStr, null, 'delete-single');
557
507
  } else {
558
508
  newValueStr = deleteRange(inputValue, selectionStart, selectionEnd);
559
509
  updateValue(event, newValueStr, null, 'delete-range');
560
510
  }
561
-
562
511
  break;
563
- // del
564
512
 
513
+ // del
565
514
  case 46:
566
515
  event.preventDefault();
567
-
568
516
  if (selectionStart === selectionEnd) {
569
517
  var _deleteChar = inputValue.charAt(selectionStart);
570
-
571
518
  var _getDecimalCharIndexe2 = getDecimalCharIndexes(inputValue),
572
- _decimalCharIndex = _getDecimalCharIndexe2.decimalCharIndex,
573
- _decimalCharIndexWithoutPrefix = _getDecimalCharIndexe2.decimalCharIndexWithoutPrefix;
574
-
519
+ _decimalCharIndex = _getDecimalCharIndexe2.decimalCharIndex,
520
+ _decimalCharIndexWithoutPrefix = _getDecimalCharIndexe2.decimalCharIndexWithoutPrefix;
575
521
  if (isNumeralChar(_deleteChar)) {
576
522
  var _decimalLength = getDecimalLength(inputValue);
577
-
578
523
  if (_group.current.test(_deleteChar)) {
579
524
  _group.current.lastIndex = 0;
580
525
  newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);
581
526
  } else if (_decimal.current.test(_deleteChar)) {
582
527
  _decimal.current.lastIndex = 0;
583
-
584
528
  if (_decimalLength) {
585
529
  inputRef.current.setSelectionRange(selectionStart + 1, selectionStart + 1);
586
530
  } else {
@@ -588,7 +532,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
588
532
  }
589
533
  } else if (_decimalCharIndex > 0 && selectionStart > _decimalCharIndex) {
590
534
  var _insertedText = isDecimalMode() && (props.minFractionDigits || 0) < _decimalLength ? '' : '0';
591
-
592
535
  newValueStr = inputValue.slice(0, selectionStart) + _insertedText + inputValue.slice(selectionStart + 1);
593
536
  } else if (_decimalCharIndexWithoutPrefix === 1) {
594
537
  newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);
@@ -597,39 +540,29 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
597
540
  newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);
598
541
  }
599
542
  }
600
-
601
543
  updateValue(event, newValueStr, null, 'delete-back-single');
602
544
  } else {
603
545
  newValueStr = deleteRange(inputValue, selectionStart, selectionEnd);
604
546
  updateValue(event, newValueStr, null, 'delete-range');
605
547
  }
606
-
607
548
  break;
608
549
  }
609
-
610
550
  if (props.onKeyDown) {
611
551
  props.onKeyDown(event);
612
552
  }
613
553
  };
614
-
615
554
  var onInputKeyPress = function onInputKeyPress(event) {
616
555
  if (props.disabled || props.readOnly) {
617
556
  return;
618
557
  }
619
-
620
558
  var code = event.which || event.keyCode;
621
-
622
559
  if (code !== 13) {
623
560
  // to submit a form
624
561
  event.preventDefault();
625
562
  }
626
-
627
563
  var _char = String.fromCharCode(code);
628
-
629
564
  var _isDecimalSign = isDecimalSign(_char);
630
-
631
565
  var _isMinusSign = isMinusSign(_char);
632
-
633
566
  if (48 <= code && code <= 57 || _isMinusSign || _isDecimalSign) {
634
567
  insert(event, _char, {
635
568
  isDecimalSign: _isDecimalSign,
@@ -637,51 +570,39 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
637
570
  });
638
571
  }
639
572
  };
640
-
641
573
  var onPaste = function onPaste(event) {
642
574
  event.preventDefault();
643
-
644
575
  if (props.disabled || props.readOnly) {
645
576
  return;
646
577
  }
647
-
648
578
  var data = (event.clipboardData || window['clipboardData']).getData('Text');
649
-
650
579
  if (data) {
651
580
  var filteredData = parseValue(data);
652
-
653
581
  if (filteredData != null) {
654
582
  insert(event, filteredData.toString());
655
583
  }
656
584
  }
657
585
  };
658
-
659
586
  var allowMinusSign = function allowMinusSign() {
660
587
  return props.min === null || props.min < 0;
661
588
  };
662
-
663
589
  var isMinusSign = function isMinusSign(_char2) {
664
590
  if (_minusSign.current.test(_char2) || _char2 === '-') {
665
591
  _minusSign.current.lastIndex = 0;
666
592
  return true;
667
593
  }
668
-
669
594
  return false;
670
595
  };
671
-
672
596
  var isDecimalSign = function isDecimalSign(_char3) {
673
597
  if (_decimal.current.test(_char3)) {
674
598
  _decimal.current.lastIndex = 0;
675
599
  return true;
676
600
  }
677
-
678
601
  return false;
679
602
  };
680
-
681
603
  var isDecimalMode = function isDecimalMode() {
682
604
  return props.mode === 'decimal';
683
605
  };
684
-
685
606
  var getDecimalCharIndexes = function getDecimalCharIndexes(val) {
686
607
  var decimalCharIndex = val.search(_decimal.current);
687
608
  _decimal.current.lastIndex = 0;
@@ -693,7 +614,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
693
614
  decimalCharIndexWithoutPrefix: decimalCharIndexWithoutPrefix
694
615
  };
695
616
  };
696
-
697
617
  var getCharIndexes = function getCharIndexes(val) {
698
618
  var decimalCharIndex = val.search(_decimal.current);
699
619
  _decimal.current.lastIndex = 0;
@@ -710,7 +630,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
710
630
  currencyCharIndex: currencyCharIndex
711
631
  };
712
632
  };
713
-
714
633
  var insert = function insert(event, text) {
715
634
  var sign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
716
635
  isDecimalSign: false,
@@ -718,31 +637,24 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
718
637
  };
719
638
  var minusCharIndexOnText = text.search(_minusSign.current);
720
639
  _minusSign.current.lastIndex = 0;
721
-
722
640
  if (!allowMinusSign() && minusCharIndexOnText !== -1) {
723
641
  return;
724
642
  }
725
-
726
643
  var selectionStart = inputRef.current.selectionStart;
727
644
  var selectionEnd = inputRef.current.selectionEnd;
728
645
  var inputValue = inputRef.current.value.trim();
729
-
730
646
  var _getCharIndexes = getCharIndexes(inputValue),
731
- decimalCharIndex = _getCharIndexes.decimalCharIndex,
732
- minusCharIndex = _getCharIndexes.minusCharIndex,
733
- suffixCharIndex = _getCharIndexes.suffixCharIndex,
734
- currencyCharIndex = _getCharIndexes.currencyCharIndex;
735
-
647
+ decimalCharIndex = _getCharIndexes.decimalCharIndex,
648
+ minusCharIndex = _getCharIndexes.minusCharIndex,
649
+ suffixCharIndex = _getCharIndexes.suffixCharIndex,
650
+ currencyCharIndex = _getCharIndexes.currencyCharIndex;
736
651
  var newValueStr;
737
-
738
652
  if (sign.isMinusSign) {
739
653
  if (selectionStart === 0) {
740
654
  newValueStr = inputValue;
741
-
742
655
  if (minusCharIndex === -1 || selectionEnd !== 0) {
743
656
  newValueStr = insertText(inputValue, text, 0, selectionEnd);
744
657
  }
745
-
746
658
  updateValue(event, newValueStr, text, 'insert');
747
659
  }
748
660
  } else if (sign.isDecimalSign) {
@@ -758,7 +670,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
758
670
  } else {
759
671
  var maxFractionDigits = numberFormat.current.resolvedOptions().maximumFractionDigits;
760
672
  var operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';
761
-
762
673
  if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
763
674
  if (selectionStart + text.length - (decimalCharIndex + 1) <= maxFractionDigits) {
764
675
  var charIndex = currencyCharIndex >= selectionStart ? currencyCharIndex - 1 : suffixCharIndex >= selectionStart ? suffixCharIndex : inputValue.length;
@@ -771,10 +682,8 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
771
682
  }
772
683
  }
773
684
  };
774
-
775
685
  var insertText = function insertText(value, text, start, end) {
776
686
  var textSplit = text === '.' ? text : text.split('.');
777
-
778
687
  if (textSplit.length === 2) {
779
688
  var decimalCharIndex = value.slice(start, end).search(_decimal.current);
780
689
  _decimal.current.lastIndex = 0;
@@ -782,42 +691,38 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
782
691
  } else if (end - start === value.length) {
783
692
  return formatValue(text);
784
693
  } else if (start === 0) {
785
- return text + value.slice(end);
694
+ var suffix = utils.ObjectUtils.isLetter(value[end]) ? end - 1 : end;
695
+ return text + value.slice(suffix);
786
696
  } else if (end === value.length) {
787
697
  return value.slice(0, start) + text;
788
698
  } else {
789
699
  return value.slice(0, start) + text + value.slice(end);
790
700
  }
791
701
  };
792
-
793
702
  var deleteRange = function deleteRange(value, start, end) {
794
703
  var newValueStr;
795
704
  if (end - start === value.length) newValueStr = '';else if (start === 0) newValueStr = value.slice(end);else if (end === value.length) newValueStr = value.slice(0, start);else newValueStr = value.slice(0, start) + value.slice(end);
796
705
  return newValueStr;
797
706
  };
798
-
799
707
  var initCursor = function initCursor() {
800
708
  var selectionStart = inputRef.current.selectionStart;
801
709
  var inputValue = inputRef.current.value;
802
710
  var valueLength = inputValue.length;
803
- var index = null; // remove prefix
711
+ var index = null;
804
712
 
713
+ // remove prefix
805
714
  var prefixLength = (prefixChar.current || '').length;
806
715
  inputValue = inputValue.replace(_prefix.current, '');
807
716
  selectionStart = selectionStart - prefixLength;
808
-
809
717
  var _char4 = inputValue.charAt(selectionStart);
810
-
811
718
  if (isNumeralChar(_char4)) {
812
719
  return selectionStart + prefixLength;
813
- } //left
814
-
720
+ }
815
721
 
722
+ //left
816
723
  var i = selectionStart - 1;
817
-
818
724
  while (i >= 0) {
819
725
  _char4 = inputValue.charAt(i);
820
-
821
726
  if (isNumeralChar(_char4)) {
822
727
  index = i + prefixLength;
823
728
  break;
@@ -825,15 +730,12 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
825
730
  i--;
826
731
  }
827
732
  }
828
-
829
733
  if (index !== null) {
830
734
  inputRef.current.setSelectionRange(index + 1, index + 1);
831
735
  } else {
832
736
  i = selectionStart;
833
-
834
737
  while (i < valueLength) {
835
738
  _char4 = inputValue.charAt(i);
836
-
837
739
  if (isNumeralChar(_char4)) {
838
740
  index = i + prefixLength;
839
741
  break;
@@ -841,19 +743,15 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
841
743
  i++;
842
744
  }
843
745
  }
844
-
845
746
  if (index !== null) {
846
747
  inputRef.current.setSelectionRange(index, index);
847
748
  }
848
749
  }
849
-
850
750
  return index || 0;
851
751
  };
852
-
853
752
  var onInputClick = function onInputClick() {
854
753
  initCursor();
855
754
  };
856
-
857
755
  var isNumeralChar = function isNumeralChar(_char5) {
858
756
  if (_char5.length === 1 && (_numeral.current.test(_char5) || _decimal.current.test(_char5) || _group.current.test(_char5) || _minusSign.current.test(_char5))) {
859
757
  resetRegex();
@@ -862,29 +760,24 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
862
760
  return false;
863
761
  }
864
762
  };
865
-
866
763
  var resetRegex = function resetRegex() {
867
764
  _numeral.current.lastIndex = 0;
868
765
  _decimal.current.lastIndex = 0;
869
766
  _group.current.lastIndex = 0;
870
767
  _minusSign.current.lastIndex = 0;
871
768
  };
872
-
873
769
  var updateValue = function updateValue(event, valueStr, insertedValueStr, operation) {
874
770
  var currentValue = inputRef.current.value;
875
771
  var newValue = null;
876
-
877
772
  if (valueStr != null) {
878
773
  newValue = evaluateEmpty(parseValue(valueStr));
879
774
  updateInput(newValue, insertedValueStr, operation, valueStr);
880
775
  handleOnChange(event, currentValue, newValue);
881
776
  }
882
777
  };
883
-
884
778
  var evaluateEmpty = function evaluateEmpty(newValue) {
885
779
  return !newValue && !props.allowEmpty ? props.min || 0 : newValue;
886
780
  };
887
-
888
781
  var handleOnChange = function handleOnChange(event, currentValue, newValue) {
889
782
  if (props.onChange && isValueChanged(currentValue, newValue)) {
890
783
  props.onChange({
@@ -893,55 +786,43 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
893
786
  });
894
787
  }
895
788
  };
896
-
897
789
  var isValueChanged = function isValueChanged(currentValue, newValue) {
898
790
  if (newValue === null && currentValue !== null) {
899
791
  return true;
900
792
  }
901
-
902
793
  if (newValue != null) {
903
794
  var parsedCurrentValue = typeof currentValue === 'string' ? parseValue(currentValue) : currentValue;
904
795
  return newValue !== parsedCurrentValue;
905
796
  }
906
-
907
797
  return false;
908
798
  };
909
-
910
799
  var validateValue = function validateValue(value) {
911
800
  if (value === '-') {
912
801
  return null;
913
802
  }
914
-
915
803
  return validateValueByLimit(value);
916
804
  };
917
-
918
805
  var validateValueByLimit = function validateValueByLimit(value) {
919
806
  if (utils.ObjectUtils.isEmpty(value)) {
920
807
  return null;
921
808
  }
922
-
923
809
  if (props.min !== null && value < props.min) {
924
810
  return props.min;
925
811
  }
926
-
927
812
  if (props.max !== null && value > props.max) {
928
813
  return props.max;
929
814
  }
930
-
931
815
  return value;
932
816
  };
933
-
934
817
  var updateInput = function updateInput(value, insertedValueStr, operation, valueStr) {
935
818
  insertedValueStr = insertedValueStr || '';
936
819
  var inputEl = inputRef.current;
937
820
  var inputValue = inputEl.value;
938
821
  var newValue = formatValue(value);
939
822
  var currentLength = inputValue.length;
940
-
941
823
  if (newValue !== valueStr) {
942
824
  newValue = concatValues(newValue, valueStr);
943
825
  }
944
-
945
826
  if (currentLength === 0) {
946
827
  inputEl.value = newValue;
947
828
  inputEl.setSelectionRange(0, 0);
@@ -951,14 +832,11 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
951
832
  } else {
952
833
  var selectionStart = inputEl.selectionStart;
953
834
  var _selectionEnd = inputEl.selectionEnd;
954
-
955
835
  if (props.maxLength && props.maxLength < newValue.length) {
956
836
  return;
957
837
  }
958
-
959
838
  inputEl.value = newValue;
960
839
  var newLength = newValue.length;
961
-
962
840
  if (operation === 'range-insert') {
963
841
  var startValue = parseValue((inputValue || '').slice(0, selectionStart));
964
842
  var startValueStr = startValue !== null ? startValue.toString() : '';
@@ -976,73 +854,56 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
976
854
  var prevChar = inputValue.charAt(_selectionEnd - 1);
977
855
  var nextChar = inputValue.charAt(_selectionEnd);
978
856
  var diff = currentLength - newLength;
979
-
980
857
  var isGroupChar = _group.current.test(nextChar);
981
-
982
858
  if (isGroupChar && diff === 1) {
983
859
  _selectionEnd += 1;
984
860
  } else if (!isGroupChar && isNumeralChar(prevChar)) {
985
861
  _selectionEnd += -1 * diff + 1;
986
862
  }
987
-
988
863
  _group.current.lastIndex = 0;
989
864
  inputEl.setSelectionRange(_selectionEnd, _selectionEnd);
990
865
  } else if (inputValue === '-' && operation === 'insert') {
991
866
  inputEl.setSelectionRange(0, 0);
992
-
993
867
  var _index2 = initCursor();
994
-
995
868
  var _selectionEnd2 = _index2 + insertedValueStr.length + 1;
996
-
997
869
  inputEl.setSelectionRange(_selectionEnd2, _selectionEnd2);
998
870
  } else {
999
871
  _selectionEnd = _selectionEnd + (newLength - currentLength);
1000
872
  inputEl.setSelectionRange(_selectionEnd, _selectionEnd);
1001
873
  }
1002
874
  }
1003
-
1004
875
  inputEl.setAttribute('aria-valuenow', value);
1005
876
  };
1006
-
1007
877
  var updateInputValue = function updateInputValue(newValue) {
1008
878
  newValue = evaluateEmpty(newValue);
1009
879
  var inputEl = inputRef.current;
1010
880
  var value = inputEl.value;
1011
-
1012
881
  var _formattedValue = formattedValue(newValue);
1013
-
1014
882
  if (value !== _formattedValue) {
1015
883
  inputEl.value = _formattedValue;
1016
884
  inputEl.setAttribute('aria-valuenow', newValue);
1017
885
  }
1018
886
  };
1019
-
1020
887
  var formattedValue = function formattedValue(val) {
1021
888
  return formatValue(evaluateEmpty(val));
1022
889
  };
1023
-
1024
890
  var concatValues = function concatValues(val1, val2) {
1025
891
  if (val1 && val2) {
1026
892
  var decimalCharIndex = val2.search(_decimal.current);
1027
893
  _decimal.current.lastIndex = 0;
1028
894
  return decimalCharIndex !== -1 ? val1.split(_decimal.current)[0] + val2.slice(decimalCharIndex) : val1;
1029
895
  }
1030
-
1031
896
  return val1;
1032
897
  };
1033
-
1034
898
  var getDecimalLength = function getDecimalLength(value) {
1035
899
  if (value) {
1036
900
  var valueSplit = value.split(_decimal.current);
1037
-
1038
901
  if (valueSplit.length === 2) {
1039
902
  return valueSplit[1].replace(_suffix.current, '').trim().replace(/\s/g, '').replace(_currency.current, '').length;
1040
903
  }
1041
904
  }
1042
-
1043
905
  return 0;
1044
906
  };
1045
-
1046
907
  var updateModel = function updateModel(event, value) {
1047
908
  if (props.onValueChange) {
1048
909
  props.onValueChange({
@@ -1058,47 +919,42 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
1058
919
  });
1059
920
  }
1060
921
  };
1061
-
1062
922
  var onInputFocus = function onInputFocus(event) {
1063
923
  setFocusedState(true);
1064
924
  props.onFocus && props.onFocus(event);
925
+ if ((props.suffix || props.currency || props.prefix) && inputRef.current) {
926
+ // GitHub #1866 Cursor must be placed before/after symbol or arrow keys don't work
927
+ var selectionEnd = initCursor();
928
+ inputRef.current.setSelectionRange(selectionEnd, selectionEnd);
929
+ }
1065
930
  };
1066
-
1067
931
  var onInputBlur = function onInputBlur(event) {
1068
932
  setFocusedState(false);
1069
-
1070
933
  if (inputRef.current) {
1071
934
  var currentValue = inputRef.current.value;
1072
-
1073
935
  if (isValueChanged(currentValue, props.value)) {
1074
936
  var newValue = validateValue(parseValue(currentValue));
1075
937
  updateInputValue(newValue);
1076
938
  updateModel(event, newValue);
1077
939
  }
1078
940
  }
1079
-
1080
941
  props.onBlur && props.onBlur(event);
1081
942
  };
1082
-
1083
943
  var clearTimer = function clearTimer() {
1084
944
  if (timer.current) {
1085
945
  clearInterval(timer.current);
1086
946
  }
1087
947
  };
1088
-
1089
948
  var changeValue = function changeValue() {
1090
949
  updateInputValue(validateValueByLimit(props.value));
1091
950
  var newValue = validateValue(props.value);
1092
-
1093
951
  if (props.value !== null && props.value !== newValue) {
1094
952
  updateModel(null, newValue);
1095
953
  }
1096
954
  };
1097
-
1098
955
  var getFormatter = function getFormatter() {
1099
956
  return numberFormat.current;
1100
957
  };
1101
-
1102
958
  React__namespace.useImperativeHandle(ref, function () {
1103
959
  return {
1104
960
  props: props,
@@ -1117,7 +973,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
1117
973
  hooks.useMountEffect(function () {
1118
974
  constructParser();
1119
975
  var newValue = validateValue(props.value);
1120
-
1121
976
  if (props.value !== null && props.value !== newValue) {
1122
977
  updateModel(null, newValue);
1123
978
  }
@@ -1129,7 +984,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
1129
984
  hooks.useUpdateEffect(function () {
1130
985
  changeValue();
1131
986
  }, [props.value]);
1132
-
1133
987
  var createInputElement = function createInputElement() {
1134
988
  var className = utils.classNames('p-inputnumber-input', props.inputClassName);
1135
989
  var valueToRender = formattedValue(props.value);
@@ -1166,7 +1020,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
1166
1020
  "aria-valuenow": props.value
1167
1021
  }, ariaProps, dataProps));
1168
1022
  };
1169
-
1170
1023
  var createUpButton = function createUpButton() {
1171
1024
  var className = utils.classNames('p-inputnumber-button p-inputnumber-button-up p-button p-button-icon-only p-component', {
1172
1025
  'p-disabled': props.disabled
@@ -1188,7 +1041,6 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
1188
1041
  className: icon
1189
1042
  }), /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
1190
1043
  };
1191
-
1192
1044
  var createDownButton = function createDownButton() {
1193
1045
  var className = utils.classNames('p-inputnumber-button p-inputnumber-button-down p-button p-button-icon-only p-component', {
1194
1046
  'p-disabled': props.disabled
@@ -1210,20 +1062,16 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
1210
1062
  className: icon
1211
1063
  }), /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
1212
1064
  };
1213
-
1214
1065
  var createButtonGroup = function createButtonGroup() {
1215
1066
  var upButton = props.showButtons && createUpButton();
1216
1067
  var downButton = props.showButtons && createDownButton();
1217
-
1218
1068
  if (stacked) {
1219
1069
  return /*#__PURE__*/React__namespace.createElement("span", {
1220
1070
  className: "p-inputnumber-button-group"
1221
1071
  }, upButton, downButton);
1222
1072
  }
1223
-
1224
1073
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, upButton, downButton);
1225
1074
  };
1226
-
1227
1075
  var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
1228
1076
  var otherProps = utils.ObjectUtils.findDiffKeys(props, InputNumber.defaultProps);
1229
1077
  var dataProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.DATA_PROPS);