primevue 3.22.3 → 3.23.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 (267) hide show
  1. package/README.md +2 -2
  2. package/accordion/Accordion.vue +7 -3
  3. package/accordion/accordion.cjs.js +7 -3
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +8 -4
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +7 -3
  8. package/accordion/accordion.min.js +1 -1
  9. package/autocomplete/AutoComplete.vue +6 -3
  10. package/autocomplete/autocomplete.cjs.js +12 -9
  11. package/autocomplete/autocomplete.cjs.min.js +1 -1
  12. package/autocomplete/autocomplete.esm.js +13 -10
  13. package/autocomplete/autocomplete.esm.min.js +1 -1
  14. package/autocomplete/autocomplete.js +12 -9
  15. package/autocomplete/autocomplete.min.js +1 -1
  16. package/breadcrumb/Breadcrumb.vue +3 -3
  17. package/breadcrumb/breadcrumb.cjs.js +19 -11
  18. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  19. package/breadcrumb/breadcrumb.esm.js +19 -11
  20. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  21. package/breadcrumb/breadcrumb.js +19 -11
  22. package/breadcrumb/breadcrumb.min.js +1 -1
  23. package/calendar/Calendar.vue +4 -4
  24. package/calendar/calendar.cjs.js +4 -4
  25. package/calendar/calendar.cjs.min.js +1 -1
  26. package/calendar/calendar.esm.js +4 -4
  27. package/calendar/calendar.esm.min.js +1 -1
  28. package/calendar/calendar.js +4 -4
  29. package/calendar/calendar.min.js +1 -1
  30. package/cascadeselect/CascadeSelect.vue +6 -3
  31. package/cascadeselect/cascadeselect.cjs.js +9 -6
  32. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  33. package/cascadeselect/cascadeselect.esm.js +10 -7
  34. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  35. package/cascadeselect/cascadeselect.js +9 -6
  36. package/cascadeselect/cascadeselect.min.js +1 -1
  37. package/config/PrimeVue.d.ts +1 -2
  38. package/config/config.cjs.js +0 -1
  39. package/config/config.cjs.min.js +1 -1
  40. package/config/config.esm.js +0 -1
  41. package/config/config.esm.min.js +1 -1
  42. package/config/config.js +0 -1
  43. package/config/config.min.js +1 -1
  44. package/contextmenu/ContextMenu.vue +6 -3
  45. package/contextmenu/contextmenu.cjs.js +8 -5
  46. package/contextmenu/contextmenu.cjs.min.js +1 -1
  47. package/contextmenu/contextmenu.esm.js +9 -6
  48. package/contextmenu/contextmenu.esm.min.js +1 -1
  49. package/contextmenu/contextmenu.js +8 -5
  50. package/contextmenu/contextmenu.min.js +1 -1
  51. package/core/core.js +74 -50
  52. package/core/core.min.js +6 -6
  53. package/datatable/BodyCell.vue +4 -2
  54. package/datatable/DataTable.vue +6 -6
  55. package/datatable/datatable.cjs.js +14 -12
  56. package/datatable/datatable.cjs.min.js +1 -1
  57. package/datatable/datatable.esm.js +14 -12
  58. package/datatable/datatable.esm.min.js +1 -1
  59. package/datatable/datatable.js +14 -12
  60. package/datatable/datatable.min.js +1 -1
  61. package/dialog/Dialog.vue +1 -1
  62. package/dialog/dialog.cjs.js +1 -1
  63. package/dialog/dialog.cjs.min.js +1 -1
  64. package/dialog/dialog.esm.js +1 -1
  65. package/dialog/dialog.esm.min.js +1 -1
  66. package/dialog/dialog.js +1 -1
  67. package/dialog/dialog.min.js +1 -1
  68. package/dock/DockSub.vue +9 -3
  69. package/dock/dock.cjs.js +10 -4
  70. package/dock/dock.cjs.min.js +1 -1
  71. package/dock/dock.esm.js +11 -5
  72. package/dock/dock.esm.min.js +1 -1
  73. package/dock/dock.js +10 -4
  74. package/dock/dock.min.js +1 -1
  75. package/dropdown/Dropdown.vue +6 -3
  76. package/dropdown/dropdown.cjs.js +13 -10
  77. package/dropdown/dropdown.cjs.min.js +1 -1
  78. package/dropdown/dropdown.esm.js +14 -11
  79. package/dropdown/dropdown.esm.min.js +1 -1
  80. package/dropdown/dropdown.js +13 -10
  81. package/dropdown/dropdown.min.js +1 -1
  82. package/listbox/Listbox.vue +6 -3
  83. package/listbox/listbox.cjs.js +11 -8
  84. package/listbox/listbox.cjs.min.js +1 -1
  85. package/listbox/listbox.esm.js +12 -9
  86. package/listbox/listbox.esm.min.js +1 -1
  87. package/listbox/listbox.js +11 -8
  88. package/listbox/listbox.min.js +1 -1
  89. package/megamenu/MegaMenu.vue +7 -3
  90. package/megamenu/megamenu.cjs.js +10 -6
  91. package/megamenu/megamenu.cjs.min.js +1 -1
  92. package/megamenu/megamenu.esm.js +11 -7
  93. package/megamenu/megamenu.esm.min.js +1 -1
  94. package/megamenu/megamenu.js +10 -6
  95. package/megamenu/megamenu.min.js +1 -1
  96. package/menu/Menu.d.ts +8 -0
  97. package/menu/Menu.vue +14 -3
  98. package/menu/menu.cjs.js +39 -16
  99. package/menu/menu.cjs.min.js +1 -1
  100. package/menu/menu.esm.js +41 -18
  101. package/menu/menu.esm.min.js +1 -1
  102. package/menu/menu.js +39 -16
  103. package/menu/menu.min.js +1 -1
  104. package/menubar/Menubar.vue +7 -3
  105. package/menubar/menubar.cjs.js +10 -6
  106. package/menubar/menubar.cjs.min.js +1 -1
  107. package/menubar/menubar.esm.js +11 -7
  108. package/menubar/menubar.esm.min.js +1 -1
  109. package/menubar/menubar.js +10 -6
  110. package/menubar/menubar.min.js +1 -1
  111. package/multiselect/MultiSelect.vue +6 -3
  112. package/multiselect/multiselect.cjs.js +11 -8
  113. package/multiselect/multiselect.cjs.min.js +1 -1
  114. package/multiselect/multiselect.esm.js +12 -9
  115. package/multiselect/multiselect.esm.min.js +1 -1
  116. package/multiselect/multiselect.js +11 -8
  117. package/multiselect/multiselect.min.js +1 -1
  118. package/orderlist/OrderList.vue +8 -3
  119. package/orderlist/orderlist.cjs.js +11 -6
  120. package/orderlist/orderlist.cjs.min.js +1 -1
  121. package/orderlist/orderlist.esm.js +12 -7
  122. package/orderlist/orderlist.esm.min.js +1 -1
  123. package/orderlist/orderlist.js +11 -6
  124. package/orderlist/orderlist.min.js +1 -1
  125. package/package.json +1 -1
  126. package/panelmenu/PanelMenu.vue +9 -6
  127. package/panelmenu/PanelMenuList.vue +1 -1
  128. package/panelmenu/panelmenu.cjs.js +11 -8
  129. package/panelmenu/panelmenu.cjs.min.js +1 -1
  130. package/panelmenu/panelmenu.esm.js +11 -8
  131. package/panelmenu/panelmenu.esm.min.js +1 -1
  132. package/panelmenu/panelmenu.js +11 -8
  133. package/panelmenu/panelmenu.min.js +1 -1
  134. package/picklist/PickList.vue +8 -2
  135. package/picklist/picklist.cjs.js +8 -2
  136. package/picklist/picklist.cjs.min.js +1 -1
  137. package/picklist/picklist.esm.js +9 -3
  138. package/picklist/picklist.esm.min.js +1 -1
  139. package/picklist/picklist.js +8 -2
  140. package/picklist/picklist.min.js +1 -1
  141. package/rating/Rating.vue +9 -3
  142. package/rating/rating.cjs.js +11 -5
  143. package/rating/rating.cjs.min.js +1 -1
  144. package/rating/rating.esm.js +12 -6
  145. package/rating/rating.esm.min.js +1 -1
  146. package/rating/rating.js +11 -5
  147. package/rating/rating.min.js +1 -1
  148. package/resources/themes/arya-blue/theme.css +7 -0
  149. package/resources/themes/arya-green/theme.css +7 -0
  150. package/resources/themes/arya-orange/theme.css +7 -0
  151. package/resources/themes/arya-purple/theme.css +7 -0
  152. package/resources/themes/bootstrap4-dark-blue/theme.css +7 -0
  153. package/resources/themes/bootstrap4-dark-purple/theme.css +7 -0
  154. package/resources/themes/bootstrap4-light-blue/theme.css +7 -0
  155. package/resources/themes/bootstrap4-light-purple/theme.css +7 -0
  156. package/resources/themes/fluent-light/theme.css +7 -0
  157. package/resources/themes/lara-dark-blue/theme.css +7 -0
  158. package/resources/themes/lara-dark-indigo/theme.css +7 -0
  159. package/resources/themes/lara-dark-purple/theme.css +7 -0
  160. package/resources/themes/lara-dark-teal/theme.css +7 -0
  161. package/resources/themes/lara-light-blue/theme.css +7 -0
  162. package/resources/themes/lara-light-indigo/theme.css +7 -0
  163. package/resources/themes/lara-light-purple/theme.css +7 -0
  164. package/resources/themes/lara-light-teal/theme.css +7 -0
  165. package/resources/themes/luna-amber/theme.css +7 -0
  166. package/resources/themes/luna-blue/theme.css +7 -0
  167. package/resources/themes/luna-green/theme.css +7 -0
  168. package/resources/themes/luna-pink/theme.css +7 -0
  169. package/resources/themes/md-dark-deeppurple/theme.css +10 -2
  170. package/resources/themes/md-dark-indigo/theme.css +10 -2
  171. package/resources/themes/md-light-deeppurple/theme.css +10 -2
  172. package/resources/themes/md-light-indigo/theme.css +10 -2
  173. package/resources/themes/mdc-dark-deeppurple/theme.css +10 -2
  174. package/resources/themes/mdc-dark-indigo/theme.css +10 -2
  175. package/resources/themes/mdc-light-deeppurple/theme.css +10 -2
  176. package/resources/themes/mdc-light-indigo/theme.css +10 -2
  177. package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
  178. package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
  179. package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
  180. package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
  181. package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
  182. package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
  183. package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
  184. package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
  185. package/resources/themes/mira/theme.css +6066 -0
  186. package/resources/themes/nano/theme.css +5838 -0
  187. package/resources/themes/nova/theme.css +7 -0
  188. package/resources/themes/nova-accent/theme.css +7 -0
  189. package/resources/themes/nova-alt/theme.css +7 -0
  190. package/resources/themes/nova-vue/theme.css +7 -0
  191. package/resources/themes/rhea/theme.css +7 -0
  192. package/resources/themes/saga-blue/theme.css +7 -0
  193. package/resources/themes/saga-green/theme.css +7 -0
  194. package/resources/themes/saga-orange/theme.css +7 -0
  195. package/resources/themes/saga-purple/theme.css +7 -0
  196. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  197. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  198. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  199. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  200. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  201. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  202. package/resources/themes/soho-dark/theme.css +5831 -0
  203. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  204. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  205. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  206. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  207. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  208. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  209. package/resources/themes/soho-light/theme.css +5885 -0
  210. package/resources/themes/tailwind-light/theme.css +7 -0
  211. package/resources/themes/vela-blue/theme.css +7 -0
  212. package/resources/themes/vela-green/theme.css +7 -0
  213. package/resources/themes/vela-orange/theme.css +7 -0
  214. package/resources/themes/vela-purple/theme.css +7 -0
  215. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
  216. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
  217. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
  218. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
  219. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
  220. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
  221. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
  222. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
  223. package/resources/themes/viva-dark/theme.css +5993 -0
  224. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
  225. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
  226. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
  227. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
  228. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
  229. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
  230. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
  231. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
  232. package/resources/themes/viva-light/theme.css +5993 -0
  233. package/speeddial/SpeedDial.vue +6 -3
  234. package/speeddial/speeddial.cjs.js +11 -8
  235. package/speeddial/speeddial.cjs.min.js +1 -1
  236. package/speeddial/speeddial.esm.js +12 -9
  237. package/speeddial/speeddial.esm.min.js +1 -1
  238. package/speeddial/speeddial.js +11 -8
  239. package/speeddial/speeddial.min.js +1 -1
  240. package/tabview/TabView.vue +6 -3
  241. package/tabview/tabview.cjs.js +6 -3
  242. package/tabview/tabview.cjs.min.js +1 -1
  243. package/tabview/tabview.esm.js +7 -4
  244. package/tabview/tabview.esm.min.js +1 -1
  245. package/tabview/tabview.js +6 -3
  246. package/tabview/tabview.min.js +1 -1
  247. package/tag/Tag.vue +1 -1
  248. package/tag/tag.cjs.js +4 -2
  249. package/tag/tag.cjs.min.js +1 -1
  250. package/tag/tag.esm.js +5 -3
  251. package/tag/tag.esm.min.js +1 -1
  252. package/tag/tag.js +4 -2
  253. package/tag/tag.min.js +1 -1
  254. package/tieredmenu/TieredMenu.vue +7 -3
  255. package/tieredmenu/tieredmenu.cjs.js +10 -6
  256. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  257. package/tieredmenu/tieredmenu.esm.js +11 -7
  258. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  259. package/tieredmenu/tieredmenu.js +10 -6
  260. package/tieredmenu/tieredmenu.min.js +1 -1
  261. package/utils/utils.cjs.js +11 -16
  262. package/utils/utils.cjs.min.js +1 -1
  263. package/utils/utils.esm.js +11 -16
  264. package/utils/utils.esm.min.js +1 -1
  265. package/utils/utils.js +11 -16
  266. package/utils/utils.min.js +1 -1
  267. package/web-types.json +11 -1
