primevue 3.41.0 → 3.42.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 (404) hide show
  1. package/autocomplete/AutoComplete.d.ts +2 -2
  2. package/autocomplete/BaseAutoComplete.vue +2 -2
  3. package/autocomplete/autocomplete.cjs.js +2 -2
  4. package/autocomplete/autocomplete.cjs.min.js +1 -1
  5. package/autocomplete/autocomplete.esm.js +2 -2
  6. package/autocomplete/autocomplete.esm.min.js +1 -1
  7. package/autocomplete/autocomplete.js +2 -2
  8. package/autocomplete/autocomplete.min.js +1 -1
  9. package/avatar/Avatar.d.ts +2 -2
  10. package/avatar/BaseAvatar.vue +2 -2
  11. package/avatar/avatar.cjs.js +2 -2
  12. package/avatar/avatar.cjs.min.js +1 -1
  13. package/avatar/avatar.esm.js +2 -2
  14. package/avatar/avatar.esm.min.js +1 -1
  15. package/avatar/avatar.js +2 -2
  16. package/avatar/avatar.min.js +1 -1
  17. package/breadcrumb/Breadcrumb.d.ts +2 -2
  18. package/button/BaseButton.vue +4 -0
  19. package/button/Button.d.ts +4 -0
  20. package/button/Button.vue +1 -1
  21. package/button/button.cjs.js +6 -1
  22. package/button/button.cjs.min.js +1 -1
  23. package/button/button.esm.js +6 -1
  24. package/button/button.esm.min.js +1 -1
  25. package/button/button.js +6 -1
  26. package/button/button.min.js +1 -1
  27. package/calendar/BaseCalendar.vue +6 -2
  28. package/calendar/Calendar.d.ts +39 -2
  29. package/calendar/Calendar.vue +40 -11
  30. package/calendar/calendar.cjs.js +70 -30
  31. package/calendar/calendar.cjs.min.js +1 -1
  32. package/calendar/calendar.esm.js +70 -30
  33. package/calendar/calendar.esm.min.js +1 -1
  34. package/calendar/calendar.js +70 -30
  35. package/calendar/calendar.min.js +1 -1
  36. package/calendar/style/calendarstyle.cjs.js +4 -2
  37. package/calendar/style/calendarstyle.cjs.min.js +1 -1
  38. package/calendar/style/calendarstyle.esm.js +4 -2
  39. package/calendar/style/calendarstyle.esm.min.js +1 -1
  40. package/calendar/style/calendarstyle.js +4 -2
  41. package/calendar/style/calendarstyle.min.js +1 -1
  42. package/cascadeselect/BaseCascadeSelect.vue +2 -2
  43. package/cascadeselect/CascadeSelect.d.ts +2 -2
  44. package/cascadeselect/cascadeselect.cjs.js +2 -2
  45. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  46. package/cascadeselect/cascadeselect.esm.js +2 -2
  47. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  48. package/cascadeselect/cascadeselect.js +2 -2
  49. package/cascadeselect/cascadeselect.min.js +1 -1
  50. package/checkbox/BaseCheckbox.vue +2 -2
  51. package/checkbox/Checkbox.d.ts +2 -2
  52. package/checkbox/checkbox.cjs.js +2 -2
  53. package/checkbox/checkbox.cjs.min.js +1 -1
  54. package/checkbox/checkbox.esm.js +2 -2
  55. package/checkbox/checkbox.esm.min.js +1 -1
  56. package/checkbox/checkbox.js +2 -2
  57. package/checkbox/checkbox.min.js +1 -1
  58. package/chips/BaseChips.vue +2 -2
  59. package/chips/Chips.d.ts +2 -2
  60. package/chips/chips.cjs.js +2 -2
  61. package/chips/chips.cjs.min.js +1 -1
  62. package/chips/chips.esm.js +2 -2
  63. package/chips/chips.esm.min.js +1 -1
  64. package/chips/chips.js +2 -2
  65. package/chips/chips.min.js +1 -1
  66. package/column/Column.d.ts +4 -0
  67. package/confirmpopup/ConfirmPopup.vue +0 -1
  68. package/contextmenu/BaseContextMenu.vue +2 -2
  69. package/contextmenu/ContextMenu.d.ts +2 -2
  70. package/contextmenu/contextmenu.cjs.js +2 -2
  71. package/contextmenu/contextmenu.cjs.min.js +1 -1
  72. package/contextmenu/contextmenu.esm.js +2 -2
  73. package/contextmenu/contextmenu.esm.min.js +1 -1
  74. package/contextmenu/contextmenu.js +2 -2
  75. package/contextmenu/contextmenu.min.js +1 -1
  76. package/core/core.js +59 -26
  77. package/core/core.min.js +10 -10
  78. package/datatable/DataTable.d.ts +1 -1
  79. package/datatable/DataTable.vue +4 -7
  80. package/datatable/HeaderCell.vue +1 -1
  81. package/datatable/datatable.cjs.js +6 -9
  82. package/datatable/datatable.cjs.min.js +1 -1
  83. package/datatable/datatable.esm.js +6 -9
  84. package/datatable/datatable.esm.min.js +1 -1
  85. package/datatable/datatable.js +6 -9
  86. package/datatable/datatable.min.js +1 -1
  87. package/dock/BaseDock.vue +2 -2
  88. package/dock/Dock.d.ts +2 -2
  89. package/dock/Dock.vue +27 -5
  90. package/dock/DockSub.vue +2 -2
  91. package/dock/dock.cjs.js +33 -12
  92. package/dock/dock.cjs.min.js +1 -1
  93. package/dock/dock.esm.js +33 -12
  94. package/dock/dock.esm.min.js +1 -1
  95. package/dock/dock.js +33 -12
  96. package/dock/dock.min.js +1 -1
  97. package/dropdown/BaseDropdown.vue +2 -2
  98. package/dropdown/Dropdown.d.ts +2 -2
  99. package/dropdown/dropdown.cjs.js +2 -2
  100. package/dropdown/dropdown.cjs.min.js +1 -1
  101. package/dropdown/dropdown.esm.js +2 -2
  102. package/dropdown/dropdown.esm.min.js +1 -1
  103. package/dropdown/dropdown.js +2 -2
  104. package/dropdown/dropdown.min.js +1 -1
  105. package/editor/Editor.vue +6 -0
  106. package/editor/editor.cjs.js +6 -0
  107. package/editor/editor.cjs.min.js +1 -1
  108. package/editor/editor.esm.js +6 -0
  109. package/editor/editor.esm.min.js +1 -1
  110. package/editor/editor.js +6 -0
  111. package/editor/editor.min.js +1 -1
  112. package/inlinemessage/InlineMessage.vue +2 -2
  113. package/inlinemessage/inlinemessage.cjs.js +7 -5
  114. package/inlinemessage/inlinemessage.cjs.min.js +1 -1
  115. package/inlinemessage/inlinemessage.esm.js +5 -3
  116. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  117. package/inlinemessage/inlinemessage.js +7 -5
  118. package/inlinemessage/inlinemessage.min.js +1 -1
  119. package/inputnumber/BaseInputNumber.vue +2 -2
  120. package/inputnumber/InputNumber.d.ts +2 -2
  121. package/inputnumber/inputnumber.cjs.js +2 -2
  122. package/inputnumber/inputnumber.cjs.min.js +1 -1
  123. package/inputnumber/inputnumber.esm.js +2 -2
  124. package/inputnumber/inputnumber.esm.min.js +1 -1
  125. package/inputnumber/inputnumber.js +2 -2
  126. package/inputnumber/inputnumber.min.js +1 -1
  127. package/inputswitch/BaseInputSwitch.vue +2 -2
  128. package/inputswitch/InputSwitch.d.ts +2 -2
  129. package/inputswitch/inputswitch.cjs.js +2 -2
  130. package/inputswitch/inputswitch.cjs.min.js +1 -1
  131. package/inputswitch/inputswitch.esm.js +2 -2
  132. package/inputswitch/inputswitch.esm.min.js +1 -1
  133. package/inputswitch/inputswitch.js +2 -2
  134. package/inputswitch/inputswitch.min.js +1 -1
  135. package/knob/BaseKnob.vue +2 -2
  136. package/knob/Knob.d.ts +2 -2
  137. package/knob/knob.cjs.js +2 -2
  138. package/knob/knob.cjs.min.js +1 -1
  139. package/knob/knob.esm.js +2 -2
  140. package/knob/knob.esm.min.js +1 -1
  141. package/knob/knob.js +2 -2
  142. package/knob/knob.min.js +1 -1
  143. package/listbox/BaseListbox.vue +14 -5
  144. package/listbox/Listbox.d.ts +3 -3
  145. package/listbox/Listbox.vue +4 -3
  146. package/listbox/listbox.cjs.js +18 -8
  147. package/listbox/listbox.cjs.min.js +1 -1
  148. package/listbox/listbox.esm.js +18 -8
  149. package/listbox/listbox.esm.min.js +1 -1
  150. package/listbox/listbox.js +18 -8
  151. package/listbox/listbox.min.js +1 -1
  152. package/megamenu/BaseMegaMenu.vue +2 -2
  153. package/megamenu/MegaMenu.d.ts +25 -2
  154. package/megamenu/MegaMenu.vue +45 -26
  155. package/megamenu/megamenu.cjs.js +65 -41
  156. package/megamenu/megamenu.cjs.min.js +1 -1
  157. package/megamenu/megamenu.esm.js +65 -41
  158. package/megamenu/megamenu.esm.min.js +1 -1
  159. package/megamenu/megamenu.js +65 -41
  160. package/megamenu/megamenu.min.js +1 -1
  161. package/megamenu/style/megamenustyle.cjs.js +1 -1
  162. package/megamenu/style/megamenustyle.cjs.min.js +1 -1
  163. package/megamenu/style/megamenustyle.esm.js +1 -1
  164. package/megamenu/style/megamenustyle.esm.min.js +1 -1
  165. package/megamenu/style/megamenustyle.js +1 -1
  166. package/megamenu/style/megamenustyle.min.js +1 -1
  167. package/menu/BaseMenu.vue +2 -2
  168. package/menu/Menu.d.ts +2 -2
  169. package/menu/Menu.vue +5 -1
  170. package/menu/menu.cjs.js +6 -3
  171. package/menu/menu.cjs.min.js +1 -1
  172. package/menu/menu.esm.js +6 -3
  173. package/menu/menu.esm.min.js +1 -1
  174. package/menu/menu.js +6 -3
  175. package/menu/menu.min.js +1 -1
  176. package/menubar/BaseMenubar.vue +2 -2
  177. package/menubar/Menubar.d.ts +29 -5
  178. package/menubar/Menubar.vue +48 -29
  179. package/menubar/menubar.cjs.js +70 -46
  180. package/menubar/menubar.cjs.min.js +1 -1
  181. package/menubar/menubar.esm.js +70 -46
  182. package/menubar/menubar.esm.min.js +1 -1
  183. package/menubar/menubar.js +70 -46
  184. package/menubar/menubar.min.js +1 -1
  185. package/multiselect/BaseMultiSelect.vue +2 -2
  186. package/multiselect/MultiSelect.d.ts +2 -2
  187. package/multiselect/multiselect.cjs.js +2 -2
  188. package/multiselect/multiselect.cjs.min.js +1 -1
  189. package/multiselect/multiselect.esm.js +2 -2
  190. package/multiselect/multiselect.esm.min.js +1 -1
  191. package/multiselect/multiselect.js +2 -2
  192. package/multiselect/multiselect.min.js +1 -1
  193. package/orderlist/BaseOrderList.vue +2 -2
  194. package/orderlist/OrderList.d.ts +2 -2
  195. package/orderlist/orderlist.cjs.js +2 -2
  196. package/orderlist/orderlist.cjs.min.js +1 -1
  197. package/orderlist/orderlist.esm.js +2 -2
  198. package/orderlist/orderlist.esm.min.js +1 -1
  199. package/orderlist/orderlist.js +2 -2
  200. package/orderlist/orderlist.min.js +1 -1
  201. package/package.json +1 -1
  202. package/panelmenu/style/panelmenustyle.cjs.js +1 -1
  203. package/panelmenu/style/panelmenustyle.cjs.min.js +1 -1
  204. package/panelmenu/style/panelmenustyle.esm.js +1 -1
  205. package/panelmenu/style/panelmenustyle.esm.min.js +1 -1
  206. package/panelmenu/style/panelmenustyle.js +1 -1
  207. package/panelmenu/style/panelmenustyle.min.js +1 -1
  208. package/password/BasePassword.vue +2 -2
  209. package/password/Password.d.ts +2 -2
  210. package/password/password.cjs.js +2 -2
  211. package/password/password.cjs.min.js +1 -1
  212. package/password/password.esm.js +2 -2
  213. package/password/password.esm.min.js +1 -1
  214. package/password/password.js +2 -2
  215. package/password/password.min.js +1 -1
  216. package/picklist/PickList.vue +1 -4
  217. package/picklist/picklist.cjs.js +1 -4
  218. package/picklist/picklist.cjs.min.js +1 -1
  219. package/picklist/picklist.esm.js +1 -4
  220. package/picklist/picklist.esm.min.js +1 -1
  221. package/picklist/picklist.js +1 -4
  222. package/picklist/picklist.min.js +1 -1
  223. package/radiobutton/BaseRadioButton.vue +2 -2
  224. package/radiobutton/RadioButton.d.ts +2 -2
  225. package/radiobutton/radiobutton.cjs.js +2 -2
  226. package/radiobutton/radiobutton.cjs.min.js +1 -1
  227. package/radiobutton/radiobutton.esm.js +2 -2
  228. package/radiobutton/radiobutton.esm.min.js +1 -1
  229. package/radiobutton/radiobutton.js +2 -2
  230. package/radiobutton/radiobutton.min.js +1 -1
  231. package/resources/themes/arya-blue/theme.css +6 -6
  232. package/resources/themes/arya-green/theme.css +6 -6
  233. package/resources/themes/arya-orange/theme.css +6 -6
  234. package/resources/themes/arya-purple/theme.css +6 -6
  235. package/resources/themes/bootstrap4-dark-blue/theme.css +6 -6
  236. package/resources/themes/bootstrap4-dark-purple/theme.css +6 -6
  237. package/resources/themes/bootstrap4-light-blue/theme.css +6 -6
  238. package/resources/themes/bootstrap4-light-purple/theme.css +6 -6
  239. package/resources/themes/fluent-light/theme.css +6 -6
  240. package/resources/themes/lara-dark-amber/theme.css +6 -6
  241. package/resources/themes/lara-dark-blue/theme.css +6 -6
  242. package/resources/themes/lara-dark-cyan/theme.css +6 -6
  243. package/resources/themes/lara-dark-green/theme.css +6 -6
  244. package/resources/themes/lara-dark-indigo/theme.css +6 -6
  245. package/resources/themes/lara-dark-pink/theme.css +6 -6
  246. package/resources/themes/lara-dark-purple/theme.css +6 -6
  247. package/resources/themes/lara-dark-teal/theme.css +6 -6
  248. package/resources/themes/lara-light-amber/theme.css +6 -6
  249. package/resources/themes/lara-light-blue/theme.css +6 -6
  250. package/resources/themes/lara-light-cyan/theme.css +6 -6
  251. package/resources/themes/lara-light-green/theme.css +6 -6
  252. package/resources/themes/lara-light-indigo/theme.css +6 -6
  253. package/resources/themes/lara-light-pink/theme.css +6 -6
  254. package/resources/themes/lara-light-purple/theme.css +6 -6
  255. package/resources/themes/lara-light-teal/theme.css +6 -6
  256. package/resources/themes/luna-amber/theme.css +6 -6
  257. package/resources/themes/luna-blue/theme.css +6 -6
  258. package/resources/themes/luna-green/theme.css +6 -6
  259. package/resources/themes/luna-pink/theme.css +6 -6
  260. package/resources/themes/md-dark-deeppurple/theme.css +6 -6
  261. package/resources/themes/md-dark-indigo/theme.css +6 -6
  262. package/resources/themes/md-light-deeppurple/theme.css +6 -6
  263. package/resources/themes/md-light-indigo/theme.css +6 -6
  264. package/resources/themes/mdc-dark-deeppurple/theme.css +6 -6
  265. package/resources/themes/mdc-dark-indigo/theme.css +6 -6
  266. package/resources/themes/mdc-light-deeppurple/theme.css +6 -6
  267. package/resources/themes/mdc-light-indigo/theme.css +6 -6
  268. package/resources/themes/mira/theme.css +6 -6
  269. package/resources/themes/nano/theme.css +6 -6
  270. package/resources/themes/nova/theme.css +6 -6
  271. package/resources/themes/nova-accent/theme.css +6 -6
  272. package/resources/themes/nova-alt/theme.css +6 -6
  273. package/resources/themes/nova-vue/theme.css +6 -6
  274. package/resources/themes/rhea/theme.css +6 -6
  275. package/resources/themes/saga-blue/theme.css +6 -6
  276. package/resources/themes/saga-green/theme.css +6 -6
  277. package/resources/themes/saga-orange/theme.css +6 -6
  278. package/resources/themes/saga-purple/theme.css +6 -6
  279. package/resources/themes/soho-dark/theme.css +6 -6
  280. package/resources/themes/soho-light/theme.css +6 -6
  281. package/resources/themes/tailwind-light/theme.css +6 -6
  282. package/resources/themes/vela-blue/theme.css +6 -6
  283. package/resources/themes/vela-green/theme.css +6 -6
  284. package/resources/themes/vela-orange/theme.css +6 -6
  285. package/resources/themes/vela-purple/theme.css +6 -6
  286. package/resources/themes/viva-dark/theme.css +6 -6
  287. package/resources/themes/viva-light/theme.css +6 -6
  288. package/selectbutton/BaseSelectButton.vue +1 -1
  289. package/selectbutton/SelectButton.d.ts +1 -1
  290. package/selectbutton/selectbutton.cjs.js +1 -1
  291. package/selectbutton/selectbutton.cjs.min.js +1 -1
  292. package/selectbutton/selectbutton.esm.js +1 -1
  293. package/selectbutton/selectbutton.esm.min.js +1 -1
  294. package/selectbutton/selectbutton.js +1 -1
  295. package/selectbutton/selectbutton.min.js +1 -1
  296. package/slider/BaseSlider.vue +2 -2
  297. package/slider/Slider.d.ts +2 -2
  298. package/slider/slider.cjs.js +2 -2
  299. package/slider/slider.cjs.min.js +1 -1
  300. package/slider/slider.esm.js +2 -2
  301. package/slider/slider.esm.min.js +1 -1
  302. package/slider/slider.js +2 -2
  303. package/slider/slider.min.js +1 -1
  304. package/speeddial/BaseSpeedDial.vue +2 -2
  305. package/speeddial/SpeedDial.d.ts +2 -2
  306. package/speeddial/speeddial.cjs.js +2 -2
  307. package/speeddial/speeddial.cjs.min.js +1 -1
  308. package/speeddial/speeddial.esm.js +2 -2
  309. package/speeddial/speeddial.esm.min.js +1 -1
  310. package/speeddial/speeddial.js +2 -2
  311. package/speeddial/speeddial.min.js +1 -1
  312. package/splitter/Splitter.vue +1 -2
  313. package/splitter/splitter.cjs.js +1 -1
  314. package/splitter/splitter.cjs.min.js +1 -1
  315. package/splitter/splitter.esm.js +1 -1
  316. package/splitter/splitter.esm.min.js +1 -1
  317. package/splitter/splitter.js +1 -1
  318. package/splitter/splitter.min.js +1 -1
  319. package/styleclass/StyleClass.d.ts +10 -0
  320. package/styleclass/styleclass.cjs.js +18 -0
  321. package/styleclass/styleclass.cjs.min.js +1 -1
  322. package/styleclass/styleclass.esm.js +18 -0
  323. package/styleclass/styleclass.esm.min.js +1 -1
  324. package/styleclass/styleclass.js +18 -0
  325. package/styleclass/styleclass.min.js +1 -1
  326. package/tabmenu/BaseTabMenu.vue +2 -2
  327. package/tabmenu/TabMenu.d.ts +2 -2
  328. package/tabmenu/tabmenu.cjs.js +2 -2
  329. package/tabmenu/tabmenu.cjs.min.js +1 -1
  330. package/tabmenu/tabmenu.esm.js +2 -2
  331. package/tabmenu/tabmenu.esm.min.js +1 -1
  332. package/tabmenu/tabmenu.js +2 -2
  333. package/tabmenu/tabmenu.min.js +1 -1
  334. package/tieredmenu/BaseTieredMenu.vue +2 -2
  335. package/tieredmenu/TieredMenu.d.ts +2 -2
  336. package/tieredmenu/TieredMenu.vue +5 -1
  337. package/tieredmenu/tieredmenu.cjs.js +6 -3
  338. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  339. package/tieredmenu/tieredmenu.esm.js +6 -3
  340. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  341. package/tieredmenu/tieredmenu.js +6 -3
  342. package/tieredmenu/tieredmenu.min.js +1 -1
  343. package/togglebutton/BaseToggleButton.vue +2 -2
  344. package/togglebutton/ToggleButton.d.ts +2 -2
  345. package/togglebutton/togglebutton.cjs.js +2 -2
  346. package/togglebutton/togglebutton.cjs.min.js +1 -1
  347. package/togglebutton/togglebutton.esm.js +2 -2
  348. package/togglebutton/togglebutton.esm.min.js +1 -1
  349. package/togglebutton/togglebutton.js +2 -2
  350. package/togglebutton/togglebutton.min.js +1 -1
  351. package/toolbar/BaseToolbar.vue +1 -1
  352. package/toolbar/Toolbar.d.ts +1 -1
  353. package/toolbar/toolbar.cjs.js +1 -1
  354. package/toolbar/toolbar.cjs.min.js +1 -1
  355. package/toolbar/toolbar.esm.js +1 -1
  356. package/toolbar/toolbar.esm.min.js +1 -1
  357. package/toolbar/toolbar.js +1 -1
  358. package/toolbar/toolbar.min.js +1 -1
  359. package/tree/BaseTree.vue +6 -2
  360. package/tree/Tree.d.ts +8 -62
  361. package/tree/Tree.vue +2 -1
  362. package/tree/TreeNode.vue +17 -8
  363. package/tree/style/treestyle.cjs.js +1 -0
  364. package/tree/style/treestyle.cjs.min.js +1 -1
  365. package/tree/style/treestyle.esm.js +1 -0
  366. package/tree/style/treestyle.esm.min.js +1 -1
  367. package/tree/style/treestyle.js +1 -0
  368. package/tree/style/treestyle.min.js +1 -1
  369. package/tree/tree.cjs.js +30 -11
  370. package/tree/tree.cjs.min.js +1 -1
  371. package/tree/tree.esm.js +31 -12
  372. package/tree/tree.esm.min.js +1 -1
  373. package/tree/tree.js +30 -11
  374. package/tree/tree.min.js +1 -1
  375. package/treenode/TreeNode.d.ts +71 -0
  376. package/treenode/package.json +3 -0
  377. package/treeselect/BaseTreeSelect.vue +2 -2
  378. package/treeselect/TreeSelect.d.ts +4 -3
  379. package/treeselect/treeselect.cjs.js +2 -2
  380. package/treeselect/treeselect.cjs.min.js +1 -1
  381. package/treeselect/treeselect.esm.js +2 -2
  382. package/treeselect/treeselect.esm.min.js +1 -1
  383. package/treeselect/treeselect.js +2 -2
  384. package/treeselect/treeselect.min.js +1 -1
  385. package/treetable/BaseTreeTable.vue +4 -0
  386. package/treetable/BodyCell.vue +16 -4
  387. package/treetable/TreeTable.d.ts +6 -1
  388. package/treetable/TreeTable.vue +2 -1
  389. package/treetable/TreeTableRow.vue +5 -0
  390. package/treetable/treetable.cjs.js +33 -6
  391. package/treetable/treetable.cjs.min.js +1 -1
  392. package/treetable/treetable.esm.js +34 -7
  393. package/treetable/treetable.esm.min.js +1 -1
  394. package/treetable/treetable.js +33 -6
  395. package/treetable/treetable.min.js +1 -1
  396. package/tristatecheckbox/BaseTriStateCheckbox.vue +2 -2
  397. package/tristatecheckbox/TriStateCheckbox.d.ts +2 -2
  398. package/tristatecheckbox/tristatecheckbox.cjs.js +2 -2
  399. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  400. package/tristatecheckbox/tristatecheckbox.esm.js +2 -2
  401. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  402. package/tristatecheckbox/tristatecheckbox.js +2 -2
  403. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  404. package/web-types.json +1 -1
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o,s,r,l,a,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(e),d=p(t),h=p(i),f=p(n),O=p(o),v=p(r),y={name:"BaseCascadeSelect",extends:v.default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:String,disabled:Boolean,dataKey:null,inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},optionGroupIcon:{type:String,default:void 0},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:p(l).default,provide:function(){return{$parentInstance:this}}},b={name:"CascadeSelectSub",hostName:"CascadeSelect",extends:v.default,emits:["option-change"],container:null,props:{selectId:String,focusedOptionId:String,options:Array,optionLabel:String,optionValue:String,optionDisabled:null,optionGroupIcon:String,optionGroupLabel:String,optionGroupChildren:Array,activeOptionPath:Array,level:Number,templates:null,isParentMount:Boolean},data:function(){return{mounted:!1}},watch:{isParentMount:{handler:function(e){e&&s.DomHandler.nestedPosition(this.container,this.level)}}},mounted:function(){(this.isParentMount||0===this.level)&&s.DomHandler.nestedPosition(this.container,this.level),this.mounted=!0},methods:{getOptionId:function(e){return"".concat(this.selectId,"_").concat(e.key)},getOptionLabel:function(e){return this.optionLabel?s.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:function(e){return e.children},isOptionGroup:function(e){return s.ObjectUtils.isNotEmpty(e.children)},isOptionSelected:function(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},isOptionFocused:function(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender:function(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick:function(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange:function(e){this.$emit("option-change",e)},containerRef:function(e){this.container=e}},directives:{ripple:p(a).default},components:{AngleRightIcon:u.default}},m=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-item-group","data-p-highlight","data-p-focus","data-p-disabled"],g=["onClick"];b.render=function(e,t,i,n,o,s){var r=c.resolveComponent("AngleRightIcon"),l=c.resolveComponent("CascadeSelectSub",!0),a=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("ul",c.mergeProps({ref:s.containerRef,class:e.cx("list")},e.ptm(0===i.level?"list":"sublist")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.options,(function(t,n){return c.openBlock(),c.createElementBlock("li",c.mergeProps({key:s.getOptionLabelToRender(t),id:s.getOptionId(t),class:e.cx("item",{processedOption:t}),role:"treeitem","aria-label":s.getOptionLabelToRender(t),"aria-selected":s.isOptionGroup(t)?void 0:s.isOptionSelected(t),"aria-expanded":s.isOptionGroup(t)?s.isOptionActive(t):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":n+1},e.ptm("item"),{"data-p-item-group":s.isOptionGroup(t),"data-p-highlight":s.isOptionActive(t),"data-p-focus":s.isOptionFocused(t),"data-p-disabled":s.isOptionDisabled(t)}),[c.withDirectives((c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("content"),onClick:function(e){return s.onOptionClick(e,t)}},e.ptm("content")),[i.templates.option?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.option),{key:0,option:t.option},null,8,["option"])):(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:e.cx("text")},e.ptm("text")),c.toDisplayString(s.getOptionLabelToRender(t)),17)),s.isOptionGroup(t)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[i.templates.optiongroupicon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.optiongroupicon),{key:0,"aria-hidden":"true"})):i.optionGroupIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:[e.cx("groupIcon"),i.optionGroupIcon],"aria-hidden":"true"},e.ptm("groupIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:2,class:e.cx("groupIcon"),"aria-hidden":"true"},e.ptm("groupIcon")),null,16,["class"]))],64)):c.createCommentVNode("",!0)],16,g)),[[a]]),s.isOptionGroup(t)&&s.isOptionActive(t)?(c.openBlock(),c.createBlock(l,{key:0,role:"group",class:c.normalizeClass(e.cx("sublist")),selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:s.getOptionGroupChildren(t),activeOptionPath:i.activeOptionPath,level:i.level+1,templates:i.templates,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:s.onOptionChange,pt:e.pt,unstyled:e.unstyled,isParentMount:o.mounted},null,8,["class","selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","pt","unstyled","isParentMount"])):c.createCommentVNode("",!0)],16,m)})),128))],16)};var I={name:"CascadeSelect",extends:y,emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data:function(){return{id:this.$attrs.id,focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||s.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel:function(e){return this.optionLabel?s.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren:function(e,t){return s.ObjectUtils.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup:function(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel:function(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:function(e){return s.ObjectUtils.isNotEmpty(e.children)},show:function(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&s.ObjectUtils.isNotEmpty(this.activeOptionPath)){var t=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?t.index:-1,level:t.level,parentKey:t.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&s.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.activeOptionPath=[],t.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&s.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||this.loading)e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&s.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}}},onOptionChange:function(e){var t=e.originalEvent,i=e.processedOption,n=e.isFocus,o=e.isHide;if(!s.ObjectUtils.isEmpty(i)){var r=i.index,l=i.level,a=i.parentKey,c=s.ObjectUtils.isNotEmpty(i.children),p=this.activeOptionPath.filter((function(e){return e.parentKey!==a}));p.push(i),this.focusedOptionInfo={index:r,level:l,parentKey:a},this.activeOptionPath=p,c?this.onOptionGroupSelect(t,i):this.onOptionSelect(t,i,o),n&&s.DomHandler.focus(this.$refs.focusInput)}},onOptionSelect:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.getOptionValue(t.option);this.activeOptionPath.forEach((function(e){return e.selected=!0})),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect:function(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick:function(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),s.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick:function(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{var i=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var t=this;if(this.overlayVisible){var i=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((function(e){return e.key===i.parentKey})),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,r=s.ObjectUtils.isEmpty(i.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((function(e){return e.parentKey!==t.focusedOptionInfo.parentKey}))),r||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey:function(e){if(this.overlayVisible){var t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t))this.activeOptionPath.some((function(e){return t.key===e.key}))?(this.focusedOptionInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)):this.onOptionChange({originalEvent:e,processedOption:t});e.preventDefault()}},onHomeKey:function(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey:function(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey:function(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index],i=this.isProccessedOptionGroup(t);this.onOptionChange({originalEvent:e,processedOption:t}),!i&&this.hide()}}else this.onArrowDownKey(e);e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter:function(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),s.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave:function(e){s.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&!e.$el.contains(t.target)&&!e.overlay.contains(t.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!s.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched:function(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption:function(e){return s.ObjectUtils.isNotEmpty(e)&&!this.isOptionDisabled(e.option)},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return s.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?s.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)}))},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(t=t||0===i&&this.processedOptions))return null;if(s.ObjectUtils.isEmpty(e))return[];for(var n=0;n<t.length;n++){var o=t[n];if(s.ObjectUtils.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];var r=this.findOptionPathByValue(e,o.children,i+1);if(r)return r.unshift(o),r}},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,o=!1;return-1!==(n=-1!==this.focusedOptionInfo.index?-1===(n=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionInfo.index:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&(o=!0),-1===n&&-1===this.focusedOptionInfo.index&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),o},changeFocusedOptionIndex:function(e,t){this.focusedOptionInfo.index!==t&&(this.focusedOptionInfo.index=t,this.scrollInView(),this.selectOnFocus&&this.onOptionChange({originalEvent:e,processedOption:this.visibleOptions[t],isHide:!1}))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionInfo.index=this.findFirstFocusedOptionIndex(),this.onOptionChange({processedOption:this.visibleOptions[this.focusedOptionInfo.index],isHide:!1}),!this.overlayVisible&&(this.focusedOptionInfo={index:-1,level:0,parentKey:""}))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=[];return e&&e.forEach((function(e,r){var l=(""!==o?o+"_":"")+r,a={option:e,index:r,level:i,key:l,parent:n,parentKey:o};a.children=t.createProcessedOptions(t.getOptionGroupChildren(e,i),i+1,a,l),s.push(a)})),s},overlayRef:function(e){this.overlay=e}},computed:{hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.modelValue)},label:function(){var e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){var t=this.findOptionPathByValue(this.modelValue),i=s.ObjectUtils.isNotEmpty(t)?t[t.length-1]:null;return i?this.getOptionLabel(i.option):e}return e},processedOptions:function(){return this.createProcessedOptions(this.options||[])},visibleOptions:function(){var e=this,t=this.activeOptionPath.find((function(t){return t.key===e.focusedOptionInfo.parentKey}));return t?t.children:this.processedOptions},equalityKey:function(){return this.optionValue?null:this.dataKey},searchResultMessageText:function(){return s.ObjectUtils.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionInfo.index?"".concat(this.id).concat(s.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:"","_").concat(this.focusedOptionInfo.index):null}},components:{CascadeSelectSub:b,Portal:O.default,ChevronDownIcon:d.default,SpinnerIcon:h.default,AngleRightIcon:u.default}};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function L(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function k(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){S(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function S(e,t,i){return(t=P(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function P(e){var t=C(e,"string");return"symbol"===x(t)?t:String(t)}function C(e,t){if("object"!==x(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var V=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"];return I.render=function(e,t,i,n,o,s){var r=c.resolveComponent("SpinnerIcon"),l=c.resolveComponent("CascadeSelectSub"),a=c.resolveComponent("Portal");return c.openBlock(),c.createElementBlock("div",c.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[5]||(t[5]=function(e){return s.onContainerClick(e)})},e.ptm("root"),{"data-pc-name":"cascadeselect"}),[c.createElementVNode("div",c.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[c.createElementVNode("input",c.mergeProps({ref:"focusInput",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,readonly:"",disabled:e.disabled,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_tree","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)})},k(k({},e.inputProps),e.ptm("input"))),null,16,V)],16),c.createElementVNode("span",c.mergeProps({class:e.cx("label")},e.ptm("label")),[c.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[c.createTextVNode(c.toDisplayString(s.label),1)]}))],16),c.createElementVNode("div",c.mergeProps({class:e.cx("dropdownButton"),role:"button",tabindex:"-1","aria-hidden":"true"},e.ptm("dropdownButton")),[e.loading?c.renderSlot(e.$slots,"loadingicon",{key:0,class:c.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):c.renderSlot(e.$slots,"dropdownicon",{key:1,class:c.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),c.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),c.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.searchResultMessageText),17),c.createVNode(a,{appendTo:e.appendTo},{default:c.withCtx((function(){return[c.createVNode(c.Transition,c.mergeProps({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:c.withCtx((function(){return[o.overlayVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[3]||(t[3]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},k(k({},e.panelProps),e.ptm("panel"))),[c.createElementVNode("div",c.mergeProps({class:e.cx("wrapper")},e.ptm("wrapper")),[c.createVNode(l,{id:o.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:o.id,focusedOptionId:o.focused?s.focusedOptionId:void 0,options:s.processedOptions,activeOptionPath:o.activeOptionPath,level:0,templates:e.$slots,optionLabel:e.optionLabel,optionValue:e.optionValue,optionDisabled:e.optionDisabled,optionGroupIcon:e.optionGroupIcon,optionGroupLabel:e.optionGroupLabel,optionGroupChildren:e.optionGroupChildren,onOptionChange:s.onOptionChange,pt:e.pt,unstyled:e.unstyled},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","pt","unstyled"])],16),c.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.selectedMessageText),17)],16)):c.createCommentVNode("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])],16)},I}(primevue.icons.angleright,primevue.icons.chevrondown,primevue.icons.spinner,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.cascadeselect.style,primevue.ripple,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o,s,r,l,a,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(e),d=p(t),h=p(i),f=p(n),O=p(o),v=p(r),y={name:"BaseCascadeSelect",extends:v.default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:String,disabled:Boolean,dataKey:null,inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},optionGroupIcon:{type:String,default:void 0},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:p(l).default,provide:function(){return{$parentInstance:this}}},b={name:"CascadeSelectSub",hostName:"CascadeSelect",extends:v.default,emits:["option-change"],container:null,props:{selectId:String,focusedOptionId:String,options:Array,optionLabel:String,optionValue:String,optionDisabled:null,optionGroupIcon:String,optionGroupLabel:String,optionGroupChildren:Array,activeOptionPath:Array,level:Number,templates:null,isParentMount:Boolean},data:function(){return{mounted:!1}},watch:{isParentMount:{handler:function(e){e&&s.DomHandler.nestedPosition(this.container,this.level)}}},mounted:function(){(this.isParentMount||0===this.level)&&s.DomHandler.nestedPosition(this.container,this.level),this.mounted=!0},methods:{getOptionId:function(e){return"".concat(this.selectId,"_").concat(e.key)},getOptionLabel:function(e){return this.optionLabel?s.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:function(e){return e.children},isOptionGroup:function(e){return s.ObjectUtils.isNotEmpty(e.children)},isOptionSelected:function(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},isOptionFocused:function(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender:function(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick:function(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange:function(e){this.$emit("option-change",e)},containerRef:function(e){this.container=e}},directives:{ripple:p(a).default},components:{AngleRightIcon:u.default}},m=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-item-group","data-p-highlight","data-p-focus","data-p-disabled"],g=["onClick"];b.render=function(e,t,i,n,o,s){var r=c.resolveComponent("AngleRightIcon"),l=c.resolveComponent("CascadeSelectSub",!0),a=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("ul",c.mergeProps({ref:s.containerRef,class:e.cx("list")},e.ptm(0===i.level?"list":"sublist")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.options,(function(t,n){return c.openBlock(),c.createElementBlock("li",c.mergeProps({key:s.getOptionLabelToRender(t),id:s.getOptionId(t),class:e.cx("item",{processedOption:t}),role:"treeitem","aria-label":s.getOptionLabelToRender(t),"aria-selected":s.isOptionGroup(t)?void 0:s.isOptionSelected(t),"aria-expanded":s.isOptionGroup(t)?s.isOptionActive(t):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":n+1},e.ptm("item"),{"data-p-item-group":s.isOptionGroup(t),"data-p-highlight":s.isOptionActive(t),"data-p-focus":s.isOptionFocused(t),"data-p-disabled":s.isOptionDisabled(t)}),[c.withDirectives((c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("content"),onClick:function(e){return s.onOptionClick(e,t)}},e.ptm("content")),[i.templates.option?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.option),{key:0,option:t.option},null,8,["option"])):(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:e.cx("text")},e.ptm("text")),c.toDisplayString(s.getOptionLabelToRender(t)),17)),s.isOptionGroup(t)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[i.templates.optiongroupicon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.optiongroupicon),{key:0,"aria-hidden":"true"})):i.optionGroupIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:[e.cx("groupIcon"),i.optionGroupIcon],"aria-hidden":"true"},e.ptm("groupIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:2,class:e.cx("groupIcon"),"aria-hidden":"true"},e.ptm("groupIcon")),null,16,["class"]))],64)):c.createCommentVNode("",!0)],16,g)),[[a]]),s.isOptionGroup(t)&&s.isOptionActive(t)?(c.openBlock(),c.createBlock(l,{key:0,role:"group",class:c.normalizeClass(e.cx("sublist")),selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:s.getOptionGroupChildren(t),activeOptionPath:i.activeOptionPath,level:i.level+1,templates:i.templates,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:s.onOptionChange,pt:e.pt,unstyled:e.unstyled,isParentMount:o.mounted},null,8,["class","selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","pt","unstyled","isParentMount"])):c.createCommentVNode("",!0)],16,m)})),128))],16)};var I={name:"CascadeSelect",extends:y,emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data:function(){return{id:this.$attrs.id,focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||s.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel:function(e){return this.optionLabel?s.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren:function(e,t){return s.ObjectUtils.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup:function(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel:function(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:function(e){return s.ObjectUtils.isNotEmpty(e.children)},show:function(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&s.ObjectUtils.isNotEmpty(this.activeOptionPath)){var t=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?t.index:-1,level:t.level,parentKey:t.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&s.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.activeOptionPath=[],t.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&s.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||this.loading)e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&s.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}}},onOptionChange:function(e){var t=e.originalEvent,i=e.processedOption,n=e.isFocus,o=e.isHide;if(!s.ObjectUtils.isEmpty(i)){var r=i.index,l=i.level,a=i.parentKey,c=s.ObjectUtils.isNotEmpty(i.children),p=this.activeOptionPath.filter((function(e){return e.parentKey!==a}));p.push(i),this.focusedOptionInfo={index:r,level:l,parentKey:a},this.activeOptionPath=p,c?this.onOptionGroupSelect(t,i):this.onOptionSelect(t,i,o),n&&s.DomHandler.focus(this.$refs.focusInput)}},onOptionSelect:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.getOptionValue(t.option);this.activeOptionPath.forEach((function(e){return e.selected=!0})),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect:function(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick:function(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),s.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick:function(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{var i=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var t=this;if(this.overlayVisible){var i=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((function(e){return e.key===i.parentKey})),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,r=s.ObjectUtils.isEmpty(i.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((function(e){return e.parentKey!==t.focusedOptionInfo.parentKey}))),r||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey:function(e){if(this.overlayVisible){var t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t))this.activeOptionPath.some((function(e){return t.key===e.key}))?(this.focusedOptionInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)):this.onOptionChange({originalEvent:e,processedOption:t});e.preventDefault()}},onHomeKey:function(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey:function(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey:function(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index],i=this.isProccessedOptionGroup(t);this.onOptionChange({originalEvent:e,processedOption:t}),!i&&this.hide()}}else this.onArrowDownKey(e);e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter:function(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),s.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave:function(e){s.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&!e.$el.contains(t.target)&&!e.overlay.contains(t.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!s.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched:function(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption:function(e){return s.ObjectUtils.isNotEmpty(e)&&!this.isOptionDisabled(e.option)},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return s.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?s.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)}))},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(t=t||0===i&&this.processedOptions))return null;if(s.ObjectUtils.isEmpty(e))return[];for(var n=0;n<t.length;n++){var o=t[n];if(s.ObjectUtils.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];var r=this.findOptionPathByValue(e,o.children,i+1);if(r)return r.unshift(o),r}},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,o=!1;return-1!==(n=-1!==this.focusedOptionInfo.index?-1===(n=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionInfo.index:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&(o=!0),-1===n&&-1===this.focusedOptionInfo.index&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),o},changeFocusedOptionIndex:function(e,t){this.focusedOptionInfo.index!==t&&(this.focusedOptionInfo.index=t,this.scrollInView(),this.selectOnFocus&&this.onOptionChange({originalEvent:e,processedOption:this.visibleOptions[t],isHide:!1}))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionInfo.index=this.findFirstFocusedOptionIndex(),this.onOptionChange({processedOption:this.visibleOptions[this.focusedOptionInfo.index],isHide:!1}),!this.overlayVisible&&(this.focusedOptionInfo={index:-1,level:0,parentKey:""}))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=[];return e&&e.forEach((function(e,r){var l=(""!==o?o+"_":"")+r,a={option:e,index:r,level:i,key:l,parent:n,parentKey:o};a.children=t.createProcessedOptions(t.getOptionGroupChildren(e,i),i+1,a,l),s.push(a)})),s},overlayRef:function(e){this.overlay=e}},computed:{hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.modelValue)},label:function(){var e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){var t=this.findOptionPathByValue(this.modelValue),i=s.ObjectUtils.isNotEmpty(t)?t[t.length-1]:null;return i?this.getOptionLabel(i.option):e}return e},processedOptions:function(){return this.createProcessedOptions(this.options||[])},visibleOptions:function(){var e=this,t=this.activeOptionPath.find((function(t){return t.key===e.focusedOptionInfo.parentKey}));return t?t.children:this.processedOptions},equalityKey:function(){return this.optionValue?null:this.dataKey},searchResultMessageText:function(){return s.ObjectUtils.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionInfo.index?"".concat(this.id).concat(s.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:"","_").concat(this.focusedOptionInfo.index):null}},components:{CascadeSelectSub:b,Portal:O.default,ChevronDownIcon:d.default,SpinnerIcon:h.default,AngleRightIcon:u.default}};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function L(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function k(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){S(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function S(e,t,i){return(t=P(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function P(e){var t=C(e,"string");return"symbol"===x(t)?t:String(t)}function C(e,t){if("object"!==x(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var V=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"];return I.render=function(e,t,i,n,o,s){var r=c.resolveComponent("SpinnerIcon"),l=c.resolveComponent("CascadeSelectSub"),a=c.resolveComponent("Portal");return c.openBlock(),c.createElementBlock("div",c.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[5]||(t[5]=function(e){return s.onContainerClick(e)})},e.ptm("root"),{"data-pc-name":"cascadeselect"}),[c.createElementVNode("div",c.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[c.createElementVNode("input",c.mergeProps({ref:"focusInput",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,readonly:"",disabled:e.disabled,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_tree","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)})},k(k({},e.inputProps),e.ptm("input"))),null,16,V)],16),c.createElementVNode("span",c.mergeProps({class:e.cx("label")},e.ptm("label")),[c.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[c.createTextVNode(c.toDisplayString(s.label),1)]}))],16),c.createElementVNode("div",c.mergeProps({class:e.cx("dropdownButton"),role:"button",tabindex:"-1","aria-hidden":"true"},e.ptm("dropdownButton")),[e.loading?c.renderSlot(e.$slots,"loadingicon",{key:0,class:c.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):c.renderSlot(e.$slots,"dropdownicon",{key:1,class:c.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),c.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),c.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.searchResultMessageText),17),c.createVNode(a,{appendTo:e.appendTo},{default:c.withCtx((function(){return[c.createVNode(c.Transition,c.mergeProps({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:c.withCtx((function(){return[o.overlayVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[3]||(t[3]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},k(k({},e.panelProps),e.ptm("panel"))),[c.createElementVNode("div",c.mergeProps({class:e.cx("wrapper")},e.ptm("wrapper")),[c.createVNode(l,{id:o.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:o.id,focusedOptionId:o.focused?s.focusedOptionId:void 0,options:s.processedOptions,activeOptionPath:o.activeOptionPath,level:0,templates:e.$slots,optionLabel:e.optionLabel,optionValue:e.optionValue,optionDisabled:e.optionDisabled,optionGroupIcon:e.optionGroupIcon,optionGroupLabel:e.optionGroupLabel,optionGroupChildren:e.optionGroupChildren,onOptionChange:s.onOptionChange,pt:e.pt,unstyled:e.unstyled},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","pt","unstyled"])],16),c.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.selectedMessageText),17)],16)):c.createCommentVNode("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])],16)},I}(primevue.icons.angleright,primevue.icons.chevrondown,primevue.icons.spinner,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.cascadeselect.style,primevue.ripple,Vue);
@@ -53,11 +53,11 @@ export default {
53
53
  type: null,
54
54
  default: null
55
55
  },
56
- 'aria-labelledby': {
56
+ ariaLabelledby: {
57
57
  type: String,
58
58
  default: null
59
59
  },
60
- 'aria-label': {
60
+ ariaLabel: {
61
61
  type: String,
62
62
  default: null
63
63
  }
@@ -159,11 +159,11 @@ export interface CheckboxProps {
159
159
  /**
160
160
  * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
161
161
  */
162
- 'aria-labelledby'?: string | undefined;
162
+ ariaLabelledby?: string | undefined;
163
163
  /**
164
164
  * Establishes a string value that labels the component.
165
165
  */
166
- 'aria-label'?: string | undefined;
166
+ ariaLabel?: string | undefined;
167
167
  /**
168
168
  * Used to pass attributes to DOM elements inside the component.
169
169
  * @type {CheckboxPassThroughOptions}
@@ -63,11 +63,11 @@ var script$1 = {
63
63
  type: null,
64
64
  "default": null
65
65
  },
66
- 'aria-labelledby': {
66
+ ariaLabelledby: {
67
67
  type: String,
68
68
  "default": null
69
69
  },
70
- 'aria-label': {
70
+ ariaLabel: {
71
71
  type: String,
72
72
  "default": null
73
73
  }
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/check"),t=require("primevue/utils"),n=require("primevue/basecomponent"),r=require("primevue/checkbox/style"),i=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e);function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p={name:"Checkbox",extends:{name:"BaseCheckbox",extends:o(n).default,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:o(r).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,focused:this.focused,disabled:this.disabled}})},onClick:function(e){var n,r,i=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,i.value)})):this.modelValue?[].concat(s(r=this.modelValue)||c(r)||u(r)||a(),[this.value]):[this.value],this.$emit("click",e),this.$emit("update:modelValue",n),this.$emit("change",e),this.$emit("input",n),this.$refs.input.focus())},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.ObjectUtils.contains(this.value,this.modelValue)}},components:{CheckIcon:l.default}};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=v(e,"string");return"symbol"===f(t)?t:String(t)}function v(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"],k=["data-p-highlight","data-p-disabled","data-p-focused"];p.render=function(e,t,n,r,o,l){var a=i.resolveComponent("CheckIcon");return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},l.getPTOptions("root"),{"data-pc-name":"checkbox"}),[i.createElementVNode("div",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({ref:"input",id:e.inputId,type:"checkbox",value:e.value,name:e.name,checked:l.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},e.ptm("hiddenInput")),null,16,g)],16),i.createElementVNode("div",i.mergeProps({ref:"box",class:[e.cx("input"),e.inputClass],style:e.inputStyle},m(m({},e.inputProps),l.getPTOptions("input")),{"data-p-highlight":l.checked,"data-p-disabled":e.disabled,"data-p-focused":o.focused}),[i.renderSlot(e.$slots,"icon",{checked:l.checked,class:i.normalizeClass(e.cx("icon"))},(function(){return[l.checked?(i.openBlock(),i.createBlock(a,i.mergeProps({key:0,class:e.cx("icon")},l.getPTOptions("icon")),null,16,["class"])):i.createCommentVNode("",!0)]}))],16,k)],16)},module.exports=p;
1
+ "use strict";var e=require("primevue/icons/check"),t=require("primevue/utils"),n=require("primevue/basecomponent"),r=require("primevue/checkbox/style"),i=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e);function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p={name:"Checkbox",extends:{name:"BaseCheckbox",extends:o(n).default,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:o(r).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,focused:this.focused,disabled:this.disabled}})},onClick:function(e){var n,r,i=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,i.value)})):this.modelValue?[].concat(s(r=this.modelValue)||c(r)||u(r)||a(),[this.value]):[this.value],this.$emit("click",e),this.$emit("update:modelValue",n),this.$emit("change",e),this.$emit("input",n),this.$refs.input.focus())},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.ObjectUtils.contains(this.value,this.modelValue)}},components:{CheckIcon:l.default}};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=v(e,"string");return"symbol"===f(t)?t:String(t)}function v(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"],k=["data-p-highlight","data-p-disabled","data-p-focused"];p.render=function(e,t,n,r,o,l){var a=i.resolveComponent("CheckIcon");return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},l.getPTOptions("root"),{"data-pc-name":"checkbox"}),[i.createElementVNode("div",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({ref:"input",id:e.inputId,type:"checkbox",value:e.value,name:e.name,checked:l.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},e.ptm("hiddenInput")),null,16,g)],16),i.createElementVNode("div",i.mergeProps({ref:"box",class:[e.cx("input"),e.inputClass],style:e.inputStyle},m(m({},e.inputProps),l.getPTOptions("input")),{"data-p-highlight":l.checked,"data-p-disabled":e.disabled,"data-p-focused":o.focused}),[i.renderSlot(e.$slots,"icon",{checked:l.checked,class:i.normalizeClass(e.cx("icon"))},(function(){return[l.checked?(i.openBlock(),i.createBlock(a,i.mergeProps({key:0,class:e.cx("icon")},l.getPTOptions("icon")),null,16,["class"])):i.createCommentVNode("",!0)]}))],16,k)],16)},module.exports=p;
@@ -55,11 +55,11 @@ var script$1 = {
55
55
  type: null,
56
56
  "default": null
57
57
  },
58
- 'aria-labelledby': {
58
+ ariaLabelledby: {
59
59
  type: String,
60
60
  "default": null
61
61
  },
62
- 'aria-label': {
62
+ ariaLabel: {
63
63
  type: String,
64
64
  "default": null
65
65
  }
@@ -1 +1 @@
1
- import e from"primevue/icons/check";import{ObjectUtils as t}from"primevue/utils";import n from"primevue/basecomponent";import r from"primevue/checkbox/style";import{resolveComponent as i,openBlock as o,createElementBlock as l,mergeProps as a,createElementVNode as u,renderSlot as c,normalizeClass as s,createBlock as d,createCommentVNode as p}from"vue";function f(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e){if(Array.isArray(e))return m(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v={name:"Checkbox",extends:{name:"BaseCheckbox",extends:n,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:r,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,focused:this.focused,disabled:this.disabled}})},onClick:function(e){var n,r,i=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.equals(e,i.value)})):this.modelValue?[].concat(y(r=this.modelValue)||h(r)||b(r)||f(),[this.value]):[this.value],this.$emit("click",e),this.$emit("update:modelValue",n),this.$emit("change",e),this.$emit("input",n),this.$refs.input.focus())},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.contains(this.value,this.modelValue)}},components:{CheckIcon:e}};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return(t=j(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){var t=x(e,"string");return"symbol"===g(t)?t:String(t)}function x(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"],V=["data-p-highlight","data-p-disabled","data-p-focused"];v.render=function(e,t,n,r,f,b){var h=i("CheckIcon");return o(),l("div",a({class:e.cx("root"),onClick:t[2]||(t[2]=function(e){return b.onClick(e)})},b.getPTOptions("root"),{"data-pc-name":"checkbox"}),[u("div",a({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",a({ref:"input",id:e.inputId,type:"checkbox",value:e.value,name:e.name,checked:b.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return b.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return b.onBlur(e)})},e.ptm("hiddenInput")),null,16,P)],16),u("div",a({ref:"box",class:[e.cx("input"),e.inputClass],style:e.inputStyle},O(O({},e.inputProps),b.getPTOptions("input")),{"data-p-highlight":b.checked,"data-p-disabled":e.disabled,"data-p-focused":f.focused}),[c(e.$slots,"icon",{checked:b.checked,class:s(e.cx("icon"))},(function(){return[b.checked?(o(),d(h,a({key:0,class:e.cx("icon")},b.getPTOptions("icon")),null,16,["class"])):p("",!0)]}))],16,V)],16)};export{v as default};
1
+ import e from"primevue/icons/check";import{ObjectUtils as t}from"primevue/utils";import n from"primevue/basecomponent";import r from"primevue/checkbox/style";import{resolveComponent as i,openBlock as o,createElementBlock as l,mergeProps as a,createElementVNode as u,renderSlot as c,normalizeClass as s,createBlock as d,createCommentVNode as p}from"vue";function f(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e){if(Array.isArray(e))return m(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v={name:"Checkbox",extends:{name:"BaseCheckbox",extends:n,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:r,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,focused:this.focused,disabled:this.disabled}})},onClick:function(e){var n,r,i=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.equals(e,i.value)})):this.modelValue?[].concat(y(r=this.modelValue)||h(r)||b(r)||f(),[this.value]):[this.value],this.$emit("click",e),this.$emit("update:modelValue",n),this.$emit("change",e),this.$emit("input",n),this.$refs.input.focus())},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.contains(this.value,this.modelValue)}},components:{CheckIcon:e}};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return(t=j(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){var t=x(e,"string");return"symbol"===g(t)?t:String(t)}function x(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"],V=["data-p-highlight","data-p-disabled","data-p-focused"];v.render=function(e,t,n,r,f,b){var h=i("CheckIcon");return o(),l("div",a({class:e.cx("root"),onClick:t[2]||(t[2]=function(e){return b.onClick(e)})},b.getPTOptions("root"),{"data-pc-name":"checkbox"}),[u("div",a({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",a({ref:"input",id:e.inputId,type:"checkbox",value:e.value,name:e.name,checked:b.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return b.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return b.onBlur(e)})},e.ptm("hiddenInput")),null,16,P)],16),u("div",a({ref:"box",class:[e.cx("input"),e.inputClass],style:e.inputStyle},O(O({},e.inputProps),b.getPTOptions("input")),{"data-p-highlight":b.checked,"data-p-disabled":e.disabled,"data-p-focused":f.focused}),[c(e.$slots,"icon",{checked:b.checked,class:s(e.cx("icon"))},(function(){return[b.checked?(o(),d(h,a({key:0,class:e.cx("icon")},b.getPTOptions("icon")),null,16,["class"])):p("",!0)]}))],16,V)],16)};export{v as default};
@@ -59,11 +59,11 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
59
59
  type: null,
60
60
  "default": null
61
61
  },
62
- 'aria-labelledby': {
62
+ ariaLabelledby: {
63
63
  type: String,
64
64
  "default": null
65
65
  },
66
- 'aria-label': {
66
+ ariaLabel: {
67
67
  type: String,
68
68
  "default": null
69
69
  }
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.checkbox=function(e,t,n,r,i){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e);function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p={name:"Checkbox",extends:{name:"BaseCheckbox",extends:o(n).default,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:o(r).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,focused:this.focused,disabled:this.disabled}})},onClick:function(e){var n,r,i=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,i.value)})):this.modelValue?[].concat(s(r=this.modelValue)||c(r)||u(r)||a(),[this.value]):[this.value],this.$emit("click",e),this.$emit("update:modelValue",n),this.$emit("change",e),this.$emit("input",n),this.$refs.input.focus())},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.ObjectUtils.contains(this.value,this.modelValue)}},components:{CheckIcon:l.default}};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=v(e,"string");return"symbol"===f(t)?t:String(t)}function v(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"],k=["data-p-highlight","data-p-disabled","data-p-focused"];return p.render=function(e,t,n,r,o,l){var a=i.resolveComponent("CheckIcon");return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},l.getPTOptions("root"),{"data-pc-name":"checkbox"}),[i.createElementVNode("div",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({ref:"input",id:e.inputId,type:"checkbox",value:e.value,name:e.name,checked:l.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},e.ptm("hiddenInput")),null,16,g)],16),i.createElementVNode("div",i.mergeProps({ref:"box",class:[e.cx("input"),e.inputClass],style:e.inputStyle},h(h({},e.inputProps),l.getPTOptions("input")),{"data-p-highlight":l.checked,"data-p-disabled":e.disabled,"data-p-focused":o.focused}),[i.renderSlot(e.$slots,"icon",{checked:l.checked,class:i.normalizeClass(e.cx("icon"))},(function(){return[l.checked?(i.openBlock(),i.createBlock(a,i.mergeProps({key:0,class:e.cx("icon")},l.getPTOptions("icon")),null,16,["class"])):i.createCommentVNode("",!0)]}))],16,k)],16)},p}(primevue.icons.check,primevue.utils,primevue.basecomponent,primevue.checkbox.style,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.checkbox=function(e,t,n,r,i){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e);function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p={name:"Checkbox",extends:{name:"BaseCheckbox",extends:o(n).default,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:o(r).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,focused:this.focused,disabled:this.disabled}})},onClick:function(e){var n,r,i=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,i.value)})):this.modelValue?[].concat(s(r=this.modelValue)||c(r)||u(r)||a(),[this.value]):[this.value],this.$emit("click",e),this.$emit("update:modelValue",n),this.$emit("change",e),this.$emit("input",n),this.$refs.input.focus())},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.ObjectUtils.contains(this.value,this.modelValue)}},components:{CheckIcon:l.default}};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=v(e,"string");return"symbol"===f(t)?t:String(t)}function v(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"],k=["data-p-highlight","data-p-disabled","data-p-focused"];return p.render=function(e,t,n,r,o,l){var a=i.resolveComponent("CheckIcon");return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},l.getPTOptions("root"),{"data-pc-name":"checkbox"}),[i.createElementVNode("div",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({ref:"input",id:e.inputId,type:"checkbox",value:e.value,name:e.name,checked:l.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},e.ptm("hiddenInput")),null,16,g)],16),i.createElementVNode("div",i.mergeProps({ref:"box",class:[e.cx("input"),e.inputClass],style:e.inputStyle},h(h({},e.inputProps),l.getPTOptions("input")),{"data-p-highlight":l.checked,"data-p-disabled":e.disabled,"data-p-focused":o.focused}),[i.renderSlot(e.$slots,"icon",{checked:l.checked,class:i.normalizeClass(e.cx("icon"))},(function(){return[l.checked?(i.openBlock(),i.createBlock(a,i.mergeProps({key:0,class:e.cx("icon")},l.getPTOptions("icon")),null,16,["class"])):i.createCommentVNode("",!0)]}))],16,k)],16)},p}(primevue.icons.check,primevue.utils,primevue.basecomponent,primevue.checkbox.style,Vue);
@@ -54,11 +54,11 @@ export default {
54
54
  type: String,
55
55
  default: undefined
56
56
  },
57
- 'aria-labelledby': {
57
+ ariaLabelledby: {
58
58
  type: String,
59
59
  default: null
60
60
  },
61
- 'aria-label': {
61
+ ariaLabel: {
62
62
  type: String,
63
63
  default: null
64
64
  }
package/chips/Chips.d.ts CHANGED
@@ -187,11 +187,11 @@ export interface ChipsProps {
187
187
  /**
188
188
  * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
189
189
  */
190
- 'aria-labelledby'?: string | undefined;
190
+ ariaLabelledby?: string | undefined;
191
191
  /**
192
192
  * Establishes a string value that labels the component.
193
193
  */
194
- 'aria-label'?: string | undefined;
194
+ ariaLabel?: string | undefined;
195
195
  /**
196
196
  * Used to pass attributes to DOM elements inside the component.
197
197
  * @type {ChipsPassThroughOptions}
@@ -64,11 +64,11 @@ var script$1 = {
64
64
  type: String,
65
65
  "default": undefined
66
66
  },
67
- 'aria-labelledby': {
67
+ ariaLabelledby: {
68
68
  type: String,
69
69
  "default": null
70
70
  },
71
- 'aria-label': {
71
+ ariaLabel: {
72
72
  type: String,
73
73
  "default": null
74
74
  }
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/timescircle"),t=require("primevue/utils"),n=require("primevue/basecomponent"),o=require("primevue/chips/style"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e);function a(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{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},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(a(o),a(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?a(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=a(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=g(e,"string");return"symbol"===m(t)?t:String(t)}function g(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var I=["aria-labelledby","aria-label","aria-activedescendant"],x=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],k=["id","disabled","placeholder"];f.render=function(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return l.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:t[7]||(t[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:t[8]||(t[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return l.removeItem(e,n)},removeCallback:function(e){return l.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,x)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)}),onInput:t[2]||(t[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(e){return l.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return l.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,k)],16)],16,I)],16)},module.exports=f;
1
+ "use strict";var e=require("primevue/icons/timescircle"),t=require("primevue/utils"),n=require("primevue/basecomponent"),o=require("primevue/chips/style"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e);function a(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{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},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(a(o),a(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?a(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=a(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=g(e,"string");return"symbol"===m(t)?t:String(t)}function g(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var I=["aria-labelledby","aria-label","aria-activedescendant"],x=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],k=["id","disabled","placeholder"];f.render=function(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return l.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:t[7]||(t[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:t[8]||(t[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return l.removeItem(e,n)},removeCallback:function(e){return l.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,x)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)}),onInput:t[2]||(t[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(e){return l.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return l.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,k)],16)],16,I)],16)},module.exports=f;
@@ -56,11 +56,11 @@ var script$1 = {
56
56
  type: String,
57
57
  "default": undefined
58
58
  },
59
- 'aria-labelledby': {
59
+ ariaLabelledby: {
60
60
  type: String,
61
61
  "default": null
62
62
  },
63
- 'aria-label': {
63
+ ariaLabel: {
64
64
  type: String,
65
65
  "default": null
66
66
  }
@@ -1 +1 @@
1
- import e from"primevue/icons/timescircle";import{UniqueComponentId as t}from"primevue/utils";import n from"primevue/basecomponent";import o from"primevue/chips/style";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as d,toDisplayString as f,createBlock as p,resolveDynamicComponent as m}from"vue";function h(e){return I(e)||v(e)||b(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e){if(Array.isArray(e))return g(e)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var x={name:"Chips",extends:{name:"BaseChips",extends:n,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{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},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:o,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],i=n.split(this.separator);i=i.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(h(o),h(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?h(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=h(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return(t=S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){var t=C(e,"string");return"symbol"===O(t)?t:String(t)}function C(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var j=["aria-labelledby","aria-label","aria-activedescendant"],B=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],P=["id","disabled","placeholder"];x.render=function(e,t,n,o,h,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":h.focused?y.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return y.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:t[7]||(t[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:t[8]||(t[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(t,n){return i(),r("li",a({key:"".concat(n,"_").concat(t),id:h.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":h.focusedIndex===n}),[c(e.$slots,"chip",{class:d(e.cx("label")),value:t},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),f(t),17)]})),c(e.$slots,"removetokenicon",{class:d(e.cx("removeTokenIcon")),index:n,onClick:function(e){return y.removeItem(e,n)},removeCallback:function(e){return y.removeItem(e,n)}},(function(){return[(i(),p(m(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,B)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return y.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return y.onBlur(e)}),onInput:t[2]||(t[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:t[3]||(t[3]=function(e){return y.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return y.onPaste(e)})},k(k({},e.inputProps),e.ptm("input"))),null,16,P)],16)],16,j)],16)};export{x as default};
1
+ import e from"primevue/icons/timescircle";import{UniqueComponentId as t}from"primevue/utils";import n from"primevue/basecomponent";import o from"primevue/chips/style";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as d,toDisplayString as f,createBlock as p,resolveDynamicComponent as m}from"vue";function h(e){return I(e)||v(e)||b(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e){if(Array.isArray(e))return g(e)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var x={name:"Chips",extends:{name:"BaseChips",extends:n,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{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},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:o,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],i=n.split(this.separator);i=i.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(h(o),h(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?h(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=h(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return(t=S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){var t=C(e,"string");return"symbol"===O(t)?t:String(t)}function C(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var j=["aria-labelledby","aria-label","aria-activedescendant"],B=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],P=["id","disabled","placeholder"];x.render=function(e,t,n,o,h,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":h.focused?y.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return y.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:t[7]||(t[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:t[8]||(t[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(t,n){return i(),r("li",a({key:"".concat(n,"_").concat(t),id:h.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":h.focusedIndex===n}),[c(e.$slots,"chip",{class:d(e.cx("label")),value:t},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),f(t),17)]})),c(e.$slots,"removetokenicon",{class:d(e.cx("removeTokenIcon")),index:n,onClick:function(e){return y.removeItem(e,n)},removeCallback:function(e){return y.removeItem(e,n)}},(function(){return[(i(),p(m(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,B)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return y.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return y.onBlur(e)}),onInput:t[2]||(t[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:t[3]||(t[3]=function(e){return y.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return y.onPaste(e)})},k(k({},e.inputProps),e.ptm("input"))),null,16,P)],16)],16,j)],16)};export{x as default};
package/chips/chips.js CHANGED
@@ -60,11 +60,11 @@ this.primevue.chips = (function (TimesCircleIcon, utils, BaseComponent, ChipsSty
60
60
  type: String,
61
61
  "default": undefined
62
62
  },
63
- 'aria-labelledby': {
63
+ ariaLabelledby: {
64
64
  type: String,
65
65
  "default": null
66
66
  },
67
- 'aria-label': {
67
+ ariaLabel: {
68
68
  type: String,
69
69
  "default": null
70
70
  }
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.chips=function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e);function a(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{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},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(a(o),a(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?a(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=a(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=g(e,"string");return"symbol"===m(t)?t:String(t)}function g(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var I=["aria-labelledby","aria-label","aria-activedescendant"],x=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],k=["id","disabled","placeholder"];return f.render=function(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return l.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:t[7]||(t[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:t[8]||(t[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return l.removeItem(e,n)},removeCallback:function(e){return l.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,x)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)}),onInput:t[2]||(t[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(e){return l.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return l.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,k)],16)],16,I)],16)},f}(primevue.icons.timescircle,primevue.utils,primevue.basecomponent,primevue.chips.style,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.chips=function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e);function a(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{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},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(a(o),a(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?a(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=a(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=g(e,"string");return"symbol"===m(t)?t:String(t)}function g(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var I=["aria-labelledby","aria-label","aria-activedescendant"],x=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],k=["id","disabled","placeholder"];return f.render=function(e,t,n,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return l.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:t[7]||(t[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:t[8]||(t[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return l.removeItem(e,n)},removeCallback:function(e){return l.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,x)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)}),onInput:t[2]||(t[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:t[3]||(t[3]=function(e){return l.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return l.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,k)],16)],16,I)],16)},f}(primevue.icons.timescircle,primevue.utils,primevue.basecomponent,primevue.chips.style,Vue);
@@ -948,6 +948,10 @@ export interface ColumnSlots {
948
948
  * @param {Object} scope - sort icon slot's params.
949
949
  */
950
950
  sorticon(scope: {
951
+ /**
952
+ * Style class of the sort icon.
953
+ */
954
+ class: string;
951
955
  /**
952
956
  * Current sort state.
953
957
  */
@@ -67,7 +67,6 @@ export default {
67
67
  name: 'ConfirmPopup',
68
68
  extends: BaseConfirmPopup,
69
69
  inheritAttrs: false,
70
-
71
70
  data() {
72
71
  return {
73
72
  visible: false,
@@ -30,11 +30,11 @@ export default {
30
30
  type: Number,
31
31
  default: 0
32
32
  },
33
- 'aria-labelledby': {
33
+ ariaLabelledby: {
34
34
  type: String,
35
35
  default: null
36
36
  },
37
- 'aria-label': {
37
+ ariaLabel: {
38
38
  type: String,
39
39
  default: null
40
40
  }
@@ -252,11 +252,11 @@ export interface ContextMenuProps {
252
252
  /**
253
253
  * Defines a string value that labels an interactive element.
254
254
  */
255
- 'aria-label'?: string | undefined;
255
+ ariaLabel?: string | undefined;
256
256
  /**
257
257
  * Identifier of the underlying menu element.
258
258
  */
259
- 'aria-labelledby'?: string | undefined;
259
+ ariaLabelledby?: string | undefined;
260
260
  /**
261
261
  * Used to pass attributes to DOM elements inside the component.
262
262
  * @type {ContextMenuPassThroughOptions}
@@ -44,11 +44,11 @@ var script$2 = {
44
44
  type: Number,
45
45
  "default": 0
46
46
  },
47
- 'aria-labelledby': {
47
+ ariaLabelledby: {
48
48
  type: String,
49
49
  "default": null
50
50
  },
51
- 'aria-label': {
51
+ ariaLabel: {
52
52
  type: String,
53
53
  "default": null
54
54
  }