primevue 3.28.0 → 3.29.0

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 (420) hide show
  1. package/README.md +3 -3
  2. package/autocomplete/AutoComplete.d.ts +153 -1
  3. package/autocomplete/AutoComplete.vue +46 -17
  4. package/autocomplete/autocomplete.cjs.js +80 -74
  5. package/autocomplete/autocomplete.cjs.min.js +1 -1
  6. package/autocomplete/autocomplete.esm.js +80 -75
  7. package/autocomplete/autocomplete.esm.min.js +1 -1
  8. package/autocomplete/autocomplete.js +81 -76
  9. package/autocomplete/autocomplete.min.js +1 -1
  10. package/basecomponent/BaseComponent.vue +19 -5
  11. package/basecomponent/basecomponent.cjs.js +19 -5
  12. package/basecomponent/basecomponent.cjs.min.js +1 -1
  13. package/basecomponent/basecomponent.esm.js +19 -5
  14. package/basecomponent/basecomponent.esm.min.js +1 -1
  15. package/basecomponent/basecomponent.js +20 -7
  16. package/basecomponent/basecomponent.min.js +1 -1
  17. package/calendar/Calendar.d.ts +269 -0
  18. package/calendar/Calendar.vue +75 -59
  19. package/calendar/calendar.cjs.js +223 -259
  20. package/calendar/calendar.cjs.min.js +1 -1
  21. package/calendar/calendar.esm.js +223 -260
  22. package/calendar/calendar.esm.min.js +1 -1
  23. package/calendar/calendar.js +224 -261
  24. package/calendar/calendar.min.js +1 -1
  25. package/carousel/Carousel.d.ts +154 -0
  26. package/carousel/Carousel.vue +27 -14
  27. package/carousel/carousel.cjs.js +64 -65
  28. package/carousel/carousel.cjs.min.js +1 -1
  29. package/carousel/carousel.esm.js +64 -66
  30. package/carousel/carousel.esm.min.js +1 -1
  31. package/carousel/carousel.js +65 -67
  32. package/carousel/carousel.min.js +1 -1
  33. package/cascadeselect/CascadeSelect.d.ts +133 -0
  34. package/cascadeselect/CascadeSelect.vue +15 -12
  35. package/cascadeselect/CascadeSelectSub.vue +7 -3
  36. package/cascadeselect/cascadeselect.cjs.js +63 -66
  37. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  38. package/cascadeselect/cascadeselect.esm.js +63 -67
  39. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  40. package/cascadeselect/cascadeselect.js +64 -68
  41. package/cascadeselect/cascadeselect.min.js +1 -1
  42. package/checkbox/Checkbox.d.ts +60 -0
  43. package/checkbox/Checkbox.vue +7 -5
  44. package/checkbox/checkbox.cjs.js +17 -15
  45. package/checkbox/checkbox.cjs.min.js +1 -1
  46. package/checkbox/checkbox.esm.js +17 -16
  47. package/checkbox/checkbox.esm.min.js +1 -1
  48. package/checkbox/checkbox.js +18 -17
  49. package/checkbox/checkbox.min.js +1 -1
  50. package/chips/Chips.d.ts +80 -0
  51. package/chips/Chips.vue +9 -5
  52. package/chips/chips.cjs.js +23 -24
  53. package/chips/chips.cjs.min.js +1 -1
  54. package/chips/chips.esm.js +23 -25
  55. package/chips/chips.esm.min.js +1 -1
  56. package/chips/chips.js +24 -26
  57. package/chips/chips.min.js +1 -1
  58. package/colorpicker/ColorPicker.d.ts +76 -0
  59. package/colorpicker/ColorPicker.vue +11 -9
  60. package/colorpicker/colorpicker.cjs.js +28 -27
  61. package/colorpicker/colorpicker.cjs.min.js +1 -1
  62. package/colorpicker/colorpicker.esm.js +28 -28
  63. package/colorpicker/colorpicker.esm.min.js +1 -1
  64. package/colorpicker/colorpicker.js +29 -29
  65. package/colorpicker/colorpicker.min.js +1 -1
  66. package/column/Column.d.ts +303 -2
  67. package/column/Column.vue +3 -0
  68. package/column/column.cjs.js +7 -0
  69. package/column/column.cjs.min.js +1 -1
  70. package/column/column.esm.js +3 -0
  71. package/column/column.esm.min.js +1 -1
  72. package/column/column.js +7 -2
  73. package/column/column.min.js +1 -1
  74. package/columngroup/ColumnGroup.d.ts +34 -0
  75. package/columngroup/ColumnGroup.vue +3 -0
  76. package/columngroup/columngroup.cjs.js +7 -0
  77. package/columngroup/columngroup.cjs.min.js +1 -1
  78. package/columngroup/columngroup.esm.js +3 -0
  79. package/columngroup/columngroup.esm.min.js +1 -1
  80. package/columngroup/columngroup.js +7 -2
  81. package/columngroup/columngroup.min.js +1 -1
  82. package/config/PrimeVue.d.ts +163 -2
  83. package/confirmdialog/ConfirmDialog.d.ts +14 -7
  84. package/contextmenu/ContextMenu.d.ts +1 -1
  85. package/core/core.js +448 -331
  86. package/core/core.min.js +9 -9
  87. package/datatable/BodyCell.vue +29 -13
  88. package/datatable/ColumnFilter.vue +49 -20
  89. package/datatable/DataTable.d.ts +188 -1
  90. package/datatable/DataTable.vue +25 -14
  91. package/datatable/FooterCell.vue +15 -1
  92. package/datatable/HeaderCell.vue +31 -6
  93. package/datatable/HeaderCheckbox.vue +35 -5
  94. package/datatable/RowCheckbox.vue +36 -5
  95. package/datatable/RowRadioButton.vue +26 -6
  96. package/datatable/TableBody.vue +41 -11
  97. package/datatable/TableFooter.vue +31 -5
  98. package/datatable/TableHeader.vue +53 -6
  99. package/datatable/datatable.cjs.js +559 -376
  100. package/datatable/datatable.cjs.min.js +1 -1
  101. package/datatable/datatable.esm.js +559 -377
  102. package/datatable/datatable.esm.min.js +1 -1
  103. package/datatable/datatable.js +560 -378
  104. package/datatable/datatable.min.js +1 -1
  105. package/dataview/DataView.d.ts +72 -0
  106. package/dataview/DataView.vue +13 -8
  107. package/dataview/dataview.cjs.js +33 -37
  108. package/dataview/dataview.cjs.min.js +1 -1
  109. package/dataview/dataview.esm.js +33 -38
  110. package/dataview/dataview.esm.min.js +1 -1
  111. package/dataview/dataview.js +33 -38
  112. package/dataview/dataview.min.js +1 -1
  113. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
  114. package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
  115. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
  116. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
  117. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
  118. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  119. package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
  120. package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
  121. package/dialog/Dialog.d.ts +6 -4
  122. package/dialog/Dialog.vue +2 -3
  123. package/dialog/dialog.cjs.js +4 -5
  124. package/dialog/dialog.cjs.min.js +1 -1
  125. package/dialog/dialog.esm.js +4 -5
  126. package/dialog/dialog.esm.min.js +1 -1
  127. package/dialog/dialog.js +4 -5
  128. package/dialog/dialog.min.js +1 -1
  129. package/dropdown/Dropdown.d.ts +162 -1
  130. package/dropdown/Dropdown.vue +44 -25
  131. package/dropdown/dropdown.cjs.js +97 -93
  132. package/dropdown/dropdown.cjs.min.js +1 -1
  133. package/dropdown/dropdown.esm.js +97 -94
  134. package/dropdown/dropdown.esm.min.js +1 -1
  135. package/dropdown/dropdown.js +98 -95
  136. package/dropdown/dropdown.min.js +1 -1
  137. package/editor/Editor.d.ts +67 -0
  138. package/editor/Editor.vue +35 -33
  139. package/editor/editor.cjs.js +88 -73
  140. package/editor/editor.cjs.min.js +1 -1
  141. package/editor/editor.esm.js +85 -74
  142. package/editor/editor.esm.min.js +1 -1
  143. package/editor/editor.js +89 -75
  144. package/editor/editor.min.js +1 -1
  145. package/fileupload/FileUpload.d.ts +23 -23
  146. package/fileupload/FileUpload.vue +3 -3
  147. package/fileupload/fileupload.cjs.js +4 -4
  148. package/fileupload/fileupload.cjs.min.js +1 -1
  149. package/fileupload/fileupload.esm.js +4 -4
  150. package/fileupload/fileupload.esm.min.js +1 -1
  151. package/fileupload/fileupload.js +4 -4
  152. package/fileupload/fileupload.min.js +1 -1
  153. package/galleria/Galleria.d.ts +196 -0
  154. package/galleria/Galleria.vue +5 -3
  155. package/galleria/GalleriaContent.vue +10 -6
  156. package/galleria/GalleriaItem.vue +12 -9
  157. package/galleria/GalleriaThumbnails.vue +46 -9
  158. package/galleria/galleria.cjs.js +106 -104
  159. package/galleria/galleria.cjs.min.js +1 -1
  160. package/galleria/galleria.esm.js +106 -105
  161. package/galleria/galleria.esm.min.js +1 -1
  162. package/galleria/galleria.js +107 -106
  163. package/galleria/galleria.min.js +1 -1
  164. package/image/Image.d.ts +170 -0
  165. package/image/Image.vue +49 -21
  166. package/image/image.cjs.js +94 -59
  167. package/image/image.cjs.min.js +1 -1
  168. package/image/image.esm.js +94 -60
  169. package/image/image.esm.min.js +1 -1
  170. package/image/image.js +95 -61
  171. package/image/image.min.js +1 -1
  172. package/inputmask/InputMask.d.ts +25 -0
  173. package/inputmask/InputMask.vue +3 -1
  174. package/inputmask/inputmask.cjs.js +9 -3
  175. package/inputmask/inputmask.cjs.min.js +1 -1
  176. package/inputmask/inputmask.esm.js +6 -4
  177. package/inputmask/inputmask.esm.min.js +1 -1
  178. package/inputmask/inputmask.js +10 -5
  179. package/inputmask/inputmask.min.js +1 -1
  180. package/inputnumber/InputNumber.d.ts +69 -0
  181. package/inputnumber/InputNumber.vue +13 -11
  182. package/inputnumber/inputnumber.cjs.js +19 -28
  183. package/inputnumber/inputnumber.cjs.min.js +1 -1
  184. package/inputnumber/inputnumber.esm.js +19 -29
  185. package/inputnumber/inputnumber.esm.min.js +1 -1
  186. package/inputnumber/inputnumber.js +20 -30
  187. package/inputnumber/inputnumber.min.js +1 -1
  188. package/inputswitch/InputSwitch.d.ts +51 -0
  189. package/inputswitch/InputSwitch.vue +7 -4
  190. package/inputswitch/inputswitch.cjs.js +15 -11
  191. package/inputswitch/inputswitch.cjs.min.js +1 -1
  192. package/inputswitch/inputswitch.esm.js +12 -12
  193. package/inputswitch/inputswitch.esm.min.js +1 -1
  194. package/inputswitch/inputswitch.js +16 -13
  195. package/inputswitch/inputswitch.min.js +1 -1
  196. package/inputtext/InputText.d.ts +25 -0
  197. package/inputtext/InputText.vue +4 -1
  198. package/inputtext/inputtext.cjs.js +9 -3
  199. package/inputtext/inputtext.cjs.min.js +1 -1
  200. package/inputtext/inputtext.esm.js +6 -4
  201. package/inputtext/inputtext.esm.min.js +1 -1
  202. package/inputtext/inputtext.js +10 -5
  203. package/inputtext/inputtext.min.js +1 -1
  204. package/knob/Knob.d.ts +78 -0
  205. package/knob/Knob.vue +8 -4
  206. package/knob/knob.cjs.js +17 -13
  207. package/knob/knob.cjs.min.js +1 -1
  208. package/knob/knob.esm.js +14 -14
  209. package/knob/knob.esm.min.js +1 -1
  210. package/knob/knob.js +18 -15
  211. package/knob/knob.min.js +1 -1
  212. package/listbox/Listbox.d.ts +137 -1
  213. package/listbox/Listbox.vue +28 -15
  214. package/listbox/listbox.cjs.js +83 -78
  215. package/listbox/listbox.cjs.min.js +1 -1
  216. package/listbox/listbox.esm.js +83 -79
  217. package/listbox/listbox.esm.min.js +1 -1
  218. package/listbox/listbox.js +84 -80
  219. package/listbox/listbox.min.js +1 -1
  220. package/megamenu/MegaMenu.d.ts +5 -5
  221. package/menu/Menu.d.ts +4 -4
  222. package/menubar/Menubar.d.ts +1 -1
  223. package/multiselect/MultiSelect.d.ts +223 -1
  224. package/multiselect/MultiSelect.vue +72 -41
  225. package/multiselect/multiselect.cjs.js +156 -151
  226. package/multiselect/multiselect.cjs.min.js +1 -1
  227. package/multiselect/multiselect.esm.js +156 -152
  228. package/multiselect/multiselect.esm.min.js +1 -1
  229. package/multiselect/multiselect.js +157 -153
  230. package/multiselect/multiselect.min.js +1 -1
  231. package/orderlist/OrderList.d.ts +94 -0
  232. package/orderlist/OrderList.vue +38 -18
  233. package/orderlist/orderlist.cjs.js +50 -36
  234. package/orderlist/orderlist.cjs.min.js +1 -1
  235. package/orderlist/orderlist.esm.js +50 -37
  236. package/orderlist/orderlist.esm.min.js +1 -1
  237. package/orderlist/orderlist.js +51 -38
  238. package/orderlist/orderlist.min.js +1 -1
  239. package/organizationchart/OrganizationChart.d.ts +129 -0
  240. package/organizationchart/OrganizationChart.vue +14 -2
  241. package/organizationchart/OrganizationChartNode.vue +37 -16
  242. package/organizationchart/organizationchart.cjs.js +77 -61
  243. package/organizationchart/organizationchart.cjs.min.js +1 -1
  244. package/organizationchart/organizationchart.esm.js +77 -62
  245. package/organizationchart/organizationchart.esm.min.js +1 -1
  246. package/organizationchart/organizationchart.js +78 -63
  247. package/organizationchart/organizationchart.min.js +1 -1
  248. package/package.json +1 -1
  249. package/paginator/CurrentPageReport.vue +5 -1
  250. package/paginator/FirstPageLink.vue +13 -2
  251. package/paginator/JumpToPageDropdown.vue +3 -1
  252. package/paginator/JumpToPageInput.vue +3 -1
  253. package/paginator/LastPageLink.vue +13 -2
  254. package/paginator/NextPageLink.vue +13 -2
  255. package/paginator/PageLinks.vue +12 -2
  256. package/paginator/Paginator.d.ts +133 -0
  257. package/paginator/Paginator.vue +23 -12
  258. package/paginator/PrevPageLink.vue +13 -2
  259. package/paginator/RowsPerPageDropdown.vue +3 -1
  260. package/paginator/paginator.cjs.js +135 -76
  261. package/paginator/paginator.cjs.min.js +1 -1
  262. package/paginator/paginator.esm.js +135 -77
  263. package/paginator/paginator.esm.min.js +1 -1
  264. package/paginator/paginator.js +136 -78
  265. package/paginator/paginator.min.js +1 -1
  266. package/panelmenu/PanelMenu.d.ts +4 -8
  267. package/password/Password.d.ts +104 -0
  268. package/password/Password.vue +11 -9
  269. package/password/password.cjs.js +26 -28
  270. package/password/password.cjs.min.js +1 -1
  271. package/password/password.esm.js +26 -29
  272. package/password/password.esm.min.js +1 -1
  273. package/password/password.js +27 -30
  274. package/password/password.min.js +1 -1
  275. package/picklist/PickList.d.ts +160 -0
  276. package/picklist/PickList.vue +46 -34
  277. package/picklist/picklist.cjs.js +111 -85
  278. package/picklist/picklist.cjs.min.js +1 -1
  279. package/picklist/picklist.esm.js +111 -86
  280. package/picklist/picklist.esm.min.js +1 -1
  281. package/picklist/picklist.js +112 -87
  282. package/picklist/picklist.min.js +1 -1
  283. package/radiobutton/RadioButton.d.ts +55 -0
  284. package/radiobutton/RadioButton.vue +7 -5
  285. package/radiobutton/radiobutton.cjs.js +19 -16
  286. package/radiobutton/radiobutton.cjs.min.js +1 -1
  287. package/radiobutton/radiobutton.esm.js +16 -17
  288. package/radiobutton/radiobutton.esm.min.js +1 -1
  289. package/radiobutton/radiobutton.js +20 -18
  290. package/radiobutton/radiobutton.min.js +1 -1
  291. package/rating/Rating.d.ts +96 -0
  292. package/rating/Rating.vue +32 -9
  293. package/rating/rating.cjs.js +41 -34
  294. package/rating/rating.cjs.min.js +1 -1
  295. package/rating/rating.esm.js +41 -35
  296. package/rating/rating.esm.min.js +1 -1
  297. package/rating/rating.js +42 -36
  298. package/rating/rating.min.js +1 -1
  299. package/row/Row.d.ts +29 -0
  300. package/row/Row.vue +3 -0
  301. package/row/row.cjs.js +7 -0
  302. package/row/row.cjs.min.js +1 -1
  303. package/row/row.esm.js +3 -0
  304. package/row/row.esm.min.js +1 -1
  305. package/row/row.js +7 -2
  306. package/row/row.min.js +1 -1
  307. package/selectbutton/SelectButton.d.ts +68 -0
  308. package/selectbutton/SelectButton.vue +13 -2
  309. package/selectbutton/selectbutton.cjs.js +20 -10
  310. package/selectbutton/selectbutton.cjs.min.js +1 -1
  311. package/selectbutton/selectbutton.esm.js +20 -11
  312. package/selectbutton/selectbutton.esm.min.js +1 -1
  313. package/selectbutton/selectbutton.js +21 -12
  314. package/selectbutton/selectbutton.min.js +1 -1
  315. package/slider/Slider.d.ts +48 -0
  316. package/slider/Slider.vue +7 -2
  317. package/slider/slider.cjs.js +22 -16
  318. package/slider/slider.cjs.min.js +1 -1
  319. package/slider/slider.esm.js +19 -17
  320. package/slider/slider.esm.min.js +1 -1
  321. package/slider/slider.js +23 -18
  322. package/slider/slider.min.js +1 -1
  323. package/splitbutton/SplitButton.d.ts +0 -4
  324. package/splitbutton/SplitButton.vue +2 -2
  325. package/splitbutton/splitbutton.cjs.js +7 -6
  326. package/splitbutton/splitbutton.cjs.min.js +1 -1
  327. package/splitbutton/splitbutton.esm.js +7 -6
  328. package/splitbutton/splitbutton.esm.min.js +1 -1
  329. package/splitbutton/splitbutton.js +7 -6
  330. package/splitbutton/splitbutton.min.js +1 -1
  331. package/splitter/Splitter.d.ts +3 -3
  332. package/textarea/Textarea.d.ts +32 -0
  333. package/textarea/Textarea.vue +4 -1
  334. package/textarea/textarea.cjs.js +9 -3
  335. package/textarea/textarea.cjs.min.js +1 -1
  336. package/textarea/textarea.esm.js +6 -4
  337. package/textarea/textarea.esm.min.js +1 -1
  338. package/textarea/textarea.js +10 -5
  339. package/textarea/textarea.min.js +1 -1
  340. package/timeline/Timeline.d.ts +49 -0
  341. package/timeline/Timeline.vue +9 -7
  342. package/timeline/timeline.cjs.js +19 -21
  343. package/timeline/timeline.cjs.min.js +1 -1
  344. package/timeline/timeline.esm.js +16 -22
  345. package/timeline/timeline.esm.min.js +1 -1
  346. package/timeline/timeline.js +20 -23
  347. package/timeline/timeline.min.js +1 -1
  348. package/toast/Toast.d.ts +4 -0
  349. package/toast/Toast.vue +1 -1
  350. package/toast/toast.cjs.js +3 -3
  351. package/toast/toast.cjs.min.js +1 -1
  352. package/toast/toast.esm.js +3 -3
  353. package/toast/toast.esm.min.js +1 -1
  354. package/toast/toast.js +3 -3
  355. package/toast/toast.min.js +1 -1
  356. package/togglebutton/ToggleButton.d.ts +59 -0
  357. package/togglebutton/ToggleButton.vue +7 -5
  358. package/togglebutton/togglebutton.cjs.js +15 -14
  359. package/togglebutton/togglebutton.cjs.min.js +1 -1
  360. package/togglebutton/togglebutton.esm.js +15 -15
  361. package/togglebutton/togglebutton.esm.min.js +1 -1
  362. package/togglebutton/togglebutton.js +16 -16
  363. package/togglebutton/togglebutton.min.js +1 -1
  364. package/tooltip/Tooltip.d.ts +10 -0
  365. package/tooltip/tooltip.cjs.js +51 -9
  366. package/tooltip/tooltip.cjs.min.js +1 -1
  367. package/tooltip/tooltip.esm.js +52 -10
  368. package/tooltip/tooltip.esm.min.js +1 -1
  369. package/tooltip/tooltip.js +51 -9
  370. package/tooltip/tooltip.min.js +1 -1
  371. package/tree/Tree.d.ts +137 -0
  372. package/tree/Tree.vue +12 -9
  373. package/tree/TreeNode.vue +23 -10
  374. package/tree/tree.cjs.js +85 -79
  375. package/tree/tree.cjs.min.js +1 -1
  376. package/tree/tree.esm.js +85 -80
  377. package/tree/tree.esm.min.js +1 -1
  378. package/tree/tree.js +86 -81
  379. package/tree/tree.min.js +1 -1
  380. package/treeselect/TreeSelect.d.ts +103 -1
  381. package/treeselect/TreeSelect.vue +15 -12
  382. package/treeselect/treeselect.cjs.js +37 -39
  383. package/treeselect/treeselect.cjs.min.js +1 -1
  384. package/treeselect/treeselect.esm.js +37 -40
  385. package/treeselect/treeselect.esm.min.js +1 -1
  386. package/treeselect/treeselect.js +38 -41
  387. package/treeselect/treeselect.min.js +1 -1
  388. package/treetable/BodyCell.vue +38 -10
  389. package/treetable/FooterCell.vue +15 -1
  390. package/treetable/HeaderCell.vue +28 -5
  391. package/treetable/TreeTable.d.ts +162 -0
  392. package/treetable/TreeTable.vue +25 -19
  393. package/treetable/TreeTableRow.vue +5 -0
  394. package/treetable/treetable.cjs.js +205 -158
  395. package/treetable/treetable.cjs.min.js +1 -1
  396. package/treetable/treetable.esm.js +205 -159
  397. package/treetable/treetable.esm.min.js +1 -1
  398. package/treetable/treetable.js +206 -160
  399. package/treetable/treetable.min.js +1 -1
  400. package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
  401. package/tristatecheckbox/TriStateCheckbox.vue +19 -8
  402. package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
  403. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  404. package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
  405. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  406. package/tristatecheckbox/tristatecheckbox.js +32 -24
  407. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  408. package/ts-helpers.d.ts +3 -1
  409. package/vetur-attributes.json +180 -0
  410. package/vetur-tags.json +94 -39
  411. package/virtualscroller/VirtualScroller.d.ts +97 -0
  412. package/virtualscroller/VirtualScroller.vue +7 -5
  413. package/virtualscroller/virtualscroller.cjs.js +22 -19
  414. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  415. package/virtualscroller/virtualscroller.esm.js +22 -20
  416. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  417. package/virtualscroller/virtualscroller.js +23 -21
  418. package/virtualscroller/virtualscroller.min.js +1 -1
  419. package/web-types.json +467 -3
  420. package/datatable/TableLoadingBody.vue +0 -25
