@progress/kendo-react-tooltip
Advanced tools
Comparing version 2.8.0 to 2.8.1-dev.201903281458
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-react-tooltip",["react","react-dom","prop-types","@progress/kendo-react-common"],function(r){var o,n,i,l;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){n=e(t)},function(t){i=e(t)},function(t){l=e(t)}],execute:function(){!function(o){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=o,r.c=n,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1);e.Tooltip=n.Tooltip,function(t){for(var e in t)r(e,t[e])}(e)},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__assign||Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},s=this&&this.__rest||function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&(o[n[r]]=t[n[r]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var u=o(2),a=o(3),p=o(4),c=o(5),f=o(6),i=function(t){function i(){var o=null!==t&&t.apply(this,arguments)||this;return o.state={targetElement:null,open:!1},o.title="",o.top=0,o.left=0,o.handleMouseOut=function(t){var e=document.elementFromPoint(t.clientX,t.clientY);f.isTooltipElement(e)||(c.dispatchEvent(o.props.onClose,t,o,void 0),o.setState({targetElement:null,open:!1}))},o.handleMouseOver=function(t){var e=t.target;o.isVisible(e)&&!f.isTooltipElement(e)&&e!==o.state.targetElement&&(o.showToolTip(t),c.dispatchEvent(o.props.onOpen,t,o,void 0))},o.handleBodyMousemove=function(t){o.top=t.clientY,o.left=t.clientX},o.position=function(t){var e=f.getDomRect(o.state.targetElement);return{left:f.getLeftPosition(o.left,t.offsetWidth,e,o.props.anchorElement,o.props.position),top:f.getTopPosition(o.top,e,t.offsetHeight,o.props.anchorElement,o.props.position)}},o.getTitle=function(t){for(;t;){if(t.title||t.titleExpando)return t.title||t.titleExpando;t=o.props.parentTitle&&t.parentElement||null}return""},o.calloutClassName=function(){switch(o.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return o.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},o}return r(i,t),i.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},i.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeout),this.openTimeout=void 0,document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},i.prototype.render=function(){var o=this;if(this.props.children){var t=this.props,e=t.children,n=s(t,["children"]),r=null;return u.createElement("div",{onMouseOver:function(t){r&&r.handleMouseOver(t)},onMouseOut:function(t){r&&r.handleMouseOut(t)}},u.createElement(i,l({ref:function(t){return r=t}},n)),e)}return this.state.targetElement&&this.title&&document&&a.createPortal(u.createElement("div",{ref:function(t){if(t){var e=o.position(t);t.style.left=e.left+"px",t.style.top=e.top+"px"}},className:"k-animation-container k-animation-container-fixed k-animation-container-shown"+(this.props.className?" "+this.props.className:""),tabIndex:0},u.createElement("div",{className:"k-tooltip",style:{position:"relative"}},u.createElement("div",{className:"k-tooltip-content"},this.props.content&&u.createElement(this.props.content,{title:this.title,target:this.state.targetElement})||this.title),this.props.showCallout&&u.createElement("div",{ref:function(t){t&&(t.className=o.calloutClassName(),"auto"===o.props.position&&(o.left<window.screen.availWidth/2?t.style.left="25%":t.style.left="75%"))}}))),document.body)},i.prototype.showToolTip=function(t){var e=this,o=t.target;clearTimeout(this.openTimeout),this.title=this.getTitle(t.target),this.title&&(o.titleExpando=o.titleExpando||o.title,o.title=""),this.props.openDelay?this.openTimeout=setTimeout(function(){e.setState({targetElement:o,open:!0})},this.props.openDelay):this.setState({targetElement:o,open:!0})},i.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},i.propTypes={anchorElement:p.oneOf(["pointer","target"]),content:p.func,filter:p.func,openDelay:p.number,position:p.oneOf(["right","left","top","bottom","auto"])},i.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},i}(u.PureComponent);e.Tooltip=i},function(t,e){t.exports=o},function(t,e){t.exports=n},function(t,e){t.exports=i},function(t,e){t.exports=l},function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getLeftPosition=function(t,e,o,n,r){switch(r){case"bottom":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;case"left":return"pointer"===n?t-e-10:o.left-e-10;case"right":return"pointer"===n?t+10:o.right+10;case"top":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;default:return"pointer"===n?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?o.left:o.right-e}},o.getTopPosition=function(t,e,o,n,r){switch(r){case"bottom":return"pointer"===n?t+10:e.bottom+10;case"left":case"right":return"pointer"===n?t-o/2:e.top-o/2+e.height/2;case"top":return"pointer"===n?t-o-10:e.top-o-10;default:return"pointer"===n?t<window.innerHeight/2?t+10:t-o-10:t<window.innerHeight/2?e.bottom+10:e.top-o-10}},o.getDomRect=function(t){return null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect()},o.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],o.isTooltipElement=function(e){if(null===e)return!1;for(var t=e;t;){if(null!==t&&"k-tooltip"===t.className)return!0;t=null!==t.parentNode&&t.parentNode}return 0<o.toolTipSelectors.filter(function(t){return t===e.className}).length}}])}}}); | ||
System.register("@progress/kendo-react-tooltip",["react","prop-types","@progress/kendo-react-common","react-dom"],function(r){var o,n,i,l;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){n=e(t)},function(t){i=e(t)},function(t){l=e(t)}],execute:function(){!function(o){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=o,r.c=n,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1);e.Tooltip=n.Tooltip,function(t){for(var e in t)r(e,t[e])}(e)},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__assign||Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},s=this&&this.__rest||function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&(o[n[r]]=t[n[r]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var u=o(2),a=o(3),p=o(4),c=o(5),f=o(6),i=function(t){function i(){var o=null!==t&&t.apply(this,arguments)||this;return o.state={targetElement:null,open:!1},o.title="",o.top=0,o.left=0,o.handleMouseOut=function(t){var e=document.elementFromPoint(t.clientX,t.clientY);f.isTooltipElement(e)||(c.dispatchEvent(o.props.onClose,t,o,void 0),o.setState({targetElement:null,open:!1}))},o.handleMouseOver=function(t){var e=t.target;o.isVisible(e)&&!f.isTooltipElement(e)&&e!==o.state.targetElement&&(o.showToolTip(t),c.dispatchEvent(o.props.onOpen,t,o,void 0))},o.handleBodyMousemove=function(t){o.top=t.clientY,o.left=t.clientX},o.position=function(t){var e=f.getDomRect(o.state.targetElement);return{left:f.getLeftPosition(o.left,t.offsetWidth,e,o.props.anchorElement,o.props.position),top:f.getTopPosition(o.top,e,t.offsetHeight,o.props.anchorElement,o.props.position)}},o.getTitle=function(t){for(;t;){if(t.title||t.titleExpando)return t.title||t.titleExpando;t=o.props.parentTitle&&t.parentElement||null}return""},o.calloutClassName=function(){switch(o.props.position){case"bottom":return"k-callout k-callout-n";case"left":return"k-callout k-callout-e";case"right":return"k-callout k-callout-w";case"top":return"k-callout k-callout-s";default:return o.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},o}return r(i,t),i.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},i.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeout),this.openTimeout=void 0,document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},i.prototype.render=function(){var o=this;if(this.props.children){var t=this.props,e=t.children,n=s(t,["children"]),r=null;return u.createElement("div",{onMouseOver:function(t){r&&r.handleMouseOver(t)},onMouseOut:function(t){r&&r.handleMouseOut(t)}},u.createElement(i,l({ref:function(t){return r=t}},n)),e)}return this.state.targetElement&&this.title&&document&&a.createPortal(u.createElement("div",{ref:function(t){if(t){var e=o.position(t);t.style.left=e.left+"px",t.style.top=e.top+"px"}},className:"k-animation-container k-animation-container-fixed k-animation-container-shown"+(this.props.className?" "+this.props.className:""),tabIndex:0},u.createElement("div",{className:"k-tooltip",style:{position:"relative"}},u.createElement("div",{className:"k-tooltip-content"},this.props.content&&u.createElement(this.props.content,{title:this.title,target:this.state.targetElement})||this.title),this.props.showCallout&&u.createElement("div",{ref:function(t){t&&(t.className=o.calloutClassName(),"auto"===o.props.position&&(o.left<window.screen.availWidth/2?t.style.left="25%":t.style.left="75%"))}}))),document.body)},i.prototype.showToolTip=function(t){var e=this,o=t.target;clearTimeout(this.openTimeout),this.title=this.getTitle(t.target),this.title&&(o.titleExpando=o.titleExpando||o.title,o.title=""),this.props.openDelay?this.openTimeout=setTimeout(function(){e.setState({targetElement:o,open:!0})},this.props.openDelay):this.setState({targetElement:o,open:!0})},i.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},i.propTypes={anchorElement:p.oneOf(["pointer","target"]),content:p.func,filter:p.func,openDelay:p.number,position:p.oneOf(["right","left","top","bottom","auto"])},i.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},i}(u.PureComponent);e.Tooltip=i},function(t,e){t.exports=o},function(t,e){t.exports=l},function(t,e){t.exports=n},function(t,e){t.exports=i},function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getLeftPosition=function(t,e,o,n,r){switch(r){case"bottom":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;case"left":return"pointer"===n?t-e-10:o.left-e-10;case"right":return"pointer"===n?t+10:o.right+10;case"top":return"pointer"===n?t-e/2:o.left-e/2+o.width/2;default:return"pointer"===n?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?o.left:o.right-e}},o.getTopPosition=function(t,e,o,n,r){switch(r){case"bottom":return"pointer"===n?t+10:e.bottom+10;case"left":case"right":return"pointer"===n?t-o/2:e.top-o/2+e.height/2;case"top":return"pointer"===n?t-o-10:e.top-o-10;default:return"pointer"===n?t<window.innerHeight/2?t+10:t-o-10:t<window.innerHeight/2?e.bottom+10:e.top-o-10}},o.getDomRect=function(t){return null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect()},o.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],o.isTooltipElement=function(e){if(null===e)return!1;for(var t=e;t;){if(null!==t&&"k-tooltip"===t.className)return!0;t=null!==t.parentNode&&t.parentNode}return 0<o.toolTipSelectors.filter(function(t){return t===e.className}).length}}])}}}); |
{ | ||
"name": "@progress/kendo-react-tooltip", | ||
"version": "2.8.0", | ||
"version": "2.8.1-dev.201903281458", | ||
"description": "KendoReact Tooltip package", | ||
@@ -30,3 +30,3 @@ "repository": { | ||
"dependencies": { | ||
"@progress/kendo-react-common": "2.8.0", | ||
"@progress/kendo-react-common": "2.8.1-dev.201903281458", | ||
"prop-types": "^15.6.0" | ||
@@ -33,0 +33,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77607
3
+ Added@progress/kendo-react-common@2.8.1-dev.201903281458(transitive)
- Removed@progress/kendo-react-common@2.8.0(transitive)