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