@@ -8,8 +8,107 @@
8
8
  *
9
9
  */
10
10
  import { HTMLAttributes, InputHTMLAttributes, VNode } from 'vue';
11
+ import { InputTextPassThroughOptionType } from '../inputtext';
11
12
  import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers';
12
13
 
14
+ export declare type PasswordPassThroughOptionType = PasswordPassThroughAttributes | ((options: PasswordPassThroughMethodOptions) => PasswordPassThroughAttributes) | null | undefined;
15
+
16
+ /**
17
+ * Custom passthrough(pt) option method.
18
+ */
19
+ export interface PasswordPassThroughMethodOptions {
20
+ props: PasswordProps;
21
+ state: PasswordState;
22
+ }
23
+
24
+ /**
25
+ * Custom passthrough(pt) options.
26
+ * @see {@link PasswordProps.pt}
27
+ */
28
+ export interface PasswordPassThroughOptions {
29
+ /**
30
+ * Uses to pass attributes to the root's DOM element.
31
+ */
32
+ root?: PasswordPassThroughOptionType;
33
+ /**
34
+ * Uses to pass attributes to the InputText component.
35
+ * @see {@link InputTextPassThroughOptionType}
36
+ */
37
+ input?: PasswordPassThroughOptionType;
38
+ /**
39
+ * Uses to pass attributes to the hide icon's DOM element.
40
+ */
41
+ hideIcon?: PasswordPassThroughOptionType;
42
+ /**
43
+ * Uses to pass attributes to the show icon's DOM element.
44
+ */
45
+ showIcon?: PasswordPassThroughOptionType;
46
+ /**
47
+ * Uses to pass attributes to the panel's DOM element.
48
+ */
49
+ panel?: PasswordPassThroughOptionType;
50
+ /**
51
+ * Uses to pass attributes to the meter's DOM element.
52
+ */
53
+ meter?: PasswordPassThroughOptionType;
54
+ /**
55
+ * Uses to pass attributes to the info's DOM element.
56
+ */
57
+ info?: PasswordPassThroughOptionType;
58
+ /**
59
+ * Uses to pass attributes to the hidden accessible DOM element.
60
+ */
61
+ hiddenAccesible?: PasswordPassThroughOptionType;
62
+ }
63
+
64
+ /**
65
+ * Custom passthrough attributes for each DOM elements
66
+ */
67
+ export interface PasswordPassThroughAttributes {
68
+ [key: string]: any;
69
+ }
70
+
71
+ /**
72
+ * Defines current inline state in Password component.
73
+ */
74
+ export interface PasswordState {
75
+ /**
76
+ * Current overlay visible state as a boolean.
77
+ * @defaultValue false
78
+ */
79
+ overlayVisible: boolean;
80
+ /**
81
+ * Current overlay visible state as a boolean.
82
+ * @see {@link PasswordMeterStateOptions}
83
+ */
84
+ meter: PasswordMeterStateOptions;
85
+ /**
86
+ * Current info test state as a string.
87
+ */
88
+ infoText: string;
89
+ /**
90
+ * Current focused state as a boolean.
91
+ * @defaultValue false
92
+ */
93
+ focused: boolean;
94
+ /**
95
+ * Current unmasked state as a boolean.
96
+ * @defaultValue false
97
+ */
98
+ unmasked: boolean;
99
+ }
100
+
101
+ export interface PasswordMeterStateOptions {
102
+ /**
103
+ * Current strength of the meter state as a string.
104
+ */
105
+ strength: string;
106
+ /**
107
+ * Current width of the meter state as a string.
108
+ */
109
+ width: string;
110
+ }
111
+
13
112
  /**
14
113
  * Defines valid properties in Password component.
15
114
  */
