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/utils/utils.cjs.js
CHANGED
|
@@ -517,7 +517,7 @@ var DomHandler = {
|
|
|
517
517
|
},
|
|
518
518
|
|
|
519
519
|
isExist(element) {
|
|
520
|
-
return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;
|
|
520
|
+
return !!(element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode);
|
|
521
521
|
},
|
|
522
522
|
|
|
523
523
|
isClient() {
|
|
@@ -981,8 +981,8 @@ function UniqueComponentId (prefix = 'pv_id_') {
|
|
|
981
981
|
function handler() {
|
|
982
982
|
let zIndexes = [];
|
|
983
983
|
|
|
984
|
-
const generateZIndex = (key, baseZIndex = 999) => {
|
|
985
|
-
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
984
|
+
const generateZIndex = (key, autoZIndex, baseZIndex = 999) => {
|
|
985
|
+
const lastZIndex = getLastZIndex(key, autoZIndex, baseZIndex);
|
|
986
986
|
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
987
987
|
|
|
988
988
|
zIndexes.push({ key, value: newZIndex });
|
|
@@ -994,12 +994,12 @@ function handler() {
|
|
|
994
994
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
995
995
|
};
|
|
996
996
|
|
|
997
|
-
const getCurrentZIndex = (key) => {
|
|
998
|
-
return getLastZIndex(key).value;
|
|
997
|
+
const getCurrentZIndex = (key, autoZIndex) => {
|
|
998
|
+
return getLastZIndex(key, autoZIndex).value;
|
|
999
999
|
};
|
|
1000
1000
|
|
|
1001
|
-
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
1002
|
-
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
1001
|
+
const getLastZIndex = (key, autoZIndex, baseZIndex = 0) => {
|
|
1002
|
+
return [...zIndexes].reverse().find((obj) => (autoZIndex ? true : obj.key === key)) || { key, value: baseZIndex };
|
|
1003
1003
|
};
|
|
1004
1004
|
|
|
1005
1005
|
const getZIndex = (el) => {
|
|
@@ -1010,7 +1010,7 @@ function handler() {
|
|
|
1010
1010
|
get: getZIndex,
|
|
1011
1011
|
set: (key, el, baseZIndex) => {
|
|
1012
1012
|
if (el) {
|
|
1013
|
-
el.style.zIndex = String(generateZIndex(key, baseZIndex));
|
|
1013
|
+
el.style.zIndex = String(generateZIndex(key, true, baseZIndex));
|
|
1014
1014
|
}
|
|
1015
1015
|
},
|
|
1016
1016
|
clear: (el) => {
|
|
@@ -1019,7 +1019,7 @@ function handler() {
|
|
|
1019
1019
|
el.style.zIndex = '';
|
|
1020
1020
|
}
|
|
1021
1021
|
},
|
|
1022
|
-
getCurrent: (key) => getCurrentZIndex(key)
|
|
1022
|
+
getCurrent: (key) => getCurrentZIndex(key, true)
|
|
1023
1023
|
};
|
|
1024
1024
|
}
|
|
1025
1025
|
|
package/utils/utils.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={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,l=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||l.clientWidth,height:e.innerHeight||n.clientHeight||l.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 l=0;l<t.length;l++){if(t[l]===e)return n;1===t[l].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,l,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,r=i.width,s=t.offsetHeight,a=t.offsetWidth,d=t.getBoundingClientRect(),c=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),h=this.getViewport();d.top+s+o>h.height?(n=d.top+c-o,e.style.transformOrigin="bottom",n<0&&(n=c)):(n=s+d.top+c,e.style.transformOrigin="top"),l=d.left+r>h.width?Math.max(0,d.left+p+a-r):d.left+p,e.style.top=n+"px",e.style.left=l+"px"}},relativePosition(e,t){if(e){let n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e);const l=t.offsetHeight,i=t.getBoundingClientRect(),o=this.getViewport();let r,s;i.top+l+n.height>o.height?(r=-1*n.height,e.style.transformOrigin="bottom",i.top+r<0&&(r=-1*i.top)):(r=l,e.style.transformOrigin="top"),s=n.width>o.width?-1*i.left:i.left+n.width>o.width?-1*(i.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 l=/(auto|scroll)/,i=e=>{let t=window.getComputedStyle(e,null);return l.test(t.getPropertyValue("overflow"))||l.test(t.getPropertyValue("overflowX"))||l.test(t.getPropertyValue("overflowY"))};for(let e of n){let n=1===e.nodeType&&e.dataset.scrollselectors;if(n){let l=n.split(",");for(let n of l){let l=this.findSingle(e,n);l&&i(l)&&t.push(l)}}9!==e.nodeType&&i(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,l=0,i=function(){l=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=l,n=+new Date,+l<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))};i()}},fadeOut(e,t){if(e){let n=1,l=50,i=l/t,o=setInterval((()=>{n-=i,n<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),l)}},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"),l=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,r=e.getBoundingClientRect(),s=t.getBoundingClientRect().top+document.body.scrollTop-(r.top+document.body.scrollTop)-l-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}`),l=[];for(let e of n)"none"!=getComputedStyle(e).display&&"hidden"!=getComputedStyle(e).visibility&&l.push(e);return l},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 l=this.getFocusableElements(e,n),i=l.length>0?l.findIndex((e=>e===t)):-1,o=i>-1&&l.length>=i+1?i+1:-1;return o>-1?l[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 l=document.createElement("a");void 0!==l.download?(l.setAttribute("href",URL.createObjectURL(n)),l.setAttribute("download",t+".csv"),l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}}};var t={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,l,i,o=Array.isArray(e),r=Array.isArray(t);if(o&&r){if((l=e.length)!=t.length)return!1;for(n=l;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((l=p.length)!==Object.keys(t).length)return!1;for(n=l;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,p[n]))return!1;for(n=l;0!=n--;)if(i=p[n],!this.deepEquals(e[i],t[i]))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 i=t.split("."),o=e;for(var n=0,l=i.length;n<l;++n){if(null==o)return null;o=o[i[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 l=[];if(e)for(let i of e)for(let e of t)if(String(this.resolveFieldData(i,e)).toLowerCase().indexOf(n.toLowerCase())>-1){l.push(i);break}return l},reorderArray(e,t,n){let l;if(e&&t!==n){if(n>=e.length)for(l=n-e.length;1+l--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}},findIndexInList(e,t){let n=-1;if(t)for(let l=0;l<t.length;l++)if(t[l]===e){n=l;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,l){if(n.length>0){let i=!1;for(let o=0;o<n.length;o++){if(this.findIndexInList(n[o],l)>t){n.splice(o,0,e),i=!0;break}}i||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 l=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(n,l)?l:t;return e.type.props[t].type===Boolean&&""===n[i]||n[i]}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}},n=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,l,i)=>{l&&(l.style.zIndex=String(((n,l=999)=>{const i=t(n,l),o=i.value+(i.key===n?0:l)+1;return e.push({key:n,value:o}),o})(n,i)))},clear:t=>{var l;t&&(l=n(t),e=e.filter((e=>e.value!==l)),t.style.zIndex="")},getCurrent:e=>(e=>t(e).value)(e)}}();exports.ConnectedOverlayScrollHandler=class{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=e.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}},exports.DomHandler=e,exports.EventBus=function(){const e=new Map;return{on(t,n){let l=e.get(t);l?l.push(n):l=[n],e.set(t,l)},off(t,n){let l=e.get(t);l&&l.splice(l.indexOf(n)>>>0,1)},emit(t,n){let l=e.get(t);l&&l.slice().map((e=>{e(n)}))}}},exports.ObjectUtils=t,exports.UniqueComponentId=function(e="pv_id_"){return`${e}${++n}`},exports.ZIndexUtils=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={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,l=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||l.clientWidth,height:e.innerHeight||n.clientHeight||l.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 l=0;l<t.length;l++){if(t[l]===e)return n;1===t[l].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,l,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,r=i.width,s=t.offsetHeight,a=t.offsetWidth,d=t.getBoundingClientRect(),c=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),h=this.getViewport();d.top+s+o>h.height?(n=d.top+c-o,e.style.transformOrigin="bottom",n<0&&(n=c)):(n=s+d.top+c,e.style.transformOrigin="top"),l=d.left+r>h.width?Math.max(0,d.left+p+a-r):d.left+p,e.style.top=n+"px",e.style.left=l+"px"}},relativePosition(e,t){if(e){let n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e);const l=t.offsetHeight,i=t.getBoundingClientRect(),o=this.getViewport();let r,s;i.top+l+n.height>o.height?(r=-1*n.height,e.style.transformOrigin="bottom",i.top+r<0&&(r=-1*i.top)):(r=l,e.style.transformOrigin="top"),s=n.width>o.width?-1*i.left:i.left+n.width>o.width?-1*(i.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 l=/(auto|scroll)/,i=e=>{let t=window.getComputedStyle(e,null);return l.test(t.getPropertyValue("overflow"))||l.test(t.getPropertyValue("overflowX"))||l.test(t.getPropertyValue("overflowY"))};for(let e of n){let n=1===e.nodeType&&e.dataset.scrollselectors;if(n){let l=n.split(",");for(let n of l){let l=this.findSingle(e,n);l&&i(l)&&t.push(l)}}9!==e.nodeType&&i(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,l=0,i=function(){l=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=l,n=+new Date,+l<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))};i()}},fadeOut(e,t){if(e){let n=1,l=50,i=l/t,o=setInterval((()=>{n-=i,n<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),l)}},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"),l=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,r=e.getBoundingClientRect(),s=t.getBoundingClientRect().top+document.body.scrollTop-(r.top+document.body.scrollTop)-l-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}`),l=[];for(let e of n)"none"!=getComputedStyle(e).display&&"hidden"!=getComputedStyle(e).visibility&&l.push(e);return l},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 l=this.getFocusableElements(e,n),i=l.length>0?l.findIndex((e=>e===t)):-1,o=i>-1&&l.length>=i+1?i+1:-1;return o>-1?l[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 l=document.createElement("a");void 0!==l.download?(l.setAttribute("href",URL.createObjectURL(n)),l.setAttribute("download",t+".csv"),l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}}};var t={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,l,i,o=Array.isArray(e),r=Array.isArray(t);if(o&&r){if((l=e.length)!=t.length)return!1;for(n=l;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((l=p.length)!==Object.keys(t).length)return!1;for(n=l;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,p[n]))return!1;for(n=l;0!=n--;)if(i=p[n],!this.deepEquals(e[i],t[i]))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 i=t.split("."),o=e;for(var n=0,l=i.length;n<l;++n){if(null==o)return null;o=o[i[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 l=[];if(e)for(let i of e)for(let e of t)if(String(this.resolveFieldData(i,e)).toLowerCase().indexOf(n.toLowerCase())>-1){l.push(i);break}return l},reorderArray(e,t,n){let l;if(e&&t!==n){if(n>=e.length)for(l=n-e.length;1+l--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}},findIndexInList(e,t){let n=-1;if(t)for(let l=0;l<t.length;l++)if(t[l]===e){n=l;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,l){if(n.length>0){let i=!1;for(let o=0;o<n.length;o++){if(this.findIndexInList(n[o],l)>t){n.splice(o,0,e),i=!0;break}}i||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 l=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(n,l)?l:t;return e.type.props[t].type===Boolean&&""===n[i]||n[i]}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}},n=0;var l=function(){let e=[];const t=(t,n,l=0)=>[...e].reverse().find((e=>!!n||e.key===t))||{key:t,value:l},n=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:n,set:(n,l,i)=>{l&&(l.style.zIndex=String(((n,l,i=999)=>{const o=t(n,l,i),r=o.value+(o.key===n?0:i)+1;return e.push({key:n,value:r}),r})(n,!0,i)))},clear:t=>{var l;t&&(l=n(t),e=e.filter((e=>e.value!==l)),t.style.zIndex="")},getCurrent:e=>((e,n)=>t(e,n).value)(e,!0)}}();exports.ConnectedOverlayScrollHandler=class{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=e.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}},exports.DomHandler=e,exports.EventBus=function(){const e=new Map;return{on(t,n){let l=e.get(t);l?l.push(n):l=[n],e.set(t,l)},off(t,n){let l=e.get(t);l&&l.splice(l.indexOf(n)>>>0,1)},emit(t,n){let l=e.get(t);l&&l.slice().map((e=>{e(n)}))}}},exports.ObjectUtils=t,exports.UniqueComponentId=function(e="pv_id_"){return`${e}${++n}`},exports.ZIndexUtils=l;
|
package/utils/utils.esm.js
CHANGED
|
@@ -513,7 +513,7 @@ var DomHandler = {
|
|
|
513
513
|
},
|
|
514
514
|
|
|
515
515
|
isExist(element) {
|
|
516
|
-
return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;
|
|
516
|
+
return !!(element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode);
|
|
517
517
|
},
|
|
518
518
|
|
|
519
519
|
isClient() {
|
|
@@ -977,8 +977,8 @@ function UniqueComponentId (prefix = 'pv_id_') {
|
|
|
977
977
|
function handler() {
|
|
978
978
|
let zIndexes = [];
|
|
979
979
|
|
|
980
|
-
const generateZIndex = (key, baseZIndex = 999) => {
|
|
981
|
-
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
980
|
+
const generateZIndex = (key, autoZIndex, baseZIndex = 999) => {
|
|
981
|
+
const lastZIndex = getLastZIndex(key, autoZIndex, baseZIndex);
|
|
982
982
|
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
983
983
|
|
|
984
984
|
zIndexes.push({ key, value: newZIndex });
|
|
@@ -990,12 +990,12 @@ function handler() {
|
|
|
990
990
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
991
991
|
};
|
|
992
992
|
|
|
993
|
-
const getCurrentZIndex = (key) => {
|
|
994
|
-
return getLastZIndex(key).value;
|
|
993
|
+
const getCurrentZIndex = (key, autoZIndex) => {
|
|
994
|
+
return getLastZIndex(key, autoZIndex).value;
|
|
995
995
|
};
|
|
996
996
|
|
|
997
|
-
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
998
|
-
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
997
|
+
const getLastZIndex = (key, autoZIndex, baseZIndex = 0) => {
|
|
998
|
+
return [...zIndexes].reverse().find((obj) => (autoZIndex ? true : obj.key === key)) || { key, value: baseZIndex };
|
|
999
999
|
};
|
|
1000
1000
|
|
|
1001
1001
|
const getZIndex = (el) => {
|
|
@@ -1006,7 +1006,7 @@ function handler() {
|
|
|
1006
1006
|
get: getZIndex,
|
|
1007
1007
|
set: (key, el, baseZIndex) => {
|
|
1008
1008
|
if (el) {
|
|
1009
|
-
el.style.zIndex = String(generateZIndex(key, baseZIndex));
|
|
1009
|
+
el.style.zIndex = String(generateZIndex(key, true, baseZIndex));
|
|
1010
1010
|
}
|
|
1011
1011
|
},
|
|
1012
1012
|
clear: (el) => {
|
|
@@ -1015,7 +1015,7 @@ function handler() {
|
|
|
1015
1015
|
el.style.zIndex = '';
|
|
1016
1016
|
}
|
|
1017
1017
|
},
|
|
1018
|
-
getCurrent: (key) => getCurrentZIndex(key)
|
|
1018
|
+
getCurrent: (key) => getCurrentZIndex(key, true)
|
|
1019
1019
|
};
|
|
1020
1020
|
}
|
|
1021
1021
|
|
package/utils/utils.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={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(),h=this.getViewport();d.top+s+o>h.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>h.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)))}}};class t{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=e.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}}function n(){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)}))}}}var i={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}},l=0;function o(e="pv_id_"){return`${e}${++l}`}var r=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)}}();export{t as ConnectedOverlayScrollHandler,e as DomHandler,n as EventBus,i as ObjectUtils,o as UniqueComponentId,r as ZIndexUtils};
|
|
1
|
+
var e={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(),h=this.getViewport();d.top+s+o>h.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>h.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)))}}};class t{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=e.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}}function n(){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)}))}}}var i={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}},l=0;function o(e="pv_id_"){return`${e}${++l}`}var r=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)}}();export{t as ConnectedOverlayScrollHandler,e as DomHandler,n as EventBus,i as ObjectUtils,o as UniqueComponentId,r as ZIndexUtils};
|
package/utils/utils.js
CHANGED
|
@@ -517,7 +517,7 @@ this.primevue.utils = (function (exports) {
|
|
|
517
517
|
},
|
|
518
518
|
|
|
519
519
|
isExist(element) {
|
|
520
|
-
return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;
|
|
520
|
+
return !!(element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode);
|
|
521
521
|
},
|
|
522
522
|
|
|
523
523
|
isClient() {
|
|
@@ -981,8 +981,8 @@ this.primevue.utils = (function (exports) {
|
|
|
981
981
|
function handler() {
|
|
982
982
|
let zIndexes = [];
|
|
983
983
|
|
|
984
|
-
const generateZIndex = (key, baseZIndex = 999) => {
|
|
985
|
-
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
984
|
+
const generateZIndex = (key, autoZIndex, baseZIndex = 999) => {
|
|
985
|
+
const lastZIndex = getLastZIndex(key, autoZIndex, baseZIndex);
|
|
986
986
|
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
987
987
|
|
|
988
988
|
zIndexes.push({ key, value: newZIndex });
|
|
@@ -994,12 +994,12 @@ this.primevue.utils = (function (exports) {
|
|
|
994
994
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
995
995
|
};
|
|
996
996
|
|
|
997
|
-
const getCurrentZIndex = (key) => {
|
|
998
|
-
return getLastZIndex(key).value;
|
|
997
|
+
const getCurrentZIndex = (key, autoZIndex) => {
|
|
998
|
+
return getLastZIndex(key, autoZIndex).value;
|
|
999
999
|
};
|
|
1000
1000
|
|
|
1001
|
-
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
1002
|
-
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
1001
|
+
const getLastZIndex = (key, autoZIndex, baseZIndex = 0) => {
|
|
1002
|
+
return [...zIndexes].reverse().find((obj) => (autoZIndex ? true : obj.key === key)) || { key, value: baseZIndex };
|
|
1003
1003
|
};
|
|
1004
1004
|
|
|
1005
1005
|
const getZIndex = (el) => {
|
|
@@ -1010,7 +1010,7 @@ this.primevue.utils = (function (exports) {
|
|
|
1010
1010
|
get: getZIndex,
|
|
1011
1011
|
set: (key, el, baseZIndex) => {
|
|
1012
1012
|
if (el) {
|
|
1013
|
-
el.style.zIndex = String(generateZIndex(key, baseZIndex));
|
|
1013
|
+
el.style.zIndex = String(generateZIndex(key, true, baseZIndex));
|
|
1014
1014
|
}
|
|
1015
1015
|
},
|
|
1016
1016
|
clear: (el) => {
|
|
@@ -1019,7 +1019,7 @@ this.primevue.utils = (function (exports) {
|
|
|
1019
1019
|
el.style.zIndex = '';
|
|
1020
1020
|
}
|
|
1021
1021
|
},
|
|
1022
|
-
getCurrent: (key) => getCurrentZIndex(key)
|
|
1022
|
+
getCurrent: (key) => getCurrentZIndex(key, true)
|
|
1023
1023
|
};
|
|
1024
1024
|
}
|
|
1025
1025
|
|
package/utils/utils.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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}({});
|
package/web-types.json
CHANGED