primevue 3.22.3 → 3.22.4
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.
- package/accordion/Accordion.vue +7 -3
- package/accordion/accordion.cjs.js +7 -3
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +8 -4
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +7 -3
- package/accordion/accordion.min.js +1 -1
- package/autocomplete/AutoComplete.vue +6 -3
- package/autocomplete/autocomplete.cjs.js +12 -9
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +13 -10
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +12 -9
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +2 -2
- package/breadcrumb/breadcrumb.cjs.js +17 -10
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +17 -10
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +17 -10
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/cascadeselect/CascadeSelect.vue +6 -3
- package/cascadeselect/cascadeselect.cjs.js +9 -6
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +10 -7
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +9 -6
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/contextmenu/ContextMenu.vue +6 -3
- package/contextmenu/contextmenu.cjs.js +8 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +9 -6
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +8 -5
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +45 -33
- package/core/core.min.js +4 -4
- package/datatable/BodyCell.vue +4 -2
- package/datatable/datatable.cjs.js +4 -2
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +4 -2
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4 -2
- package/datatable/datatable.min.js +1 -1
- package/dock/DockSub.vue +9 -3
- package/dock/dock.cjs.js +10 -4
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +11 -5
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +10 -4
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.vue +6 -3
- package/dropdown/dropdown.cjs.js +13 -10
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +14 -11
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +13 -10
- package/dropdown/dropdown.min.js +1 -1
- package/listbox/Listbox.vue +6 -3
- package/listbox/listbox.cjs.js +11 -8
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -9
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +11 -8
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +7 -3
- package/megamenu/megamenu.cjs.js +10 -6
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +11 -7
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +10 -6
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.vue +8 -3
- package/menu/menu.cjs.js +13 -8
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +14 -9
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +13 -8
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +7 -3
- package/menubar/menubar.cjs.js +10 -6
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +11 -7
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +10 -6
- package/menubar/menubar.min.js +1 -1
- package/multiselect/MultiSelect.vue +6 -3
- package/multiselect/multiselect.cjs.js +11 -8
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +12 -9
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +11 -8
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.vue +8 -3
- package/orderlist/orderlist.cjs.js +11 -6
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +12 -7
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +11 -6
- package/orderlist/orderlist.min.js +1 -1
- package/package.json +1 -1
- package/panelmenu/PanelMenu.vue +9 -6
- package/panelmenu/PanelMenuList.vue +1 -1
- package/panelmenu/panelmenu.cjs.js +11 -8
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +11 -8
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +11 -8
- package/panelmenu/panelmenu.min.js +1 -1
- package/picklist/PickList.vue +8 -2
- package/picklist/picklist.cjs.js +8 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +9 -3
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +8 -2
- package/picklist/picklist.min.js +1 -1
- package/rating/Rating.vue +9 -3
- package/rating/rating.cjs.js +11 -5
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +12 -6
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +11 -5
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +7 -0
- package/resources/themes/arya-green/theme.css +7 -0
- package/resources/themes/arya-orange/theme.css +7 -0
- package/resources/themes/arya-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +7 -0
- package/resources/themes/fluent-light/theme.css +7 -0
- package/resources/themes/lara-dark-blue/theme.css +7 -0
- package/resources/themes/lara-dark-indigo/theme.css +7 -0
- package/resources/themes/lara-dark-purple/theme.css +7 -0
- package/resources/themes/lara-dark-teal/theme.css +7 -0
- package/resources/themes/lara-light-blue/theme.css +7 -0
- package/resources/themes/lara-light-indigo/theme.css +7 -0
- package/resources/themes/lara-light-purple/theme.css +7 -0
- package/resources/themes/lara-light-teal/theme.css +7 -0
- package/resources/themes/luna-amber/theme.css +7 -0
- package/resources/themes/luna-blue/theme.css +7 -0
- package/resources/themes/luna-green/theme.css +7 -0
- package/resources/themes/luna-pink/theme.css +7 -0
- package/resources/themes/md-dark-deeppurple/theme.css +10 -2
- package/resources/themes/md-dark-indigo/theme.css +10 -2
- package/resources/themes/md-light-deeppurple/theme.css +10 -2
- package/resources/themes/md-light-indigo/theme.css +10 -2
- package/resources/themes/mdc-dark-deeppurple/theme.css +10 -2
- package/resources/themes/mdc-dark-indigo/theme.css +10 -2
- package/resources/themes/mdc-light-deeppurple/theme.css +10 -2
- package/resources/themes/mdc-light-indigo/theme.css +10 -2
- package/resources/themes/nova/theme.css +7 -0
- package/resources/themes/nova-accent/theme.css +7 -0
- package/resources/themes/nova-alt/theme.css +7 -0
- package/resources/themes/nova-vue/theme.css +7 -0
- package/resources/themes/rhea/theme.css +7 -0
- package/resources/themes/saga-blue/theme.css +7 -0
- package/resources/themes/saga-green/theme.css +7 -0
- package/resources/themes/saga-orange/theme.css +7 -0
- package/resources/themes/saga-purple/theme.css +7 -0
- package/resources/themes/tailwind-light/theme.css +7 -0
- package/resources/themes/vela-blue/theme.css +7 -0
- package/resources/themes/vela-green/theme.css +7 -0
- package/resources/themes/vela-orange/theme.css +7 -0
- package/resources/themes/vela-purple/theme.css +7 -0
- package/speeddial/SpeedDial.vue +6 -3
- package/speeddial/speeddial.cjs.js +11 -8
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +12 -9
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +11 -8
- package/speeddial/speeddial.min.js +1 -1
- package/tabview/TabView.vue +6 -3
- package/tabview/tabview.cjs.js +6 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +7 -4
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +6 -3
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/TieredMenu.vue +7 -3
- package/tieredmenu/tieredmenu.cjs.js +10 -6
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +11 -7
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +10 -6
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/utils/utils.cjs.js +9 -9
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +9 -9
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +9 -9
- package/utils/utils.min.js +1 -1
- package/web-types.json +1 -1
package/core/core.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.utils=function(e){"use strict";var t={innerWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},width(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth(e,t){if(e){let n=e.offsetWidth;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginLeft)+parseFloat(t.marginRight)}return n}return 0},getOuterHeight(e,t){if(e){let n=e.offsetHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0},getClientHeight(e,t){if(e){let n=e.clientHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0},getViewport(){let e=window,t=document,n=t.documentElement,i=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||i.clientWidth,height:e.innerHeight||n.clientHeight||i.clientHeight}},getOffset(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index(e){if(e){let t=e.parentNode.childNodes,n=0;for(let i=0;i<t.length;i++){if(t[i]===e)return n;1===t[i].nodeType&&n++}}return-1},addMultipleClasses(e,t){if(e&&t)if(e.classList){let n=t.split(" ");for(let t=0;t<n.length;t++)e.classList.add(n[t])}else{let n=t.split(" ");for(let t=0;t<n.length;t++)e.className+=" "+n[t]}},addClass(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)},removeClass(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:(e,t)=>!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)),find(e,t){return this.isElement(e)?e.querySelectorAll(t):[]},findSingle(e,t){return this.isElement(e)?e.querySelector(t):null},getHeight(e){if(e){let t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0},getWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0},absolutePosition(e,t){if(e){let n,i,l=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=l.height,r=l.width,s=t.offsetHeight,a=t.offsetWidth,d=t.getBoundingClientRect(),c=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),u=this.getViewport();d.top+s+o>u.height?(n=d.top+c-o,e.style.transformOrigin="bottom",n<0&&(n=c)):(n=s+d.top+c,e.style.transformOrigin="top"),i=d.left+r>u.width?Math.max(0,d.left+p+a-r):d.left+p,e.style.top=n+"px",e.style.left=i+"px"}},relativePosition(e,t){if(e){let n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e);const i=t.offsetHeight,l=t.getBoundingClientRect(),o=this.getViewport();let r,s;l.top+i+n.height>o.height?(r=-1*n.height,e.style.transformOrigin="bottom",l.top+r<0&&(r=-1*l.top)):(r=i,e.style.transformOrigin="top"),s=n.width>o.width?-1*l.left:l.left+n.width>o.width?-1*(l.left+n.width-o.width):0,e.style.top=r+"px",e.style.left=s+"px"}},getParents(e,t=[]){return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))},getScrollableParents(e){let t=[];if(e){let n=this.getParents(e);const i=/(auto|scroll)/,l=e=>{let t=window.getComputedStyle(e,null);return i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY"))};for(let e of n){let n=1===e.nodeType&&e.dataset.scrollselectors;if(n){let i=n.split(",");for(let n of i){let i=this.findSingle(e,n);i&&l(i)&&t.push(i)}}9!==e.nodeType&&l(e)&&t.push(e)}}return t},getHiddenElementOuterHeight(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementOuterWidth(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementDimensions(e){if(e){let t={};return e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",t}return 0},fadeIn(e,t){if(e){e.style.opacity=0;let n=+new Date,i=0,l=function(){i=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=i,n=+new Date,+i<1&&(window.requestAnimationFrame&&requestAnimationFrame(l)||setTimeout(l,16))};l()}},fadeOut(e,t){if(e){let n=1,i=50,l=i/t,o=setInterval((()=>{n-=l,n<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),i)}},getUserAgent:()=>navigator.userAgent,appendChild(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.elElement)throw new Error("Cannot append "+t+" to "+e);t.elElement.appendChild(e)}},isElement:e=>"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName,scrollInView(e,t){let n=getComputedStyle(e).getPropertyValue("borderTopWidth"),i=n?parseFloat(n):0,l=getComputedStyle(e).getPropertyValue("paddingTop"),o=l?parseFloat(l):0,r=e.getBoundingClientRect(),s=t.getBoundingClientRect().top+document.body.scrollTop-(r.top+document.body.scrollTop)-i-o,a=e.scrollTop,d=e.clientHeight,c=this.getOuterHeight(t);s<0?e.scrollTop=a+s:s+c>d&&(e.scrollTop=a+s-d+c)},clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}},getSelection:()=>window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null,calculateScrollbarWidth(){if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=t,t},getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},isVisible:e=>e&&null!=e.offsetParent,invokeElementMethod(e,t,n){e[t].apply(e,n)},isExist:e=>null!=e&&e.nodeName&&e.parentNode,isClient:()=>!("undefined"==typeof window||!window.document||!window.document.createElement),focus(e,t){e&&document.activeElement!==e&&e.focus(t)},isFocusableElement(e,t=""){return!!this.isElement(e)&&e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`)},getFocusableElements(e,t=""){let n=this.find(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`),i=[];for(let e of n)"none"!=getComputedStyle(e).display&&"hidden"!=getComputedStyle(e).visibility&&i.push(e);return i},getFirstFocusableElement(e,t){const n=this.getFocusableElements(e,t);return n.length>0?n[0]:null},getLastFocusableElement(e,t){const n=this.getFocusableElements(e,t);return n.length>0?n[n.length-1]:null},getNextFocusableElement(e,t,n){const i=this.getFocusableElements(e,n),l=i.length>0?i.findIndex((e=>e===t)):-1,o=l>-1&&i.length>=l+1?l+1:-1;return o>-1?i[o]:null},isClickable(e){const t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"==t||"BUTTON"==t||"A"==t||"INPUT"==n||"BUTTON"==n||"A"==n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")},applyStyle(e,t){if("string"==typeof t)e.style.cssText=t;else for(let n in t)e.style[n]=t[n]},isIOS:()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,isAndroid:()=>/(android)/i.test(navigator.userAgent),isTouchDevice:()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,exportCSV(e,t){let n=new Blob([e],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,t+".csv");else{let i=document.createElement("a");void 0!==i.download?(i.setAttribute("href",URL.createObjectURL(n)),i.setAttribute("download",t+".csv"),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}}};var n={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,i,l,o=Array.isArray(e),r=Array.isArray(t);if(o&&r){if((i=e.length)!=t.length)return!1;for(n=i;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!=r)return!1;var s=e instanceof Date,a=t instanceof Date;if(s!=a)return!1;if(s&&a)return e.getTime()==t.getTime();var d=e instanceof RegExp,c=t instanceof RegExp;if(d!=c)return!1;if(d&&c)return e.toString()==t.toString();var p=Object.keys(e);if((i=p.length)!==Object.keys(t).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,p[n]))return!1;for(n=i;0!=n--;)if(l=p[n],!this.deepEquals(e[l],t[l]))return!1;return!0}return e!=e&&t!=t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(this.isFunction(t))return t(e);if(-1===t.indexOf("."))return e[t];{let l=t.split("."),o=e;for(var n=0,i=l.length;n<i;++n){if(null==o)return null;o=o[l[n]]}return o}}return null},isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),getItemValue(e,...t){return this.isFunction(e)?e(...t):e},filter(e,t,n){var i=[];if(e)for(let l of e)for(let e of t)if(String(this.resolveFieldData(l,e)).toLowerCase().indexOf(n.toLowerCase())>-1){i.push(l);break}return i},reorderArray(e,t,n){let i;if(e&&t!==n){if(n>=e.length)for(i=n-e.length;1+i--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}},findIndexInList(e,t){let n=-1;if(t)for(let i=0;i<t.length;i++)if(t[i]===e){n=i;break}return n},contains(e,t){if(null!=e&&t&&t.length)for(let n of t)if(this.equals(e,n))return!0;return!1},insertIntoOrderedArray(e,t,n,i){if(n.length>0){let l=!1;for(let o=0;o<n.length;o++){if(this.findIndexInList(n[o],i)>t){n.splice(o,0,e),l=!0;break}}l||n.push(e)}else n.push(e)},removeAccents:e=>(e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e),getVNodeProp(e,t){let n=e.props;if(n){let i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),l=Object.prototype.hasOwnProperty.call(n,i)?i:t;return e.type.props[t].type===Boolean&&""===n[l]||n[l]}return null},isEmpty:e=>null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length,isNotEmpty(e){return!this.isEmpty(e)},isPrintableCharacter(e=""){return this.isNotEmpty(e)&&1===e.length&&e.match(/\S| /)},findLast(e,t){let n;if(this.isNotEmpty(e))try{n=e.findLast(t)}catch{n=[...e].reverse().find(t)}return n},findLastIndex(e,t){let n=-1;if(this.isNotEmpty(e))try{n=e.findLastIndex(t)}catch{n=e.lastIndexOf([...e].reverse().find(t))}return n}},i=0;var l=function(){let e=[];const t=(t,n=0)=>[...e].reverse().find((e=>e.key===t))||{key:t,value:n},n=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:n,set:(n,i,l)=>{i&&(i.style.zIndex=String(((n,i=999)=>{const l=t(n,i),o=l.value+(l.key===n?0:i)+1;return e.push({key:n,value:o}),o})(n,l)))},clear:t=>{var i;t&&(i=n(t),e=e.filter((e=>e.value!==i)),t.style.zIndex="")},getCurrent:e=>(e=>t(e).value)(e)}}();return e.ConnectedOverlayScrollHandler=class{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=t.getScrollableParents(this.element);for(let e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}unbindScrollListener(){if(this.scrollableParents)for(let e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}},e.DomHandler=t,e.EventBus=function(){const e=new Map;return{on(t,n){let i=e.get(t);i?i.push(n):i=[n],e.set(t,i)},off(t,n){let i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){let i=e.get(t);i&&i.slice().map((e=>{e(n)}))}}},e.ObjectUtils=n,e.UniqueComponentId=function(e="pv_id_"){return`${e}${++i}`},e.ZIndexUtils=l,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.utils=function(e){"use strict";var t={innerWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},width(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth(e,t){if(e){let n=e.offsetWidth;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginLeft)+parseFloat(t.marginRight)}return n}return 0},getOuterHeight(e,t){if(e){let n=e.offsetHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0},getClientHeight(e,t){if(e){let n=e.clientHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0},getViewport(){let e=window,t=document,n=t.documentElement,i=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||i.clientWidth,height:e.innerHeight||n.clientHeight||i.clientHeight}},getOffset(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index(e){if(e){let t=e.parentNode.childNodes,n=0;for(let i=0;i<t.length;i++){if(t[i]===e)return n;1===t[i].nodeType&&n++}}return-1},addMultipleClasses(e,t){if(e&&t)if(e.classList){let n=t.split(" ");for(let t=0;t<n.length;t++)e.classList.add(n[t])}else{let n=t.split(" ");for(let t=0;t<n.length;t++)e.className+=" "+n[t]}},addClass(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)},removeClass(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:(e,t)=>!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)),find(e,t){return this.isElement(e)?e.querySelectorAll(t):[]},findSingle(e,t){return this.isElement(e)?e.querySelector(t):null},getHeight(e){if(e){let t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0},getWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0},absolutePosition(e,t){if(e){let n,i,l=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=l.height,r=l.width,s=t.offsetHeight,a=t.offsetWidth,d=t.getBoundingClientRect(),c=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),u=this.getViewport();d.top+s+o>u.height?(n=d.top+c-o,e.style.transformOrigin="bottom",n<0&&(n=c)):(n=s+d.top+c,e.style.transformOrigin="top"),i=d.left+r>u.width?Math.max(0,d.left+p+a-r):d.left+p,e.style.top=n+"px",e.style.left=i+"px"}},relativePosition(e,t){if(e){let n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e);const i=t.offsetHeight,l=t.getBoundingClientRect(),o=this.getViewport();let r,s;l.top+i+n.height>o.height?(r=-1*n.height,e.style.transformOrigin="bottom",l.top+r<0&&(r=-1*l.top)):(r=i,e.style.transformOrigin="top"),s=n.width>o.width?-1*l.left:l.left+n.width>o.width?-1*(l.left+n.width-o.width):0,e.style.top=r+"px",e.style.left=s+"px"}},getParents(e,t=[]){return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))},getScrollableParents(e){let t=[];if(e){let n=this.getParents(e);const i=/(auto|scroll)/,l=e=>{let t=window.getComputedStyle(e,null);return i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY"))};for(let e of n){let n=1===e.nodeType&&e.dataset.scrollselectors;if(n){let i=n.split(",");for(let n of i){let i=this.findSingle(e,n);i&&l(i)&&t.push(i)}}9!==e.nodeType&&l(e)&&t.push(e)}}return t},getHiddenElementOuterHeight(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementOuterWidth(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0},getHiddenElementDimensions(e){if(e){let t={};return e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",t}return 0},fadeIn(e,t){if(e){e.style.opacity=0;let n=+new Date,i=0,l=function(){i=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=i,n=+new Date,+i<1&&(window.requestAnimationFrame&&requestAnimationFrame(l)||setTimeout(l,16))};l()}},fadeOut(e,t){if(e){let n=1,i=50,l=i/t,o=setInterval((()=>{n-=l,n<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),i)}},getUserAgent:()=>navigator.userAgent,appendChild(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.elElement)throw new Error("Cannot append "+t+" to "+e);t.elElement.appendChild(e)}},isElement:e=>"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName,scrollInView(e,t){let n=getComputedStyle(e).getPropertyValue("borderTopWidth"),i=n?parseFloat(n):0,l=getComputedStyle(e).getPropertyValue("paddingTop"),o=l?parseFloat(l):0,r=e.getBoundingClientRect(),s=t.getBoundingClientRect().top+document.body.scrollTop-(r.top+document.body.scrollTop)-i-o,a=e.scrollTop,d=e.clientHeight,c=this.getOuterHeight(t);s<0?e.scrollTop=a+s:s+c>d&&(e.scrollTop=a+s-d+c)},clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}},getSelection:()=>window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null,calculateScrollbarWidth(){if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=t,t},getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},isVisible:e=>e&&null!=e.offsetParent,invokeElementMethod(e,t,n){e[t].apply(e,n)},isExist:e=>!(null==e||!e.nodeName||!e.parentNode),isClient:()=>!("undefined"==typeof window||!window.document||!window.document.createElement),focus(e,t){e&&document.activeElement!==e&&e.focus(t)},isFocusableElement(e,t=""){return!!this.isElement(e)&&e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`)},getFocusableElements(e,t=""){let n=this.find(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`),i=[];for(let e of n)"none"!=getComputedStyle(e).display&&"hidden"!=getComputedStyle(e).visibility&&i.push(e);return i},getFirstFocusableElement(e,t){const n=this.getFocusableElements(e,t);return n.length>0?n[0]:null},getLastFocusableElement(e,t){const n=this.getFocusableElements(e,t);return n.length>0?n[n.length-1]:null},getNextFocusableElement(e,t,n){const i=this.getFocusableElements(e,n),l=i.length>0?i.findIndex((e=>e===t)):-1,o=l>-1&&i.length>=l+1?l+1:-1;return o>-1?i[o]:null},isClickable(e){const t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"==t||"BUTTON"==t||"A"==t||"INPUT"==n||"BUTTON"==n||"A"==n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")},applyStyle(e,t){if("string"==typeof t)e.style.cssText=t;else for(let n in t)e.style[n]=t[n]},isIOS:()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,isAndroid:()=>/(android)/i.test(navigator.userAgent),isTouchDevice:()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,exportCSV(e,t){let n=new Blob([e],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,t+".csv");else{let i=document.createElement("a");void 0!==i.download?(i.setAttribute("href",URL.createObjectURL(n)),i.setAttribute("download",t+".csv"),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}}};var n={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,i,l,o=Array.isArray(e),r=Array.isArray(t);if(o&&r){if((i=e.length)!=t.length)return!1;for(n=i;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!=r)return!1;var s=e instanceof Date,a=t instanceof Date;if(s!=a)return!1;if(s&&a)return e.getTime()==t.getTime();var d=e instanceof RegExp,c=t instanceof RegExp;if(d!=c)return!1;if(d&&c)return e.toString()==t.toString();var p=Object.keys(e);if((i=p.length)!==Object.keys(t).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,p[n]))return!1;for(n=i;0!=n--;)if(l=p[n],!this.deepEquals(e[l],t[l]))return!1;return!0}return e!=e&&t!=t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(this.isFunction(t))return t(e);if(-1===t.indexOf("."))return e[t];{let l=t.split("."),o=e;for(var n=0,i=l.length;n<i;++n){if(null==o)return null;o=o[l[n]]}return o}}return null},isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),getItemValue(e,...t){return this.isFunction(e)?e(...t):e},filter(e,t,n){var i=[];if(e)for(let l of e)for(let e of t)if(String(this.resolveFieldData(l,e)).toLowerCase().indexOf(n.toLowerCase())>-1){i.push(l);break}return i},reorderArray(e,t,n){let i;if(e&&t!==n){if(n>=e.length)for(i=n-e.length;1+i--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}},findIndexInList(e,t){let n=-1;if(t)for(let i=0;i<t.length;i++)if(t[i]===e){n=i;break}return n},contains(e,t){if(null!=e&&t&&t.length)for(let n of t)if(this.equals(e,n))return!0;return!1},insertIntoOrderedArray(e,t,n,i){if(n.length>0){let l=!1;for(let o=0;o<n.length;o++){if(this.findIndexInList(n[o],i)>t){n.splice(o,0,e),l=!0;break}}l||n.push(e)}else n.push(e)},removeAccents:e=>(e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e),getVNodeProp(e,t){let n=e.props;if(n){let i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),l=Object.prototype.hasOwnProperty.call(n,i)?i:t;return e.type.props[t].type===Boolean&&""===n[l]||n[l]}return null},isEmpty:e=>null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length,isNotEmpty(e){return!this.isEmpty(e)},isPrintableCharacter(e=""){return this.isNotEmpty(e)&&1===e.length&&e.match(/\S| /)},findLast(e,t){let n;if(this.isNotEmpty(e))try{n=e.findLast(t)}catch{n=[...e].reverse().find(t)}return n},findLastIndex(e,t){let n=-1;if(this.isNotEmpty(e))try{n=e.findLastIndex(t)}catch{n=e.lastIndexOf([...e].reverse().find(t))}return n}},i=0;var l=function(){let e=[];const t=(t,n,i=0)=>[...e].reverse().find((e=>!!n||e.key===t))||{key:t,value:i},n=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:n,set:(n,i,l)=>{i&&(i.style.zIndex=String(((n,i,l=999)=>{const o=t(n,i,l),r=o.value+(o.key===n?0:l)+1;return e.push({key:n,value:r}),r})(n,!0,l)))},clear:t=>{var i;t&&(i=n(t),e=e.filter((e=>e.value!==i)),t.style.zIndex="")},getCurrent:e=>((e,n)=>t(e,n).value)(e,!0)}}();return e.ConnectedOverlayScrollHandler=class{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=t.getScrollableParents(this.element);for(let e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}unbindScrollListener(){if(this.scrollableParents)for(let e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}},e.DomHandler=t,e.EventBus=function(){const e=new Map;return{on(t,n){let i=e.get(t);i?i.push(n):i=[n],e.set(t,i)},off(t,n){let i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){let i=e.get(t);i&&i.slice().map((e=>{e(n)}))}}},e.ObjectUtils=n,e.UniqueComponentId=function(e="pv_id_"){return`${e}${++i}`},e.ZIndexUtils=l,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
2
2
|
|
|
3
3
|
this.primevue=this.primevue||{},this.primevue.api=function(i,p){"use strict";const e={filter(i,e,t,r,l){let o=[];if(i)for(let E of i)for(let i of e){let e=p.ObjectUtils.resolveFieldData(E,i);if(this.filters[r](e,t,l)){o.push(E);break}}return o},filters:{startsWith(i,e,t){if(null==e||""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).slice(0,r.length)===r},contains(i,e,t){if(null==e||"string"==typeof e&&""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return-1!==p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).indexOf(r)},notContains(i,e,t){if(null==e||"string"==typeof e&&""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return-1===p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).indexOf(r)},endsWith(i,e,t){if(null==e||""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t),l=p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t);return-1!==l.indexOf(r,l.length-r.length)},equals:(i,e,t)=>null==e||"string"==typeof e&&""===e.trim()||null!=i&&(i.getTime&&e.getTime?i.getTime()===e.getTime():p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t)==p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t)),notEquals:(i,e,t)=>null!=e&&("string"!=typeof e||""!==e.trim())&&(null==i||(i.getTime&&e.getTime?i.getTime()!==e.getTime():p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t)!=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t))),in(i,e){if(null==e||0===e.length)return!0;for(let t=0;t<e.length;t++)if(p.ObjectUtils.equals(i,e[t]))return!0;return!1},between:(i,p)=>null==p||null==p[0]||null==p[1]||null!=i&&(i.getTime?p[0].getTime()<=i.getTime()&&i.getTime()<=p[1].getTime():p[0]<=i&&i<=p[1]),lt:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()<p.getTime():i<p),lte:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()<=p.getTime():i<=p),gt:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()>p.getTime():i>p),gte:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()>=p.getTime():i>=p),dateIs:(i,p)=>null==p||null!=i&&i.toDateString()===p.toDateString(),dateIsNot:(i,p)=>null==p||null!=i&&i.toDateString()!==p.toDateString(),dateBefore:(i,p)=>null==p||null!=i&&i.getTime()<p.getTime(),dateAfter:(i,p)=>null==p||null!=i&&i.getTime()>p.getTime()},register(i,p){this.filters[i]=p}};return i.FilterMatchMode={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},i.FilterOperator={AND:"and",OR:"or"},i.FilterService=e,i.PrimeIcons={ALIGN_CENTER:"pi pi-align-center",ALIGN_JUSTIFY:"pi pi-align-justify",ALIGN_LEFT:"pi pi-align-left",ALIGN_RIGHT:"pi pi-align-right",AMAZON:"pi pi-amazon",ANDROID:"pi pi-android",ANGLE_DOUBLE_DOWN:"pi pi-angle-double-down",ANGLE_DOUBLE_LEFT:"pi pi-angle-double-left",ANGLE_DOUBLE_RIGHT:"pi pi-angle-double-right",ANGLE_DOUBLE_UP:"pi pi-angle-double-up",ANGLE_DOWN:"pi pi-angle-down",ANGLE_LEFT:"pi pi-angle-left",ANGLE_RIGHT:"pi pi-angle-right",ANGLE_UP:"pi pi-angle-up",APPLE:"pi pi-apple",ARROW_CIRCLE_DOWN:"pi pi-arrow-circle-down",ARROW_CIRCLE_LEFT:"pi pi-arrow-circle-left",ARROW_CIRCLE_RIGHT:"pi pi-arrow-circle-right",ARROW_CIRCLE_UP:"pi pi-arrow-circle-up",ARROW_DOWN:"pi pi-arrow-down",ARROW_DOWN_LEFT:"pi pi-arrow-down-left",ARROW_DOWN_RIGHT:"pi pi-arrow-down-right",ARROW_LEFT:"pi pi-arrow-left",ARROW_RIGHT:"pi pi-arrow-right",ARROW_RIGHT_ARROW_LEFT:"pi pi-arrow-right-arrow-left",ARROW_UP:"pi pi-arrow-up",ARROW_UP_LEFT:"pi pi-arrow-up-left",ARROW_UP_RIGHT:"pi pi-arrow-up-right",ARROW_H:"pi pi-arrows-h",ARROW_V:"pi pi-arrows-v",ARROW_A:"pi pi-arrows-alt",AT:"pi pi-at",BACKWARD:"pi pi-backward",BAN:"pi pi-ban",BARS:"pi pi-bars",BELL:"pi pi-bell",BITCOIN:"pi pi-bitcoin",BOLT:"pi pi-bolt",BOOK:"pi pi-book",BOOKMARK:"pi pi-bookmark",BOOKMARK_FILL:"pi pi-bookmark-fill",BOX:"pi pi-box",BRIEFCASE:"pi pi-briefcase",BUILDING:"pi pi-building",CALENDAR:"pi pi-calendar",CALENDAR_MINUS:"pi pi-calendar-minus",CALENDAR_PLUS:"pi pi-calendar-plus",CALENDAR_TIMES:"pi pi-calendar-times",CALCULATOR:"pi pi-calculator",CAMERA:"pi pi-camera",CAR:"pi pi-car",CARET_DOWN:"pi pi-caret-down",CARET_LEFT:"pi pi-caret-left",CARET_RIGHT:"pi pi-caret-right",CARET_UP:"pi pi-caret-up",CART_PLUS:"pi pi-cart-plus",CHART_BAR:"pi pi-chart-bar",CHART_LINE:"pi pi-chart-line",CHART_PIE:"pi pi-chart-pie",CHECK:"pi pi-check",CHECK_CIRCLE:"pi pi-check-circle",CHECK_SQUARE:"pi pi-check-square",CHEVRON_CIRCLE_DOWN:"pi pi-chevron-circle-down",CHEVRON_CIRCLE_LEFT:"pi pi-chevron-circle-left",CHEVRON_CIRCLE_RIGHT:"pi pi-chevron-circle-right",CHEVRON_CIRCLE_UP:"pi pi-chevron-circle-up",CHEVRON_DOWN:"pi pi-chevron-down",CHEVRON_LEFT:"pi pi-chevron-left",CHEVRON_RIGHT:"pi pi-chevron-right",CHEVRON_UP:"pi pi-chevron-up",CIRCLE:"pi pi-circle",CIRCLE_FILL:"pi pi-circle-fill",CLOCK:"pi pi-clock",CLONE:"pi pi-clone",CLOUD:"pi pi-cloud",CLOUD_DOWNLOAD:"pi pi-cloud-download",CLOUD_UPLOAD:"pi pi-cloud-upload",CODE:"pi pi-code",COG:"pi pi-cog",COMMENT:"pi pi-comment",COMMENTS:"pi pi-comments",COMPASS:"pi pi-compass",COPY:"pi pi-copy",CREDIT_CARD:"pi pi-credit-card",DATABASE:"pi pi-database",DELETELEFT:"pi pi-delete-left",DESKTOP:"pi pi-desktop",DIRECTIONS:"pi pi-directions",DIRECTIONS_ALT:"pi pi-directions-alt",DISCORD:"pi pi-discord",DOLLAR:"pi pi-dollar",DOWNLOAD:"pi pi-download",EJECT:"pi pi-eject",ELLIPSIS_H:"pi pi-ellipsis-h",ELLIPSIS_V:"pi pi-ellipsis-v",ENVELOPE:"pi pi-envelope",ERASER:"pi pi-eraser",EURO:"pi pi-euro",EXCLAMATION_CIRCLE:"pi pi-exclamation-circle",EXCLAMATION_TRIANGLE:"pi pi-exclamation-triangle",EXTERNAL_LINK:"pi pi-external-link",EYE:"pi pi-eye",EYE_SLASH:"pi pi-eye-slash",FACEBOOK:"pi pi-facebook",FAST_BACKWARD:"pi pi-fast-backward",FAST_FORWARD:"pi pi-fast-forward",FILE:"pi pi-file",FILE_EDIT:"pi pi-file-edit",FILE_EXCEL:"pi pi-file-excel",FILE_EXPORT:"pi pi-file-export",FILE_IMPORT:"pi pi-file-import",FILE_PDF:"pi pi-file-pdf",FILE_WORD:"pi pi-file-word",FILTER:"pi pi-filter",FILTER_FILL:"pi pi-filter-fill",FILTER_SLASH:"pi pi-filter-slash",FLAG:"pi pi-flag",FLAG_FILL:"pi pi-flag-fill",FOLDER:"pi pi-folder",FOLDER_OPEN:"pi pi-folder-open",FORWARD:"pi pi-forward",GIFT:"pi pi-gift",GITHUB:"pi pi-github",GLOBE:"pi pi-globe",GOOGLE:"pi pi-google",HASHTAG:"pi pi-hashtag",HEART:"pi pi-heart",HEART_FILL:"pi pi-heart-fill",HISTORY:"pi pi-history",HOURGLASS:"pi pi-hourglass",HOME:"pi pi-home",ID_CARD:"pi pi-id-card",IMAGE:"pi pi-image",IMAGES:"pi pi-images",INBOX:"pi pi-inbox",INFO:"pi pi-info",INFO_CIRCLE:"pi pi-info-circle",INSTAGRAM:"pi pi-instagram",KEY:"pi pi-key",LANGUAGE:"pi pi-language",LINK:"pi pi-link",LINKEDIN:"pi pi-linkedin",LIST:"pi pi-list",LOCK:"pi pi-lock",LOCK_OPEN:"pi pi-lock-open",MAP:"pi pi-map",MAP_MARKER:"pi pi-map-marker",MEGAPHONE:"pi pi-megaphone",MICREPHONE:"pi pi-microphone",MICROSOFT:"pi pi-microsoft",MINUS:"pi pi-minus",MINUS_CIRCLE:"pi pi-minus-circle",MOBILE:"pi pi-mobile",MONEY_BILL:"pi pi-money-bill",MOON:"pi pi-moon",PALETTE:"pi pi-palette",PAPERCLIP:"pi pi-paperclip",PAUSE:"pi pi-pause",PAYPAL:"pi pi-paypal",PENCIL:"pi pi-pencil",PERCENTAGE:"pi pi-percentage",PHONE:"pi pi-phone",PLAY:"pi pi-play",PLUS:"pi pi-plus",PLUS_CIRCLE:"pi pi-plus-circle",POUND:"pi pi-pound",POWER_OFF:"pi pi-power-off",PRIME:"pi pi-prime",PRINT:"pi pi-print",QRCODE:"pi pi-qrcode",QUESTION:"pi pi-question",QUESTION_CIRCLE:"pi pi-question-circle",REDDIT:"pi pi-reddit",REFRESH:"pi pi-refresh",REPLAY:"pi pi-replay",REPLY:"pi pi-reply",SAVE:"pi pi-save",SEARCH:"pi pi-search",SEARCH_MINUS:"pi pi-search-minus",SEARCH_PLUS:"pi pi-search-plus",SEND:"pi pi-send",SERVER:"pi pi-server",SHARE_ALT:"pi pi-share-alt",SHIELD:"pi pi-shield",SHOPPING_BAG:"pi pi-shopping-bag",SHOPPING_CART:"pi pi-shopping-cart",SIGN_IN:"pi pi-sign-in",SIGN_OUT:"pi pi-sign-out",SITEMAP:"pi pi-sitemap",SLACK:"pi pi-slack",SLIDERS_H:"pi pi-sliders-h",SLIDERS_V:"pi pi-sliders-v",SORT:"pi pi-sort",SORT_ALPHA_DOWN:"pi pi-sort-alpha-down",SORT_ALPHA_ALT_DOWN:"pi pi-sort-alpha-alt-down",SORT_ALPHA_UP:"pi pi-sort-alpha-up",SORT_ALPHA_ALT_UP:"pi pi-sort-alpha-alt-up",SORT_ALT:"pi pi-sort-alt",SORT_ALT_SLASH:"pi pi-sort-slash",SORT_AMOUNT_DOWN:"pi pi-sort-amount-down",SORT_AMOUNT_DOWN_ALT:"pi pi-sort-amount-down-alt",SORT_AMOUNT_UP:"pi pi-sort-amount-up",SORT_AMOUNT_UP_ALT:"pi pi-sort-amount-up-alt",SORT_DOWN:"pi pi-sort-down",SORT_NUMERIC_DOWN:"pi pi-sort-numeric-down",SORT_NUMERIC_ALT_DOWN:"pi pi-sort-numeric-alt-down",SORT_NUMERIC_UP:"pi pi-sort-numeric-up",SORT_NUMERIC_ALT_UP:"pi pi-sort-numeric-alt-up",SORT_UP:"pi pi-sort-up",SPINNER:"pi pi-spinner",STAR:"pi pi-star",STAR_FILL:"pi pi-star-fill",STEP_BACKWARD:"pi pi-step-backward",STEP_BACKWARD_ALT:"pi pi-step-backward-alt",STEP_FORWARD:"pi pi-step-forward",STEP_FORWARD_ALT:"pi pi-step-forward-alt",STOP:"pi pi-stop",STOPWATCH:"pi pi-stop-watch",STOP_CIRCLE:"pi pi-stop-circle",SUN:"pi pi-sun",SYNC:"pi pi-sync",TABLE:"pi pi-table",TABLET:"pi pi-tablet",TAG:"pi pi-tag",TAGS:"pi pi-tags",TELEGRAM:"pi pi-telegram",TH_LARGE:"pi pi-th-large",THUMBS_DOWN:"pi pi-thumbs-down",THUMBS_DOWN_FILL:"pi pi-thumbs-down-fill",THUMBS_UP:"pi pi-thumbs-up",THUMBS_UP_FILL:"pi pi-thumbs-up-fill",TICKET:"pi pi-ticket",TIMES:"pi pi-times",TIMES_CIRCLE:"pi pi-times-circle",TRASH:"pi pi-trash",TRUCK:"pi pi-truck",TWITTER:"pi pi-twitter",UNDO:"pi pi-undo",UNLOCK:"pi pi-unlock",UPLOAD:"pi pi-upload",USER:"pi pi-user",USER_EDIT:"pi pi-user-edit",USER_MINUS:"pi pi-user-minus",USER_PLUS:"pi pi-user-plus",USERS:"pi pi-users",VERIFIED:"pi pi-verified",VIDEO:"pi pi-video",VIMEO:"pi pi-vimeo",VOLUME_DOWN:"pi pi-volume-down",VOLUME_OFF:"pi pi-volume-off",VOLUME_UP:"pi pi-volume-up",WALLET:"pi pi-wallet",WHATSAPP:"pi pi-whatsapp",WIFI:"pi pi-wifi",WINDOW_MAXIMIZE:"pi pi-window-maximize",WINDOW_MINIMIZE:"pi pi-window-minimize",WRENCH:"pi pi-wrench",YOUTUBE:"pi pi-youtube"},i.ToastSeverity={INFO:"info",WARN:"warn",ERROR:"error",SUCCESS:"success"},Object.defineProperty(i,"__esModule",{value:!0}),i}({},primevue.utils);
|
|
4
4
|
|
|
@@ -40,7 +40,7 @@ this.primevue=this.primevue||{},this.primevue.message=function(e,t){"use strict"
|
|
|
40
40
|
|
|
41
41
|
this.primevue=this.primevue||{},this.primevue.progressbar=function(e){"use strict";var n={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const t=["aria-valuenow"],r={key:0,class:"p-progressbar-label"},i={key:1,class:"p-progressbar-indeterminate-container"},a=[e.createElementVNode("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1)];return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),n.render=function(n,s,o,l,p,m){return e.openBlock(),e.createElementBlock("div",{role:"progressbar",class:e.normalizeClass(m.containerClass),"aria-valuemin":"0","aria-valuenow":o.value,"aria-valuemax":"100"},[m.determinate?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:e.normalizeStyle(m.progressStyle)},[null!=o.value&&0!==o.value&&o.showValue?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(n.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value+"%"),1)]))])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),m.indeterminate?(e.openBlock(),e.createElementBlock("div",i,a)):e.createCommentVNode("",!0)],10,t)},n}(Vue);
|
|
42
42
|
|
|
43
|
-
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,n,o,s,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t),d=r(i),p=r(n),c=r(s),u={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},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},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data:()=>({focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}),watch:{modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?o.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?o.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?o.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&o.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&o.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&o.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled)return void e.preventDefault();const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&o.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key))}},onEditableInput(e){const t=e.target.value;this.searchValue="";!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.$emit("update:modelValue",t)},onContainerClick(e){this.disabled||this.loading||o.DomHandler.hasClass(e.target,"p-dropdown-clear-icon")||"INPUT"===e.target.tagName||this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t);this.updateModel(e,n),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){a.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(o.DomHandler.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){o.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&o.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){o.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?o.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=o.DomHandler.getOuterWidth(this.$el)+"px",o.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 o.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return o.DomHandler.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return o.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.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?o.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionIndex?(i=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionIndex):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionIndex&&(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.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=o.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const n=this.getOptionGroupChildren(t);return n&&n.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!(this.editable||this.$slots.value||"p-emptylabel"!==this.label&&0!==this.label.length)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const i=e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const e=this.options||[],t=[];return e.forEach((e=>{const n=e.items.filter((e=>i.includes(e)));n.length>0&&t.push({...e,items:[...n]})})),this.flatOptions(t)}return i}return t},hasSelectedOption(){return o.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return o.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},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||o.UniqueComponentId()},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:p.default},components:{VirtualScroller:c.default,Portal:d.default}};const h=["id"],f=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],b={class:"p-dropdown-trigger"},v={key:0,class:"p-dropdown-header"},m={class:"p-dropdown-filter-container"},O=["value","placeholder","aria-owns","aria-activedescendant"],g={role:"status","aria-live":"polite",class:"p-hidden-accessible"},x=["id"],w=["id"],I=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],S={key:0,class:"p-dropdown-empty-message",role:"option"},V={key:1,class:"p-dropdown-empty-message",role:"option"},k={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},F={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-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-dropdown-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-dropdown-label-empty {\n overflow: hidden;\n opacity: 0;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-fluid .p-dropdown {\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n"),u.render=function(e,t,i,n,o,s){const r=l.resolveComponent("VirtualScroller"),a=l.resolveComponent("Portal"),d=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",{ref:"container",id:s.id,class:l.normalizeClass(s.containerClass),onClick:t[16]||(t[16]=(...e)=>s.onContainerClick&&s.onContainerClick(...e))},[i.editable?(l.openBlock(),l.createElementBlock("input",l.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:s.inputStyleClass,value:s.editableInputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":s.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>s.onEditableInput&&s.onEditableInput(...e))},i.inputProps),null,16,f)):(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,ref:"focusInput",id:i.inputId,style:i.inputStyle,class:s.inputStyleClass,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel||("p-emptylabel"===s.label?void 0:s.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":s.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":i.disabled,onFocus:t[4]||(t[4]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[6]||(t[6]=(...e)=>s.onKeyDown&&s.onKeyDown(...e))},i.inputProps),[l.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[l.createTextVNode(l.toDisplayString("p-emptylabel"===s.label?" ":s.label||"empty"),1)]))],16,y)),i.showClear&&null!=i.modelValue?(l.openBlock(),l.createElementBlock("i",l.mergeProps({key:2,class:["p-dropdown-clear-icon",i.clearIcon],onClick:t[7]||(t[7]=(...e)=>s.onClearClick&&s.onClearClick(...e))},i.clearIconProps),null,16)):l.createCommentVNode("",!0),l.createElementVNode("div",b,[l.renderSlot(e.$slots,"indicator",{},(()=>[l.createElementVNode("span",{class:l.normalizeClass(s.dropdownIconClass),"aria-hidden":"true"},null,2)]))]),l.createVNode(a,{appendTo:i.appendTo},{default:l.withCtx((()=>[l.createVNode(l.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:l.withCtx((()=>[o.overlayVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:s.overlayRef,style:i.panelStyle,class:s.panelStyleClass,onClick:t[14]||(t[14]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e)),onKeydown:t[15]||(t[15]=(...e)=>s.onOverlayKeyDown&&s.onOverlayKeyDown(...e))},i.panelProps),[l.createElementVNode("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...e)=>s.onFirstHiddenFocus&&s.onFirstHiddenFocus(...e))},null,544),l.renderSlot(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.filter?(l.openBlock(),l.createElementBlock("div",v,[l.createElementVNode("div",m,[l.createElementVNode("input",l.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeUpdated:t[9]||(t[9]=(...e)=>s.onFilterUpdated&&s.onFilterUpdated(...e)),class:"p-dropdown-filter p-inputtext p-component",placeholder:i.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":s.id+"_list","aria-activedescendant":s.focusedOptionId,onKeydown:t[10]||(t[10]=(...e)=>s.onFilterKeyDown&&s.onFilterKeyDown(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onFilterBlur&&s.onFilterBlur(...e)),onInput:t[12]||(t[12]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},i.filterInputProps),null,16,O),l.createElementVNode("span",{class:l.normalizeClass(["p-dropdown-filter-icon",i.filterIcon])},null,2)]),l.createElementVNode("span",g,l.toDisplayString(s.filterResultMessageText),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"p-dropdown-items-wrapper",style:l.normalizeStyle({"max-height":s.virtualScrollerDisabled?i.scrollHeight:""})},[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},tabindex:-1,disabled:s.virtualScrollerDisabled}),l.createSlots({content:l.withCtx((({styleClass:t,contentRef:n,items:r,getItemOptions:a,contentStyle:p,itemSize:c})=>[l.createElementVNode("ul",{ref:e=>s.listRef(e,n),id:s.id+"_list",class:l.normalizeClass(["p-dropdown-items",t]),style:l.normalizeStyle(p),role:"listbox"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r,((t,i)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,a))},[s.isOptionGroup(t)?(l.openBlock(),l.createElementBlock("li",{key:0,id:s.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[l.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]))],12,w)):l.withDirectives((l.openBlock(),l.createElementBlock("li",{key:1,id:s.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:l.normalizeClass(["p-dropdown-item",{"p-highlight":s.isSelected(t),"p-focus":o.focusedOptionIndex===s.getOptionIndex(i,a),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,a)),onClick:e=>s.onOptionSelect(e,t),onMousemove:e=>s.onOptionMouseMove(e,s.getOptionIndex(i,a))},[l.renderSlot(e.$slots,"option",{option:t,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionLabel(t)),1)]))],46,I)),[[d]])],64)))),128)),o.filterValue&&(!r||r&&0===r.length)?(l.openBlock(),l.createElementBlock("li",S,[l.renderSlot(e.$slots,"emptyfilter",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("li",V,[l.renderSlot(e.$slots,"empty",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]))])):l.createCommentVNode("",!0)],14,x)])),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((({options:t})=>[l.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["items","style","disabled"])],4),l.renderSlot(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions}),!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("span",k,l.toDisplayString(s.emptyMessageText),1)):l.createCommentVNode("",!0),l.createElementVNode("span",F,l.toDisplayString(s.selectedMessageText),1),l.createElementVNode("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...e)=>s.onLastHiddenFocus&&s.onLastHiddenFocus(...e))},null,544)],16)):l.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],10,h)},u}(primevue.api,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
|
|
43
|
+
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,n,o,s,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t),d=r(i),p=r(n),c=r(s),u={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},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},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||o.UniqueComponentId()},modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||o.UniqueComponentId(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?o.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?o.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?o.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&o.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&o.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&o.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled)return void e.preventDefault();const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&o.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key))}},onEditableInput(e){const t=e.target.value;this.searchValue="";!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.$emit("update:modelValue",t)},onContainerClick(e){this.disabled||this.loading||o.DomHandler.hasClass(e.target,"p-dropdown-clear-icon")||"INPUT"===e.target.tagName||this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t);this.updateModel(e,n),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){a.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(o.DomHandler.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){o.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&o.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){o.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?o.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=o.DomHandler.getOuterWidth(this.$el)+"px",o.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 o.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return o.DomHandler.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return o.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.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?o.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionIndex?(i=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionIndex):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionIndex&&(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.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=o.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const n=this.getOptionGroupChildren(t);return n&&n.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!(this.editable||this.$slots.value||"p-emptylabel"!==this.label&&0!==this.label.length)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const i=e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const e=this.options||[],t=[];return e.forEach((e=>{const n=e.items.filter((e=>i.includes(e)));n.length>0&&t.push({...e,items:[...n]})})),this.flatOptions(t)}return i}return t},hasSelectedOption(){return o.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return o.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},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.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:p.default},components:{VirtualScroller:c.default,Portal:d.default}};const h=["id"],f=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],b={class:"p-dropdown-trigger"},v={key:0,class:"p-dropdown-header"},m={class:"p-dropdown-filter-container"},O=["value","placeholder","aria-owns","aria-activedescendant"],g={role:"status","aria-live":"polite",class:"p-hidden-accessible"},x=["id"],w=["id"],I=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],S={key:0,class:"p-dropdown-empty-message",role:"option"},V={key:1,class:"p-dropdown-empty-message",role:"option"},k={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},F={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-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-dropdown-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-dropdown-label-empty {\n overflow: hidden;\n opacity: 0;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-fluid .p-dropdown {\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n"),u.render=function(e,t,i,n,o,s){const r=l.resolveComponent("VirtualScroller"),a=l.resolveComponent("Portal"),d=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",{ref:"container",id:o.id,class:l.normalizeClass(s.containerClass),onClick:t[16]||(t[16]=(...e)=>s.onContainerClick&&s.onContainerClick(...e))},[i.editable?(l.openBlock(),l.createElementBlock("input",l.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:s.inputStyleClass,value:s.editableInputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>s.onEditableInput&&s.onEditableInput(...e))},i.inputProps),null,16,f)):(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,ref:"focusInput",id:i.inputId,style:i.inputStyle,class:s.inputStyleClass,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel||("p-emptylabel"===s.label?void 0:s.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":i.disabled,onFocus:t[4]||(t[4]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[6]||(t[6]=(...e)=>s.onKeyDown&&s.onKeyDown(...e))},i.inputProps),[l.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[l.createTextVNode(l.toDisplayString("p-emptylabel"===s.label?" ":s.label||"empty"),1)]))],16,y)),i.showClear&&null!=i.modelValue?(l.openBlock(),l.createElementBlock("i",l.mergeProps({key:2,class:["p-dropdown-clear-icon",i.clearIcon],onClick:t[7]||(t[7]=(...e)=>s.onClearClick&&s.onClearClick(...e))},i.clearIconProps),null,16)):l.createCommentVNode("",!0),l.createElementVNode("div",b,[l.renderSlot(e.$slots,"indicator",{},(()=>[l.createElementVNode("span",{class:l.normalizeClass(s.dropdownIconClass),"aria-hidden":"true"},null,2)]))]),l.createVNode(a,{appendTo:i.appendTo},{default:l.withCtx((()=>[l.createVNode(l.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:l.withCtx((()=>[o.overlayVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:s.overlayRef,style:i.panelStyle,class:s.panelStyleClass,onClick:t[14]||(t[14]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e)),onKeydown:t[15]||(t[15]=(...e)=>s.onOverlayKeyDown&&s.onOverlayKeyDown(...e))},i.panelProps),[l.createElementVNode("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...e)=>s.onFirstHiddenFocus&&s.onFirstHiddenFocus(...e))},null,544),l.renderSlot(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.filter?(l.openBlock(),l.createElementBlock("div",v,[l.createElementVNode("div",m,[l.createElementVNode("input",l.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeUpdated:t[9]||(t[9]=(...e)=>s.onFilterUpdated&&s.onFilterUpdated(...e)),class:"p-dropdown-filter p-inputtext p-component",placeholder:i.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,onKeydown:t[10]||(t[10]=(...e)=>s.onFilterKeyDown&&s.onFilterKeyDown(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onFilterBlur&&s.onFilterBlur(...e)),onInput:t[12]||(t[12]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},i.filterInputProps),null,16,O),l.createElementVNode("span",{class:l.normalizeClass(["p-dropdown-filter-icon",i.filterIcon])},null,2)]),l.createElementVNode("span",g,l.toDisplayString(s.filterResultMessageText),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"p-dropdown-items-wrapper",style:l.normalizeStyle({"max-height":s.virtualScrollerDisabled?i.scrollHeight:""})},[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},tabindex:-1,disabled:s.virtualScrollerDisabled}),l.createSlots({content:l.withCtx((({styleClass:t,contentRef:n,items:r,getItemOptions:a,contentStyle:p,itemSize:c})=>[l.createElementVNode("ul",{ref:e=>s.listRef(e,n),id:o.id+"_list",class:l.normalizeClass(["p-dropdown-items",t]),style:l.normalizeStyle(p),role:"listbox"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r,((t,i)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,a))},[s.isOptionGroup(t)?(l.openBlock(),l.createElementBlock("li",{key:0,id:o.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[l.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]))],12,w)):l.withDirectives((l.openBlock(),l.createElementBlock("li",{key:1,id:o.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:l.normalizeClass(["p-dropdown-item",{"p-highlight":s.isSelected(t),"p-focus":o.focusedOptionIndex===s.getOptionIndex(i,a),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,a)),onClick:e=>s.onOptionSelect(e,t),onMousemove:e=>s.onOptionMouseMove(e,s.getOptionIndex(i,a))},[l.renderSlot(e.$slots,"option",{option:t,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionLabel(t)),1)]))],46,I)),[[d]])],64)))),128)),o.filterValue&&(!r||r&&0===r.length)?(l.openBlock(),l.createElementBlock("li",S,[l.renderSlot(e.$slots,"emptyfilter",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("li",V,[l.renderSlot(e.$slots,"empty",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]))])):l.createCommentVNode("",!0)],14,x)])),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((({options:t})=>[l.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["items","style","disabled"])],4),l.renderSlot(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions}),!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("span",k,l.toDisplayString(s.emptyMessageText),1)):l.createCommentVNode("",!0),l.createElementVNode("span",F,l.toDisplayString(s.selectedMessageText),1),l.createElementVNode("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...e)=>s.onLastHiddenFocus&&s.onLastHiddenFocus(...e))},null,544)],16)):l.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],10,h)},u}(primevue.api,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
|
|
44
44
|
|
|
45
45
|
this.primevue=this.primevue||{},this.primevue.dialog=function(e,t,n,i,o){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(e),s=a(t),d={name:"Dialog",inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:"pi pi-times"},maximizeIcon:{type:String,default:"pi pi-window-maximize"},minimizeIcon:{type:String,default:"pi pi-window-minimize"},closeButtonProps:{type:null,default:null},_instance:null},provide(){return{dialogRef:o.computed((()=>this._instance))}},data(){return{containerVisible:this.visible,maximized:!1,focusable:!1}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&i.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted(){this.breakpoints&&this.createStyle()},methods:{close(){this.$emit("update:visible",!1)},onBeforeEnter(e){e.setAttribute(this.attributeSelector,"")},onEnter(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&i.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave(){this.modal&&i.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide"),this.focusable=!1},onAfterLeave(){this.autoZIndex&&i.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick(e){this.dismissableMask&&this.closable&&this.modal&&this.mask===e.target&&this.close()},focus(){const e=e=>e.querySelector("[autofocus]");let t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(t=e(this.container)))),t&&(this.focusable=!0,t.focus())},maximize(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?i.DomHandler.addClass(document.body,"p-overflow-hidden"):i.DomHandler.removeClass(document.body,"p-overflow-hidden"))},enableDocumentSettings(){(this.modal||this.maximizable&&this.maximized)&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},unbindDocumentState(){(this.modal||this.maximizable&&this.maximized)&&i.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeyDown(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},getPositionClass(){const e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((e=>e===this.position));return e?`p-dialog-${e}`:""},containerRef(e){this.container=e},maskRef(e){this.mask=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},footerContainerRef(e){this.footerContainer=e},maximizableRef(e){this.maximizableButton=e},closeButtonRef(e){this.closeButton=e},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints)e+=`\n @media screen and (max-width: ${t}) {\n .p-dialog[${this.attributeSelector}] {\n width: ${this.breakpoints[t]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag(e){i.DomHandler.hasClass(e.target,"p-dialog-header-icon")||i.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",i.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener(){this.documentDragListener=e=>{if(this.dragging){let t=i.DomHandler.getOuterWidth(this.container),n=i.DomHandler.getOuterHeight(this.container),o=e.pageX-this.lastPageX,a=e.pageY-this.lastPageY,l=this.container.getBoundingClientRect(),s=l.left+o,d=l.top+a,r=i.DomHandler.getViewport();this.container.style.position="fixed",this.keepInViewport?(s>=this.minX&&s+t<r.width&&(this.lastPageX=e.pageX,this.container.style.left=s+"px"),d>=this.minY&&d+n<r.height&&(this.lastPageY=e.pageY,this.container.style.top=d+"px")):(this.lastPageX=e.pageX,this.container.style.left=s+"px",this.lastPageY=e.pageY,this.container.style.top=d+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener(){this.documentDragEndListener=e=>{this.dragging&&(this.dragging=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),this.$emit("dragend",e))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maskClass(){return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.modal},this.getPositionClass()]},dialogClass(){return["p-dialog p-component",{"p-dialog-rtl":this.rtl,"p-dialog-maximized":this.maximizable&&this.maximized,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},maximizeIconClass(){return["p-dialog-header-maximize-icon",{[this.maximizeIcon]:!this.maximized,[this.minimizeIcon]:this.maximized}]},ariaId:()=>i.UniqueComponentId(),ariaLabelledById(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:()=>i.UniqueComponentId(),contentStyleClass(){return["p-dialog-content",this.contentClass]}},directives:{ripple:a(n).default,focustrap:l.default},components:{Portal:s.default}};const r=["aria-labelledby","aria-modal"],p=["id"],m={class:"p-dialog-header-icons"},c=["autofocus","tabindex"],g=["autofocus","aria-label"];return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-dialog-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n}\n.p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n}\n.p-dialog-content {\n overflow-y: auto;\n}\n.p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n}\n.p-dialog-footer {\n flex-shrink: 0;\n}\n.p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n}\n.p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Fluid */\n.p-fluid .p-dialog-footer .p-button {\n width: auto;\n}\n\n/* Animation */\n/* Center */\n.p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-dialog-enter-from,\n.p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n\n/* Top, Bottom, Left, Right, Top* and Bottom* */\n.p-dialog-top .p-dialog,\n.p-dialog-bottom .p-dialog,\n.p-dialog-left .p-dialog,\n.p-dialog-right .p-dialog,\n.p-dialog-topleft .p-dialog,\n.p-dialog-topright .p-dialog,\n.p-dialog-bottomleft .p-dialog,\n.p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n}\n.p-dialog-top .p-dialog-enter-active,\n.p-dialog-top .p-dialog-leave-active,\n.p-dialog-bottom .p-dialog-enter-active,\n.p-dialog-bottom .p-dialog-leave-active,\n.p-dialog-left .p-dialog-enter-active,\n.p-dialog-left .p-dialog-leave-active,\n.p-dialog-right .p-dialog-enter-active,\n.p-dialog-right .p-dialog-leave-active,\n.p-dialog-topleft .p-dialog-enter-active,\n.p-dialog-topleft .p-dialog-leave-active,\n.p-dialog-topright .p-dialog-enter-active,\n.p-dialog-topright .p-dialog-leave-active,\n.p-dialog-bottomleft .p-dialog-enter-active,\n.p-dialog-bottomleft .p-dialog-leave-active,\n.p-dialog-bottomright .p-dialog-enter-active,\n.p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n}\n.p-dialog-top .p-dialog-enter-from,\n.p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n}\n.p-dialog-bottom .p-dialog-enter-from,\n.p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n}\n.p-dialog-left .p-dialog-enter-from,\n.p-dialog-left .p-dialog-leave-to,\n.p-dialog-topleft .p-dialog-enter-from,\n.p-dialog-topleft .p-dialog-leave-to,\n.p-dialog-bottomleft .p-dialog-enter-from,\n.p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n}\n.p-dialog-right .p-dialog-enter-from,\n.p-dialog-right .p-dialog-leave-to,\n.p-dialog-topright .p-dialog-enter-from,\n.p-dialog-topright .p-dialog-leave-to,\n.p-dialog-bottomright .p-dialog-enter-from,\n.p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n}\n\n/* Maximize */\n.p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n}\n.p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n}\n\n/* Position */\n.p-dialog-left {\n justify-content: flex-start;\n}\n.p-dialog-right {\n justify-content: flex-end;\n}\n.p-dialog-top {\n align-items: flex-start;\n}\n.p-dialog-topleft {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.p-dialog-topright {\n justify-content: flex-end;\n align-items: flex-start;\n}\n.p-dialog-bottom {\n align-items: flex-end;\n}\n.p-dialog-bottomleft {\n justify-content: flex-start;\n align-items: flex-end;\n}\n.p-dialog-bottomright {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n}\n"),d.render=function(e,t,n,i,a,l){const s=o.resolveComponent("Portal"),d=o.resolveDirective("ripple"),u=o.resolveDirective("focustrap");return o.openBlock(),o.createBlock(s,{appendTo:n.appendTo},{default:o.withCtx((()=>[a.containerVisible?(o.openBlock(),o.createElementBlock("div",{key:0,ref:l.maskRef,class:o.normalizeClass(l.maskClass),onClick:t[3]||(t[3]=(...e)=>l.onMaskClick&&l.onMaskClick(...e))},[o.createVNode(o.Transition,{name:"p-dialog",onBeforeEnter:l.onBeforeEnter,onEnter:l.onEnter,onBeforeLeave:l.onBeforeLeave,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave,appear:""},{default:o.withCtx((()=>[n.visible?o.withDirectives((o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.containerRef,class:l.dialogClass,role:"dialog","aria-labelledby":l.ariaLabelledById,"aria-modal":n.modal},e.$attrs),[n.showHeader?(o.openBlock(),o.createElementBlock("div",{key:0,ref:l.headerContainerRef,class:"p-dialog-header",onMousedown:t[2]||(t[2]=(...e)=>l.initDrag&&l.initDrag(...e))},[o.renderSlot(e.$slots,"header",{},(()=>[n.header?(o.openBlock(),o.createElementBlock("span",{key:0,id:l.ariaLabelledById,class:"p-dialog-title"},o.toDisplayString(n.header),9,p)):o.createCommentVNode("",!0)])),o.createElementVNode("div",m,[n.maximizable?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref:l.maximizableRef,autofocus:a.focusable,class:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:t[0]||(t[0]=(...e)=>l.maximize&&l.maximize(...e)),type:"button",tabindex:n.maximizable?"0":"-1"},[o.createElementVNode("span",{class:o.normalizeClass(l.maximizeIconClass)},null,2)],8,c)),[[d]]):o.createCommentVNode("",!0),n.closable?o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({key:1,ref:l.closeButtonRef,autofocus:a.focusable,class:"p-dialog-header-icon p-dialog-header-close p-link",onClick:t[1]||(t[1]=(...e)=>l.close&&l.close(...e)),"aria-label":l.closeAriaLabel,type:"button"},n.closeButtonProps),[o.createElementVNode("span",{class:o.normalizeClass(["p-dialog-header-close-icon",n.closeIcon])},null,2)],16,g)),[[d]]):o.createCommentVNode("",!0)])],544)):o.createCommentVNode("",!0),o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentStyleClass,style:n.contentStyle},n.contentProps),[o.renderSlot(e.$slots,"default")],16),n.footer||e.$slots.footer?(o.openBlock(),o.createElementBlock("div",{key:1,ref:l.footerContainerRef,class:"p-dialog-footer"},[o.renderSlot(e.$slots,"footer",{},(()=>[o.createTextVNode(o.toDisplayString(n.footer),1)]))],512)):o.createCommentVNode("",!0)],16,r)),[[u,{disabled:!n.modal}]]):o.createCommentVNode("",!0)])),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],2)):o.createCommentVNode("",!0)])),_:3},8,["appendTo"])},d}(primevue.focustrap,primevue.portal,primevue.ripple,primevue.utils,Vue);
|
|
46
46
|
|
|
@@ -48,9 +48,9 @@ this.primevue=this.primevue||{},this.primevue.paginator=function(e,t,a,n,r){"use
|
|
|
48
48
|
|
|
49
49
|
this.primevue=this.primevue||{},this.primevue.tree=function(e,t,n){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"TreeNode",emits:["node-toggle","node-click","checkbox-change"],props:{node:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},templates:{type:null,default:null},level:{type:Number,default:null},index:{type:Number,default:null}},nodeTouched:!1,mounted(){this.$refs.currentNode.closest(".p-treeselect-items-wrapper")&&this.setAllNodesTabIndexes()},methods:{toggle(){this.$emit("node-toggle",this.node)},label:e=>"function"==typeof e.label?e.label():e.label,onChildNodeToggle(e){this.$emit("node-toggle",e)},onClick(t){e.DomHandler.hasClass(t.target,"p-tree-toggler")||e.DomHandler.hasClass(t.target.parentElement,"p-tree-toggler")||(this.isCheckboxSelectionMode()?this.toggleCheckbox():this.$emit("node-click",{originalEvent:t,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1)},onChildNodeClick(e){this.$emit("node-click",e)},onTouchEnd(){this.nodeTouched=!0},onKeyDown(e){if(this.isSameNode(e))switch(e.code){case"Tab":this.onTabKey(e);break;case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowRight":this.onArrowRight(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"Enter":case"Space":this.onEnterKey(e)}},onArrowDown(e){const t=e.target,n=t.children[1];if(n)this.focusRowChange(t,n.children[0]);else if(t.nextElementSibling)this.focusRowChange(t,t.nextElementSibling);else{let e=this.findNextSiblingOfAncestor(t);e&&this.focusRowChange(t,e)}e.preventDefault()},onArrowUp(e){const t=e.target;if(t.previousElementSibling)this.focusRowChange(t,t.previousElementSibling,this.findLastVisibleDescendant(t.previousElementSibling));else{let e=this.getParentNodeElement(t);e&&this.focusRowChange(t,e)}e.preventDefault()},onArrowRight(e){this.leaf||this.expanded||(e.currentTarget.tabIndex=-1,this.$emit("node-toggle",this.node),this.$nextTick((()=>{this.onArrowDown(e)})))},onArrowLeft(t){const n=e.DomHandler.findSingle(t.currentTarget,".p-tree-toggler");if(0===this.level&&!this.expanded)return!1;if(this.expanded&&!this.leaf)return n.click(),!1;const l=this.findBeforeClickableNode(t.currentTarget);l&&this.focusRowChange(t.currentTarget,l)},onEnterKey(e){this.setTabIndexForSelectionMode(e,this.nodeTouched),this.onClick(e),e.preventDefault()},onTabKey(){this.setAllNodesTabIndexes()},setAllNodesTabIndexes(){const t=e.DomHandler.find(this.$refs.currentNode.closest(".p-tree-container"),".p-treenode"),n=[...t].some((e=>"true"===e.getAttribute("aria-selected")||"true"===e.getAttribute("aria-checked")));if([...t].forEach((e=>{e.tabIndex=-1})),n){[...t].filter((e=>"true"===e.getAttribute("aria-selected")||"true"===e.getAttribute("aria-checked")))[0].tabIndex=0}else[...t][0].tabIndex=0},setTabIndexForSelectionMode(t,n){if(null!==this.selectionMode){const l=[...e.DomHandler.find(this.$refs.currentNode.parentElement,".p-treenode")];t.currentTarget.tabIndex=!1===n?-1:0,l.every((e=>-1===e.tabIndex))&&(l[0].tabIndex=0)}},focusRowChange(e,t,n){e.tabIndex="-1",t.tabIndex="0",this.focusNode(n||t)},findBeforeClickableNode(t){const n=t.closest("ul").closest("li");if(n){const l=e.DomHandler.findSingle(n,"button");return l&&"hidden"!==l.style.visibility?n:this.findBeforeClickableNode(t.previousElementSibling)}return null},toggleCheckbox(){let e=this.selectionKeys?{...this.selectionKeys}:{};const t=!this.checked;this.propagateDown(this.node,t,e),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:e})},propagateDown(e,t,n){if(t?n[e.key]={checked:!0,partialChecked:!1}:delete n[e.key],e.children&&e.children.length)for(let l of e.children)this.propagateDown(l,t,n)},propagateUp(e){let t=e.check,n={...e.selectionKeys},l=0,i=!1;for(let e of this.node.children)n[e.key]&&n[e.key].checked?l++:n[e.key]&&n[e.key].partialChecked&&(i=!0);t&&l===this.node.children.length?n[this.node.key]={checked:!0,partialChecked:!1}:(t||delete n[this.node.key],i||l>0&&l!==this.node.children.length?n[this.node.key]={checked:!1,partialChecked:!0}:delete n[this.node.key]),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:n})},onChildCheckboxChange(e){this.$emit("checkbox-change",e)},findNextSiblingOfAncestor(e){let t=this.getParentNodeElement(e);return t?t.nextElementSibling?t.nextElementSibling:this.findNextSiblingOfAncestor(t):null},findLastVisibleDescendant(e){const t=e.children[1];if(t){const e=t.children[t.children.length-1];return this.findLastVisibleDescendant(e)}return e},getParentNodeElement(t){const n=t.parentElement.parentElement;return e.DomHandler.hasClass(n,"p-treenode")?n:null},focusNode(e){e.focus()},isCheckboxSelectionMode(){return"checkbox"===this.selectionMode},isSameNode:e=>e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest(".p-treenode")))},computed:{hasChildren(){return this.node.children&&this.node.children.length>0},expanded(){return this.expandedKeys&&!0===this.expandedKeys[this.node.key]},leaf(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},selectable(){return!1!==this.node.selectable&&null!=this.selectionMode},selected(){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[this.node.key]},containerClass(){return["p-treenode",{"p-treenode-leaf":this.leaf}]},contentClass(){return["p-treenode-content",this.node.styleClass,{"p-treenode-selectable":this.selectable,"p-highlight":this.checkboxMode?this.checked:this.selected}]},icon(){return["p-treenode-icon",this.node.icon]},toggleIcon(){return["p-tree-toggler-icon pi pi-fw",this.expanded?this.node.expandedIcon||"pi-chevron-down":this.node.collapsedIcon||"pi-chevron-right"]},checkboxClass(){return["p-checkbox-box",{"p-highlight":this.checked,"p-indeterminate":this.partialChecked}]},checkboxIcon(){return["p-checkbox-icon",{"pi pi-check":this.checked,"pi pi-minus":this.partialChecked}]},checkboxMode(){return"checkbox"===this.selectionMode&&!1!==this.node.selectable},checked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].checked)},partialChecked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].partialChecked)},ariaChecked(){return"single"===this.selectionMode||"multiple"===this.selectionMode?this.selected:void 0},ariaSelected(){return this.checkboxMode?this.checked:void 0}},directives:{ripple:l(t).default}};const o=["aria-label","aria-selected","aria-expanded","aria-setsize","aria-posinset","aria-level","aria-checked","tabindex"],s={key:0,class:"p-checkbox p-component","aria-hidden":"true"},r={class:"p-treenode-label"},d={key:0,class:"p-treenode-children",role:"group"};i.render=function(e,t,l,i,c,a){const h=n.resolveComponent("TreeNode",!0),p=n.resolveDirective("ripple");return n.openBlock(),n.createElementBlock("li",{ref:"currentNode",class:n.normalizeClass(a.containerClass),role:"treeitem","aria-label":a.label(l.node),"aria-selected":a.ariaSelected,"aria-expanded":a.expanded,"aria-setsize":l.node.children?l.node.children.length:0,"aria-posinset":l.index+1,"aria-level":l.level,"aria-checked":a.ariaChecked,tabindex:0===l.index?0:-1,onKeydown:t[3]||(t[3]=(...e)=>a.onKeyDown&&a.onKeyDown(...e))},[n.createElementVNode("div",{class:n.normalizeClass(a.contentClass),onClick:t[1]||(t[1]=(...e)=>a.onClick&&a.onClick(...e)),onTouchend:t[2]||(t[2]=(...e)=>a.onTouchEnd&&a.onTouchEnd(...e)),style:n.normalizeStyle(l.node.style)},[n.withDirectives((n.openBlock(),n.createElementBlock("button",{type:"button",class:"p-tree-toggler p-link",onClick:t[0]||(t[0]=(...e)=>a.toggle&&a.toggle(...e)),tabindex:"-1","aria-hidden":"true"},[n.createElementVNode("span",{class:n.normalizeClass(a.toggleIcon)},null,2)])),[[p]]),a.checkboxMode?(n.openBlock(),n.createElementBlock("div",s,[n.createElementVNode("div",{class:n.normalizeClass(a.checkboxClass),role:"checkbox"},[n.createElementVNode("span",{class:n.normalizeClass(a.checkboxIcon)},null,2)],2)])):n.createCommentVNode("",!0),n.createElementVNode("span",{class:n.normalizeClass(a.icon)},null,2),n.createElementVNode("span",r,[l.templates[l.node.type]||l.templates.default?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.templates[l.node.type]||l.templates.default),{key:0,node:l.node},null,8,["node"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(a.label(l.node)),1)],64))])],38),a.hasChildren&&a.expanded?(n.openBlock(),n.createElementBlock("ul",d,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.node.children,(e=>(n.openBlock(),n.createBlock(h,{key:e.key,node:e,templates:l.templates,level:l.level+1,expandedKeys:l.expandedKeys,onNodeToggle:a.onChildNodeToggle,onNodeClick:a.onChildNodeClick,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,onCheckboxChange:a.propagateUp},null,8,["node","templates","level","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange"])))),128))])):n.createCommentVNode("",!0)],42,o)};var c={name:"Tree",emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect"],props:{value:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner"},filter:{type:Boolean,default:!1},filterBy:{type:String,default:"label"},filterMode:{type:String,default:"lenient"},filterPlaceholder:{type:String,default:null},filterLocale:{type:String,default:void 0},scrollHeight:{type:String,default:null},level:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data(){return{d_expandedKeys:this.expandedKeys||{},filterValue:null}},watch:{expandedKeys(e){this.d_expandedKeys=e}},methods:{onNodeToggle(e){const t=e.key;this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",e)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",e)),this.d_expandedKeys={...this.d_expandedKeys},this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick(e){if(null!=this.selectionMode&&!1!==e.node.selectable){const t=!e.nodeTouched&&this.metaKeySelection?this.handleSelectionWithMetaKey(e):this.handleSelectionWithoutMetaKey(e);this.$emit("update:selectionKeys",t)}},onCheckboxChange(e){this.$emit("update:selectionKeys",e.selectionKeys),e.check?this.$emit("node-select",e.node):this.$emit("node-unselect",e.node)},handleSelectionWithMetaKey(e){const t=e.originalEvent,n=e.node,l=t.metaKey||t.ctrlKey;let i;return this.isNodeSelected(n)&&l?(this.isSingleSelectionMode()?i={}:(i={...this.selectionKeys},delete i[n.key]),this.$emit("node-unselect",n)):(this.isSingleSelectionMode()?i={}:this.isMultipleSelectionMode()&&(i=l&&this.selectionKeys?{...this.selectionKeys}:{}),i[n.key]=!0,this.$emit("node-select",n)),i},handleSelectionWithoutMetaKey(e){const t=e.node,n=this.isNodeSelected(t);let l;return this.isSingleSelectionMode()?n?(l={},this.$emit("node-unselect",t)):(l={},l[t.key]=!0,this.$emit("node-select",t)):n?(l={...this.selectionKeys},delete l[t.key],this.$emit("node-unselect",t)):(l=this.selectionKeys?{...this.selectionKeys}:{},l[t.key]=!0,this.$emit("node-select",t)),l},isSingleSelectionMode(){return"single"===this.selectionMode},isMultipleSelectionMode(){return"multiple"===this.selectionMode},isNodeSelected(e){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[e.key]},isChecked(e){return!!this.selectionKeys&&(this.selectionKeys[e.key]&&this.selectionKeys[e.key].checked)},isNodeLeaf:e=>!1!==e.leaf&&!(e.children&&e.children.length),onFilterKeydown(e){13===e.which&&e.preventDefault()},findFilteredNodes(e,t){if(e){let n=!1;if(e.children){let l=[...e.children];e.children=[];for(let i of l){let l={...i};this.isFilterMatched(l,t)&&(n=!0,e.children.push(l))}}if(n)return!0}},isFilterMatched(t,{searchFields:n,filterText:l,strict:i}){let o=!1;for(let i of n){String(e.ObjectUtils.resolveFieldData(t,i)).toLocaleLowerCase(this.filterLocale).indexOf(l)>-1&&(o=!0)}return(!o||i&&!this.isNodeLeaf(t))&&(o=this.findFilteredNodes(t,{searchFields:n,filterText:l,strict:i})||o),o}},computed:{containerClass(){return["p-tree p-component",{"p-tree-selectable":null!=this.selectionMode,"p-tree-loading":this.loading,"p-tree-flex-scrollable":"flex"===this.scrollHeight}]},loadingIconClass(){return["p-tree-loading-icon pi-spin",this.loadingIcon]},filteredValue(){let e=[];const t=this.filterBy.split(","),n=this.filterValue.trim().toLocaleLowerCase(this.filterLocale),l="strict"===this.filterMode;for(let i of this.value){let o={...i},s={searchFields:t,filterText:n,strict:l};(l&&(this.findFilteredNodes(o,s)||this.isFilterMatched(o,s))||!l&&(this.isFilterMatched(o,s)||this.findFilteredNodes(o,s)))&&e.push(o)}return e},valueToRender(){return this.filterValue&&this.filterValue.trim().length>0?this.filteredValue:this.value}},components:{TreeNode:i}};const a={key:0,class:"p-tree-loading-overlay p-component-overlay"},h={key:1,class:"p-tree-filter-container"},p=["placeholder"],u=n.createElementVNode("span",{class:"p-tree-filter-icon pi pi-search"},null,-1),y=["aria-labelledby","aria-label"];return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-tree-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n overflow: auto;\n}\n.p-treenode-children {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-tree-wrapper {\n overflow: auto;\n}\n.p-treenode-selectable {\n cursor: pointer;\n user-select: none;\n}\n.p-tree-toggler {\n cursor: pointer;\n user-select: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n flex-shrink: 0;\n}\n.p-treenode-leaf > .p-treenode-content .p-tree-toggler {\n visibility: hidden;\n}\n.p-treenode-content {\n display: flex;\n align-items: center;\n}\n.p-tree-filter {\n width: 100%;\n}\n.p-tree-filter-container {\n position: relative;\n display: block;\n width: 100%;\n}\n.p-tree-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-tree-loading {\n position: relative;\n min-height: 4rem;\n}\n.p-tree .p-tree-loading-overlay {\n position: absolute;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.p-tree-flex-scrollable {\n display: flex;\n flex: 1;\n height: 100%;\n flex-direction: column;\n}\n.p-tree-flex-scrollable .p-tree-wrapper {\n flex: 1;\n}\n"),c.render=function(e,t,l,i,o,s){const r=n.resolveComponent("TreeNode");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(s.containerClass)},[l.loading?(n.openBlock(),n.createElementBlock("div",a,[n.createElementVNode("i",{class:n.normalizeClass(s.loadingIconClass)},null,2)])):n.createCommentVNode("",!0),l.filter?(n.openBlock(),n.createElementBlock("div",h,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>o.filterValue=e),type:"text",autocomplete:"off",class:"p-tree-filter p-inputtext p-component",placeholder:l.filterPlaceholder,onKeydown:t[1]||(t[1]=(...e)=>s.onFilterKeydown&&s.onFilterKeydown(...e))},null,40,p),[[n.vModelText,o.filterValue]]),u])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"p-tree-wrapper",style:n.normalizeStyle({maxHeight:l.scrollHeight})},[n.createElementVNode("ul",{class:"p-tree-container",role:"tree","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.valueToRender,((t,i)=>(n.openBlock(),n.createBlock(r,{key:t.key,node:t,templates:e.$slots,level:l.level+1,index:i,expandedKeys:o.d_expandedKeys,onNodeToggle:s.onNodeToggle,onNodeClick:s.onNodeClick,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,onCheckboxChange:s.onCheckboxChange},null,8,["node","templates","level","index","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange"])))),128))],8,y)],4)],2)},c}(primevue.utils,primevue.ripple,Vue);
|
|
50
50
|
|
|
51
|
-
this.primevue=this.primevue||{},this.primevue.menu=function(e,t,i,n,s){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),a=l(t),r={name:"Menuitem",inheritAttrs:!1,emits:["item-click"],props:{item:null,template:null,exact:null,id:null,focusedOptionId:null},methods:{getItemProp:(e,t)=>e&&e.item?i.ObjectUtils.getItemValue(e.item[t]):void 0,onItemActionClick(e,t){t&&t(e)},onItemClick(e){const t=this.getItemProp(this.item,"command");t&&t({originalEvent:e,item:this.item.item}),this.$emit("item-click",{originalEvent:e,item:this.item,id:this.id})},containerClass(){return["p-menuitem",this.item.class,{"p-focus":this.id===this.focusedOptionId,"p-disabled":this.disabled()}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},visible(){return"function"==typeof this.item.visible?this.item.visible():!1!==this.item.visible},disabled(){return"function"==typeof this.item.disabled?this.item.disabled():this.item.disabled},label(){return"function"==typeof this.item.label?this.item.label():this.item.label}},directives:{ripple:l(n).default}};const d=["id","aria-label","aria-disabled"],c=["href","onClick"],u={class:"p-menuitem-text"},p=["href","target"],m={class:"p-menuitem-text"};r.render=function(e,t,i,n,l,o){const a=s.resolveComponent("router-link"),r=s.resolveDirective("ripple");return o.visible()?(s.openBlock(),s.createElementBlock("li",{key:0,id:i.id,class:s.normalizeClass(o.containerClass()),role:"menuitem",style:s.normalizeStyle(i.item.style),"aria-label":o.label(),"aria-disabled":o.disabled()},[s.createElementVNode("div",{class:"p-menuitem-content",onClick:t[0]||(t[0]=e=>o.onItemClick(e))},[i.template?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.template),{key:1,item:i.item},null,8,["item"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[i.item.to&&!o.disabled()?(s.openBlock(),s.createBlock(a,{key:0,to:i.item.to,custom:""},{default:s.withCtx((({navigate:e,href:t,isActive:n,isExactActive:l})=>[s.withDirectives((s.openBlock(),s.createElementBlock("a",{href:t,class:s.normalizeClass(o.linkClass({isActive:n,isExactActive:l})),tabindex:"-1","aria-hidden":"true",onClick:t=>o.onItemActionClick(t,e)},[i.item.icon?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["p-menuitem-icon",i.item.icon])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",u,s.toDisplayString(o.label()),1)],10,c)),[[r]])])),_:1},8,["to"])):s.withDirectives((s.openBlock(),s.createElementBlock("a",{key:1,href:i.item.url,class:s.normalizeClass(o.linkClass()),target:i.item.target,tabindex:"-1","aria-hidden":"true"},[i.item.icon?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["p-menuitem-icon",i.item.icon])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",m,s.toDisplayString(o.label()),1)],10,p)),[[r]])],64))])],14,d)):s.createCommentVNode("",!0)};var h={name:"Menu",inheritAttrs:!1,emits:["show","hide","focus","blur"],props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:()=>({overlayVisible:!1,focused:!1,focusedOptionIndex:-1,selectedOptionIndex:-1}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,list:null,mounted(){this.popup||(this.bindResizeListener(),this.bindOutsideClickListener())},beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&i.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;this.disabled(t)||(t.command&&t.command(e),t.to&&e.navigate&&e.navigate(e.originalEvent),this.overlayVisible&&this.hide(),this.popup||this.focusedOptionIndex===e.id||(this.focusedOptionIndex=e.id))},onListFocus(e){this.focused=!0,this.popup||(-1!==this.selectedOptionIndex?(this.changeFocusedOptionIndex(this.selectedOptionIndex),this.selectedOptionIndex=-1):this.changeFocusedOptionIndex(0)),this.$emit("focus",e)},onListBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":this.popup&&(i.DomHandler.focus(this.target),this.hide());case"Tab":this.overlayVisible&&this.hide()}},onArrowDownKey(e){const t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},onArrowUpKey(e){if(e.altKey&&this.popup)i.DomHandler.focus(this.target),this.hide(),e.preventDefault();else{const t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()}},onHomeKey(e){this.changeFocusedOptionIndex(0),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)").length-1),e.preventDefault()},onEnterKey(e){const t=i.DomHandler.findSingle(this.list,`li[id="${this.focusedOptionIndex}"]`),n=t&&i.DomHandler.findSingle(t,".p-menuitem-link");this.popup&&i.DomHandler.focus(this.target),n?n.click():t&&t.click(),e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},findNextOptionIndex(e){const t=[...i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t+1:0},findPrevOptionIndex(e){const t=[...i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t-1:0},changeFocusedOptionIndex(e){const t=i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)");let n=e>=t.length?t.length-1:e<0?0:e;n>-1&&(this.focusedOptionIndex=t[n].getAttribute("id"))},toggle(e){this.overlayVisible?this.hide():this.show(e)},show(e){this.overlayVisible=!0,this.target=e.currentTarget},hide(){this.overlayVisible=!1,this.target=null},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&i.ZIndexUtils.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.popup&&(i.DomHandler.focus(this.list),this.changeFocusedOptionIndex(0)),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave(e){this.autoZIndex&&i.ZIndexUtils.clear(e)},alignOverlay(){i.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=i.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!(this.target&&(this.target===e.target||this.target.contains(e.target)));this.overlayVisible&&t&&i?this.hide():!this.popup&&t&&i&&(this.focusedOptionIndex=-1)},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.target,(()=>{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)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label,separatorClass:e=>["p-menuitem-separator",e.class],onOverlayClick(e){o.default.emit("overlay-click",{originalEvent:e,target:this.target})},containerRef(e){this.container=e},listRef(e){this.list=e}},computed:{containerClass(){return["p-menu p-component",{"p-menu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},id(){return this.$attrs.id||i.UniqueComponentId()},focusedOptionId(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{PVMenuitem:r,Portal:a.default}};const b=["id"],f=["id","tabindex","aria-activedescendant","aria-label","aria-labelledby"],k=["id"];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],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-menu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menu .p-menuitem-text {\n line-height: 1;\n}\n"),h.render=function(e,t,i,n,l,o){const a=s.resolveComponent("PVMenuitem"),r=s.resolveComponent("Portal");return s.openBlock(),s.createBlock(r,{appendTo:i.appendTo,disabled:!i.popup},{default:s.withCtx((()=>[s.createVNode(s.Transition,{name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:s.withCtx((()=>[!i.popup||l.overlayVisible?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:o.containerRef,id:o.id,class:o.containerClass},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[s.createElementVNode("ul",{ref:o.listRef,id:o.id+"_list",class:"p-menu-list p-reset",role:"menu",tabindex:i.tabindex,"aria-activedescendant":l.focused?o.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=(...e)=>o.onListFocus&&o.onListFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>o.onListBlur&&o.onListBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>o.onListKeyDown&&o.onListKeyDown(...e))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.model,((t,n)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:o.label(t)+n.toString()},[t.items&&o.visible(t)&&!t.separator?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[t.items?(s.openBlock(),s.createElementBlock("li",{key:0,id:o.id+"_"+n,class:"p-submenu-header",role:"none"},[s.renderSlot(e.$slots,"item",{item:t},(()=>[s.createTextVNode(s.toDisplayString(o.label(t)),1)]))],8,k)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,((l,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:l.label+n+"_"+r},[o.visible(l)&&!l.separator?(s.openBlock(),s.createBlock(a,{key:0,id:o.id+"_"+n+"_"+r,item:l,template:e.$slots.item,exact:i.exact,focusedOptionId:o.focusedOptionId,onItemClick:o.itemClick},null,8,["id","item","template","exact","focusedOptionId","onItemClick"])):o.visible(l)&&l.separator?(s.openBlock(),s.createElementBlock("li",{key:"separator"+n+r,class:s.normalizeClass(o.separatorClass(t)),style:s.normalizeStyle(l.style),role:"separator"},null,6)):s.createCommentVNode("",!0)],64)))),128))],64)):o.visible(t)&&t.separator?(s.openBlock(),s.createElementBlock("li",{key:"separator"+n.toString(),class:s.normalizeClass(o.separatorClass(t)),style:s.normalizeStyle(t.style),role:"separator"},null,6)):(s.openBlock(),s.createBlock(a,{key:o.label(t)+n.toString(),id:o.id+"_"+n,item:t,template:e.$slots.item,exact:i.exact,focusedOptionId:o.focusedOptionId,onItemClick:o.itemClick},null,8,["id","item","template","exact","focusedOptionId","onItemClick"]))],64)))),128))],40,f)],16,b)):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo","disabled"])},h}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);
|
|
51
|
+
this.primevue=this.primevue||{},this.primevue.menu=function(e,t,i,n,s){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),a=l(t),r={name:"Menuitem",inheritAttrs:!1,emits:["item-click"],props:{item:null,template:null,exact:null,id:null,focusedOptionId:null},methods:{getItemProp:(e,t)=>e&&e.item?i.ObjectUtils.getItemValue(e.item[t]):void 0,onItemActionClick(e,t){t&&t(e)},onItemClick(e){const t=this.getItemProp(this.item,"command");t&&t({originalEvent:e,item:this.item.item}),this.$emit("item-click",{originalEvent:e,item:this.item,id:this.id})},containerClass(){return["p-menuitem",this.item.class,{"p-focus":this.id===this.focusedOptionId,"p-disabled":this.disabled()}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},visible(){return"function"==typeof this.item.visible?this.item.visible():!1!==this.item.visible},disabled(){return"function"==typeof this.item.disabled?this.item.disabled():this.item.disabled},label(){return"function"==typeof this.item.label?this.item.label():this.item.label}},directives:{ripple:l(n).default}};const d=["id","aria-label","aria-disabled"],c=["href","onClick"],u={class:"p-menuitem-text"},p=["href","target"],m={class:"p-menuitem-text"};r.render=function(e,t,i,n,l,o){const a=s.resolveComponent("router-link"),r=s.resolveDirective("ripple");return o.visible()?(s.openBlock(),s.createElementBlock("li",{key:0,id:i.id,class:s.normalizeClass(o.containerClass()),role:"menuitem",style:s.normalizeStyle(i.item.style),"aria-label":o.label(),"aria-disabled":o.disabled()},[s.createElementVNode("div",{class:"p-menuitem-content",onClick:t[0]||(t[0]=e=>o.onItemClick(e))},[i.template?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.template),{key:1,item:i.item},null,8,["item"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[i.item.to&&!o.disabled()?(s.openBlock(),s.createBlock(a,{key:0,to:i.item.to,custom:""},{default:s.withCtx((({navigate:e,href:t,isActive:n,isExactActive:l})=>[s.withDirectives((s.openBlock(),s.createElementBlock("a",{href:t,class:s.normalizeClass(o.linkClass({isActive:n,isExactActive:l})),tabindex:"-1","aria-hidden":"true",onClick:t=>o.onItemActionClick(t,e)},[i.item.icon?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["p-menuitem-icon",i.item.icon])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",u,s.toDisplayString(o.label()),1)],10,c)),[[r]])])),_:1},8,["to"])):s.withDirectives((s.openBlock(),s.createElementBlock("a",{key:1,href:i.item.url,class:s.normalizeClass(o.linkClass()),target:i.item.target,tabindex:"-1","aria-hidden":"true"},[i.item.icon?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["p-menuitem-icon",i.item.icon])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",m,s.toDisplayString(o.label()),1)],10,p)),[[r]])],64))])],14,d)):s.createCommentVNode("",!0)};var h={name:"Menu",inheritAttrs:!1,emits:["show","hide","focus","blur"],props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data(){return{id:this.$attrs.id,overlayVisible:!1,focused:!1,focusedOptionIndex:-1,selectedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||i.UniqueComponentId()}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,list:null,mounted(){this.id=this.id||i.UniqueComponentId(),this.popup||(this.bindResizeListener(),this.bindOutsideClickListener())},beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&i.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;this.disabled(t)||(t.command&&t.command(e),t.to&&e.navigate&&e.navigate(e.originalEvent),this.overlayVisible&&this.hide(),this.popup||this.focusedOptionIndex===e.id||(this.focusedOptionIndex=e.id))},onListFocus(e){this.focused=!0,this.popup||(-1!==this.selectedOptionIndex?(this.changeFocusedOptionIndex(this.selectedOptionIndex),this.selectedOptionIndex=-1):this.changeFocusedOptionIndex(0)),this.$emit("focus",e)},onListBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":this.popup&&(i.DomHandler.focus(this.target),this.hide());case"Tab":this.overlayVisible&&this.hide()}},onArrowDownKey(e){const t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},onArrowUpKey(e){if(e.altKey&&this.popup)i.DomHandler.focus(this.target),this.hide(),e.preventDefault();else{const t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()}},onHomeKey(e){this.changeFocusedOptionIndex(0),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)").length-1),e.preventDefault()},onEnterKey(e){const t=i.DomHandler.findSingle(this.list,`li[id="${this.focusedOptionIndex}"]`),n=t&&i.DomHandler.findSingle(t,".p-menuitem-link");this.popup&&i.DomHandler.focus(this.target),n?n.click():t&&t.click(),e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},findNextOptionIndex(e){const t=[...i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t+1:0},findPrevOptionIndex(e){const t=[...i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t-1:0},changeFocusedOptionIndex(e){const t=i.DomHandler.find(this.container,"li.p-menuitem:not(.p-disabled)");let n=e>=t.length?t.length-1:e<0?0:e;n>-1&&(this.focusedOptionIndex=t[n].getAttribute("id"))},toggle(e){this.overlayVisible?this.hide():this.show(e)},show(e){this.overlayVisible=!0,this.target=e.currentTarget},hide(){this.overlayVisible=!1,this.target=null},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&i.ZIndexUtils.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.popup&&(i.DomHandler.focus(this.list),this.changeFocusedOptionIndex(0)),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave(e){this.autoZIndex&&i.ZIndexUtils.clear(e)},alignOverlay(){i.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=i.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!(this.target&&(this.target===e.target||this.target.contains(e.target)));this.overlayVisible&&t&&i?this.hide():!this.popup&&t&&i&&(this.focusedOptionIndex=-1)},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.target,(()=>{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)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label,separatorClass:e=>["p-menuitem-separator",e.class],onOverlayClick(e){o.default.emit("overlay-click",{originalEvent:e,target:this.target})},containerRef(e){this.container=e},listRef(e){this.list=e}},computed:{containerClass(){return["p-menu p-component",{"p-menu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},focusedOptionId(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{PVMenuitem:r,Portal:a.default}};const b=["id"],f=["id","tabindex","aria-activedescendant","aria-label","aria-labelledby"],k=["id"];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],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-menu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menu .p-menuitem-text {\n line-height: 1;\n}\n"),h.render=function(e,t,i,n,l,o){const a=s.resolveComponent("PVMenuitem"),r=s.resolveComponent("Portal");return s.openBlock(),s.createBlock(r,{appendTo:i.appendTo,disabled:!i.popup},{default:s.withCtx((()=>[s.createVNode(s.Transition,{name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:s.withCtx((()=>[!i.popup||l.overlayVisible?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:o.containerRef,id:l.id,class:o.containerClass},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[s.createElementVNode("ul",{ref:o.listRef,id:l.id+"_list",class:"p-menu-list p-reset",role:"menu",tabindex:i.tabindex,"aria-activedescendant":l.focused?o.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=(...e)=>o.onListFocus&&o.onListFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>o.onListBlur&&o.onListBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>o.onListKeyDown&&o.onListKeyDown(...e))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.model,((t,n)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:o.label(t)+n.toString()},[t.items&&o.visible(t)&&!t.separator?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[t.items?(s.openBlock(),s.createElementBlock("li",{key:0,id:l.id+"_"+n,class:"p-submenu-header",role:"none"},[s.renderSlot(e.$slots,"item",{item:t},(()=>[s.createTextVNode(s.toDisplayString(o.label(t)),1)]))],8,k)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,((r,d)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:r.label+n+"_"+d},[o.visible(r)&&!r.separator?(s.openBlock(),s.createBlock(a,{key:0,id:l.id+"_"+n+"_"+d,item:r,template:e.$slots.item,exact:i.exact,focusedOptionId:o.focusedOptionId,onItemClick:o.itemClick},null,8,["id","item","template","exact","focusedOptionId","onItemClick"])):o.visible(r)&&r.separator?(s.openBlock(),s.createElementBlock("li",{key:"separator"+n+d,class:s.normalizeClass(o.separatorClass(t)),style:s.normalizeStyle(r.style),role:"separator"},null,6)):s.createCommentVNode("",!0)],64)))),128))],64)):o.visible(t)&&t.separator?(s.openBlock(),s.createElementBlock("li",{key:"separator"+n.toString(),class:s.normalizeClass(o.separatorClass(t)),style:s.normalizeStyle(t.style),role:"separator"},null,6)):(s.openBlock(),s.createBlock(a,{key:o.label(t)+n.toString(),id:l.id+"_"+n,item:t,template:e.$slots.item,exact:i.exact,focusedOptionId:o.focusedOptionId,onItemClick:o.itemClick},null,8,["id","item","template","exact","focusedOptionId","onItemClick"]))],64)))),128))],40,f)],16,b)):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo","disabled"])},h}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);
|
|
52
52
|
|
|
53
|
-
this.primevue=this.primevue||{},this.primevue.tieredmenu=function(e,t,i,s,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e),a=o(t),l={name:"TieredMenuSub",emits:["item-click","item-mouseenter"],props:{menuId:{type:String,default:null},focusedItemId:{type:String,default:null},items:{type:Array,default:null},level:{type:Number,default:0},template:{type:Function,default:null},activeItemPath:{type:Object,default:null},exact:{type:Boolean,default:!0}},methods:{getItemId(e){return`${this.menuId}_${e.key}`},getItemKey(e){return this.getItemId(e)},getItemProp:(e,t,s)=>e&&e.item?i.ObjectUtils.getItemValue(e.item[t],s):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemActive(e){return this.activeItemPath.some((t=>t.key===e.key))},isItemVisible(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemFocused(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:e=>i.ObjectUtils.isNotEmpty(e.items),onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},onItemActionClick(e,t){t&&t(e)},getAriaSetSize(){return this.items.filter((e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator"))).length},getAriaPosInset(e){return e-this.items.slice(0,e).filter((e=>this.isItemVisible(e)&&this.getItemProp(e,"separator"))).length+1},getItemClass(e){return["p-menuitem",this.getItemProp(e,"class"),{"p-menuitem-active p-highlight":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)}]},getItemActionClass(e,t){return["p-menuitem-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},getItemIconClass(e){return["p-menuitem-icon",this.getItemProp(e,"icon")]},getSeparatorItemClass(e){return["p-menuitem-separator",this.getItemProp(e,"class")]}},directives:{ripple:o(s).default}};const d=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset"],m=["onClick","onMouseenter"],c=["href","onClick"],u={class:"p-menuitem-text"},h=["href","target"],I={class:"p-menuitem-text"},p={key:1,class:"p-submenu-icon pi pi-angle-right"},f=["id"];l.render=function(e,t,i,s,o,r){const a=n.resolveComponent("router-link"),l=n.resolveComponent("TieredMenuSub",!0),b=n.resolveDirective("ripple");return n.openBlock(),n.createElementBlock("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.items,((s,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:r.getItemKey(s)},[r.isItemVisible(s)&&!r.getItemProp(s,"separator")?(n.openBlock(),n.createElementBlock("li",{key:0,id:r.getItemId(s),style:n.normalizeStyle(r.getItemProp(s,"style")),class:n.normalizeClass(r.getItemClass(s)),role:"menuitem","aria-label":r.getItemLabel(s),"aria-disabled":r.isItemDisabled(s)||void 0,"aria-expanded":r.isItemGroup(s)?r.isItemActive(s):void 0,"aria-haspopup":r.isItemGroup(s)&&!r.getItemProp(s,"to")?"menu":void 0,"aria-level":i.level+1,"aria-setsize":r.getAriaSetSize(),"aria-posinset":r.getAriaPosInset(o)},[n.createElementVNode("div",{class:"p-menuitem-content",onClick:e=>r.onItemClick(e,s),onMouseenter:e=>r.onItemMouseEnter(e,s)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:s.item},null,8,["item"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.getItemProp(s,"to")&&!r.isItemDisabled(s)?(n.openBlock(),n.createBlock(a,{key:0,to:r.getItemProp(s,"to"),custom:""},{default:n.withCtx((({navigate:e,href:t,isActive:i,isExactActive:o})=>[n.withDirectives((n.openBlock(),n.createElementBlock("a",{href:t,class:n.normalizeClass(r.getItemActionClass(s,{isActive:i,isExactActive:o})),tabindex:"-1","aria-hidden":"true",onClick:t=>r.onItemActionClick(t,e)},[r.getItemProp(s,"icon")?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(r.getItemIconClass(s))},null,2)):n.createCommentVNode("",!0),n.createElementVNode("span",u,n.toDisplayString(r.getItemLabel(s)),1)],10,c)),[[b]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createElementBlock("a",{key:1,href:r.getItemProp(s,"url"),class:n.normalizeClass(r.getItemActionClass(s)),target:r.getItemProp(s,"target"),tabindex:"-1","aria-hidden":"true"},[r.getItemProp(s,"icon")?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(r.getItemIconClass(s))},null,2)):n.createCommentVNode("",!0),n.createElementVNode("span",I,n.toDisplayString(r.getItemLabel(s)),1),r.isItemGroup(s)?(n.openBlock(),n.createElementBlock("span",p)):n.createCommentVNode("",!0)],10,h)),[[b]])],64))],40,m),r.isItemVisible(s)&&r.isItemGroup(s)?(n.openBlock(),n.createBlock(l,{key:0,id:r.getItemId(s)+"_list",role:"menu",class:"p-submenu-list",menuId:i.menuId,focusedItemId:i.focusedItemId,items:s.items,template:i.template,activeItemPath:i.activeItemPath,exact:i.exact,level:i.level+1,onItemClick:t[0]||(t[0]=t=>e.$emit("item-click",t)),onItemMouseenter:t[1]||(t[1]=t=>e.$emit("item-mouseenter",t))},null,8,["id","menuId","focusedItemId","items","template","activeItemPath","exact","level"])):n.createCommentVNode("",!0)],14,d)):n.createCommentVNode("",!0),r.isItemVisible(s)&&r.getItemProp(s,"separator")?(n.openBlock(),n.createElementBlock("li",{key:1,id:r.getItemId(s),style:n.normalizeStyle(r.getItemProp(s,"style")),class:n.normalizeClass(r.getSeparatorItemClass(s)),role:"separator"},null,14,f)):n.createCommentVNode("",!0)],64)))),128))])};var b={name:"TieredMenu",inheritAttrs:!1,emits:["focus","blur","before-show","before-hide","hide","show"],props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,target:null,container:null,menubar:null,searchTimeout:null,searchValue:null,data(){return{focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!this.popup,dirty:!1}},watch:{activeItemPath(e){this.popup||(i.ObjectUtils.isNotEmpty(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener()))}},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&i.ZIndexUtils.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:(e,t)=>e?i.ObjectUtils.getItemValue(e[t]):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemGroup(e){return i.ObjectUtils.isNotEmpty(this.getItemProp(e,"items"))},isItemSeparator(e){return this.getItemProp(e,"separator")},getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:e=>e&&i.ObjectUtils.isNotEmpty(e.items),toggle(e){this.visible?this.hide(e,!0):this.show(e)},show(e,t){this.popup&&(this.$emit("before-show"),this.visible=!0,this.target=this.target||e.currentTarget,this.relatedTarget=e.relatedTarget||null),this.focusedItemInfo={index:this.findFirstFocusedItemIndex(),level:0,parentKey:""},t&&i.DomHandler.focus(this.menubar)},hide(e,t){this.popup&&(this.$emit("before-hide"),this.visible=!1),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},t&&i.DomHandler.focus(this.relatedTarget||this.target||this.menubar),this.dirty=!1},onFocus(e){this.focused=!0,this.focusedItemInfo=-1!==this.focusedItemInfo.index?this.focusedItemInfo:{index:this.findFirstFocusedItemIndex(),level:0,parentKey:""},this.$emit("focus",e)},onBlur(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.dirty=!1,this.$emit("blur",e)},onKeyDown(e){if(this.disabled)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.searchItems(e,e.key)}},onItemChange(e){const{processedItem:t,isFocus:s}=e;if(i.ObjectUtils.isEmpty(t))return;const{index:n,key:o,level:r,parentKey:a,items:l}=t,d=i.ObjectUtils.isNotEmpty(l),m=this.activeItemPath.filter((e=>e.parentKey!==a&&e.parentKey!==o));d&&m.push(t),this.focusedItemInfo={index:n,level:r,parentKey:a},this.activeItemPath=m,d&&(this.dirty=!0),s&&i.DomHandler.focus(this.menubar)},onOverlayClick(e){r.default.emit("overlay-click",{originalEvent:e,target:this.target})},onItemClick(e){const{originalEvent:t,processedItem:s}=e,n=this.isProccessedItemGroup(s),o=i.ObjectUtils.isEmpty(s.parent);if(this.isSelected(s)){const{index:e,key:t,level:n,parentKey:r}=s;this.activeItemPath=this.activeItemPath.filter((e=>t!==e.key&&t.startsWith(e.key))),this.focusedItemInfo={index:e,level:n,parentKey:r},this.dirty=!o,i.DomHandler.focus(this.menubar)}else if(n)this.onItemChange(e);else{const e=o?s:this.activeItemPath.find((e=>""===e.parentKey));this.hide(t),this.changeFocusedItemIndex(t,e?e.index:-1),i.DomHandler.focus(this.menubar)}},onItemMouseEnter(e){this.dirty&&this.onItemChange(e)},onArrowDownKey(e){const t=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedItemInfo.index){const t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(e,!0),e.preventDefault()}else{const t=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}},onArrowLeftKey(e){const t=this.visibleItems[this.focusedItemInfo.index],s=this.activeItemPath.find((e=>e.key===t.parentKey));i.ObjectUtils.isEmpty(t.parent)||(this.focusedItemInfo={index:-1,parentKey:s?s.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter((e=>e.parentKey!==this.focusedItemInfo.parentKey)),e.preventDefault()},onArrowRightKey(e){const t=this.visibleItems[this.focusedItemInfo.index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey(e){if(-1!==this.focusedItemInfo.index){const e=i.DomHandler.findSingle(this.menubar,`li[id="${this.focusedItemId}"]`),t=e&&i.DomHandler.findSingle(e,".p-menuitem-link");if(t?t.click():e&&e.click(),!this.popup){const e=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(e)&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}}e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onEscapeKey(e){this.hide(e,!0),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey(e){if(-1!==this.focusedItemInfo.index){const t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter(e){this.autoZIndex&&i.ZIndexUtils.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.alignOverlay(),i.DomHandler.focus(this.menubar),this.scrollInView()},onAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.container=null,this.dirty=!1},onAfterLeave(e){this.autoZIndex&&i.ZIndexUtils.clear(e)},alignOverlay(){this.container.style.minWidth=i.DomHandler.getOuterWidth(this.target)+"px",i.DomHandler.absolutePosition(this.container,this.target)},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!this.popup||!(this.target&&(this.target===e.target||this.target.contains(e.target)));t&&i&&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.target,(e=>{this.hide(e,!0)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=e=>{i.DomHandler.isTouchDevice()||this.hide(e,!0)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected(e){return this.activeItemPath.some((t=>t.key===e.key))},findFirstItemIndex(){return this.visibleItems.findIndex((e=>this.isValidItem(e)))},findLastItemIndex(){return i.ObjectUtils.findLastIndex(this.visibleItems,(e=>this.isValidItem(e)))},findNextItemIndex(e){const t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((e=>this.isValidItem(e))):-1;return t>-1?t+e+1:e},findPrevItemIndex(e){const t=e>0?i.ObjectUtils.findLastIndex(this.visibleItems.slice(0,e),(e=>this.isValidItem(e))):-1;return t>-1?t:e},findSelectedItemIndex(){return this.visibleItems.findIndex((e=>this.isValidSelectedItem(e)))},findFirstFocusedItemIndex(){const e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex(){const e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,s=!1;return-1!==this.focusedItemInfo.index?(i=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((e=>this.isItemMatched(e))),i=-1===i?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((e=>this.isItemMatched(e))):i+this.focusedItemInfo.index):i=this.visibleItems.findIndex((e=>this.isItemMatched(e))),-1!==i&&(s=!0),-1===i&&-1===this.focusedItemInfo.index&&(i=this.findFirstFocusedItemIndex()),-1!==i&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),s},changeFocusedItemIndex(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedItemId,s=i.DomHandler.findSingle(this.menubar,`li[id="${t}"]`);s&&s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems(e,t=0,i={},s=""){const n=[];return e&&e.forEach(((e,o)=>{const r=(""!==s?s+"_":"")+o,a={item:e,index:o,level:t,key:r,parent:i,parentKey:s};a.items=this.createProcessedItems(e.items,t+1,a,r),n.push(a)})),n},containerRef(e){this.container=e},menubarRef(e){this.menubar=e?e.$el:void 0}},computed:{containerClass(){return["p-tieredmenu p-component",{"p-tieredmenu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},processedItems(){return this.createProcessedItems(this.model||[])},visibleItems(){const e=this.activeItemPath.find((e=>e.key===this.focusedItemInfo.parentKey));return e?e.items:this.processedItems},id(){return this.$attrs.id||i.UniqueComponentId()},focusedItemId(){return-1!==this.focusedItemInfo.index?`${this.id}${i.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:""}_${this.focusedItemInfo.index}`:null}},components:{TieredMenuSub:l,Portal:a.default}};const v=["id"];return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-tieredmenu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-tieredmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-tieredmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-tieredmenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-tieredmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-tieredmenu .p-menuitem {\n position: relative;\n}\n.p-tieredmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-tieredmenu .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n"),b.render=function(e,t,i,s,o,r){const a=n.resolveComponent("TieredMenuSub"),l=n.resolveComponent("Portal");return n.openBlock(),n.createBlock(l,{appendTo:i.appendTo,disabled:!i.popup},{default:n.withCtx((()=>[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},{default:n.withCtx((()=>[o.visible?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,ref:r.containerRef,id:r.id,class:r.containerClass,onClick:t[0]||(t[0]=(...e)=>r.onOverlayClick&&r.onOverlayClick(...e))},e.$attrs),[n.createVNode(a,{ref:r.menubarRef,id:r.id+"_list",class:"p-tieredmenu-root-list",tabindex:i.disabled?-1:i.tabindex,role:"menubar","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-disabled":i.disabled||void 0,"aria-orientation":"vertical","aria-activedescendant":o.focused?r.focusedItemId:void 0,menuId:r.id,focusedItemId:o.focused?r.focusedItemId:void 0,items:r.processedItems,template:e.$slots.item,activeItemPath:o.activeItemPath,exact:i.exact,level:0,onFocus:r.onFocus,onBlur:r.onBlur,onKeydown:r.onKeyDown,onItemClick:r.onItemClick,onItemMouseenter:r.onItemMouseEnter},null,8,["id","tabindex","aria-label","aria-labelledby","aria-disabled","aria-activedescendant","menuId","focusedItemId","items","template","activeItemPath","exact","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"])],16,v)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo","disabled"])},b}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);
|
|
53
|
+
this.primevue=this.primevue||{},this.primevue.tieredmenu=function(e,t,i,s,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e),a=o(t),l={name:"TieredMenuSub",emits:["item-click","item-mouseenter"],props:{menuId:{type:String,default:null},focusedItemId:{type:String,default:null},items:{type:Array,default:null},level:{type:Number,default:0},template:{type:Function,default:null},activeItemPath:{type:Object,default:null},exact:{type:Boolean,default:!0}},methods:{getItemId(e){return`${this.menuId}_${e.key}`},getItemKey(e){return this.getItemId(e)},getItemProp:(e,t,s)=>e&&e.item?i.ObjectUtils.getItemValue(e.item[t],s):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemActive(e){return this.activeItemPath.some((t=>t.key===e.key))},isItemVisible(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemFocused(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:e=>i.ObjectUtils.isNotEmpty(e.items),onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},onItemActionClick(e,t){t&&t(e)},getAriaSetSize(){return this.items.filter((e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator"))).length},getAriaPosInset(e){return e-this.items.slice(0,e).filter((e=>this.isItemVisible(e)&&this.getItemProp(e,"separator"))).length+1},getItemClass(e){return["p-menuitem",this.getItemProp(e,"class"),{"p-menuitem-active p-highlight":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)}]},getItemActionClass(e,t){return["p-menuitem-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},getItemIconClass(e){return["p-menuitem-icon",this.getItemProp(e,"icon")]},getSeparatorItemClass(e){return["p-menuitem-separator",this.getItemProp(e,"class")]}},directives:{ripple:o(s).default}};const d=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset"],m=["onClick","onMouseenter"],c=["href","onClick"],u={class:"p-menuitem-text"},h=["href","target"],I={class:"p-menuitem-text"},p={key:1,class:"p-submenu-icon pi pi-angle-right"},f=["id"];l.render=function(e,t,i,s,o,r){const a=n.resolveComponent("router-link"),l=n.resolveComponent("TieredMenuSub",!0),b=n.resolveDirective("ripple");return n.openBlock(),n.createElementBlock("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.items,((s,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:r.getItemKey(s)},[r.isItemVisible(s)&&!r.getItemProp(s,"separator")?(n.openBlock(),n.createElementBlock("li",{key:0,id:r.getItemId(s),style:n.normalizeStyle(r.getItemProp(s,"style")),class:n.normalizeClass(r.getItemClass(s)),role:"menuitem","aria-label":r.getItemLabel(s),"aria-disabled":r.isItemDisabled(s)||void 0,"aria-expanded":r.isItemGroup(s)?r.isItemActive(s):void 0,"aria-haspopup":r.isItemGroup(s)&&!r.getItemProp(s,"to")?"menu":void 0,"aria-level":i.level+1,"aria-setsize":r.getAriaSetSize(),"aria-posinset":r.getAriaPosInset(o)},[n.createElementVNode("div",{class:"p-menuitem-content",onClick:e=>r.onItemClick(e,s),onMouseenter:e=>r.onItemMouseEnter(e,s)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:s.item},null,8,["item"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.getItemProp(s,"to")&&!r.isItemDisabled(s)?(n.openBlock(),n.createBlock(a,{key:0,to:r.getItemProp(s,"to"),custom:""},{default:n.withCtx((({navigate:e,href:t,isActive:i,isExactActive:o})=>[n.withDirectives((n.openBlock(),n.createElementBlock("a",{href:t,class:n.normalizeClass(r.getItemActionClass(s,{isActive:i,isExactActive:o})),tabindex:"-1","aria-hidden":"true",onClick:t=>r.onItemActionClick(t,e)},[r.getItemProp(s,"icon")?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(r.getItemIconClass(s))},null,2)):n.createCommentVNode("",!0),n.createElementVNode("span",u,n.toDisplayString(r.getItemLabel(s)),1)],10,c)),[[b]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createElementBlock("a",{key:1,href:r.getItemProp(s,"url"),class:n.normalizeClass(r.getItemActionClass(s)),target:r.getItemProp(s,"target"),tabindex:"-1","aria-hidden":"true"},[r.getItemProp(s,"icon")?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(r.getItemIconClass(s))},null,2)):n.createCommentVNode("",!0),n.createElementVNode("span",I,n.toDisplayString(r.getItemLabel(s)),1),r.isItemGroup(s)?(n.openBlock(),n.createElementBlock("span",p)):n.createCommentVNode("",!0)],10,h)),[[b]])],64))],40,m),r.isItemVisible(s)&&r.isItemGroup(s)?(n.openBlock(),n.createBlock(l,{key:0,id:r.getItemId(s)+"_list",role:"menu",class:"p-submenu-list",menuId:i.menuId,focusedItemId:i.focusedItemId,items:s.items,template:i.template,activeItemPath:i.activeItemPath,exact:i.exact,level:i.level+1,onItemClick:t[0]||(t[0]=t=>e.$emit("item-click",t)),onItemMouseenter:t[1]||(t[1]=t=>e.$emit("item-mouseenter",t))},null,8,["id","menuId","focusedItemId","items","template","activeItemPath","exact","level"])):n.createCommentVNode("",!0)],14,d)):n.createCommentVNode("",!0),r.isItemVisible(s)&&r.getItemProp(s,"separator")?(n.openBlock(),n.createElementBlock("li",{key:1,id:r.getItemId(s),style:n.normalizeStyle(r.getItemProp(s,"style")),class:n.normalizeClass(r.getSeparatorItemClass(s)),role:"separator"},null,14,f)):n.createCommentVNode("",!0)],64)))),128))])};var b={name:"TieredMenu",inheritAttrs:!1,emits:["focus","blur","before-show","before-hide","hide","show"],props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,target:null,container:null,menubar:null,searchTimeout:null,searchValue:null,data(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!this.popup,dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||i.UniqueComponentId()},activeItemPath(e){this.popup||(i.ObjectUtils.isNotEmpty(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener()))}},mounted(){this.id=this.id||i.UniqueComponentId()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&i.ZIndexUtils.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:(e,t)=>e?i.ObjectUtils.getItemValue(e[t]):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemGroup(e){return i.ObjectUtils.isNotEmpty(this.getItemProp(e,"items"))},isItemSeparator(e){return this.getItemProp(e,"separator")},getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:e=>e&&i.ObjectUtils.isNotEmpty(e.items),toggle(e){this.visible?this.hide(e,!0):this.show(e)},show(e,t){this.popup&&(this.$emit("before-show"),this.visible=!0,this.target=this.target||e.currentTarget,this.relatedTarget=e.relatedTarget||null),this.focusedItemInfo={index:this.findFirstFocusedItemIndex(),level:0,parentKey:""},t&&i.DomHandler.focus(this.menubar)},hide(e,t){this.popup&&(this.$emit("before-hide"),this.visible=!1),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},t&&i.DomHandler.focus(this.relatedTarget||this.target||this.menubar),this.dirty=!1},onFocus(e){this.focused=!0,this.focusedItemInfo=-1!==this.focusedItemInfo.index?this.focusedItemInfo:{index:this.findFirstFocusedItemIndex(),level:0,parentKey:""},this.$emit("focus",e)},onBlur(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.dirty=!1,this.$emit("blur",e)},onKeyDown(e){if(this.disabled)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.searchItems(e,e.key)}},onItemChange(e){const{processedItem:t,isFocus:s}=e;if(i.ObjectUtils.isEmpty(t))return;const{index:n,key:o,level:r,parentKey:a,items:l}=t,d=i.ObjectUtils.isNotEmpty(l),m=this.activeItemPath.filter((e=>e.parentKey!==a&&e.parentKey!==o));d&&m.push(t),this.focusedItemInfo={index:n,level:r,parentKey:a},this.activeItemPath=m,d&&(this.dirty=!0),s&&i.DomHandler.focus(this.menubar)},onOverlayClick(e){r.default.emit("overlay-click",{originalEvent:e,target:this.target})},onItemClick(e){const{originalEvent:t,processedItem:s}=e,n=this.isProccessedItemGroup(s),o=i.ObjectUtils.isEmpty(s.parent);if(this.isSelected(s)){const{index:e,key:t,level:n,parentKey:r}=s;this.activeItemPath=this.activeItemPath.filter((e=>t!==e.key&&t.startsWith(e.key))),this.focusedItemInfo={index:e,level:n,parentKey:r},this.dirty=!o,i.DomHandler.focus(this.menubar)}else if(n)this.onItemChange(e);else{const e=o?s:this.activeItemPath.find((e=>""===e.parentKey));this.hide(t),this.changeFocusedItemIndex(t,e?e.index:-1),i.DomHandler.focus(this.menubar)}},onItemMouseEnter(e){this.dirty&&this.onItemChange(e)},onArrowDownKey(e){const t=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedItemInfo.index){const t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(e,!0),e.preventDefault()}else{const t=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}},onArrowLeftKey(e){const t=this.visibleItems[this.focusedItemInfo.index],s=this.activeItemPath.find((e=>e.key===t.parentKey));i.ObjectUtils.isEmpty(t.parent)||(this.focusedItemInfo={index:-1,parentKey:s?s.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter((e=>e.parentKey!==this.focusedItemInfo.parentKey)),e.preventDefault()},onArrowRightKey(e){const t=this.visibleItems[this.focusedItemInfo.index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey(e){if(-1!==this.focusedItemInfo.index){const e=i.DomHandler.findSingle(this.menubar,`li[id="${this.focusedItemId}"]`),t=e&&i.DomHandler.findSingle(e,".p-menuitem-link");if(t?t.click():e&&e.click(),!this.popup){const e=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(e)&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}}e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onEscapeKey(e){this.hide(e,!0),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey(e){if(-1!==this.focusedItemInfo.index){const t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter(e){this.autoZIndex&&i.ZIndexUtils.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.alignOverlay(),i.DomHandler.focus(this.menubar),this.scrollInView()},onAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.container=null,this.dirty=!1},onAfterLeave(e){this.autoZIndex&&i.ZIndexUtils.clear(e)},alignOverlay(){this.container.style.minWidth=i.DomHandler.getOuterWidth(this.target)+"px",i.DomHandler.absolutePosition(this.container,this.target)},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!this.popup||!(this.target&&(this.target===e.target||this.target.contains(e.target)));t&&i&&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.target,(e=>{this.hide(e,!0)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=e=>{i.DomHandler.isTouchDevice()||this.hide(e,!0)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected(e){return this.activeItemPath.some((t=>t.key===e.key))},findFirstItemIndex(){return this.visibleItems.findIndex((e=>this.isValidItem(e)))},findLastItemIndex(){return i.ObjectUtils.findLastIndex(this.visibleItems,(e=>this.isValidItem(e)))},findNextItemIndex(e){const t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((e=>this.isValidItem(e))):-1;return t>-1?t+e+1:e},findPrevItemIndex(e){const t=e>0?i.ObjectUtils.findLastIndex(this.visibleItems.slice(0,e),(e=>this.isValidItem(e))):-1;return t>-1?t:e},findSelectedItemIndex(){return this.visibleItems.findIndex((e=>this.isValidSelectedItem(e)))},findFirstFocusedItemIndex(){const e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex(){const e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,s=!1;return-1!==this.focusedItemInfo.index?(i=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((e=>this.isItemMatched(e))),i=-1===i?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((e=>this.isItemMatched(e))):i+this.focusedItemInfo.index):i=this.visibleItems.findIndex((e=>this.isItemMatched(e))),-1!==i&&(s=!0),-1===i&&-1===this.focusedItemInfo.index&&(i=this.findFirstFocusedItemIndex()),-1!==i&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),s},changeFocusedItemIndex(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedItemId,s=i.DomHandler.findSingle(this.menubar,`li[id="${t}"]`);s&&s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems(e,t=0,i={},s=""){const n=[];return e&&e.forEach(((e,o)=>{const r=(""!==s?s+"_":"")+o,a={item:e,index:o,level:t,key:r,parent:i,parentKey:s};a.items=this.createProcessedItems(e.items,t+1,a,r),n.push(a)})),n},containerRef(e){this.container=e},menubarRef(e){this.menubar=e?e.$el:void 0}},computed:{containerClass(){return["p-tieredmenu p-component",{"p-tieredmenu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},processedItems(){return this.createProcessedItems(this.model||[])},visibleItems(){const e=this.activeItemPath.find((e=>e.key===this.focusedItemInfo.parentKey));return e?e.items:this.processedItems},focusedItemId(){return-1!==this.focusedItemInfo.index?`${this.id}${i.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:""}_${this.focusedItemInfo.index}`:null}},components:{TieredMenuSub:l,Portal:a.default}};const v=["id"];return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-tieredmenu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-tieredmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-tieredmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-tieredmenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-tieredmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-tieredmenu .p-menuitem {\n position: relative;\n}\n.p-tieredmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-tieredmenu .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n"),b.render=function(e,t,i,s,o,r){const a=n.resolveComponent("TieredMenuSub"),l=n.resolveComponent("Portal");return n.openBlock(),n.createBlock(l,{appendTo:i.appendTo,disabled:!i.popup},{default:n.withCtx((()=>[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:r.onEnter,onAfterEnter:r.onAfterEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},{default:n.withCtx((()=>[o.visible?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,ref:r.containerRef,id:o.id,class:r.containerClass,onClick:t[0]||(t[0]=(...e)=>r.onOverlayClick&&r.onOverlayClick(...e))},e.$attrs),[n.createVNode(a,{ref:r.menubarRef,id:o.id+"_list",class:"p-tieredmenu-root-list",tabindex:i.disabled?-1:i.tabindex,role:"menubar","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-disabled":i.disabled||void 0,"aria-orientation":"vertical","aria-activedescendant":o.focused?r.focusedItemId:void 0,menuId:o.id,focusedItemId:o.focused?r.focusedItemId:void 0,items:r.processedItems,template:e.$slots.item,activeItemPath:o.activeItemPath,exact:i.exact,level:0,onFocus:r.onFocus,onBlur:r.onBlur,onKeydown:r.onKeyDown,onItemClick:r.onItemClick,onItemMouseenter:r.onItemMouseEnter},null,8,["id","tabindex","aria-label","aria-labelledby","aria-disabled","aria-activedescendant","menuId","focusedItemId","items","template","activeItemPath","exact","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"])],16,v)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo","disabled"])},b}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);
|
|
54
54
|
|
|
55
55
|
this.primevue=this.primevue||{},this.primevue.badge=function(e){"use strict";var s={name:"Badge",props:{value:null,severity:null,size:null},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":this.value&&1===String(this.value).length,"p-badge-dot":!this.value&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};return s.render=function(s,t,a,i,r,l){return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(l.badgeClass)},[e.renderSlot(s.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]))],2)},s}(Vue);
|
|
56
56
|
|
package/datatable/BodyCell.vue
CHANGED
|
@@ -141,9 +141,11 @@ export default {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
if (this.d_editing && (this.editMode === 'cell' || (this.editMode === 'row' && this.columnProp('rowEditor')))) {
|
|
144
|
-
|
|
144
|
+
setTimeout(() => {
|
|
145
|
+
const focusableEl = DomHandler.getFirstFocusableElement(this.$el);
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
focusableEl && focusableEl.focus();
|
|
148
|
+
}, 1);
|
|
147
149
|
}
|
|
148
150
|
},
|
|
149
151
|
beforeUnmount() {
|
|
@@ -265,9 +265,11 @@ var script$8 = {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
if (this.d_editing && (this.editMode === 'cell' || (this.editMode === 'row' && this.columnProp('rowEditor')))) {
|
|
268
|
-
|
|
268
|
+
setTimeout(() => {
|
|
269
|
+
const focusableEl = utils.DomHandler.getFirstFocusableElement(this.$el);
|
|
269
270
|
|
|
270
|
-
|
|
271
|
+
focusableEl && focusableEl.focus();
|
|
272
|
+
}, 1);
|
|
271
273
|
}
|
|
272
274
|
},
|
|
273
275
|
beforeUnmount() {
|