@@ -123,6 +222,11 @@ export interface PasswordProps extends InputHTMLAttributes {
123
222
  * Establishes a string value that labels the component.
124
223
  */
125
224
  'aria-label'?: string | undefined;
225
+ /**
226
+ * Uses to pass attributes to DOM elements inside the component.
227
+ * @type {PasswordPassThroughOptions}
228
+ */
229
+ pt?: PasswordPassThroughOptions;
126
230
  }
127
231
 
128
232
  /**
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="containerClass">
2
+ <div :class="containerClass" v-bind="ptm('root')">
3
3
  <PInputText
4
4
  ref="input"
5
5
  :id="inputId"
@@ -19,26 +19,26 @@
19
19
  @blur="onBlur"
20
20
  @keyup="onKeyUp"
21
21
  @invalid="onInvalid"
22
- v-bind="inputProps"
22
+ v-bind="{ ...inputProps, ...ptm('input') }"
23
23
  />
24
24
  <slot v-if="toggleMask && unmasked" name="hideicon" :onClick="onMaskToggle">
25
- <component :is="hideIcon ? 'i' : 'EyeSlashIcon'" :class="hideIcon" @click="onMaskToggle" />
25
+ <component :is="hideIcon ? 'i' : 'EyeSlashIcon'" :class="hideIcon" @click="onMaskToggle" v-bind="ptm('hideIcon')" />
26
26
  </slot>
27
27
  <slot v-if="toggleMask && !unmasked" name="showicon" :onClick="onMaskToggle">
28
- <component :is="showIcon ? 'i' : 'EyeIcon'" :class="showIcon" @click="onMaskToggle" />
28
+ <component :is="showIcon ? 'i' : 'EyeIcon'" :class="showIcon" @click="onMaskToggle" v-bind="ptm('showIcon')" />
29
29
  </slot>
30
- <span class="p-hidden-accessible" aria-live="polite">
30
+ <span class="p-hidden-accessible" aria-live="polite" v-bind="ptm('hiddenAccesible')">
31
31
  {{ infoText }}
32
32
  </span>
33
33
  <Portal :appendTo="appendTo">
34
34
  <transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
35
- <div v-if="overlayVisible" :ref="overlayRef" :id="panelId || panelUniqueId" :class="panelStyleClass" :style="panelStyle" @click="onOverlayClick" v-bind="panelProps">
35
+ <div v-if="overlayVisible" :ref="overlayRef" :id="panelId || panelUniqueId" :class="panelStyleClass" :style="panelStyle" @click="onOverlayClick" v-bind="{ ...panelProps, ...ptm('panel') }">
36
36
  <slot name="header"></slot>
37
37
  <slot name="content">
38
- <div class="p-password-meter">
39
- <div :class="strengthClass" :style="{ width: meter ? meter.width : '' }"></div>
38
+ <div class="p-password-meter" v-bind="ptm('meter')">
39
+ <div :class="strengthClass" :style="{ width: meter ? meter.width : '' }" v-bind="ptm('meterLabel')"></div>
40
40
  </div>
41
- <div class="p-password-info">{{ infoText }}</div>
41
+ <div class="p-password-info" v-bind="ptm('info')">{{ infoText }}</div>
42
42
  </slot>
43
43
  <slot name="footer"></slot>
44
44
  </div>
@@ -48,6 +48,7 @@
48
48
  </template>
49
49
 
50
50
  <script>
51
+ import BaseComponent from 'primevue/basecomponent';
51
52
  import EyeIcon from 'primevue/icons/eye';
52
53
  import EyeSlashIcon from 'primevue/icons/eyeslash';
53
54
  import InputText from 'primevue/inputtext';
@@ -57,6 +58,7 @@ import { ConnectedOverlayScrollHandler, DomHandler, UniqueComponentId, ZIndexUti
57
58
 
58
59
  export default {
59
60
  name: 'Password',
61
+ extends: BaseComponent,
60
62
  emits: ['update:modelValue', 'change', 'focus', 'blur', 'invalid'],
61
63
  props: {
62
64
  modelValue: String,
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var BaseComponent = require('primevue/basecomponent');
3
4
  var EyeIcon = require('primevue/icons/eye');
4
5
  var EyeSlashIcon = require('primevue/icons/eyeslash');
5
6
  var InputText = require('primevue/inputtext');
@@ -10,6 +11,7 @@ var vue = require('vue');
10
11
 
11
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
13
 
14
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
13
15
  var EyeIcon__default = /*#__PURE__*/_interopDefaultLegacy(EyeIcon);
