katoikia-app/web-ui/web-react/node_modules/primereact/tooltip/tooltip.esm.min.js

2 lines
13 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
import t,{Component as e}from"react";import n from"react-dom";import{DomHandler as i,ZIndexUtils as o,ConnectedOverlayScrollHandler as r,classNames as s}from"primereact/utils";import{Portal as a}from"primereact/portal";import l from"primereact/api";function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function v(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function E(e){var o=e.appendTo||document.body,r=document.createDocumentFragment();i.appendChild(r,o),e=b(b({},e),e.options);var s=t.createElement(w,e);n.render(s,r);var a=function(i){e=b(b({},e),i),n.render(t.cloneElement(s,e),r)};return{destroy:function(){n.unmountComponentAtNode(r)},updateContent:function(t){console.warn("The 'updateContent' method has been deprecated on Tooltip. Use update(newProps) method."),a({content:t})},update:function(t){a(t)}}}var w=function(h){d(k,e);var f,T,b,E,w,O=(f=k,T=m(),function(){var t,e=g(f);if(T){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function k(t){var e;return u(this,k),(e=O.call(this,t)).state={visible:!1,position:e.props.position},e.show=e.show.bind(p(e)),e.hide=e.hide.bind(p(e)),e.onMouseEnter=e.onMouseEnter.bind(p(e)),e.onMouseLeave=e.onMouseLeave.bind(p(e)),e}return b=k,E=[{key:"isTargetContentEmpty",value:function(t){return!(this.props.content||this.getTargetOption(t,"tooltip"))}},{key:"isContentEmpty",value:function(t){return!(this.props.content||this.getTargetOption(t,"tooltip")||this.props.children)}},{key:"isMouseTrack",value:function(t){return this.getTargetOption(t,"mousetrack")||this.props.mouseTrack}},{key:"isDisabled",value:function(t){return"true"===this.getTargetOption(t,"disabled")||this.hasTargetOption(t,"disabled")||this.props.disabled}},{key:"isShowOnDisabled",value:function(t){return this.getTargetOption(t,"showondisabled")||this.props.showOnDisabled}},{key:"isAutoHide",value:function(){return this.getTargetOption(this.currentTarget,"autohide")||t