primevue 3.22.2 → 3.22.3
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/README.md +1 -1
- package/core/core.js +10 -8
- package/core/core.min.js +2 -2
- package/package.json +1 -1
- package/tooltip/tooltip.cjs.js +0 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +1 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +0 -2
- package/tooltip/tooltip.min.js +1 -1
- package/utils/utils.cjs.js +10 -6
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +10 -6
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +10 -6
- package/utils/utils.min.js +1 -1
- package/web-types.json +1 -1
package/README.md
CHANGED
package/core/core.js
CHANGED
|
@@ -981,9 +981,9 @@ this.primevue.utils = (function (exports) {
|
|
|
981
981
|
function handler() {
|
|
982
982
|
let zIndexes = [];
|
|
983
983
|
|
|
984
|
-
const generateZIndex = (key, baseZIndex) => {
|
|
985
|
-
|
|
986
|
-
|
|
984
|
+
const generateZIndex = (key, baseZIndex = 999) => {
|
|
985
|
+
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
986
|
+
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
987
987
|
|
|
988
988
|
zIndexes.push({ key, value: newZIndex });
|
|
989
989
|
|
|
@@ -994,8 +994,12 @@ this.primevue.utils = (function (exports) {
|
|
|
994
994
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
995
995
|
};
|
|
996
996
|
|
|
997
|
-
const getCurrentZIndex = () => {
|
|
998
|
-
return
|
|
997
|
+
const getCurrentZIndex = (key) => {
|
|
998
|
+
return getLastZIndex(key).value;
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
1002
|
+
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
999
1003
|
};
|
|
1000
1004
|
|
|
1001
1005
|
const getZIndex = (el) => {
|
|
@@ -1015,7 +1019,7 @@ this.primevue.utils = (function (exports) {
|
|
|
1015
1019
|
el.style.zIndex = '';
|
|
1016
1020
|
}
|
|
1017
1021
|
},
|
|
1018
|
-
getCurrent: () => getCurrentZIndex()
|
|
1022
|
+
getCurrent: (key) => getCurrentZIndex(key)
|
|
1019
1023
|
};
|
|
1020
1024
|
}
|
|
1021
1025
|
|
|
@@ -2237,8 +2241,6 @@ this.primevue.tooltip = (function (utils) {
|
|
|
2237
2241
|
target.$_ptooltipScrollHandler.destroy();
|
|
2238
2242
|
target.$_ptooltipScrollHandler = null;
|
|
2239
2243
|
}
|
|
2240
|
-
|
|
2241
|
-
utils.ZIndexUtils.clear(el);
|
|
2242
2244
|
},
|
|
2243
2245
|
updated(el, options) {
|
|
2244
2246
|
let target = getTarget(el);
|
package/core/core.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.utils=function(e){"use strict";var t={innerWidth(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},width(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0},getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth(e,t){if(e){let n=e.offsetWidth;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginLeft)+parseFloat(t.marginRight)}return n}return 0},getOuterHeight(e,t){if(e){let n=e.offsetHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0},getClientHeight(e,t){if(e){let n=e.clientHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0},getViewport(){let e=window,t=document,n=t.documentElement,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 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,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}},l=0;var i=function(){let e=[];const t=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:t,set:(t,n,l)=>{n&&(n.style.zIndex=String(((t,n)=>{let l=e.length>0?e[e.length-1]:{key:t,value:n},i=l.value+(l.key===t?0:n)+1;return e.push({key:t,value:i}),i})(t,l)))},clear:n=>{var l;n&&(l=t(n),e=e.filter((e=>e.value!==l)),n.style.zIndex="")},getCurrent:()=>e.length>0?e[e.length-1].value: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 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)}))}}},e.ObjectUtils=n,e.UniqueComponentId=function(e="pv_id_"){return`${e}${++l}`},e.ZIndexUtils=i,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=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}({});
|
|
2
2
|
|
|
3
3
|
this.primevue=this.primevue||{},this.primevue.api=function(i,p){"use strict";const e={filter(i,e,t,r,l){let o=[];if(i)for(let E of i)for(let i of e){let e=p.ObjectUtils.resolveFieldData(E,i);if(this.filters[r](e,t,l)){o.push(E);break}}return o},filters:{startsWith(i,e,t){if(null==e||""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).slice(0,r.length)===r},contains(i,e,t){if(null==e||"string"==typeof e&&""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return-1!==p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).indexOf(r)},notContains(i,e,t){if(null==e||"string"==typeof e&&""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return-1===p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).indexOf(r)},endsWith(i,e,t){if(null==e||""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t),l=p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t);return-1!==l.indexOf(r,l.length-r.length)},equals:(i,e,t)=>null==e||"string"==typeof e&&""===e.trim()||null!=i&&(i.getTime&&e.getTime?i.getTime()===e.getTime():p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t)==p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t)),notEquals:(i,e,t)=>null!=e&&("string"!=typeof e||""!==e.trim())&&(null==i||(i.getTime&&e.getTime?i.getTime()!==e.getTime():p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t)!=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t))),in(i,e){if(null==e||0===e.length)return!0;for(let t=0;t<e.length;t++)if(p.ObjectUtils.equals(i,e[t]))return!0;return!1},between:(i,p)=>null==p||null==p[0]||null==p[1]||null!=i&&(i.getTime?p[0].getTime()<=i.getTime()&&i.getTime()<=p[1].getTime():p[0]<=i&&i<=p[1]),lt:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()<p.getTime():i<p),lte:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()<=p.getTime():i<=p),gt:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()>p.getTime():i>p),gte:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()>=p.getTime():i>=p),dateIs:(i,p)=>null==p||null!=i&&i.toDateString()===p.toDateString(),dateIsNot:(i,p)=>null==p||null!=i&&i.toDateString()!==p.toDateString(),dateBefore:(i,p)=>null==p||null!=i&&i.getTime()<p.getTime(),dateAfter:(i,p)=>null==p||null!=i&&i.getTime()>p.getTime()},register(i,p){this.filters[i]=p}};return i.FilterMatchMode={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},i.FilterOperator={AND:"and",OR:"or"},i.FilterService=e,i.PrimeIcons={ALIGN_CENTER:"pi pi-align-center",ALIGN_JUSTIFY:"pi pi-align-justify",ALIGN_LEFT:"pi pi-align-left",ALIGN_RIGHT:"pi pi-align-right",AMAZON:"pi pi-amazon",ANDROID:"pi pi-android",ANGLE_DOUBLE_DOWN:"pi pi-angle-double-down",ANGLE_DOUBLE_LEFT:"pi pi-angle-double-left",ANGLE_DOUBLE_RIGHT:"pi pi-angle-double-right",ANGLE_DOUBLE_UP:"pi pi-angle-double-up",ANGLE_DOWN:"pi pi-angle-down",ANGLE_LEFT:"pi pi-angle-left",ANGLE_RIGHT:"pi pi-angle-right",ANGLE_UP:"pi pi-angle-up",APPLE:"pi pi-apple",ARROW_CIRCLE_DOWN:"pi pi-arrow-circle-down",ARROW_CIRCLE_LEFT:"pi pi-arrow-circle-left",ARROW_CIRCLE_RIGHT:"pi pi-arrow-circle-right",ARROW_CIRCLE_UP:"pi pi-arrow-circle-up",ARROW_DOWN:"pi pi-arrow-down",ARROW_DOWN_LEFT:"pi pi-arrow-down-left",ARROW_DOWN_RIGHT:"pi pi-arrow-down-right",ARROW_LEFT:"pi pi-arrow-left",ARROW_RIGHT:"pi pi-arrow-right",ARROW_RIGHT_ARROW_LEFT:"pi pi-arrow-right-arrow-left",ARROW_UP:"pi pi-arrow-up",ARROW_UP_LEFT:"pi pi-arrow-up-left",ARROW_UP_RIGHT:"pi pi-arrow-up-right",ARROW_H:"pi pi-arrows-h",ARROW_V:"pi pi-arrows-v",ARROW_A:"pi pi-arrows-alt",AT:"pi pi-at",BACKWARD:"pi pi-backward",BAN:"pi pi-ban",BARS:"pi pi-bars",BELL:"pi pi-bell",BITCOIN:"pi pi-bitcoin",BOLT:"pi pi-bolt",BOOK:"pi pi-book",BOOKMARK:"pi pi-bookmark",BOOKMARK_FILL:"pi pi-bookmark-fill",BOX:"pi pi-box",BRIEFCASE:"pi pi-briefcase",BUILDING:"pi pi-building",CALENDAR:"pi pi-calendar",CALENDAR_MINUS:"pi pi-calendar-minus",CALENDAR_PLUS:"pi pi-calendar-plus",CALENDAR_TIMES:"pi pi-calendar-times",CALCULATOR:"pi pi-calculator",CAMERA:"pi pi-camera",CAR:"pi pi-car",CARET_DOWN:"pi pi-caret-down",CARET_LEFT:"pi pi-caret-left",CARET_RIGHT:"pi pi-caret-right",CARET_UP:"pi pi-caret-up",CART_PLUS:"pi pi-cart-plus",CHART_BAR:"pi pi-chart-bar",CHART_LINE:"pi pi-chart-line",CHART_PIE:"pi pi-chart-pie",CHECK:"pi pi-check",CHECK_CIRCLE:"pi pi-check-circle",CHECK_SQUARE:"pi pi-check-square",CHEVRON_CIRCLE_DOWN:"pi pi-chevron-circle-down",CHEVRON_CIRCLE_LEFT:"pi pi-chevron-circle-left",CHEVRON_CIRCLE_RIGHT:"pi pi-chevron-circle-right",CHEVRON_CIRCLE_UP:"pi pi-chevron-circle-up",CHEVRON_DOWN:"pi pi-chevron-down",CHEVRON_LEFT:"pi pi-chevron-left",CHEVRON_RIGHT:"pi pi-chevron-right",CHEVRON_UP:"pi pi-chevron-up",CIRCLE:"pi pi-circle",CIRCLE_FILL:"pi pi-circle-fill",CLOCK:"pi pi-clock",CLONE:"pi pi-clone",CLOUD:"pi pi-cloud",CLOUD_DOWNLOAD:"pi pi-cloud-download",CLOUD_UPLOAD:"pi pi-cloud-upload",CODE:"pi pi-code",COG:"pi pi-cog",COMMENT:"pi pi-comment",COMMENTS:"pi pi-comments",COMPASS:"pi pi-compass",COPY:"pi pi-copy",CREDIT_CARD:"pi pi-credit-card",DATABASE:"pi pi-database",DELETELEFT:"pi pi-delete-left",DESKTOP:"pi pi-desktop",DIRECTIONS:"pi pi-directions",DIRECTIONS_ALT:"pi pi-directions-alt",DISCORD:"pi pi-discord",DOLLAR:"pi pi-dollar",DOWNLOAD:"pi pi-download",EJECT:"pi pi-eject",ELLIPSIS_H:"pi pi-ellipsis-h",ELLIPSIS_V:"pi pi-ellipsis-v",ENVELOPE:"pi pi-envelope",ERASER:"pi pi-eraser",EURO:"pi pi-euro",EXCLAMATION_CIRCLE:"pi pi-exclamation-circle",EXCLAMATION_TRIANGLE:"pi pi-exclamation-triangle",EXTERNAL_LINK:"pi pi-external-link",EYE:"pi pi-eye",EYE_SLASH:"pi pi-eye-slash",FACEBOOK:"pi pi-facebook",FAST_BACKWARD:"pi pi-fast-backward",FAST_FORWARD:"pi pi-fast-forward",FILE:"pi pi-file",FILE_EDIT:"pi pi-file-edit",FILE_EXCEL:"pi pi-file-excel",FILE_EXPORT:"pi pi-file-export",FILE_IMPORT:"pi pi-file-import",FILE_PDF:"pi pi-file-pdf",FILE_WORD:"pi pi-file-word",FILTER:"pi pi-filter",FILTER_FILL:"pi pi-filter-fill",FILTER_SLASH:"pi pi-filter-slash",FLAG:"pi pi-flag",FLAG_FILL:"pi pi-flag-fill",FOLDER:"pi pi-folder",FOLDER_OPEN:"pi pi-folder-open",FORWARD:"pi pi-forward",GIFT:"pi pi-gift",GITHUB:"pi pi-github",GLOBE:"pi pi-globe",GOOGLE:"pi pi-google",HASHTAG:"pi pi-hashtag",HEART:"pi pi-heart",HEART_FILL:"pi pi-heart-fill",HISTORY:"pi pi-history",HOURGLASS:"pi pi-hourglass",HOME:"pi pi-home",ID_CARD:"pi pi-id-card",IMAGE:"pi pi-image",IMAGES:"pi pi-images",INBOX:"pi pi-inbox",INFO:"pi pi-info",INFO_CIRCLE:"pi pi-info-circle",INSTAGRAM:"pi pi-instagram",KEY:"pi pi-key",LANGUAGE:"pi pi-language",LINK:"pi pi-link",LINKEDIN:"pi pi-linkedin",LIST:"pi pi-list",LOCK:"pi pi-lock",LOCK_OPEN:"pi pi-lock-open",MAP:"pi pi-map",MAP_MARKER:"pi pi-map-marker",MEGAPHONE:"pi pi-megaphone",MICREPHONE:"pi pi-microphone",MICROSOFT:"pi pi-microsoft",MINUS:"pi pi-minus",MINUS_CIRCLE:"pi pi-minus-circle",MOBILE:"pi pi-mobile",MONEY_BILL:"pi pi-money-bill",MOON:"pi pi-moon",PALETTE:"pi pi-palette",PAPERCLIP:"pi pi-paperclip",PAUSE:"pi pi-pause",PAYPAL:"pi pi-paypal",PENCIL:"pi pi-pencil",PERCENTAGE:"pi pi-percentage",PHONE:"pi pi-phone",PLAY:"pi pi-play",PLUS:"pi pi-plus",PLUS_CIRCLE:"pi pi-plus-circle",POUND:"pi pi-pound",POWER_OFF:"pi pi-power-off",PRIME:"pi pi-prime",PRINT:"pi pi-print",QRCODE:"pi pi-qrcode",QUESTION:"pi pi-question",QUESTION_CIRCLE:"pi pi-question-circle",REDDIT:"pi pi-reddit",REFRESH:"pi pi-refresh",REPLAY:"pi pi-replay",REPLY:"pi pi-reply",SAVE:"pi pi-save",SEARCH:"pi pi-search",SEARCH_MINUS:"pi pi-search-minus",SEARCH_PLUS:"pi pi-search-plus",SEND:"pi pi-send",SERVER:"pi pi-server",SHARE_ALT:"pi pi-share-alt",SHIELD:"pi pi-shield",SHOPPING_BAG:"pi pi-shopping-bag",SHOPPING_CART:"pi pi-shopping-cart",SIGN_IN:"pi pi-sign-in",SIGN_OUT:"pi pi-sign-out",SITEMAP:"pi pi-sitemap",SLACK:"pi pi-slack",SLIDERS_H:"pi pi-sliders-h",SLIDERS_V:"pi pi-sliders-v",SORT:"pi pi-sort",SORT_ALPHA_DOWN:"pi pi-sort-alpha-down",SORT_ALPHA_ALT_DOWN:"pi pi-sort-alpha-alt-down",SORT_ALPHA_UP:"pi pi-sort-alpha-up",SORT_ALPHA_ALT_UP:"pi pi-sort-alpha-alt-up",SORT_ALT:"pi pi-sort-alt",SORT_ALT_SLASH:"pi pi-sort-slash",SORT_AMOUNT_DOWN:"pi pi-sort-amount-down",SORT_AMOUNT_DOWN_ALT:"pi pi-sort-amount-down-alt",SORT_AMOUNT_UP:"pi pi-sort-amount-up",SORT_AMOUNT_UP_ALT:"pi pi-sort-amount-up-alt",SORT_DOWN:"pi pi-sort-down",SORT_NUMERIC_DOWN:"pi pi-sort-numeric-down",SORT_NUMERIC_ALT_DOWN:"pi pi-sort-numeric-alt-down",SORT_NUMERIC_UP:"pi pi-sort-numeric-up",SORT_NUMERIC_ALT_UP:"pi pi-sort-numeric-alt-up",SORT_UP:"pi pi-sort-up",SPINNER:"pi pi-spinner",STAR:"pi pi-star",STAR_FILL:"pi pi-star-fill",STEP_BACKWARD:"pi pi-step-backward",STEP_BACKWARD_ALT:"pi pi-step-backward-alt",STEP_FORWARD:"pi pi-step-forward",STEP_FORWARD_ALT:"pi pi-step-forward-alt",STOP:"pi pi-stop",STOPWATCH:"pi pi-stop-watch",STOP_CIRCLE:"pi pi-stop-circle",SUN:"pi pi-sun",SYNC:"pi pi-sync",TABLE:"pi pi-table",TABLET:"pi pi-tablet",TAG:"pi pi-tag",TAGS:"pi pi-tags",TELEGRAM:"pi pi-telegram",TH_LARGE:"pi pi-th-large",THUMBS_DOWN:"pi pi-thumbs-down",THUMBS_DOWN_FILL:"pi pi-thumbs-down-fill",THUMBS_UP:"pi pi-thumbs-up",THUMBS_UP_FILL:"pi pi-thumbs-up-fill",TICKET:"pi pi-ticket",TIMES:"pi pi-times",TIMES_CIRCLE:"pi pi-times-circle",TRASH:"pi pi-trash",TRUCK:"pi pi-truck",TWITTER:"pi pi-twitter",UNDO:"pi pi-undo",UNLOCK:"pi pi-unlock",UPLOAD:"pi pi-upload",USER:"pi pi-user",USER_EDIT:"pi pi-user-edit",USER_MINUS:"pi pi-user-minus",USER_PLUS:"pi pi-user-plus",USERS:"pi pi-users",VERIFIED:"pi pi-verified",VIDEO:"pi pi-video",VIMEO:"pi pi-vimeo",VOLUME_DOWN:"pi pi-volume-down",VOLUME_OFF:"pi pi-volume-off",VOLUME_UP:"pi pi-volume-up",WALLET:"pi pi-wallet",WHATSAPP:"pi pi-whatsapp",WIFI:"pi pi-wifi",WINDOW_MAXIMIZE:"pi pi-window-maximize",WINDOW_MINIMIZE:"pi pi-window-minimize",WRENCH:"pi pi-wrench",YOUTUBE:"pi pi-youtube"},i.ToastSeverity={INFO:"info",WARN:"warn",ERROR:"error",SUCCESS:"success"},Object.defineProperty(i,"__esModule",{value:!0}),i}({},primevue.utils);
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ this.primevue=this.primevue||{},this.primevue.ripple=function(e){"use strict";le
|
|
|
8
8
|
|
|
9
9
|
this.primevue=this.primevue||{},this.primevue.portal=function(e,t){"use strict";var o={name:"Portal",props:{appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1}},data:()=>({mounted:!1}),mounted(){this.mounted=e.DomHandler.isClient()},computed:{inline(){return this.disabled||"self"===this.appendTo}}};return o.render=function(e,o,n,r,d,i){return i.inline?t.renderSlot(e.$slots,"default",{key:0}):d.mounted?(t.openBlock(),t.createBlock(t.Teleport,{key:1,to:n.appendTo},[t.renderSlot(e.$slots,"default")],8,["to"])):t.createCommentVNode("",!0)},o}(primevue.utils,Vue);
|
|
10
10
|
|
|
11
|
-
this.primevue=this.primevue||{},this.primevue.tooltip=function(t){"use strict";function e(t){t.$_ptooltipModifiers.focus?(t.addEventListener("focus",n),t.addEventListener("blur",p)):(t.addEventListener("mouseenter",l),t.addEventListener("mouseleave",i),t.addEventListener("click",r)),t.addEventListener("keydown",a)}function o(t){t.$_ptooltipModifiers.focus?(t.removeEventListener("focus",n),t.removeEventListener("blur",p)):(t.removeEventListener("mouseenter",l),t.removeEventListener("mouseleave",i),t.removeEventListener("click",r)),t.removeEventListener("keydown",a)}function l(t){u(t.currentTarget)}function i(t){d(t.currentTarget)}function n(t){u(t.currentTarget)}function p(t){d(t.currentTarget)}function r(t){d(t.currentTarget)}function a(t){"Escape"===t.code&&d(t.currentTarget)}function u(e){if(e.$_ptooltipDisabled)return;let o=function(e){const o=""!==e.$_ptooltipIdAttr?e.$_ptooltipIdAttr:t.UniqueComponentId()+"_tooltip";e.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let i=document.createElement("div");i.className="p-tooltip-arrow",l.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",e.$_ptooltipEscape?n.innerHTML=e.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(e.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(n),document.body.appendChild(l),l.style.display="inline-block",e.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(e);!function(t){const e=t.$_ptooltipModifiers;e.top?($(t),H(t)&&(_(t),H(t)&&$(t))):e.left?(m(t),H(t)&&(v(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&m(t))))):e.bottom?(_(t),H(t)&&($(t),H(t)&&_(t))):(v(t),H(t)&&(m(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&v(t)))))}(e),t.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){t.DomHandler.isTouchDevice()||d(e),this.removeEventListener("resize",o)})),function(e){e.$_ptooltipScrollHandler||(e.$_ptooltipScrollHandler=new t.ConnectedOverlayScrollHandler(e,(function(){d(e)}))),e.$_ptooltipScrollHandler.bindScrollListener()}(e),t.ZIndexUtils.set("tooltip",o,e.$_ptooltipZIndex)}function d(t){c(t),function(t){t.$_ptooltipScrollHandler&&t.$_ptooltipScrollHandler.unbindScrollListener()}(t)}function s(t){return document.getElementById(t.$_ptooltipId)}function c(e){if(e){let o=s(e);o&&o.parentElement&&(t.ZIndexUtils.clear(o),document.body.removeChild(o)),e.$_ptooltipId=null}}function f(e){let o=e.getBoundingClientRect();return{left:o.left+t.DomHandler.getWindowScrollLeft(),top:o.top+t.DomHandler.getWindowScrollTop()}}function v(e){g(e,"right");let o=s(e),l=f(e),i=l.left+t.DomHandler.getOuterWidth(e),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function m(e){g(e,"left");let o=s(e),l=f(e),i=l.left-t.DomHandler.getOuterWidth(o),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function $(e){g(e,"top");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top-t.DomHandler.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function _(e){g(e,"bottom");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top+t.DomHandler.getOuterHeight(e);o.style.left=i+"px",o.style.top=n+"px"}function g(t,e){let o=s(t);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${e} ${t.$_ptooltipClass||""}`}function H(e){let o=s(e),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=t.DomHandler.getOuterWidth(o),r=t.DomHandler.getOuterHeight(o),a=t.DomHandler.getViewport();return n+p>a.width||n<0||i<0||i+r>a.height}function h(e){return t.DomHandler.hasClass(e,"p-inputwrapper")?t.DomHandler.findSingle(e,"input"):e}function b(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"==typeof t.arg?Object.entries(t.arg).reduce(((t,[e,o])=>("event"!==e&&"position"!==e||(t[o]=!0),t)),{}):{}}return{beforeMount(o,l){let i=h(o);if(i.$_ptooltipModifiers=b(l),l.value){if("string"==typeof l.value)i.$_ptooltipValue=l.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipFitContent=!0,i.$_ptooltipIdAttr="";else if("object"==typeof l.value&&l.value){if(t.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;i.$_ptooltipValue=l.value.value,i.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,i.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,i.$_ptooltipClass=l.value.class,i.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,i.$_ptooltipIdAttr=l.value.id||""}i.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,e(i)}},unmounted(
|
|
11
|
+
this.primevue=this.primevue||{},this.primevue.tooltip=function(t){"use strict";function e(t){t.$_ptooltipModifiers.focus?(t.addEventListener("focus",n),t.addEventListener("blur",p)):(t.addEventListener("mouseenter",l),t.addEventListener("mouseleave",i),t.addEventListener("click",r)),t.addEventListener("keydown",a)}function o(t){t.$_ptooltipModifiers.focus?(t.removeEventListener("focus",n),t.removeEventListener("blur",p)):(t.removeEventListener("mouseenter",l),t.removeEventListener("mouseleave",i),t.removeEventListener("click",r)),t.removeEventListener("keydown",a)}function l(t){u(t.currentTarget)}function i(t){d(t.currentTarget)}function n(t){u(t.currentTarget)}function p(t){d(t.currentTarget)}function r(t){d(t.currentTarget)}function a(t){"Escape"===t.code&&d(t.currentTarget)}function u(e){if(e.$_ptooltipDisabled)return;let o=function(e){const o=""!==e.$_ptooltipIdAttr?e.$_ptooltipIdAttr:t.UniqueComponentId()+"_tooltip";e.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let i=document.createElement("div");i.className="p-tooltip-arrow",l.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",e.$_ptooltipEscape?n.innerHTML=e.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(e.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(n),document.body.appendChild(l),l.style.display="inline-block",e.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(e);!function(t){const e=t.$_ptooltipModifiers;e.top?($(t),H(t)&&(_(t),H(t)&&$(t))):e.left?(m(t),H(t)&&(v(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&m(t))))):e.bottom?(_(t),H(t)&&($(t),H(t)&&_(t))):(v(t),H(t)&&(m(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&v(t)))))}(e),t.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){t.DomHandler.isTouchDevice()||d(e),this.removeEventListener("resize",o)})),function(e){e.$_ptooltipScrollHandler||(e.$_ptooltipScrollHandler=new t.ConnectedOverlayScrollHandler(e,(function(){d(e)}))),e.$_ptooltipScrollHandler.bindScrollListener()}(e),t.ZIndexUtils.set("tooltip",o,e.$_ptooltipZIndex)}function d(t){c(t),function(t){t.$_ptooltipScrollHandler&&t.$_ptooltipScrollHandler.unbindScrollListener()}(t)}function s(t){return document.getElementById(t.$_ptooltipId)}function c(e){if(e){let o=s(e);o&&o.parentElement&&(t.ZIndexUtils.clear(o),document.body.removeChild(o)),e.$_ptooltipId=null}}function f(e){let o=e.getBoundingClientRect();return{left:o.left+t.DomHandler.getWindowScrollLeft(),top:o.top+t.DomHandler.getWindowScrollTop()}}function v(e){g(e,"right");let o=s(e),l=f(e),i=l.left+t.DomHandler.getOuterWidth(e),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function m(e){g(e,"left");let o=s(e),l=f(e),i=l.left-t.DomHandler.getOuterWidth(o),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function $(e){g(e,"top");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top-t.DomHandler.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function _(e){g(e,"bottom");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top+t.DomHandler.getOuterHeight(e);o.style.left=i+"px",o.style.top=n+"px"}function g(t,e){let o=s(t);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${e} ${t.$_ptooltipClass||""}`}function H(e){let o=s(e),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=t.DomHandler.getOuterWidth(o),r=t.DomHandler.getOuterHeight(o),a=t.DomHandler.getViewport();return n+p>a.width||n<0||i<0||i+r>a.height}function h(e){return t.DomHandler.hasClass(e,"p-inputwrapper")?t.DomHandler.findSingle(e,"input"):e}function b(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"==typeof t.arg?Object.entries(t.arg).reduce(((t,[e,o])=>("event"!==e&&"position"!==e||(t[o]=!0),t)),{}):{}}return{beforeMount(o,l){let i=h(o);if(i.$_ptooltipModifiers=b(l),l.value){if("string"==typeof l.value)i.$_ptooltipValue=l.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipFitContent=!0,i.$_ptooltipIdAttr="";else if("object"==typeof l.value&&l.value){if(t.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;i.$_ptooltipValue=l.value.value,i.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,i.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,i.$_ptooltipClass=l.value.class,i.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,i.$_ptooltipIdAttr=l.value.id||""}i.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,e(i)}},unmounted(t){let e=h(t);c(e),o(e),e.$_ptooltipScrollHandler&&(e.$_ptooltipScrollHandler.destroy(),e.$_ptooltipScrollHandler=null)},updated(l,i){let n=h(l);if(n.$_ptooltipModifiers=b(i),i.value){if("string"==typeof i.value)n.$_ptooltipValue=i.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!1,n.$_ptooltipClass=null,n.$_ptooltipIdAttr="",e(n);else if("object"==typeof i.value&&i.value){if(t.ObjectUtils.isEmpty(i.value.value||""===i.value.value.trim()))return void o(n);n.$_ptooltipValue=i.value.value,n.$_ptooltipDisabled=!!i.value.disabled===i.value.disabled&&i.value.disabled,n.$_ptooltipEscape=!!i.value.escape===i.value.escape&&i.value.escape,n.$_ptooltipClass=i.value.class,n.$_ptooltipFitContent=!!i.value.fitContent!==i.value.fitContent||i.value.fitContent,n.$_ptooltipIdAttr=i.value.id||"",e(n)}}else o(n)}}}(primevue.utils);
|
|
12
12
|
|
|
13
13
|
this.primevue=this.primevue||{},this.primevue.focustrap=function(e){"use strict";function t(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener("focusin",e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener("focusout",e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)}function o(t){const{currentTarget:o,relatedTarget:s}=t,n=s===o.$_pfocustrap_lasthiddenfocusableelement?e.DomHandler.getFirstFocusableElement(o.parentElement,`:not(.p-hidden-focusable)${o.$_pfocustrap_focusableselector}`):o.$_pfocustrap_lasthiddenfocusableelement;e.DomHandler.focus(n)}function s(t){const{currentTarget:o,relatedTarget:s}=t,n=s===o.$_pfocustrap_firsthiddenfocusableelement?e.DomHandler.getLastFocusableElement(o.parentElement,`:not(.p-hidden-focusable)${o.$_pfocustrap_focusableselector}`):o.$_pfocustrap_firsthiddenfocusableelement;e.DomHandler.focus(n)}const n={mounted(t,n){const{disabled:u}=n.value||{};u||(function(e,t){const{tabIndex:n=0,firstFocusableSelector:u="",lastFocusableSelector:c=""}=t.value||{},r=e=>{const t=document.createElement("span");return t.classList="p-hidden-accessible p-hidden-focusable",t.tabIndex=n,t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),t.addEventListener("focus",e),t},a=r(o),l=r(s);a.$_pfocustrap_lasthiddenfocusableelement=l,a.$_pfocustrap_focusableselector=u,l.$_pfocustrap_firsthiddenfocusableelement=a,l.$_pfocustrap_focusableselector=c,e.prepend(a),e.append(l)}(t,n),function(t,o){const{onFocusIn:s,onFocusOut:n}=o.value||{};t.$_pfocustrap_mutationobserver=new MutationObserver((o=>{o.forEach((o=>{if("childList"===o.type&&!t.contains(document.activeElement)){const t=o=>{const s=e.DomHandler.isFocusableElement(o)?o:e.DomHandler.getFirstFocusableElement(o);return e.ObjectUtils.isNotEmpty(s)?s:t(o.nextSibling)};e.DomHandler.focus(t(o.nextSibling))}}))})),t.$_pfocustrap_mutationobserver.disconnect(),t.$_pfocustrap_mutationobserver.observe(t,{childList:!0}),t.$_pfocustrap_focusinlistener=e=>s&&s(e),t.$_pfocustrap_focusoutlistener=e=>n&&n(e),t.addEventListener("focusin",t.$_pfocustrap_focusinlistener),t.addEventListener("focusout",t.$_pfocustrap_focusoutlistener)}(t,n),function(t,o){const{autoFocusSelector:s="",firstFocusableSelector:n="",autoFocus:u=!1}=o.value||{};let c=e.DomHandler.getFirstFocusableElement(t,`[autofocus]:not(.p-hidden-focusable)${s}`);u&&!c&&(c=e.DomHandler.getFirstFocusableElement(t,`:not(.p-hidden-focusable)${n}`)),e.DomHandler.focus(c)}(t,n))},updated(e,o){const{disabled:s}=o.value||{};s&&t(e)},unmounted(e){t(e)}};return n}(primevue.utils);
|
|
14
14
|
|
package/package.json
CHANGED
package/tooltip/tooltip.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils");function t(e){e.$_ptooltipModifiers.focus?(e.addEventListener("focus",i),e.addEventListener("blur",p)):(e.addEventListener("mouseenter",l),e.addEventListener("mouseleave",n),e.addEventListener("click",r)),e.addEventListener("keydown",a)}function o(e){e.$_ptooltipModifiers.focus?(e.removeEventListener("focus",i),e.removeEventListener("blur",p)):(e.removeEventListener("mouseenter",l),e.removeEventListener("mouseleave",n),e.removeEventListener("click",r)),e.removeEventListener("keydown",a)}function l(e){u(e.currentTarget)}function n(e){d(e.currentTarget)}function i(e){u(e.currentTarget)}function p(e){d(e.currentTarget)}function r(e){d(e.currentTarget)}function a(e){"Escape"===e.code&&d(e.currentTarget)}function u(t){if(t.$_ptooltipDisabled)return;let o=function(t){const o=""!==t.$_ptooltipIdAttr?t.$_ptooltipIdAttr:e.UniqueComponentId()+"_tooltip";t.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let n=document.createElement("div");n.className="p-tooltip-arrow",l.appendChild(n);let i=document.createElement("div");i.className="p-tooltip-text",t.$_ptooltipEscape?i.innerHTML=t.$_ptooltipValue:(i.innerHTML="",i.appendChild(document.createTextNode(t.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(i),document.body.appendChild(l),l.style.display="inline-block",t.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(t);!function(e){const t=e.$_ptooltipModifiers;t.top?($(e),H(e)&&(_(e),H(e)&&$(e))):t.left?(m(e),H(e)&&(v(e),H(e)&&($(e),H(e)&&(_(e),H(e)&&m(e))))):t.bottom?(_(e),H(e)&&($(e),H(e)&&_(e))):(v(e),H(e)&&(m(e),H(e)&&($(e),H(e)&&(_(e),H(e)&&v(e)))))}(t),e.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){e.DomHandler.isTouchDevice()||d(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new e.ConnectedOverlayScrollHandler(t,(function(){d(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.ZIndexUtils.set("tooltip",o,t.$_ptooltipZIndex)}function d(e){c(e),function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()}(e)}function s(e){return document.getElementById(e.$_ptooltipId)}function c(t){if(t){let o=s(t);o&&o.parentElement&&(e.ZIndexUtils.clear(o),document.body.removeChild(o)),t.$_ptooltipId=null}}function f(t){let o=t.getBoundingClientRect();return{left:o.left+e.DomHandler.getWindowScrollLeft(),top:o.top+e.DomHandler.getWindowScrollTop()}}function v(t){g(t,"right");let o=s(t),l=f(t),n=l.left+e.DomHandler.getOuterWidth(t),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function m(t){g(t,"left");let o=s(t),l=f(t),n=l.left-e.DomHandler.getOuterWidth(o),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function $(t){g(t,"top");let o=s(t),l=f(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top-e.DomHandler.getOuterHeight(o);o.style.left=n+"px",o.style.top=i+"px"}function _(t){g(t,"bottom");let o=s(t),l=f(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top+e.DomHandler.getOuterHeight(t);o.style.left=n+"px",o.style.top=i+"px"}function g(e,t){let o=s(e);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${t} ${e.$_ptooltipClass||""}`}function H(t){let o=s(t),l=o.getBoundingClientRect(),n=l.top,i=l.left,p=e.DomHandler.getOuterWidth(o),r=e.DomHandler.getOuterHeight(o),a=e.DomHandler.getViewport();return i+p>a.width||i<0||n<0||n+r>a.height}function b(t){return e.DomHandler.hasClass(t,"p-inputwrapper")?e.DomHandler.findSingle(t,"input"):t}function h(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"==typeof e.arg?Object.entries(e.arg).reduce(((e,[t,o])=>("event"!==t&&"position"!==t||(e[o]=!0),e)),{}):{}}const y={beforeMount(o,l){let n=b(o);if(n.$_ptooltipModifiers=h(l),l.value){if("string"==typeof l.value)n.$_ptooltipValue=l.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!1,n.$_ptooltipClass=null,n.$_ptooltipFitContent=!0,n.$_ptooltipIdAttr="";else if("object"==typeof l.value&&l.value){if(e.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;n.$_ptooltipValue=l.value.value,n.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,n.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,n.$_ptooltipClass=l.value.class,n.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,n.$_ptooltipIdAttr=l.value.id||""}n.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,t(n)}},unmounted(
|
|
1
|
+
"use strict";var e=require("primevue/utils");function t(e){e.$_ptooltipModifiers.focus?(e.addEventListener("focus",i),e.addEventListener("blur",p)):(e.addEventListener("mouseenter",l),e.addEventListener("mouseleave",n),e.addEventListener("click",r)),e.addEventListener("keydown",a)}function o(e){e.$_ptooltipModifiers.focus?(e.removeEventListener("focus",i),e.removeEventListener("blur",p)):(e.removeEventListener("mouseenter",l),e.removeEventListener("mouseleave",n),e.removeEventListener("click",r)),e.removeEventListener("keydown",a)}function l(e){u(e.currentTarget)}function n(e){d(e.currentTarget)}function i(e){u(e.currentTarget)}function p(e){d(e.currentTarget)}function r(e){d(e.currentTarget)}function a(e){"Escape"===e.code&&d(e.currentTarget)}function u(t){if(t.$_ptooltipDisabled)return;let o=function(t){const o=""!==t.$_ptooltipIdAttr?t.$_ptooltipIdAttr:e.UniqueComponentId()+"_tooltip";t.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let n=document.createElement("div");n.className="p-tooltip-arrow",l.appendChild(n);let i=document.createElement("div");i.className="p-tooltip-text",t.$_ptooltipEscape?i.innerHTML=t.$_ptooltipValue:(i.innerHTML="",i.appendChild(document.createTextNode(t.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(i),document.body.appendChild(l),l.style.display="inline-block",t.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(t);!function(e){const t=e.$_ptooltipModifiers;t.top?($(e),H(e)&&(_(e),H(e)&&$(e))):t.left?(m(e),H(e)&&(v(e),H(e)&&($(e),H(e)&&(_(e),H(e)&&m(e))))):t.bottom?(_(e),H(e)&&($(e),H(e)&&_(e))):(v(e),H(e)&&(m(e),H(e)&&($(e),H(e)&&(_(e),H(e)&&v(e)))))}(t),e.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){e.DomHandler.isTouchDevice()||d(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new e.ConnectedOverlayScrollHandler(t,(function(){d(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.ZIndexUtils.set("tooltip",o,t.$_ptooltipZIndex)}function d(e){c(e),function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()}(e)}function s(e){return document.getElementById(e.$_ptooltipId)}function c(t){if(t){let o=s(t);o&&o.parentElement&&(e.ZIndexUtils.clear(o),document.body.removeChild(o)),t.$_ptooltipId=null}}function f(t){let o=t.getBoundingClientRect();return{left:o.left+e.DomHandler.getWindowScrollLeft(),top:o.top+e.DomHandler.getWindowScrollTop()}}function v(t){g(t,"right");let o=s(t),l=f(t),n=l.left+e.DomHandler.getOuterWidth(t),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function m(t){g(t,"left");let o=s(t),l=f(t),n=l.left-e.DomHandler.getOuterWidth(o),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function $(t){g(t,"top");let o=s(t),l=f(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top-e.DomHandler.getOuterHeight(o);o.style.left=n+"px",o.style.top=i+"px"}function _(t){g(t,"bottom");let o=s(t),l=f(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top+e.DomHandler.getOuterHeight(t);o.style.left=n+"px",o.style.top=i+"px"}function g(e,t){let o=s(e);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${t} ${e.$_ptooltipClass||""}`}function H(t){let o=s(t),l=o.getBoundingClientRect(),n=l.top,i=l.left,p=e.DomHandler.getOuterWidth(o),r=e.DomHandler.getOuterHeight(o),a=e.DomHandler.getViewport();return i+p>a.width||i<0||n<0||n+r>a.height}function b(t){return e.DomHandler.hasClass(t,"p-inputwrapper")?e.DomHandler.findSingle(t,"input"):t}function h(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"==typeof e.arg?Object.entries(e.arg).reduce(((e,[t,o])=>("event"!==t&&"position"!==t||(e[o]=!0),e)),{}):{}}const y={beforeMount(o,l){let n=b(o);if(n.$_ptooltipModifiers=h(l),l.value){if("string"==typeof l.value)n.$_ptooltipValue=l.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!1,n.$_ptooltipClass=null,n.$_ptooltipFitContent=!0,n.$_ptooltipIdAttr="";else if("object"==typeof l.value&&l.value){if(e.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;n.$_ptooltipValue=l.value.value,n.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,n.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,n.$_ptooltipClass=l.value.class,n.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,n.$_ptooltipIdAttr=l.value.id||""}n.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,t(n)}},unmounted(e){let t=b(e);c(t),o(t),t.$_ptooltipScrollHandler&&(t.$_ptooltipScrollHandler.destroy(),t.$_ptooltipScrollHandler=null)},updated(l,n){let i=b(l);if(i.$_ptooltipModifiers=h(n),n.value){if("string"==typeof n.value)i.$_ptooltipValue=n.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipIdAttr="",t(i);else if("object"==typeof n.value&&n.value){if(e.ObjectUtils.isEmpty(n.value.value||""===n.value.value.trim()))return void o(i);i.$_ptooltipValue=n.value.value,i.$_ptooltipDisabled=!!n.value.disabled===n.value.disabled&&n.value.disabled,i.$_ptooltipEscape=!!n.value.escape===n.value.escape&&n.value.escape,i.$_ptooltipClass=n.value.class,i.$_ptooltipFitContent=!!n.value.fitContent!==n.value.fitContent||n.value.fitContent,i.$_ptooltipIdAttr=n.value.id||"",t(i)}}else o(i)}};module.exports=y;
|
package/tooltip/tooltip.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectUtils,
|
|
1
|
+
import { ObjectUtils, DomHandler, ZIndexUtils, UniqueComponentId, ConnectedOverlayScrollHandler } from 'primevue/utils';
|
|
2
2
|
|
|
3
3
|
function bindEvents(el) {
|
|
4
4
|
const modifiers = el.$_ptooltipModifiers;
|
|
@@ -347,8 +347,6 @@ const Tooltip = {
|
|
|
347
347
|
target.$_ptooltipScrollHandler.destroy();
|
|
348
348
|
target.$_ptooltipScrollHandler = null;
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
ZIndexUtils.clear(el);
|
|
352
350
|
},
|
|
353
351
|
updated(el, options) {
|
|
354
352
|
let target = getTarget(el);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectUtils as t,
|
|
1
|
+
import{ObjectUtils as t,DomHandler as e,ZIndexUtils as o,UniqueComponentId as l,ConnectedOverlayScrollHandler as i}from"primevue/utils";function n(t){t.$_ptooltipModifiers.focus?(t.addEventListener("focus",a),t.addEventListener("blur",s)):(t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",u),t.addEventListener("click",d)),t.addEventListener("keydown",c)}function p(t){t.$_ptooltipModifiers.focus?(t.removeEventListener("focus",a),t.removeEventListener("blur",s)):(t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",u),t.removeEventListener("click",d)),t.removeEventListener("keydown",c)}function r(t){f(t.currentTarget)}function u(t){v(t.currentTarget)}function a(t){f(t.currentTarget)}function s(t){v(t.currentTarget)}function d(t){v(t.currentTarget)}function c(t){"Escape"===t.code&&v(t.currentTarget)}function f(t){if(t.$_ptooltipDisabled)return;let n=function(t){const e=""!==t.$_ptooltipIdAttr?t.$_ptooltipIdAttr:l()+"_tooltip";t.$_ptooltipId=e;let o=document.createElement("div");o.id=e;let i=document.createElement("div");i.className="p-tooltip-arrow",o.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",t.$_ptooltipEscape?n.innerHTML=t.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(t.$_ptooltipValue)));o.setAttribute("role","tooltip"),o.appendChild(n),document.body.appendChild(o),o.style.display="inline-block",t.$_ptooltipFitContent&&(o.style.width="fit-content");return o}(t);!function(t){const e=t.$_ptooltipModifiers;e.top?(b(t),C(t)&&(y(t),C(t)&&b(t))):e.left?(h(t),C(t)&&(m(t),C(t)&&(b(t),C(t)&&(y(t),C(t)&&h(t))))):e.bottom?(y(t),C(t)&&(b(t),C(t)&&y(t))):(m(t),C(t)&&(h(t),C(t)&&(b(t),C(t)&&(y(t),C(t)&&m(t)))))}(t),e.fadeIn(n,250),window.addEventListener("resize",(function o(){e.isTouchDevice()||v(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new i(t,(function(){v(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),o.set("tooltip",n,t.$_ptooltipZIndex)}function v(t){_(t),function(t){t.$_ptooltipScrollHandler&&t.$_ptooltipScrollHandler.unbindScrollListener()}(t)}function $(t){return document.getElementById(t.$_ptooltipId)}function _(t){if(t){let e=$(t);e&&e.parentElement&&(o.clear(e),document.body.removeChild(e)),t.$_ptooltipId=null}}function g(t){let o=t.getBoundingClientRect();return{left:o.left+e.getWindowScrollLeft(),top:o.top+e.getWindowScrollTop()}}function m(t){E(t,"right");let o=$(t),l=g(t),i=l.left+e.getOuterWidth(t),n=l.top+(e.getOuterHeight(t)-e.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function h(t){E(t,"left");let o=$(t),l=g(t),i=l.left-e.getOuterWidth(o),n=l.top+(e.getOuterHeight(t)-e.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function b(t){E(t,"top");let o=$(t),l=g(t),i=l.left+(e.getOuterWidth(t)-e.getOuterWidth(o))/2,n=l.top-e.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function y(t){E(t,"bottom");let o=$(t),l=g(t),i=l.left+(e.getOuterWidth(t)-e.getOuterWidth(o))/2,n=l.top+e.getOuterHeight(t);o.style.left=i+"px",o.style.top=n+"px"}function E(t,e){let o=$(t);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${e} ${t.$_ptooltipClass||""}`}function C(t){let o=$(t),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=e.getOuterWidth(o),r=e.getOuterHeight(o),u=e.getViewport();return n+p>u.width||n<0||i<0||i+r>u.height}function L(t){return e.hasClass(t,"p-inputwrapper")?e.findSingle(t,"input"):t}function H(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"==typeof t.arg?Object.entries(t.arg).reduce(((t,[e,o])=>("event"!==e&&"position"!==e||(t[o]=!0),t)),{}):{}}const x={beforeMount(e,o){let l=L(e);if(l.$_ptooltipModifiers=H(o),o.value){if("string"==typeof o.value)l.$_ptooltipValue=o.value,l.$_ptooltipDisabled=!1,l.$_ptooltipEscape=!1,l.$_ptooltipClass=null,l.$_ptooltipFitContent=!0,l.$_ptooltipIdAttr="";else if("object"==typeof o.value&&o.value){if(t.isEmpty(o.value.value)||""===o.value.value.trim())return;l.$_ptooltipValue=o.value.value,l.$_ptooltipDisabled=!!o.value.disabled===o.value.disabled&&o.value.disabled,l.$_ptooltipEscape=!!o.value.escape===o.value.escape&&o.value.escape,l.$_ptooltipClass=o.value.class,l.$_ptooltipFitContent=!!o.value.fitContent!==o.value.fitContent||o.value.fitContent,l.$_ptooltipIdAttr=o.value.id||""}l.$_ptooltipZIndex=o.instance.$primevue&&o.instance.$primevue.config&&o.instance.$primevue.config.zIndex.tooltip,n(l)}},unmounted(t){let e=L(t);_(e),p(e),e.$_ptooltipScrollHandler&&(e.$_ptooltipScrollHandler.destroy(),e.$_ptooltipScrollHandler=null)},updated(e,o){let l=L(e);if(l.$_ptooltipModifiers=H(o),o.value){if("string"==typeof o.value)l.$_ptooltipValue=o.value,l.$_ptooltipDisabled=!1,l.$_ptooltipEscape=!1,l.$_ptooltipClass=null,l.$_ptooltipIdAttr="",n(l);else if("object"==typeof o.value&&o.value){if(t.isEmpty(o.value.value||""===o.value.value.trim()))return void p(l);l.$_ptooltipValue=o.value.value,l.$_ptooltipDisabled=!!o.value.disabled===o.value.disabled&&o.value.disabled,l.$_ptooltipEscape=!!o.value.escape===o.value.escape&&o.value.escape,l.$_ptooltipClass=o.value.class,l.$_ptooltipFitContent=!!o.value.fitContent!==o.value.fitContent||o.value.fitContent,l.$_ptooltipIdAttr=o.value.id||"",n(l)}}else p(l)}};export{x as default};
|
package/tooltip/tooltip.js
CHANGED
package/tooltip/tooltip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.tooltip=function(t){"use strict";function e(t){t.$_ptooltipModifiers.focus?(t.addEventListener("focus",n),t.addEventListener("blur",p)):(t.addEventListener("mouseenter",l),t.addEventListener("mouseleave",i),t.addEventListener("click",r)),t.addEventListener("keydown",a)}function o(t){t.$_ptooltipModifiers.focus?(t.removeEventListener("focus",n),t.removeEventListener("blur",p)):(t.removeEventListener("mouseenter",l),t.removeEventListener("mouseleave",i),t.removeEventListener("click",r)),t.removeEventListener("keydown",a)}function l(t){u(t.currentTarget)}function i(t){d(t.currentTarget)}function n(t){u(t.currentTarget)}function p(t){d(t.currentTarget)}function r(t){d(t.currentTarget)}function a(t){"Escape"===t.code&&d(t.currentTarget)}function u(e){if(e.$_ptooltipDisabled)return;let o=function(e){const o=""!==e.$_ptooltipIdAttr?e.$_ptooltipIdAttr:t.UniqueComponentId()+"_tooltip";e.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let i=document.createElement("div");i.className="p-tooltip-arrow",l.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",e.$_ptooltipEscape?n.innerHTML=e.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(e.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(n),document.body.appendChild(l),l.style.display="inline-block",e.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(e);!function(t){const e=t.$_ptooltipModifiers;e.top?($(t),H(t)&&(_(t),H(t)&&$(t))):e.left?(m(t),H(t)&&(v(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&m(t))))):e.bottom?(_(t),H(t)&&($(t),H(t)&&_(t))):(v(t),H(t)&&(m(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&v(t)))))}(e),t.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){t.DomHandler.isTouchDevice()||d(e),this.removeEventListener("resize",o)})),function(e){e.$_ptooltipScrollHandler||(e.$_ptooltipScrollHandler=new t.ConnectedOverlayScrollHandler(e,(function(){d(e)}))),e.$_ptooltipScrollHandler.bindScrollListener()}(e),t.ZIndexUtils.set("tooltip",o,e.$_ptooltipZIndex)}function d(t){c(t),function(t){t.$_ptooltipScrollHandler&&t.$_ptooltipScrollHandler.unbindScrollListener()}(t)}function s(t){return document.getElementById(t.$_ptooltipId)}function c(e){if(e){let o=s(e);o&&o.parentElement&&(t.ZIndexUtils.clear(o),document.body.removeChild(o)),e.$_ptooltipId=null}}function f(e){let o=e.getBoundingClientRect();return{left:o.left+t.DomHandler.getWindowScrollLeft(),top:o.top+t.DomHandler.getWindowScrollTop()}}function v(e){g(e,"right");let o=s(e),l=f(e),i=l.left+t.DomHandler.getOuterWidth(e),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function m(e){g(e,"left");let o=s(e),l=f(e),i=l.left-t.DomHandler.getOuterWidth(o),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function $(e){g(e,"top");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top-t.DomHandler.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function _(e){g(e,"bottom");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top+t.DomHandler.getOuterHeight(e);o.style.left=i+"px",o.style.top=n+"px"}function g(t,e){let o=s(t);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${e} ${t.$_ptooltipClass||""}`}function H(e){let o=s(e),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=t.DomHandler.getOuterWidth(o),r=t.DomHandler.getOuterHeight(o),a=t.DomHandler.getViewport();return n+p>a.width||n<0||i<0||i+r>a.height}function h(e){return t.DomHandler.hasClass(e,"p-inputwrapper")?t.DomHandler.findSingle(e,"input"):e}function b(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"==typeof t.arg?Object.entries(t.arg).reduce(((t,[e,o])=>("event"!==e&&"position"!==e||(t[o]=!0),t)),{}):{}}return{beforeMount(o,l){let i=h(o);if(i.$_ptooltipModifiers=b(l),l.value){if("string"==typeof l.value)i.$_ptooltipValue=l.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipFitContent=!0,i.$_ptooltipIdAttr="";else if("object"==typeof l.value&&l.value){if(t.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;i.$_ptooltipValue=l.value.value,i.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,i.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,i.$_ptooltipClass=l.value.class,i.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,i.$_ptooltipIdAttr=l.value.id||""}i.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,e(i)}},unmounted(
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.tooltip=function(t){"use strict";function e(t){t.$_ptooltipModifiers.focus?(t.addEventListener("focus",n),t.addEventListener("blur",p)):(t.addEventListener("mouseenter",l),t.addEventListener("mouseleave",i),t.addEventListener("click",r)),t.addEventListener("keydown",a)}function o(t){t.$_ptooltipModifiers.focus?(t.removeEventListener("focus",n),t.removeEventListener("blur",p)):(t.removeEventListener("mouseenter",l),t.removeEventListener("mouseleave",i),t.removeEventListener("click",r)),t.removeEventListener("keydown",a)}function l(t){u(t.currentTarget)}function i(t){d(t.currentTarget)}function n(t){u(t.currentTarget)}function p(t){d(t.currentTarget)}function r(t){d(t.currentTarget)}function a(t){"Escape"===t.code&&d(t.currentTarget)}function u(e){if(e.$_ptooltipDisabled)return;let o=function(e){const o=""!==e.$_ptooltipIdAttr?e.$_ptooltipIdAttr:t.UniqueComponentId()+"_tooltip";e.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let i=document.createElement("div");i.className="p-tooltip-arrow",l.appendChild(i);let n=document.createElement("div");n.className="p-tooltip-text",e.$_ptooltipEscape?n.innerHTML=e.$_ptooltipValue:(n.innerHTML="",n.appendChild(document.createTextNode(e.$_ptooltipValue)));l.setAttribute("role","tooltip"),l.appendChild(n),document.body.appendChild(l),l.style.display="inline-block",e.$_ptooltipFitContent&&(l.style.width="fit-content");return l}(e);!function(t){const e=t.$_ptooltipModifiers;e.top?($(t),H(t)&&(_(t),H(t)&&$(t))):e.left?(m(t),H(t)&&(v(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&m(t))))):e.bottom?(_(t),H(t)&&($(t),H(t)&&_(t))):(v(t),H(t)&&(m(t),H(t)&&($(t),H(t)&&(_(t),H(t)&&v(t)))))}(e),t.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){t.DomHandler.isTouchDevice()||d(e),this.removeEventListener("resize",o)})),function(e){e.$_ptooltipScrollHandler||(e.$_ptooltipScrollHandler=new t.ConnectedOverlayScrollHandler(e,(function(){d(e)}))),e.$_ptooltipScrollHandler.bindScrollListener()}(e),t.ZIndexUtils.set("tooltip",o,e.$_ptooltipZIndex)}function d(t){c(t),function(t){t.$_ptooltipScrollHandler&&t.$_ptooltipScrollHandler.unbindScrollListener()}(t)}function s(t){return document.getElementById(t.$_ptooltipId)}function c(e){if(e){let o=s(e);o&&o.parentElement&&(t.ZIndexUtils.clear(o),document.body.removeChild(o)),e.$_ptooltipId=null}}function f(e){let o=e.getBoundingClientRect();return{left:o.left+t.DomHandler.getWindowScrollLeft(),top:o.top+t.DomHandler.getWindowScrollTop()}}function v(e){g(e,"right");let o=s(e),l=f(e),i=l.left+t.DomHandler.getOuterWidth(e),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function m(e){g(e,"left");let o=s(e),l=f(e),i=l.left-t.DomHandler.getOuterWidth(o),n=l.top+(t.DomHandler.getOuterHeight(e)-t.DomHandler.getOuterHeight(o))/2;o.style.left=i+"px",o.style.top=n+"px"}function $(e){g(e,"top");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top-t.DomHandler.getOuterHeight(o);o.style.left=i+"px",o.style.top=n+"px"}function _(e){g(e,"bottom");let o=s(e),l=f(e),i=l.left+(t.DomHandler.getOuterWidth(e)-t.DomHandler.getOuterWidth(o))/2,n=l.top+t.DomHandler.getOuterHeight(e);o.style.left=i+"px",o.style.top=n+"px"}function g(t,e){let o=s(t);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${e} ${t.$_ptooltipClass||""}`}function H(e){let o=s(e),l=o.getBoundingClientRect(),i=l.top,n=l.left,p=t.DomHandler.getOuterWidth(o),r=t.DomHandler.getOuterHeight(o),a=t.DomHandler.getViewport();return n+p>a.width||n<0||i<0||i+r>a.height}function h(e){return t.DomHandler.hasClass(e,"p-inputwrapper")?t.DomHandler.findSingle(e,"input"):e}function b(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"==typeof t.arg?Object.entries(t.arg).reduce(((t,[e,o])=>("event"!==e&&"position"!==e||(t[o]=!0),t)),{}):{}}return{beforeMount(o,l){let i=h(o);if(i.$_ptooltipModifiers=b(l),l.value){if("string"==typeof l.value)i.$_ptooltipValue=l.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!1,i.$_ptooltipClass=null,i.$_ptooltipFitContent=!0,i.$_ptooltipIdAttr="";else if("object"==typeof l.value&&l.value){if(t.ObjectUtils.isEmpty(l.value.value)||""===l.value.value.trim())return;i.$_ptooltipValue=l.value.value,i.$_ptooltipDisabled=!!l.value.disabled===l.value.disabled&&l.value.disabled,i.$_ptooltipEscape=!!l.value.escape===l.value.escape&&l.value.escape,i.$_ptooltipClass=l.value.class,i.$_ptooltipFitContent=!!l.value.fitContent!==l.value.fitContent||l.value.fitContent,i.$_ptooltipIdAttr=l.value.id||""}i.$_ptooltipZIndex=l.instance.$primevue&&l.instance.$primevue.config&&l.instance.$primevue.config.zIndex.tooltip,e(i)}},unmounted(t){let e=h(t);c(e),o(e),e.$_ptooltipScrollHandler&&(e.$_ptooltipScrollHandler.destroy(),e.$_ptooltipScrollHandler=null)},updated(l,i){let n=h(l);if(n.$_ptooltipModifiers=b(i),i.value){if("string"==typeof i.value)n.$_ptooltipValue=i.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!1,n.$_ptooltipClass=null,n.$_ptooltipIdAttr="",e(n);else if("object"==typeof i.value&&i.value){if(t.ObjectUtils.isEmpty(i.value.value||""===i.value.value.trim()))return void o(n);n.$_ptooltipValue=i.value.value,n.$_ptooltipDisabled=!!i.value.disabled===i.value.disabled&&i.value.disabled,n.$_ptooltipEscape=!!i.value.escape===i.value.escape&&i.value.escape,n.$_ptooltipClass=i.value.class,n.$_ptooltipFitContent=!!i.value.fitContent!==i.value.fitContent||i.value.fitContent,n.$_ptooltipIdAttr=i.value.id||"",e(n)}}else o(n)}}}(primevue.utils);
|
package/utils/utils.cjs.js
CHANGED
|
@@ -981,9 +981,9 @@ function UniqueComponentId (prefix = 'pv_id_') {
|
|
|
981
981
|
function handler() {
|
|
982
982
|
let zIndexes = [];
|
|
983
983
|
|
|
984
|
-
const generateZIndex = (key, baseZIndex) => {
|
|
985
|
-
|
|
986
|
-
|
|
984
|
+
const generateZIndex = (key, baseZIndex = 999) => {
|
|
985
|
+
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
986
|
+
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
987
987
|
|
|
988
988
|
zIndexes.push({ key, value: newZIndex });
|
|
989
989
|
|
|
@@ -994,8 +994,12 @@ function handler() {
|
|
|
994
994
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
995
995
|
};
|
|
996
996
|
|
|
997
|
-
const getCurrentZIndex = () => {
|
|
998
|
-
return
|
|
997
|
+
const getCurrentZIndex = (key) => {
|
|
998
|
+
return getLastZIndex(key).value;
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
1002
|
+
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
999
1003
|
};
|
|
1000
1004
|
|
|
1001
1005
|
const getZIndex = (el) => {
|
|
@@ -1015,7 +1019,7 @@ function handler() {
|
|
|
1015
1019
|
el.style.zIndex = '';
|
|
1016
1020
|
}
|
|
1017
1021
|
},
|
|
1018
|
-
getCurrent: () => getCurrentZIndex()
|
|
1022
|
+
getCurrent: (key) => getCurrentZIndex(key)
|
|
1019
1023
|
};
|
|
1020
1024
|
}
|
|
1021
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=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:t,set:(t,n,l)=>{n&&(n.style.zIndex=String(((t,n)=>{let l=e.length>0?e[e.length-1]:{key:t,value:n},i=l.value+(l.key===t?0:n)+1;return e.push({key:t,value:i}),i})(t,l)))},clear:n=>{var l;n&&(l=t(n),e=e.filter((e=>e.value!==l)),n.style.zIndex="")},getCurrent:()=>e.length>0?e[e.length-1].value: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;
|
|
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;
|
package/utils/utils.esm.js
CHANGED
|
@@ -977,9 +977,9 @@ function UniqueComponentId (prefix = 'pv_id_') {
|
|
|
977
977
|
function handler() {
|
|
978
978
|
let zIndexes = [];
|
|
979
979
|
|
|
980
|
-
const generateZIndex = (key, baseZIndex) => {
|
|
981
|
-
|
|
982
|
-
|
|
980
|
+
const generateZIndex = (key, baseZIndex = 999) => {
|
|
981
|
+
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
982
|
+
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
983
983
|
|
|
984
984
|
zIndexes.push({ key, value: newZIndex });
|
|
985
985
|
|
|
@@ -990,8 +990,12 @@ function handler() {
|
|
|
990
990
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
991
991
|
};
|
|
992
992
|
|
|
993
|
-
const getCurrentZIndex = () => {
|
|
994
|
-
return
|
|
993
|
+
const getCurrentZIndex = (key) => {
|
|
994
|
+
return getLastZIndex(key).value;
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
998
|
+
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
995
999
|
};
|
|
996
1000
|
|
|
997
1001
|
const getZIndex = (el) => {
|
|
@@ -1011,7 +1015,7 @@ function handler() {
|
|
|
1011
1015
|
el.style.zIndex = '';
|
|
1012
1016
|
}
|
|
1013
1017
|
},
|
|
1014
|
-
getCurrent: () => getCurrentZIndex()
|
|
1018
|
+
getCurrent: (key) => getCurrentZIndex(key)
|
|
1015
1019
|
};
|
|
1016
1020
|
}
|
|
1017
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,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)))}}};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 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)}))}}}var l={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}},i=0;function o(e="pv_id_"){return`${e}${++i}`}var r=function(){let e=[];const t=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:t,set:(t,n,l)=>{n&&(n.style.zIndex=String(((t,n)=>{let l=e.length>0?e[e.length-1]:{key:t,value:n},i=l.value+(l.key===t?0:n)+1;return e.push({key:t,value:i}),i})(t,l)))},clear:n=>{var l;n&&(l=t(n),e=e.filter((e=>e.value!==l)),n.style.zIndex="")},getCurrent:()=>e.length>0?e[e.length-1].value:0}}();export{t as ConnectedOverlayScrollHandler,e as DomHandler,n as EventBus,l 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=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};
|
package/utils/utils.js
CHANGED
|
@@ -981,9 +981,9 @@ this.primevue.utils = (function (exports) {
|
|
|
981
981
|
function handler() {
|
|
982
982
|
let zIndexes = [];
|
|
983
983
|
|
|
984
|
-
const generateZIndex = (key, baseZIndex) => {
|
|
985
|
-
|
|
986
|
-
|
|
984
|
+
const generateZIndex = (key, baseZIndex = 999) => {
|
|
985
|
+
const lastZIndex = getLastZIndex(key, baseZIndex);
|
|
986
|
+
const newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;
|
|
987
987
|
|
|
988
988
|
zIndexes.push({ key, value: newZIndex });
|
|
989
989
|
|
|
@@ -994,8 +994,12 @@ this.primevue.utils = (function (exports) {
|
|
|
994
994
|
zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);
|
|
995
995
|
};
|
|
996
996
|
|
|
997
|
-
const getCurrentZIndex = () => {
|
|
998
|
-
return
|
|
997
|
+
const getCurrentZIndex = (key) => {
|
|
998
|
+
return getLastZIndex(key).value;
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
const getLastZIndex = (key, baseZIndex = 0) => {
|
|
1002
|
+
return [...zIndexes].reverse().find((obj) => obj.key === key) || { key, value: baseZIndex };
|
|
999
1003
|
};
|
|
1000
1004
|
|
|
1001
1005
|
const getZIndex = (el) => {
|
|
@@ -1015,7 +1019,7 @@ this.primevue.utils = (function (exports) {
|
|
|
1015
1019
|
el.style.zIndex = '';
|
|
1016
1020
|
}
|
|
1017
1021
|
},
|
|
1018
|
-
getCurrent: () => getCurrentZIndex()
|
|
1022
|
+
getCurrent: (key) => getCurrentZIndex(key)
|
|
1019
1023
|
};
|
|
1020
1024
|
}
|
|
1021
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,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 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,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}},l=0;var i=function(){let e=[];const t=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:t,set:(t,n,l)=>{n&&(n.style.zIndex=String(((t,n)=>{let l=e.length>0?e[e.length-1]:{key:t,value:n},i=l.value+(l.key===t?0:n)+1;return e.push({key:t,value:i}),i})(t,l)))},clear:n=>{var l;n&&(l=t(n),e=e.filter((e=>e.value!==l)),n.style.zIndex="")},getCurrent:()=>e.length>0?e[e.length-1].value: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 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)}))}}},e.ObjectUtils=n,e.UniqueComponentId=function(e="pv_id_"){return`${e}${++l}`},e.ZIndexUtils=i,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=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}({});
|
package/web-types.json
CHANGED