14
16
  var EyeSlashIcon__default = /*#__PURE__*/_interopDefaultLegacy(EyeSlashIcon);
15
17
  var InputText__default = /*#__PURE__*/_interopDefaultLegacy(InputText);
@@ -18,6 +20,7 @@ var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
18
20
 
19
21
  var script = {
20
22
  name: 'Password',
23
+ extends: BaseComponent__default["default"],
21
24
  emits: ['update:modelValue', 'change', 'focus', 'blur', 'invalid'],
22
25
  props: {
23
26
  modelValue: String,
@@ -384,21 +387,13 @@ var script = {
384
387
  }
385
388
  };
386
389
 
387
- const _hoisted_1 = {
388
- class: "p-hidden-accessible",
389
- "aria-live": "polite"
390
- };
391
- const _hoisted_2 = ["id"];
392
- const _hoisted_3 = { class: "p-password-meter" };
393
- const _hoisted_4 = { class: "p-password-info" };
390
+ const _hoisted_1 = ["id"];
394
391
 
395
392
  function render(_ctx, _cache, $props, $setup, $data, $options) {
396
393
  const _component_PInputText = vue.resolveComponent("PInputText");
397
394
  const _component_Portal = vue.resolveComponent("Portal");
398
395
 
399
- return (vue.openBlock(), vue.createElementBlock("div", {
400
- class: vue.normalizeClass($options.containerClass)
401
- }, [
396
+ return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
402
397
  vue.createVNode(_component_PInputText, vue.mergeProps({
403
398
  ref: "input",
404
399
  id: $props.inputId,
@@ -418,16 +413,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
418
413
  onBlur: $options.onBlur,
419
414
  onKeyup: $options.onKeyUp,
420
415
  onInvalid: $options.onInvalid
421
- }, $props.inputProps), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid"]),
416
+ }, { ...$props.inputProps, ..._ctx.ptm('input') }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid"]),
422
417
  ($props.toggleMask && $data.unmasked)
423
418
  ? vue.renderSlot(_ctx.$slots, "hideicon", {
424
419
  key: 0,
425
420
  onClick: $options.onMaskToggle
426
421
  }, () => [
427
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), {
428
- class: vue.normalizeClass($props.hideIcon),
422
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), vue.mergeProps({
423
+ class: $props.hideIcon,
429
424
  onClick: $options.onMaskToggle
430
- }, null, 8, ["class", "onClick"]))
425
+ }, _ctx.ptm('hideIcon')), null, 16, ["class", "onClick"]))
431
426
  ])
