2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
|
this.primereact=this.primereact||{},this.primereact.tooltip=function(t,e,n,i,o,r){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(e),l=s(n),u=s(r);function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(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 h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function f(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&&d(t,e)}function v(t){return v="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},v(t)}function g(t,e){if(e&&("object"===v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T(){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 b(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 E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w=function(t){f(b,t);var e,n,r,s,d,v=(e=b,n=T(),function(){var t,i=y(e);if(n){var o=y(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return g(this,t)});function b(t){var e;return c(this,b),(e=v.call(this,t)).state={visible:!1,position:e.props.position},e.show=e.show.bind(h(e)),e.hide=e.hide.bind(h(e)),e.onMouseEnter=e.onMouseEnter.bind(h(e)),e.onMouseLeave=e.onMouseLeave.bind(h(e)),e}return r=b,s=[{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")||this.props.autoHide}},{key:"getTargetOption",value:function(t,e){return this.hasTargetOption(t,"data-pr-".concat(e))?t.getAttribute("data-pr-".concat(e)):null}},{key:"hasTargetOption",value:function(t,e){return t&&t.hasAttribute(e)}},{key:"getEvents",value:function(t){var e=this.getTargetOption(t,"showevent")||this.props.showEvent,n=this.getTargetOption(t,"hideevent")||this.props.hideEvent;return this.isMouseTrack(t)?(e="mousemove",n="mouseleave"):"focus"===(this.getTargetOption(t,"event")||this.props.event)&&(
|