@@ -1 +1 @@
1
- import e from"primevue/overlayeventbus";import t from"primevue/portal";import{ObjectUtils as i,DomHandler as n,ZIndexUtils as s,ConnectedOverlayScrollHandler as o,UniqueComponentId as l}from"primevue/utils";import a from"primevue/ripple";import{resolveComponent as r,resolveDirective as p,openBlock as d,createElementBlock as c,Fragment as h,renderList as u,normalizeClass as f,withDirectives as O,createBlock as y,resolveDynamicComponent as v,toDisplayString as b,createCommentVNode as g,createElementVNode as m,mergeProps as I,renderSlot as x,createTextVNode as L,createVNode as w,withCtx as S,Transition as C}from"vue";var V={name:"CascadeSelectSub",emits:["option-change"],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},mounted(){i.isNotEmpty(this.parentKey)&&this.position()},methods:{getOptionId(e){return`${this.selectId}_${e.key}`},getOptionLabel(e){return this.optionLabel?i.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue(e){return this.optionValue?i.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled(e){return!!this.optionDisabled&&i.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:e=>e.children,isOptionGroup:e=>i.isNotEmpty(e.children),isOptionSelected(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive(e){return this.activeOptionPath.some((t=>t.key===e.key))},isOptionFocused(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange(e){this.$emit("option-change",e)},position(){const e=this.$el.parentElement,t=n.getOffset(e),i=n.getViewport(),s=this.$el.offsetParent?this.$el.offsetWidth:n.getHiddenElementOuterWidth(this.$el),o=n.getOuterWidth(e.children[0]);parseInt(t.left,10)+o+s>i.width-n.calculateScrollbarWidth()&&(this.$el.style.left="-100%")},getOptionClass(e){return["p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.isOptionActive(e),"p-focus":this.isOptionFocused(e),"p-disabled":this.isOptionDisabled(e)}]}},directives:{ripple:a}};const k={class:"p-cascadeselect-panel p-cascadeselect-items"},K=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset"],G=["onClick"],P={key:1,class:"p-cascadeselect-item-text"};V.render=function(e,t,i,n,s,o){const l=r("CascadeSelectSub",!0),a=p("ripple");return d(),c("ul",k,[(d(!0),c(h,null,u(i.options,((e,t)=>(d(),c("li",{key:o.getOptionLabelToRender(e),id:o.getOptionId(e),class:f(o.getOptionClass(e)),role:"treeitem","aria-label":o.getOptionLabelToRender(e),"aria-selected":o.isOptionGroup(e)?void 0:o.isOptionSelected(e),"aria-expanded":o.isOptionGroup(e)?o.isOptionActive(e):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":t+1},[O((d(),c("div",{class:"p-cascadeselect-item-content",onClick:t=>o.onOptionClick(t,e)},[i.templates.option?(d(),y(v(i.templates.option),{key:0,option:e.option},null,8,["option"])):(d(),c("span",P,b(o.getOptionLabelToRender(e)),1)),o.isOptionGroup(e)?(d(),c("span",{key:2,class:f(["p-cascadeselect-group-icon",i.optionGroupIcon]),"aria-hidden":"true"},null,2)):g("",!0)],8,G)),[[a]]),o.isOptionGroup(e)&&o.isOptionActive(e)?(d(),y(l,{key:0,role:"group",class:"p-cascadeselect-sublist",selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:o.getOptionGroupChildren(e),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:o.onOptionChange},null,8,["selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])):g("",!0)],10,K)))),128))])};var E={name:"CascadeSelect",emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],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,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:"pi pi-chevron-down"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},optionGroupIcon:{type:String,default:"pi pi-angle-right"},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}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data:()=>({focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}),watch:{options(){this.autoUpdateModel()}},mounted(){this.autoUpdateModel()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel(e){return this.optionLabel?i.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.resolveFieldData(e,this.optionValue):e},isOptionDisabled(e){return!!this.optionDisabled&&i.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren(e,t){return i.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:e=>i.isNotEmpty(e.children),show(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&i.isNotEmpty(this.activeOptionPath)){const e=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?e.index:-1,level:e.level,parentKey:e.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&n.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.activeOptionPath=[],this.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&n.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled||this.loading)return void e.preventDefault();const 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&&i.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}},onOptionChange(e){const{originalEvent:t,processedOption:s,isFocus:o,isHide:l}=e;if(i.isEmpty(s))return;const{index:a,level:r,parentKey:p,children:d}=s,c=i.isNotEmpty(d),h=this.activeOptionPath.filter((e=>e.parentKey!==p));h.push(s),this.focusedOptionInfo={index:a,level:r,parentKey:p},this.activeOptionPath=h,c?this.onOptionGroupSelect(t,s):this.onOptionSelect(t,s,l),o&&n.focus(this.$refs.focusInput)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t.option);this.activeOptionPath.forEach((e=>e.selected=!0)),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),n.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick(t){e.emit("overlay-click",{originalEvent:t,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{const t=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((e=>e.key===t.parentKey)),s=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,o=i.isEmpty(t.parent);s&&(this.activeOptionPath=this.activeOptionPath.filter((e=>e.parentKey!==this.focusedOptionInfo.parentKey))),o||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t)){this.activeOptionPath.some((e=>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(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){const 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(e){this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter(e){s.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave(e){s.clear(e)},alignOverlay(){"self"===this.appendTo?n.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=n.getOuterWidth(this.$el)+"px",n.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!n.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption(e){return!!e&&!this.isOptionDisabled(e.option)},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.activeOptionPath.some((t=>t.key===e.key))},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return i.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?i.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e)))},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue(e,t,n=0){if(!(t=t||0===n&&this.processedOptions))return null;if(i.isEmpty(e))return[];for(let s=0;s<t.length;s++){const o=t[s];if(i.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];const l=this.findOptionPathByValue(e,o.children,n+1);if(l)return l.unshift(o),l}},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionInfo.index?(i=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionInfo.index):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionInfo.index&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(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(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=n.findSingle(this.list,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel(){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(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions(e,t=0,i={},n=""){const s=[];return e&&e.forEach(((e,o)=>{const l=(""!==n?n+"_":"")+o,a={option:e,index:o,level:t,key:l,parent:i,parentKey:n};a.children=this.createProcessedOptions(this.getOptionGroupChildren(e,t),t+1,a,l),s.push(a)})),s},overlayRef(e){this.overlay=e}},computed:{containerClass(){return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},labelClass(){return["p-cascadeselect-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-cascadeselect-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-cascadeselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-cascadeselect-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},hasSelectedOption(){return i.isNotEmpty(this.modelValue)},label(){const e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){const t=this.findOptionPathByValue(this.modelValue),n=i.isNotEmpty(t)?t[t.length-1]:null;return n?this.getOptionLabel(n.option):e}return e},processedOptions(){return this.createProcessedOptions(this.options||[])},visibleOptions(){const e=this.activeOptionPath.find((e=>e.key===this.focusedOptionInfo.parentKey));return e?e.children:this.processedOptions},equalityKey(){return this.optionValue?null:this.dataKey},searchResultMessageText(){return i.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},id(){return this.$attrs.id||l()},focusedOptionId(){return-1!==this.focusedOptionInfo.index?`${this.id}${i.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:""}_${this.focusedOptionInfo.index}`:null}},components:{CascadeSelectSub:V,Portal:t}};const D={class:"p-hidden-accessible"},$=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],F={class:"p-cascadeselect-trigger",role:"button",tabindex:"-1","aria-hidden":"true"},M={role:"status","aria-live":"polite",class:"p-hidden-accessible"},T={class:"p-cascadeselect-items-wrapper"},A={role:"status","aria-live":"polite",class:"p-hidden-accessible"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n}\n.p-cascadeselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n}\n.p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-cascadeselect-group-icon {\n margin-left: auto;\n}\n.p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n}\n.p-fluid .p-cascadeselect {\n display: flex;\n}\n.p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n}\n.p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-cascadeselect-item-active {\n overflow: visible !important;\n}\n.p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n}\n"),E.render=function(e,t,i,n,s,o){const l=r("CascadeSelectSub"),a=r("Portal");return d(),c("div",{ref:"container",class:f(o.containerClass),onClick:t[5]||(t[5]=e=>o.onContainerClick(e))},[m("div",D,[m("input",I({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,readonly:"",disabled:i.disabled,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":s.overlayVisible,"aria-controls":o.id+"_tree","aria-activedescendant":s.focused?o.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>o.onFocus&&o.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>o.onBlur&&o.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>o.onKeyDown&&o.onKeyDown(...e))},i.inputProps),null,16,$)]),m("span",{class:f(o.labelClass)},[x(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[L(b(o.label),1)]))],2),m("div",F,[x(e.$slots,"indicator",{},(()=>[m("span",{class:f(o.dropdownIconClass)},null,2)]))]),m("span",M,b(o.searchResultMessageText),1),w(a,{appendTo:i.appendTo},{default:S((()=>[w(C,{name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},{default:S((()=>[s.overlayVisible?(d(),c("div",I({key:0,ref:o.overlayRef,style:i.panelStyle,class:o.panelStyleClass,onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e)),onKeydown:t[4]||(t[4]=(...e)=>o.onOverlayKeyDown&&o.onOverlayKeyDown(...e))},i.panelProps),[m("div",T,[w(l,{id:o.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:o.id,focusedOptionId:s.focused?o.focusedOptionId:void 0,options:o.processedOptions,activeOptionPath:s.activeOptionPath,level:0,templates:e.$slots,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:o.onOptionChange},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])]),m("span",A,b(o.selectedMessageText),1)],16)):g("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo"])],2)};export{E as default};
1
+ import e from"primevue/overlayeventbus";import t from"primevue/portal";import{ObjectUtils as i,DomHandler as n,UniqueComponentId as s,ZIndexUtils as o,ConnectedOverlayScrollHandler as l}from"primevue/utils";import a from"primevue/ripple";import{resolveComponent as r,resolveDirective as p,openBlock as d,createElementBlock as c,Fragment as h,renderList as u,normalizeClass as f,withDirectives as O,createBlock as y,resolveDynamicComponent as v,toDisplayString as b,createCommentVNode as g,createElementVNode as m,mergeProps as I,renderSlot as x,createTextVNode as L,createVNode as w,withCtx as S,Transition as C}from"vue";var V={name:"CascadeSelectSub",emits:["option-change"],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},mounted(){i.isNotEmpty(this.parentKey)&&this.position()},methods:{getOptionId(e){return`${this.selectId}_${e.key}`},getOptionLabel(e){return this.optionLabel?i.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue(e){return this.optionValue?i.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled(e){return!!this.optionDisabled&&i.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:e=>e.children,isOptionGroup:e=>i.isNotEmpty(e.children),isOptionSelected(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive(e){return this.activeOptionPath.some((t=>t.key===e.key))},isOptionFocused(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange(e){this.$emit("option-change",e)},position(){const e=this.$el.parentElement,t=n.getOffset(e),i=n.getViewport(),s=this.$el.offsetParent?this.$el.offsetWidth:n.getHiddenElementOuterWidth(this.$el),o=n.getOuterWidth(e.children[0]);parseInt(t.left,10)+o+s>i.width-n.calculateScrollbarWidth()&&(this.$el.style.left="-100%")},getOptionClass(e){return["p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.isOptionActive(e),"p-focus":this.isOptionFocused(e),"p-disabled":this.isOptionDisabled(e)}]}},directives:{ripple:a}};const k={class:"p-cascadeselect-panel p-cascadeselect-items"},K=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset"],G=["onClick"],P={key:1,class:"p-cascadeselect-item-text"};V.render=function(e,t,i,n,s,o){const l=r("CascadeSelectSub",!0),a=p("ripple");return d(),c("ul",k,[(d(!0),c(h,null,u(i.options,((e,t)=>(d(),c("li",{key:o.getOptionLabelToRender(e),id:o.getOptionId(e),class:f(o.getOptionClass(e)),role:"treeitem","aria-label":o.getOptionLabelToRender(e),"aria-selected":o.isOptionGroup(e)?void 0:o.isOptionSelected(e),"aria-expanded":o.isOptionGroup(e)?o.isOptionActive(e):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":t+1},[O((d(),c("div",{class:"p-cascadeselect-item-content",onClick:t=>o.onOptionClick(t,e)},[i.templates.option?(d(),y(v(i.templates.option),{key:0,option:e.option},null,8,["option"])):(d(),c("span",P,b(o.getOptionLabelToRender(e)),1)),o.isOptionGroup(e)?(d(),c("span",{key:2,class:f(["p-cascadeselect-group-icon",i.optionGroupIcon]),"aria-hidden":"true"},null,2)):g("",!0)],8,G)),[[a]]),o.isOptionGroup(e)&&o.isOptionActive(e)?(d(),y(l,{key:0,role:"group",class:"p-cascadeselect-sublist",selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:o.getOptionGroupChildren(e),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:o.onOptionChange},null,8,["selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])):g("",!0)],10,K)))),128))])};var E={name:"CascadeSelect",emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],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,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:"pi pi-chevron-down"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},optionGroupIcon:{type:String,default:"pi pi-angle-right"},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}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data(){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()},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||s(),this.autoUpdateModel()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel(e){return this.optionLabel?i.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.resolveFieldData(e,this.optionValue):e},isOptionDisabled(e){return!!this.optionDisabled&&i.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren(e,t){return i.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:e=>i.isNotEmpty(e.children),show(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&i.isNotEmpty(this.activeOptionPath)){const e=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?e.index:-1,level:e.level,parentKey:e.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&n.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.activeOptionPath=[],this.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&n.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled||this.loading)return void e.preventDefault();const 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&&i.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}},onOptionChange(e){const{originalEvent:t,processedOption:s,isFocus:o,isHide:l}=e;if(i.isEmpty(s))return;const{index:a,level:r,parentKey:p,children:d}=s,c=i.isNotEmpty(d),h=this.activeOptionPath.filter((e=>e.parentKey!==p));h.push(s),this.focusedOptionInfo={index:a,level:r,parentKey:p},this.activeOptionPath=h,c?this.onOptionGroupSelect(t,s):this.onOptionSelect(t,s,l),o&&n.focus(this.$refs.focusInput)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t.option);this.activeOptionPath.forEach((e=>e.selected=!0)),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),n.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick(t){e.emit("overlay-click",{originalEvent:t,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{const t=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((e=>e.key===t.parentKey)),s=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,o=i.isEmpty(t.parent);s&&(this.activeOptionPath=this.activeOptionPath.filter((e=>e.parentKey!==this.focusedOptionInfo.parentKey))),o||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t)){this.activeOptionPath.some((e=>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(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){const 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(e){this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter(e){o.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave(e){o.clear(e)},alignOverlay(){"self"===this.appendTo?n.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=n.getOuterWidth(this.$el)+"px",n.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new l(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!n.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption(e){return!!e&&!this.isOptionDisabled(e.option)},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.activeOptionPath.some((t=>t.key===e.key))},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return i.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?i.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e)))},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue(e,t,n=0){if(!(t=t||0===n&&this.processedOptions))return null;if(i.isEmpty(e))return[];for(let s=0;s<t.length;s++){const o=t[s];if(i.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];const l=this.findOptionPathByValue(e,o.children,n+1);if(l)return l.unshift(o),l}},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionInfo.index?(i=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionInfo.index):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionInfo.index&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(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(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=n.findSingle(this.list,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel(){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(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions(e,t=0,i={},n=""){const s=[];return e&&e.forEach(((e,o)=>{const l=(""!==n?n+"_":"")+o,a={option:e,index:o,level:t,key:l,parent:i,parentKey:n};a.children=this.createProcessedOptions(this.getOptionGroupChildren(e,t),t+1,a,l),s.push(a)})),s},overlayRef(e){this.overlay=e}},computed:{containerClass(){return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},labelClass(){return["p-cascadeselect-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-cascadeselect-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-cascadeselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-cascadeselect-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},hasSelectedOption(){return i.isNotEmpty(this.modelValue)},label(){const e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){const t=this.findOptionPathByValue(this.modelValue),n=i.isNotEmpty(t)?t[t.length-1]:null;return n?this.getOptionLabel(n.option):e}return e},processedOptions(){return this.createProcessedOptions(this.options||[])},visibleOptions(){const e=this.activeOptionPath.find((e=>e.key===this.focusedOptionInfo.parentKey));return e?e.children:this.processedOptions},equalityKey(){return this.optionValue?null:this.dataKey},searchResultMessageText(){return i.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionInfo.index?`${this.id}${i.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:""}_${this.focusedOptionInfo.index}`:null}},components:{CascadeSelectSub:V,Portal:t}};const D={class:"p-hidden-accessible"},$=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],F={class:"p-cascadeselect-trigger",role:"button",tabindex:"-1","aria-hidden":"true"},M={role:"status","aria-live":"polite",class:"p-hidden-accessible"},T={class:"p-cascadeselect-items-wrapper"},A={role:"status","aria-live":"polite",class:"p-hidden-accessible"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n}\n.p-cascadeselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n}\n.p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-cascadeselect-group-icon {\n margin-left: auto;\n}\n.p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n}\n.p-fluid .p-cascadeselect {\n display: flex;\n}\n.p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n}\n.p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-cascadeselect-item-active {\n overflow: visible !important;\n}\n.p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n}\n"),E.render=function(e,t,i,n,s,o){const l=r("CascadeSelectSub"),a=r("Portal");return d(),c("div",{ref:"container",class:f(o.containerClass),onClick:t[5]||(t[5]=e=>o.onContainerClick(e))},[m("div",D,[m("input",I({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,readonly:"",disabled:i.disabled,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":s.overlayVisible,"aria-controls":s.id+"_tree","aria-activedescendant":s.focused?o.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>o.onFocus&&o.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>o.onBlur&&o.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>o.onKeyDown&&o.onKeyDown(...e))},i.inputProps),null,16,$)]),m("span",{class:f(o.labelClass)},[x(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[L(b(o.label),1)]))],2),m("div",F,[x(e.$slots,"indicator",{},(()=>[m("span",{class:f(o.dropdownIconClass)},null,2)]))]),m("span",M,b(o.searchResultMessageText),1),w(a,{appendTo:i.appendTo},{default:S((()=>[w(C,{name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},{default:S((()=>[s.overlayVisible?(d(),c("div",I({key:0,ref:o.overlayRef,style:i.panelStyle,class:o.panelStyleClass,onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e)),onKeydown:t[4]||(t[4]=(...e)=>o.onOverlayKeyDown&&o.onOverlayKeyDown(...e))},i.panelProps),[m("div",T,[w(l,{id:s.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:s.id,focusedOptionId:s.focused?o.focusedOptionId:void 0,options:o.processedOptions,activeOptionPath:s.activeOptionPath,level:0,templates:e.$slots,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:o.onOptionChange},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])]),m("span",A,b(o.selectedMessageText),1)],16)):g("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo"])],2)};export{E as default};
@@ -287,6 +287,7 @@ this.primevue.cascadeselect = (function (OverlayEventBus, Portal, utils, Ripple,
287
287
  focusOnHover: false,
288
288
  data() {
289
289
  return {
290
+ id: this.$attrs.id,
290
291
  focused: false,
291
292
  focusedOptionInfo: { index: -1, level: 0, parentKey: '' },
292
293
  activeOptionPath: [],
@@ -295,11 +296,16 @@ this.primevue.cascadeselect = (function (OverlayEventBus, Portal, utils, Ripple,
295
296
  };
296
297
  },
297
298
  watch: {
299
+ '$attrs.id': function (newValue) {
300
+ this.id = newValue || utils.UniqueComponentId();
301
+ },
298
302
  options() {
299
303
  this.autoUpdateModel();
300
304
  }
301
305
  },
302
306
  mounted() {
307
+ this.id = this.id || utils.UniqueComponentId();
308
+
303
309
  this.autoUpdateModel();
304
310
  },
305
311
  beforeUnmount() {
@@ -938,9 +944,6 @@ this.primevue.cascadeselect = (function (OverlayEventBus, Portal, utils, Ripple,
938
944
  selectedMessageText() {
939
945
  return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
940
946
  },
941
- id() {
942
- return this.$attrs.id || utils.UniqueComponentId();
943
- },
944
947
  focusedOptionId() {
945
948
  return this.focusedOptionInfo.index !== -1 ? `${this.id}${utils.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey) ? '_' + this.focusedOptionInfo.parentKey : ''}_${this.focusedOptionInfo.index}` : null;
946
949
  }
@@ -996,7 +999,7 @@ this.primevue.cascadeselect = (function (OverlayEventBus, Portal, utils, Ripple,
996
999
  "aria-labelledby": _ctx.ariaLabelledby,
997
1000
  "aria-haspopup": "tree",
998
1001
  "aria-expanded": $data.overlayVisible,
999
- "aria-controls": $options.id + '_tree',
1002
+ "aria-controls": $data.id + '_tree',
1000
1003
  "aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
1001
1004
  onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
1002
1005
  onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
@@ -1042,10 +1045,10 @@ this.primevue.cascadeselect = (function (OverlayEventBus, Portal, utils, Ripple,
1042
1045
  }, $props.panelProps), [
1043
1046
  vue.createElementVNode("div", _hoisted_5, [
1044
1047
  vue.createVNode(_component_CascadeSelectSub, {
1045
- id: $options.id + '_tree',
1048
+ id: $data.id + '_tree',
1046
1049
  role: "tree",
1047
1050
  "aria-orientation": "horizontal",
1048
- selectId: $options.id,
1051
+ selectId: $data.id,
1049
1052
  focusedOptionId: $data.focused ? $options.focusedOptionId : undefined,
1050
1053
  options: $options.processedOptions,
1051
1054
  activeOptionPath: $data.activeOptionPath,
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),a=s(t),r={name:"CascadeSelectSub",emits:["option-change"],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},mounted(){i.ObjectUtils.isNotEmpty(this.parentKey)&&this.position()},methods:{getOptionId(e){return`${this.selectId}_${e.key}`},getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:e=>e.children,isOptionGroup:e=>i.ObjectUtils.isNotEmpty(e.children),isOptionSelected(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive(e){return this.activeOptionPath.some((t=>t.key===e.key))},isOptionFocused(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange(e){this.$emit("option-change",e)},position(){const e=this.$el.parentElement,t=i.DomHandler.getOffset(e),n=i.DomHandler.getViewport(),o=this.$el.offsetParent?this.$el.offsetWidth:i.DomHandler.getHiddenElementOuterWidth(this.$el),s=i.DomHandler.getOuterWidth(e.children[0]);parseInt(t.left,10)+s+o>n.width-i.DomHandler.calculateScrollbarWidth()&&(this.$el.style.left="-100%")},getOptionClass(e){return["p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.isOptionActive(e),"p-focus":this.isOptionFocused(e),"p-disabled":this.isOptionDisabled(e)}]}},directives:{ripple:s(n).default}};const p={class:"p-cascadeselect-panel p-cascadeselect-items"},c=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset"],d=["onClick"],h={key:1,class:"p-cascadeselect-item-text"};r.render=function(e,t,i,n,s,l){const a=o.resolveComponent("CascadeSelectSub",!0),r=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("ul",p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.options,((e,t)=>(o.openBlock(),o.createElementBlock("li",{key:l.getOptionLabelToRender(e),id:l.getOptionId(e),class:o.normalizeClass(l.getOptionClass(e)),role:"treeitem","aria-label":l.getOptionLabelToRender(e),"aria-selected":l.isOptionGroup(e)?void 0:l.isOptionSelected(e),"aria-expanded":l.isOptionGroup(e)?l.isOptionActive(e):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":t+1},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"p-cascadeselect-item-content",onClick:t=>l.onOptionClick(t,e)},[i.templates.option?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.option),{key:0,option:e.option},null,8,["option"])):(o.openBlock(),o.createElementBlock("span",h,o.toDisplayString(l.getOptionLabelToRender(e)),1)),l.isOptionGroup(e)?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(["p-cascadeselect-group-icon",i.optionGroupIcon]),"aria-hidden":"true"},null,2)):o.createCommentVNode("",!0)],8,d)),[[r]]),l.isOptionGroup(e)&&l.isOptionActive(e)?(o.openBlock(),o.createBlock(a,{key:0,role:"group",class:"p-cascadeselect-sublist",selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:l.getOptionGroupChildren(e),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:l.onOptionChange},null,8,["selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])):o.createCommentVNode("",!0)],10,c)))),128))])};var u={name:"CascadeSelect",emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],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,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:"pi pi-chevron-down"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},optionGroupIcon:{type:String,default:"pi pi-angle-right"},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}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data:()=>({focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}),watch:{options(){this.autoUpdateModel()}},mounted(){this.autoUpdateModel()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(i.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren(e,t){return i.ObjectUtils.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:e=>i.ObjectUtils.isNotEmpty(e.children),show(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&i.ObjectUtils.isNotEmpty(this.activeOptionPath)){const e=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?e.index:-1,level:e.level,parentKey:e.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&i.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.activeOptionPath=[],this.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&i.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled||this.loading)return void e.preventDefault();const 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&&i.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}},onOptionChange(e){const{originalEvent:t,processedOption:n,isFocus:o,isHide:s}=e;if(i.ObjectUtils.isEmpty(n))return;const{index:l,level:a,parentKey:r,children:p}=n,c=i.ObjectUtils.isNotEmpty(p),d=this.activeOptionPath.filter((e=>e.parentKey!==r));d.push(n),this.focusedOptionInfo={index:l,level:a,parentKey:r},this.activeOptionPath=d,c?this.onOptionGroupSelect(t,n):this.onOptionSelect(t,n,s),o&&i.DomHandler.focus(this.$refs.focusInput)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t.option);this.activeOptionPath.forEach((e=>e.selected=!0)),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),i.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick(e){l.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{const t=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((e=>e.key===t.parentKey)),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,s=i.ObjectUtils.isEmpty(t.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((e=>e.parentKey!==this.focusedOptionInfo.parentKey))),s||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t)){this.activeOptionPath.some((e=>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(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){const 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(e){this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter(e){i.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave(e){i.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?i.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.DomHandler.getOuterWidth(this.$el)+"px",i.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption(e){return!!e&&!this.isOptionDisabled(e.option)},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.activeOptionPath.some((t=>t.key===e.key))},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return i.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?i.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e)))},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue(e,t,n=0){if(!(t=t||0===n&&this.processedOptions))return null;if(i.ObjectUtils.isEmpty(e))return[];for(let o=0;o<t.length;o++){const s=t[o];if(i.ObjectUtils.equals(e,this.getOptionValue(s.option),this.equalityKey))return[s];const l=this.findOptionPathByValue(e,s.children,n+1);if(l)return l.unshift(s),l}},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionInfo.index?(i=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionInfo.index):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionInfo.index&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(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(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,n=i.DomHandler.findSingle(this.list,`li[id="${t}"]`);n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel(){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(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions(e,t=0,i={},n=""){const o=[];return e&&e.forEach(((e,s)=>{const l=(""!==n?n+"_":"")+s,a={option:e,index:s,level:t,key:l,parent:i,parentKey:n};a.children=this.createProcessedOptions(this.getOptionGroupChildren(e,t),t+1,a,l),o.push(a)})),o},overlayRef(e){this.overlay=e}},computed:{containerClass(){return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},labelClass(){return["p-cascadeselect-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-cascadeselect-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-cascadeselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-cascadeselect-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},hasSelectedOption(){return i.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){const t=this.findOptionPathByValue(this.modelValue),n=i.ObjectUtils.isNotEmpty(t)?t[t.length-1]:null;return n?this.getOptionLabel(n.option):e}return e},processedOptions(){return this.createProcessedOptions(this.options||[])},visibleOptions(){const e=this.activeOptionPath.find((e=>e.key===this.focusedOptionInfo.parentKey));return e?e.children:this.processedOptions},equalityKey(){return this.optionValue?null:this.dataKey},searchResultMessageText(){return i.ObjectUtils.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},id(){return this.$attrs.id||i.UniqueComponentId()},focusedOptionId(){return-1!==this.focusedOptionInfo.index?`${this.id}${i.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:""}_${this.focusedOptionInfo.index}`:null}},components:{CascadeSelectSub:r,Portal:a.default}};const O={class:"p-hidden-accessible"},f=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y={class:"p-cascadeselect-trigger",role:"button",tabindex:"-1","aria-hidden":"true"},v={role:"status","aria-live":"polite",class:"p-hidden-accessible"},b={class:"p-cascadeselect-items-wrapper"},m={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n}\n.p-cascadeselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n}\n.p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-cascadeselect-group-icon {\n margin-left: auto;\n}\n.p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n}\n.p-fluid .p-cascadeselect {\n display: flex;\n}\n.p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n}\n.p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-cascadeselect-item-active {\n overflow: visible !important;\n}\n.p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n}\n"),u.render=function(e,t,i,n,s,l){const a=o.resolveComponent("CascadeSelectSub"),r=o.resolveComponent("Portal");return o.openBlock(),o.createElementBlock("div",{ref:"container",class:o.normalizeClass(l.containerClass),onClick:t[5]||(t[5]=e=>l.onContainerClick(e))},[o.createElementVNode("div",O,[o.createElementVNode("input",o.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,readonly:"",disabled:i.disabled,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":s.overlayVisible,"aria-controls":l.id+"_tree","aria-activedescendant":s.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onKeyDown&&l.onKeyDown(...e))},i.inputProps),null,16,f)]),o.createElementVNode("span",{class:o.normalizeClass(l.labelClass)},[o.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[o.createTextVNode(o.toDisplayString(l.label),1)]))],2),o.createElementVNode("div",y,[o.renderSlot(e.$slots,"indicator",{},(()=>[o.createElementVNode("span",{class:o.normalizeClass(l.dropdownIconClass)},null,2)]))]),o.createElementVNode("span",v,o.toDisplayString(l.searchResultMessageText),1),o.createVNode(r,{appendTo:i.appendTo},{default:o.withCtx((()=>[o.createVNode(o.Transition,{name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},{default:o.withCtx((()=>[s.overlayVisible?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.overlayRef,style:i.panelStyle,class:l.panelStyleClass,onClick:t[3]||(t[3]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e)),onKeydown:t[4]||(t[4]=(...e)=>l.onOverlayKeyDown&&l.onOverlayKeyDown(...e))},i.panelProps),[o.createElementVNode("div",b,[o.createVNode(a,{id:l.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:l.id,focusedOptionId:s.focused?l.focusedOptionId:void 0,options:l.processedOptions,activeOptionPath:s.activeOptionPath,level:0,templates:e.$slots,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:l.onOptionChange},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])]),o.createElementVNode("span",m,o.toDisplayString(l.selectedMessageText),1)],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo"])],2)},u}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),a=s(t),r={name:"CascadeSelectSub",emits:["option-change"],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},mounted(){i.ObjectUtils.isNotEmpty(this.parentKey)&&this.position()},methods:{getOptionId(e){return`${this.selectId}_${e.key}`},getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:e=>e.children,isOptionGroup:e=>i.ObjectUtils.isNotEmpty(e.children),isOptionSelected(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive(e){return this.activeOptionPath.some((t=>t.key===e.key))},isOptionFocused(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange(e){this.$emit("option-change",e)},position(){const e=this.$el.parentElement,t=i.DomHandler.getOffset(e),n=i.DomHandler.getViewport(),o=this.$el.offsetParent?this.$el.offsetWidth:i.DomHandler.getHiddenElementOuterWidth(this.$el),s=i.DomHandler.getOuterWidth(e.children[0]);parseInt(t.left,10)+s+o>n.width-i.DomHandler.calculateScrollbarWidth()&&(this.$el.style.left="-100%")},getOptionClass(e){return["p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.isOptionActive(e),"p-focus":this.isOptionFocused(e),"p-disabled":this.isOptionDisabled(e)}]}},directives:{ripple:s(n).default}};const p={class:"p-cascadeselect-panel p-cascadeselect-items"},c=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset"],d=["onClick"],h={key:1,class:"p-cascadeselect-item-text"};r.render=function(e,t,i,n,s,l){const a=o.resolveComponent("CascadeSelectSub",!0),r=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("ul",p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.options,((e,t)=>(o.openBlock(),o.createElementBlock("li",{key:l.getOptionLabelToRender(e),id:l.getOptionId(e),class:o.normalizeClass(l.getOptionClass(e)),role:"treeitem","aria-label":l.getOptionLabelToRender(e),"aria-selected":l.isOptionGroup(e)?void 0:l.isOptionSelected(e),"aria-expanded":l.isOptionGroup(e)?l.isOptionActive(e):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":t+1},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"p-cascadeselect-item-content",onClick:t=>l.onOptionClick(t,e)},[i.templates.option?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.option),{key:0,option:e.option},null,8,["option"])):(o.openBlock(),o.createElementBlock("span",h,o.toDisplayString(l.getOptionLabelToRender(e)),1)),l.isOptionGroup(e)?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(["p-cascadeselect-group-icon",i.optionGroupIcon]),"aria-hidden":"true"},null,2)):o.createCommentVNode("",!0)],8,d)),[[r]]),l.isOptionGroup(e)&&l.isOptionActive(e)?(o.openBlock(),o.createBlock(a,{key:0,role:"group",class:"p-cascadeselect-sublist",selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:l.getOptionGroupChildren(e),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:l.onOptionChange},null,8,["selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])):o.createCommentVNode("",!0)],10,c)))),128))])};var u={name:"CascadeSelect",emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],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,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:"pi pi-chevron-down"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},optionGroupIcon:{type:String,default:"pi pi-angle-right"},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}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data(){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||i.UniqueComponentId()},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||i.UniqueComponentId(),this.autoUpdateModel()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(i.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren(e,t){return i.ObjectUtils.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:e=>i.ObjectUtils.isNotEmpty(e.children),show(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&i.ObjectUtils.isNotEmpty(this.activeOptionPath)){const e=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?e.index:-1,level:e.level,parentKey:e.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&i.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.activeOptionPath=[],this.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&i.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled||this.loading)return void e.preventDefault();const 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&&i.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}},onOptionChange(e){const{originalEvent:t,processedOption:n,isFocus:o,isHide:s}=e;if(i.ObjectUtils.isEmpty(n))return;const{index:l,level:a,parentKey:r,children:p}=n,c=i.ObjectUtils.isNotEmpty(p),d=this.activeOptionPath.filter((e=>e.parentKey!==r));d.push(n),this.focusedOptionInfo={index:l,level:a,parentKey:r},this.activeOptionPath=d,c?this.onOptionGroupSelect(t,n):this.onOptionSelect(t,n,s),o&&i.DomHandler.focus(this.$refs.focusInput)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t.option);this.activeOptionPath.forEach((e=>e.selected=!0)),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),i.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick(e){l.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{const t=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((e=>e.key===t.parentKey)),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,s=i.ObjectUtils.isEmpty(t.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((e=>e.parentKey!==this.focusedOptionInfo.parentKey))),s||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t)){this.activeOptionPath.some((e=>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(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){const 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(e){this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter(e){i.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave(e){i.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?i.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.DomHandler.getOuterWidth(this.$el)+"px",i.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption(e){return!!e&&!this.isOptionDisabled(e.option)},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.activeOptionPath.some((t=>t.key===e.key))},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return i.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?i.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e)))},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue(e,t,n=0){if(!(t=t||0===n&&this.processedOptions))return null;if(i.ObjectUtils.isEmpty(e))return[];for(let o=0;o<t.length;o++){const s=t[o];if(i.ObjectUtils.equals(e,this.getOptionValue(s.option),this.equalityKey))return[s];const l=this.findOptionPathByValue(e,s.children,n+1);if(l)return l.unshift(s),l}},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionInfo.index?(i=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionInfo.index):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionInfo.index&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(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(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,n=i.DomHandler.findSingle(this.list,`li[id="${t}"]`);n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel(){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(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions(e,t=0,i={},n=""){const o=[];return e&&e.forEach(((e,s)=>{const l=(""!==n?n+"_":"")+s,a={option:e,index:s,level:t,key:l,parent:i,parentKey:n};a.children=this.createProcessedOptions(this.getOptionGroupChildren(e,t),t+1,a,l),o.push(a)})),o},overlayRef(e){this.overlay=e}},computed:{containerClass(){return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},labelClass(){return["p-cascadeselect-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-cascadeselect-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-cascadeselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-cascadeselect-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},hasSelectedOption(){return i.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){const t=this.findOptionPathByValue(this.modelValue),n=i.ObjectUtils.isNotEmpty(t)?t[t.length-1]:null;return n?this.getOptionLabel(n.option):e}return e},processedOptions(){return this.createProcessedOptions(this.options||[])},visibleOptions(){const e=this.activeOptionPath.find((e=>e.key===this.focusedOptionInfo.parentKey));return e?e.children:this.processedOptions},equalityKey(){return this.optionValue?null:this.dataKey},searchResultMessageText(){return i.ObjectUtils.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionInfo.index?`${this.id}${i.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:""}_${this.focusedOptionInfo.index}`:null}},components:{CascadeSelectSub:r,Portal:a.default}};const O={class:"p-hidden-accessible"},f=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y={class:"p-cascadeselect-trigger",role:"button",tabindex:"-1","aria-hidden":"true"},v={role:"status","aria-live":"polite",class:"p-hidden-accessible"},b={class:"p-cascadeselect-items-wrapper"},m={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n}\n.p-cascadeselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n}\n.p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-cascadeselect-group-icon {\n margin-left: auto;\n}\n.p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n}\n.p-fluid .p-cascadeselect {\n display: flex;\n}\n.p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n}\n.p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-cascadeselect-item-active {\n overflow: visible !important;\n}\n.p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n}\n"),u.render=function(e,t,i,n,s,l){const a=o.resolveComponent("CascadeSelectSub"),r=o.resolveComponent("Portal");return o.openBlock(),o.createElementBlock("div",{ref:"container",class:o.normalizeClass(l.containerClass),onClick:t[5]||(t[5]=e=>l.onContainerClick(e))},[o.createElementVNode("div",O,[o.createElementVNode("input",o.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,readonly:"",disabled:i.disabled,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":s.overlayVisible,"aria-controls":s.id+"_tree","aria-activedescendant":s.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onKeyDown&&l.onKeyDown(...e))},i.inputProps),null,16,f)]),o.createElementVNode("span",{class:o.normalizeClass(l.labelClass)},[o.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[o.createTextVNode(o.toDisplayString(l.label),1)]))],2),o.createElementVNode("div",y,[o.renderSlot(e.$slots,"indicator",{},(()=>[o.createElementVNode("span",{class:o.normalizeClass(l.dropdownIconClass)},null,2)]))]),o.createElementVNode("span",v,o.toDisplayString(l.searchResultMessageText),1),o.createVNode(r,{appendTo:i.appendTo},{default:o.withCtx((()=>[o.createVNode(o.Transition,{name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},{default:o.withCtx((()=>[s.overlayVisible?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.overlayRef,style:i.panelStyle,class:l.panelStyleClass,onClick:t[3]||(t[3]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e)),onKeydown:t[4]||(t[4]=(...e)=>l.onOverlayKeyDown&&l.onOverlayKeyDown(...e))},i.panelProps),[o.createElementVNode("div",b,[o.createVNode(a,{id:s.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:s.id,focusedOptionId:s.focused?l.focusedOptionId:void 0,options:l.processedOptions,activeOptionPath:s.activeOptionPath,level:0,templates:e.$slots,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:l.onOptionChange},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])]),o.createElementVNode("span",m,o.toDisplayString(l.selectedMessageText),1)],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo"])],2)},u}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);
@@ -42,7 +42,6 @@ interface PrimeVueLocaleAriaOptions {
42
42
  nextPageLabel?: string;
43
43
  prevPageLabel?: string;
44
44
  rowsPerPageLabel?: string;
45
- previousPageLabel?: string;
46
45
  jumpToPageDropdownLabel?: string;
47
46
  jumpToPageInputLabel?: string;
48
47
  selectRow?: string;
@@ -71,7 +70,7 @@ interface PrimeVueLocaleOptions {
71
70
  startsWith?: string;
72
71
  contains?: string;
73
72
  notContains?: string;
74
- endWith?: string;
73
+ endsWith?: string;
75
74
  equals?: string;
76
75
  notEquals?: string;
77
76
  noFilter?: string;
@@ -100,7 +100,6 @@ const defaultOptions = {
100
100
  nextPageLabel: 'Next Page',
101
101
  prevPageLabel: 'Previous Page',
102
102
  rowsPerPageLabel: 'Rows per page',
103
- previousPageLabel: 'Previous Page',
104
103
  jumpToPageDropdownLabel: 'Jump to Page Dropdown',
105
104
  jumpToPageInputLabel: 'Jump to Page Input',
106
105
  selectRow: 'Row Selected',
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("primevue/api"),t=require("vue");const o={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[e.FilterMatchMode.STARTS_WITH,e.FilterMatchMode.CONTAINS,e.FilterMatchMode.NOT_CONTAINS,e.FilterMatchMode.ENDS_WITH,e.FilterMatchMode.EQUALS,e.FilterMatchMode.NOT_EQUALS],numeric:[e.FilterMatchMode.EQUALS,e.FilterMatchMode.NOT_EQUALS,e.FilterMatchMode.LESS_THAN,e.FilterMatchMode.LESS_THAN_OR_EQUAL_TO,e.FilterMatchMode.GREATER_THAN,e.FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],date:[e.FilterMatchMode.DATE_IS,e.FilterMatchMode.DATE_IS_NOT,e.FilterMatchMode.DATE_BEFORE,e.FilterMatchMode.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},a=Symbol();var r={install:(e,r)=>{let l=r?{...o,...r}:{...o};const s={config:t.reactive(l)};e.config.globalProperties.$primevue=s,e.provide(a,s)}};exports.default=r,exports.usePrimeVue=function(){const e=t.inject(a);if(!e)throw new Error("PrimeVue is not installed!");return e};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("primevue/api"),t=require("vue");const o={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[e.FilterMatchMode.STARTS_WITH,e.FilterMatchMode.CONTAINS,e.FilterMatchMode.NOT_CONTAINS,e.FilterMatchMode.ENDS_WITH,e.FilterMatchMode.EQUALS,e.FilterMatchMode.NOT_EQUALS],numeric:[e.FilterMatchMode.EQUALS,e.FilterMatchMode.NOT_EQUALS,e.FilterMatchMode.LESS_THAN,e.FilterMatchMode.LESS_THAN_OR_EQUAL_TO,e.FilterMatchMode.GREATER_THAN,e.FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],date:[e.FilterMatchMode.DATE_IS,e.FilterMatchMode.DATE_IS_NOT,e.FilterMatchMode.DATE_BEFORE,e.FilterMatchMode.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},a=Symbol();var r={install:(e,r)=>{let l=r?{...o,...r}:{...o};const s={config:t.reactive(l)};e.config.globalProperties.$primevue=s,e.provide(a,s)}};exports.default=r,exports.usePrimeVue=function(){const e=t.inject(a);if(!e)throw new Error("PrimeVue is not installed!");return e};
@@ -96,7 +96,6 @@ const defaultOptions = {
96
96
  nextPageLabel: 'Next Page',
97
97
  prevPageLabel: 'Previous Page',
98
98
  rowsPerPageLabel: 'Rows per page',
99
- previousPageLabel: 'Previous Page',
100
99
  jumpToPageDropdownLabel: 'Jump to Page Dropdown',
101
100
  jumpToPageInputLabel: 'Jump to Page Input',
102
101
  selectRow: 'Row Selected',
@@ -1 +1 @@
1
- import{FilterMatchMode as e}from"primevue/api";import{reactive as t,inject as o}from"vue";const a={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[e.STARTS_WITH,e.CONTAINS,e.NOT_CONTAINS,e.ENDS_WITH,e.EQUALS,e.NOT_EQUALS],numeric:[e.EQUALS,e.NOT_EQUALS,e.LESS_THAN,e.LESS_THAN_OR_EQUAL_TO,e.GREATER_THAN,e.GREATER_THAN_OR_EQUAL_TO],date:[e.DATE_IS,e.DATE_IS_NOT,e.DATE_BEFORE,e.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},r=Symbol();function s(){const e=o(r);if(!e)throw new Error("PrimeVue is not installed!");return e}var l={install:(e,o)=>{let s=o?{...a,...o}:{...a};const l={config:t(s)};e.config.globalProperties.$primevue=l,e.provide(r,l)}};export{l as default,s as usePrimeVue};
1
+ import{FilterMatchMode as e}from"primevue/api";import{reactive as t,inject as o}from"vue";const a={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[e.STARTS_WITH,e.CONTAINS,e.NOT_CONTAINS,e.ENDS_WITH,e.EQUALS,e.NOT_EQUALS],numeric:[e.EQUALS,e.NOT_EQUALS,e.LESS_THAN,e.LESS_THAN_OR_EQUAL_TO,e.GREATER_THAN,e.GREATER_THAN_OR_EQUAL_TO],date:[e.DATE_IS,e.DATE_IS_NOT,e.DATE_BEFORE,e.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},r=Symbol();function l(){const e=o(r);if(!e)throw new Error("PrimeVue is not installed!");return e}var s={install:(e,o)=>{let l=o?{...a,...o}:{...a};const s={config:t(l)};e.config.globalProperties.$primevue=s,e.provide(r,s)}};export{s as default,l as usePrimeVue};
package/config/config.js CHANGED
@@ -97,7 +97,6 @@ this.primevue.config = (function (exports, api, vue) {
97
97
  nextPageLabel: 'Next Page',
98
98
  prevPageLabel: 'Previous Page',
99
99
  rowsPerPageLabel: 'Rows per page',
100
- previousPageLabel: 'Previous Page',
101
100
  jumpToPageDropdownLabel: 'Jump to Page Dropdown',
102
101
  jumpToPageInputLabel: 'Jump to Page Input',
103
102
  selectRow: 'Row Selected',
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.config=function(e,t,o){"use strict";const a={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[t.FilterMatchMode.STARTS_WITH,t.FilterMatchMode.CONTAINS,t.FilterMatchMode.NOT_CONTAINS,t.FilterMatchMode.ENDS_WITH,t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS],numeric:[t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS,t.FilterMatchMode.LESS_THAN,t.FilterMatchMode.LESS_THAN_OR_EQUAL_TO,t.FilterMatchMode.GREATER_THAN,t.FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],date:[t.FilterMatchMode.DATE_IS,t.FilterMatchMode.DATE_IS_NOT,t.FilterMatchMode.DATE_BEFORE,t.FilterMatchMode.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},r=Symbol();var l={install:(e,t)=>{let l=t?{...a,...t}:{...a};const i={config:o.reactive(l)};e.config.globalProperties.$primevue=i,e.provide(r,i)}};return e.default=l,e.usePrimeVue=function(){const e=o.inject(r);if(!e)throw new Error("PrimeVue is not installed!");return e},Object.defineProperty(e,"__esModule",{value:!0}),e}({},primevue.api,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.config=function(e,t,o){"use strict";const a={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[t.FilterMatchMode.STARTS_WITH,t.FilterMatchMode.CONTAINS,t.FilterMatchMode.NOT_CONTAINS,t.FilterMatchMode.ENDS_WITH,t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS],numeric:[t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS,t.FilterMatchMode.LESS_THAN,t.FilterMatchMode.LESS_THAN_OR_EQUAL_TO,t.FilterMatchMode.GREATER_THAN,t.FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],date:[t.FilterMatchMode.DATE_IS,t.FilterMatchMode.DATE_IS_NOT,t.FilterMatchMode.DATE_BEFORE,t.FilterMatchMode.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},r=Symbol();var l={install:(e,t)=>{let l=t?{...a,...t}:{...a};const i={config:o.reactive(l)};e.config.globalProperties.$primevue=i,e.provide(r,i)}};return e.default=l,e.usePrimeVue=function(){const e=o.inject(r);if(!e)throw new Error("PrimeVue is not installed!");return e},Object.defineProperty(e,"__esModule",{value:!0}),e}({},primevue.api,Vue);
@@ -89,6 +89,7 @@ export default {
89
89
  list: null,
90
90
  data() {
91
91
  return {
92
+ id: this.$attrs.id,
92
93
  focused: false,
93
94
  focusedItemInfo: { index: -1, level: 0, parentKey: '' },
94
95
  activeItemPath: [],
@@ -97,6 +98,9 @@ export default {
97
98
  };
98
99
  },
99
100
  watch: {
101
+ '$attrs.id': function (newValue) {
102
+ this.id = newValue || UniqueComponentId();
103
+ },
100
104
  activeItemPath(newPath) {
101
105
  if (ObjectUtils.isNotEmpty(newPath)) {
102
106
  this.bindOutsideClickListener();
@@ -122,6 +126,8 @@ export default {
122
126
  this.container = null;
123
127
  },
124
128
  mounted() {
129
+ this.id = this.id || UniqueComponentId();
130
+
125
131
  if (this.global) {
126
132
  this.bindDocumentContextMenuListener();
127
133
  }
@@ -611,9 +617,6 @@ export default {
611
617
 
612
618
  return processedItem ? processedItem.items : this.processedItems;
613
619
  },
614
- id() {
615
- return this.$attrs.id || UniqueComponentId();
616
- },
617
620
  focusedItemId() {
618
621
  return this.focusedItemInfo.index !== -1 ? `${this.id}${ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : ''}_${this.focusedItemInfo.index}` : null;
619
622
  }
@@ -345,6 +345,7 @@ var script = {
345
345
  list: null,
346
346
  data() {
347
347
  return {
348
+ id: this.$attrs.id,
348
349
  focused: false,
349
350
  focusedItemInfo: { index: -1, level: 0, parentKey: '' },
350
351
  activeItemPath: [],
@@ -353,6 +354,9 @@ var script = {
353
354
  };
354
355
  },
355
356
  watch: {
357
+ '$attrs.id': function (newValue) {
358
+ this.id = newValue || utils.UniqueComponentId();
359
+ },
356
360
  activeItemPath(newPath) {
357
361
  if (utils.ObjectUtils.isNotEmpty(newPath)) {
358
362
  this.bindOutsideClickListener();
@@ -378,6 +382,8 @@ var script = {
378
382
  this.container = null;
379
383
  },
380
384
  mounted() {
385
+ this.id = this.id || utils.UniqueComponentId();
386
+
381
387
  if (this.global) {
382
388
  this.bindDocumentContextMenuListener();
383
389
  }
@@ -867,9 +873,6 @@ var script = {
867
873
 
868
874
  return processedItem ? processedItem.items : this.processedItems;
869
875
  },
870
- id() {
871
- return this.$attrs.id || utils.UniqueComponentId();
872
- },
873
876
  focusedItemId() {
874
877
  return this.focusedItemInfo.index !== -1 ? `${this.id}${utils.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : ''}_${this.focusedItemInfo.index}` : null;
875
878
  }
@@ -902,14 +905,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
902
905
  }, _ctx.$attrs), [
903
906
  vue.createVNode(_component_ContextMenuSub, {
904
907
  ref: $options.listRef,
905
- id: $options.id + '_list',
908
+ id: $data.id + '_list',
906
909
  class: "p-contextmenu-root-list",
907
910
  role: "menubar",
908
911
  root: true,
909
912
  tabindex: $props.tabindex,
910
913
  "aria-orientation": "vertical",
911
914
  "aria-activedescendant": $data.focused ? $options.focusedItemId : undefined,
912
- menuId: $options.id,
915
+ menuId: $data.id,
913
916
  focusedItemId: $data.focused ? $options.focusedItemId : undefined,
914
917
  items: $options.processedItems,
915
918
  template: _ctx.$slots.item,