432
427
  : vue.createCommentVNode("", true),
433
428
  ($props.toggleMask && !$data.unmasked)
@@ -435,13 +430,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
435
430
  key: 1,
436
431
  onClick: $options.onMaskToggle
437
432
  }, () => [
438
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), {
439
- class: vue.normalizeClass($props.showIcon),
433
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), vue.mergeProps({
434
+ class: $props.showIcon,
440
435
  onClick: $options.onMaskToggle
441
- }, null, 8, ["class", "onClick"]))
436
+ }, _ctx.ptm('showIcon')), null, 16, ["class", "onClick"]))
442
437
  ])
443
438
  : vue.createCommentVNode("", true),
444
- vue.createElementVNode("span", _hoisted_1, vue.toDisplayString($data.infoText), 1),
439
+ vue.createElementVNode("span", vue.mergeProps({
440
+ class: "p-hidden-accessible",
441
+ "aria-live": "polite"
442
+ }, _ctx.ptm('hiddenAccesible')), vue.toDisplayString($data.infoText), 17),
445
443
  vue.createVNode(_component_Portal, { appendTo: $props.appendTo }, {
446
444
  default: vue.withCtx(() => [
447
445
  vue.createVNode(vue.Transition, {
@@ -459,19 +457,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
459
457
  class: $options.panelStyleClass,
460
458
  style: $props.panelStyle,
461
459
  onClick: _cache[0] || (_cache[0] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
462
- }, $props.panelProps), [
460
+ }, { ...$props.panelProps, ..._ctx.ptm('panel') }), [
463
461
  vue.renderSlot(_ctx.$slots, "header"),
464
462
  vue.renderSlot(_ctx.$slots, "content", {}, () => [
465
- vue.createElementVNode("div", _hoisted_3, [
466
- vue.createElementVNode("div", {
467
- class: vue.normalizeClass($options.strengthClass),
468
- style: vue.normalizeStyle({ width: $data.meter ? $data.meter.width : '' })
469
- }, null, 6)
470
- ]),
471
- vue.createElementVNode("div", _hoisted_4, vue.toDisplayString($data.infoText), 1)
463
+ vue.createElementVNode("div", vue.mergeProps({ class: "p-password-meter" }, _ctx.ptm('meter')), [
464
+ vue.createElementVNode("div", vue.mergeProps({
465
+ class: $options.strengthClass,
466
+ style: { width: $data.meter ? $data.meter.width : '' }
467
+ }, _ctx.ptm('meterLabel')), null, 16)
468
+ ], 16),
469
+ vue.createElementVNode("div", vue.mergeProps({ class: "p-password-info" }, _ctx.ptm('info')), vue.toDisplayString($data.infoText), 17)
472
470
  ]),
473
471
  vue.renderSlot(_ctx.$slots, "footer")
474
- ], 16, _hoisted_2))
472
+ ], 16, _hoisted_1))
475
473
  : vue.createCommentVNode("", true)
476
474
  ]),
477
475
  _: 3
@@ -479,7 +477,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
479
477
  ]),
480
478
  _: 3
481
479
  }, 8, ["appendTo"])
482
- ], 2))
480
+ ], 16))
483
481
  }
484
482
 
485
483
  function styleInject(css, ref) {
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),l=require("primevue/inputtext"),n=require("primevue/overlayeventbus"),i=require("primevue/portal"),s=require("primevue/utils"),r=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),d=a(t),p=a(l),u=a(n),h=a(i),c={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:n}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!s.DomHandler.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){u.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>s.UniqueComponentId()+"_panel"},components:{PInputText:p.default,Portal:h.default,EyeSlashIcon:d.default,EyeIcon:o.default}};const m={class:"p-hidden-accessible","aria-live":"polite"},y=["id"],v={class:"p-password-meter"},g={class:"p-password-info"};!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===l&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),c.render=function(e,t,l,n,i,s){const a=r.resolveComponent("PInputText"),o=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(s.containerClass)},[r.createVNode(a,r.mergeProps({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&i.unmasked?r.renderSlot(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.hideIcon?"i":"EyeSlashIcon"),{class:r.normalizeClass(l.hideIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):r.createCommentVNode("",!0),l.toggleMask&&!i.unmasked?r.renderSlot(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.showIcon?"i":"EyeIcon"),{class:r.normalizeClass(l.showIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):r.createCommentVNode("",!0),r.createElementVNode("span",m,r.toDisplayString(i.infoText),1),r.createVNode(o,{appendTo:l.appendTo},{default:r.withCtx((()=>[r.createVNode(r.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:r.withCtx((()=>[i.overlayVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},l.panelProps),[r.renderSlot(e.$slots,"header"),r.renderSlot(e.$slots,"content",{},(()=>[r.createElementVNode("div",v,[r.createElementVNode("div",{class:r.normalizeClass(s.strengthClass),style:r.normalizeStyle({width:i.meter?i.meter.width:""})},null,6)]),r.createElementVNode("div",g,r.toDisplayString(i.infoText),1)])),r.renderSlot(e.$slots,"footer")],16,y)):r.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},module.exports=c;
1
+ "use strict";var e=require("primevue/basecomponent"),t=require("primevue/icons/eye"),l=require("primevue/icons/eyeslash"),n=require("primevue/inputtext"),i=require("primevue/overlayeventbus"),s=require("primevue/portal"),r=require("primevue/utils"),o=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=a(e),p=a(t),u=a(l),h=a(n),c=a(i),m=a(s),y={name:"Password",extends:d.default,emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){r.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",r.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:n}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!r.DomHandler.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>r.UniqueComponentId()+"_panel"},components:{PInputText:h.default,Portal:m.default,EyeSlashIcon:u.default,EyeIcon:p.default}};const g=["id"];!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===l&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),y.render=function(e,t,l,n,i,s){const r=o.resolveComponent("PInputText"),a=o.resolveComponent("Portal");return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:s.containerClass},e.ptm("root")),[o.createVNode(r,o.mergeProps({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},{...l.inputProps,...e.ptm("input")}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&i.unmasked?o.renderSlot(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.hideIcon?"i":"EyeSlashIcon"),o.mergeProps({class:l.hideIcon,onClick:s.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))])):o.createCommentVNode("",!0),l.toggleMask&&!i.unmasked?o.renderSlot(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.showIcon?"i":"EyeIcon"),o.mergeProps({class:l.showIcon,onClick:s.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))])):o.createCommentVNode("",!0),o.createElementVNode("span",o.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible")),o.toDisplayString(i.infoText),17),o.createVNode(a,{appendTo:l.appendTo},{default:o.withCtx((()=>[o.createVNode(o.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:o.withCtx((()=>[i.overlayVisible?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},{...l.panelProps,...e.ptm("panel")}),[o.renderSlot(e.$slots,"header"),o.renderSlot(e.$slots,"content",{},(()=>[o.createElementVNode("div",o.mergeProps({class:"p-password-meter"},e.ptm("meter")),[o.createElementVNode("div",o.mergeProps({class:s.strengthClass,style:{width:i.meter?i.meter.width:""}},e.ptm("meterLabel")),null,16)],16),o.createElementVNode("div",o.mergeProps({class:"p-password-info"},e.ptm("info")),o.toDisplayString(i.infoText),17)])),o.renderSlot(e.$slots,"footer")],16,g)):o.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],16)},module.exports=y;
@@ -1,13 +1,15 @@
1
+ import BaseComponent from 'primevue/basecomponent';
1
2
  import EyeIcon from 'primevue/icons/eye';
2
3
  import EyeSlashIcon from 'primevue/icons/eyeslash';
3
4
  import InputText from 'primevue/inputtext';
4
5
  import OverlayEventBus from 'primevue/overlayeventbus';
5
6
  import Portal from 'primevue/portal';
6
7
  import { ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler, UniqueComponentId } from 'primevue/utils';
7
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, toDisplayString, withCtx, Transition, normalizeStyle } from 'vue';
8
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, toDisplayString, withCtx, Transition } from 'vue';
8
9
 
9
10
  var script = {
10
11
  name: 'Password',
12
+ extends: BaseComponent,
11
13
  emits: ['update:modelValue', 'change', 'focus', 'blur', 'invalid'],
12
14
  props: {
13
15
  modelValue: String,
@@ -374,21 +376,13 @@ var script = {
374
376
  }
375
377
  };
376
378
 
377
- const _hoisted_1 = {
378
- class: "p-hidden-accessible",
379
- "aria-live": "polite"
380
- };
381
- const _hoisted_2 = ["id"];
382
- const _hoisted_3 = { class: "p-password-meter" };
383
- const _hoisted_4 = { class: "p-password-info" };
379
+ const _hoisted_1 = ["id"];
384
380
 
385
381
  function render(_ctx, _cache, $props, $setup, $data, $options) {
386
382
  const _component_PInputText = resolveComponent("PInputText");
387
383
  const _component_Portal = resolveComponent("Portal");
388
384
 
389
- return (openBlock(), createElementBlock("div", {
390
- class: normalizeClass($options.containerClass)
391
- }, [
385
+ return (openBlock(), createElementBlock("div", mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
392
386
  createVNode(_component_PInputText, mergeProps({
393
387
  ref: "input",
394
388
  id: $props.inputId,
@@ -408,16 +402,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
408
402
  onBlur: $options.onBlur,
409
403
  onKeyup: $options.onKeyUp,
410
404
  onInvalid: $options.onInvalid
411
- }, $props.inputProps), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid"]),
405
+ }, { ...$props.inputProps, ..._ctx.ptm('input') }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid"]),
412
406
  ($props.toggleMask && $data.unmasked)
413
407
  ? renderSlot(_ctx.$slots, "hideicon", {
414
408
  key: 0,
415
409
  onClick: $options.onMaskToggle
416
410
  }, () => [
417
- (openBlock(), createBlock(resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), {
418
- class: normalizeClass($props.hideIcon),
411
+ (openBlock(), createBlock(resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), mergeProps({
412
+ class: $props.hideIcon,
419
413
  onClick: $options.onMaskToggle
420
- }, null, 8, ["class", "onClick"]))
414
+ }, _ctx.ptm('hideIcon')), null, 16, ["class", "onClick"]))
421
415
  ])
422
416
  : createCommentVNode("", true),
423
417
  ($props.toggleMask && !$data.unmasked)
@@ -425,13 +419,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
425
419
  key: 1,
426
420
  onClick: $options.onMaskToggle
427
421
  }, () => [
428
- (openBlock(), createBlock(resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), {
429
- class: normalizeClass($props.showIcon),
422
+ (openBlock(), createBlock(resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), mergeProps({
423
+ class: $props.showIcon,
430
424
  onClick: $options.onMaskToggle
431
- }, null, 8, ["class", "onClick"]))
425
+ }, _ctx.ptm('showIcon')), null, 16, ["class", "onClick"]))
432
426
  ])
433
427
  : createCommentVNode("", true),
434
- createElementVNode("span", _hoisted_1, toDisplayString($data.infoText), 1),
428
+ createElementVNode("span", mergeProps({
429
+ class: "p-hidden-accessible",
430
+ "aria-live": "polite"
431
+ }, _ctx.ptm('hiddenAccesible')), toDisplayString($data.infoText), 17),
435
432
  createVNode(_component_Portal, { appendTo: $props.appendTo }, {
436
433
  default: withCtx(() => [
437
434
  createVNode(Transition, {
@@ -449,19 +446,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
449
446
  class: $options.panelStyleClass,
450
447
  style: $props.panelStyle,
451
448
  onClick: _cache[0] || (_cache[0] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
452
- }, $props.panelProps), [
449
+ }, { ...$props.panelProps, ..._ctx.ptm('panel') }), [
453
450
  renderSlot(_ctx.$slots, "header"),
454
451
  renderSlot(_ctx.$slots, "content", {}, () => [
455
- createElementVNode("div", _hoisted_3, [
456
- createElementVNode("div", {
457
- class: normalizeClass($options.strengthClass),
458
- style: normalizeStyle({ width: $data.meter ? $data.meter.width : '' })
459
- }, null, 6)
460
- ]),
461
- createElementVNode("div", _hoisted_4, toDisplayString($data.infoText), 1)
452
+ createElementVNode("div", mergeProps({ class: "p-password-meter" }, _ctx.ptm('meter')), [
453
+ createElementVNode("div", mergeProps({
454
+ class: $options.strengthClass,
455
+ style: { width: $data.meter ? $data.meter.width : '' }
456
+ }, _ctx.ptm('meterLabel')), null, 16)
457
+ ], 16),
458
+ createElementVNode("div", mergeProps({ class: "p-password-info" }, _ctx.ptm('info')), toDisplayString($data.infoText), 17)
462
459
  ]),
463
460
  renderSlot(_ctx.$slots, "footer")
464
- ], 16, _hoisted_2))
461
+ ], 16, _hoisted_1))
465
462
  : createCommentVNode("", true)
466
463
  ]),
467
464
  _: 3
@@ -469,7 +466,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
469
466
  ]),
470
467
  _: 3
471
468
  }, 8, ["appendTo"])
472
- ], 2))
469
+ ], 16))
473
470
  }
474
471
 
475
472
  function styleInject(css, ref) {
@@ -1 +1 @@
1
- import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import l from"primevue/inputtext";import i from"primevue/overlayeventbus";import n from"primevue/portal";import{ZIndexUtils as s,DomHandler as r,ConnectedOverlayScrollHandler as a,UniqueComponentId as o}from"primevue/utils";import{resolveComponent as p,openBlock as d,createElementBlock as u,normalizeClass as h,createVNode as c,mergeProps as m,renderSlot as y,createBlock as v,resolveDynamicComponent as f,createCommentVNode as g,createElementVNode as b,toDisplayString as w,withCtx as k,Transition as x,normalizeStyle as S}from"vue";var L={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.clear(e)},alignOverlay(){"self"===this.appendTo?r.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=r.getOuterWidth(this.$refs.input.$el)+"px",r.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:i}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=i,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!r.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>o()+"_panel"},components:{PInputText:l,Portal:n,EyeSlashIcon:t,EyeIcon:e}};const T={class:"p-hidden-accessible","aria-live":"polite"},C=["id"],I={class:"p-password-meter"},$={class:"p-password-info"};!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),L.render=function(e,t,l,i,n,s){const r=p("PInputText"),a=p("Portal");return d(),u("div",{class:h(s.containerClass)},[c(r,m({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":n.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&n.unmasked?y(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(d(),v(f(l.hideIcon?"i":"EyeSlashIcon"),{class:h(l.hideIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):g("",!0),l.toggleMask&&!n.unmasked?y(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(d(),v(f(l.showIcon?"i":"EyeIcon"),{class:h(l.showIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):g("",!0),b("span",T,w(n.infoText),1),c(a,{appendTo:l.appendTo},{default:k((()=>[c(x,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:k((()=>[n.overlayVisible?(d(),u("div",m({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},l.panelProps),[y(e.$slots,"header"),y(e.$slots,"content",{},(()=>[b("div",I,[b("div",{class:h(s.strengthClass),style:S({width:n.meter?n.meter.width:""})},null,6)]),b("div",$,w(n.infoText),1)])),y(e.$slots,"footer")],16,C)):g("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)};export{L as default};
1
+ import e from"primevue/basecomponent";import t from"primevue/icons/eye";import l from"primevue/icons/eyeslash";import i from"primevue/inputtext";import n from"primevue/overlayeventbus";import s from"primevue/portal";import{ZIndexUtils as r,DomHandler as a,ConnectedOverlayScrollHandler as o,UniqueComponentId as p}from"primevue/utils";import{resolveComponent as d,openBlock as u,createElementBlock as h,mergeProps as c,createVNode as m,renderSlot as y,createBlock as f,resolveDynamicComponent as v,createCommentVNode as g,createElementVNode as b,toDisplayString as w,withCtx as k,Transition as x}from"vue";var S={name:"Password",extends:e,emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){r.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){r.clear(e)},alignOverlay(){"self"===this.appendTo?a.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=a.getOuterWidth(this.$refs.input.$el)+"px",a.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:i}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=i,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!a.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){n.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>p()+"_panel"},components:{PInputText:i,Portal:s,EyeSlashIcon:l,EyeIcon:t}};const L=["id"];!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),S.render=function(e,t,l,i,n,s){const r=d("PInputText"),a=d("Portal");return u(),h("div",c({class:s.containerClass},e.ptm("root")),[m(r,c({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":n.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},{...l.inputProps,...e.ptm("input")}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&n.unmasked?y(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(u(),f(v(l.hideIcon?"i":"EyeSlashIcon"),c({class:l.hideIcon,onClick:s.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))])):g("",!0),l.toggleMask&&!n.unmasked?y(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(u(),f(v(l.showIcon?"i":"EyeIcon"),c({class:l.showIcon,onClick:s.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))])):g("",!0),b("span",c({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible")),w(n.infoText),17),m(a,{appendTo:l.appendTo},{default:k((()=>[m(x,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:k((()=>[n.overlayVisible?(u(),h("div",c({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},{...l.panelProps,...e.ptm("panel")}),[y(e.$slots,"header"),y(e.$slots,"content",{},(()=>[b("div",c({class:"p-password-meter"},e.ptm("meter")),[b("div",c({class:s.strengthClass,style:{width:n.meter?n.meter.width:""}},e.ptm("meterLabel")),null,16)],16),b("div",c({class:"p-password-info"},e.ptm("info")),w(n.infoText),17)])),y(e.$slots,"footer")],16,L)):g("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],16)};export{S as default};