Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-react-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
1151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-react-tooltip - npm Package Compare versions

Comparing version 2.2.0-dev.201810121327 to 2.2.0

2

dist/systemjs/kendo-react-tooltip.js

@@ -1,1 +0,1 @@

System.register("@progress/kendo-react-tooltip",["react","prop-types","@progress/kendo-react-common","react-dom"],function(i){var o,n,r,l;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){n=e(t)},function(t){r=e(t)},function(t){l=e(t)}],execute:function(){!function(o){var n={};function i(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,i),e.l=!0,e.exports}i.m=o,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.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)i(e,t[e])}(e)},function(t,e,o){"use strict";var n,i=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 i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);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 i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&(o[n[i]]=t[n[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(2),p=o(3),u=o(4),c=o(5),f=o(6),r=function(t){function r(){var o=null!==t&&t.apply(this,arguments)||this;return o.state={renderTooltipItem:!1,targetElement:null},o.title="",o.top=0,o.left=0,o.handleMouseLeave=function(t){var e=t.target;f.isTooltipElement(e&&e.className)||o.hideToolTip(t)},o.handleMouseOver=function(t){var e=t.target;f.isTooltipElement(e)||o.openedElement===e||(""!==e.title?o.isVisible(e)&&(o.state.renderTooltipItem&&c.dispatchEvent(o.props.onClose,t,o,void 0),o.showToolTip(t)):o.hideToolTip(t))},o.handleOnOpenEvent=function(t){void 0!==o.targetElement.title&&c.dispatchEvent(o.props.onOpen,t,o,void 0)},o.handleBodyMousemove=function(t){o.top=t.clientY,o.left=t.clientX,document&&(o.targetElement=t.target||document.body)},o.position=function(t){var e=f.getDomRect(o.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.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 i(r,t),r.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},r.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeout),this.openTimeout=void 0,document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},r.prototype.render=function(){var o=this;if(this.props.children){var t=this.props,e=t.children,n=s(t,["children"]),i=null;return a.createElement("div",{onMouseOver:function(t){i&&i.handleMouseOver(t)},onMouseLeave:function(t){i&&i.handleMouseLeave(t)}},a.createElement(r,l({ref:function(t){return i=t}},n)),e)}return void 0!==this.targetElement&&this.targetElement.hasAttribute("title")&&document&&this.state.renderTooltipItem&&p.createPortal(a.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",tabIndex:0},a.createElement("div",{className:"k-tooltip",style:{position:"relative"}},a.createElement("div",{className:"k-tooltip-content"},o.props.content&&a.createElement(o.props.content,{title:o.title,target:o.state.targetElement})||o.title),o.props.showCallout&&a.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)},r.prototype.showToolTip=function(t){var e=this;this.openedElement&&this.openedElement.setAttribute("title",this.title);var o=this.openedElement=t.target;if(this.title=o.title,o.setAttribute("title",""),clearTimeout(this.openTimeout),!this.props.openDelay)return this.setState({renderTooltipItem:!0,targetElement:o}),void this.handleOnOpenEvent(t);t.persist(),this.openTimeout=setTimeout(function(){e.setState({renderTooltipItem:!0,targetElement:e.targetElement}),e.targetElement.hasAttribute("title")&&e.handleOnOpenEvent(t)},this.props.openDelay)},r.prototype.hideToolTip=function(t){this.openedElement&&this.openedElement.setAttribute("title",this.title),this.openedElement&&this.state.renderTooltipItem&&(this.setState({renderTooltipItem:!1}),c.dispatchEvent(this.props.onClose,t,this,void 0)),this.openedElement=null},r.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},r.propTypes={anchorElement:u.oneOf(["pointer","target"]),content:u.func,filter:u.func,openDelay:u.number,position:u.oneOf(["right","left","top","bottom","auto"])},r.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0},r}(a.Component);e.Tooltip=r},function(t,e){t.exports=o},function(t,e){t.exports=l},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getLeftPosition=function(t,e,o,n,i){switch(i){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,i){switch(i){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){for(var t=e.parentNode;t;){if("k-tooltip"===t.className)return!0;t=t.parentNode}return 0<o.toolTipSelectors.filter(function(t){return t===e.className}).length}}])}}});
System.register("@progress/kendo-react-tooltip",["react","prop-types","react-dom","@progress/kendo-react-common"],function(i){var o,n,r,l;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){n=e(t)},function(t){r=e(t)},function(t){l=e(t)}],execute:function(){!function(o){var n={};function i(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,i),e.l=!0,e.exports}i.m=o,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.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)i(e,t[e])}(e)},function(t,e,o){"use strict";var n,i=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 i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);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 i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&(o[n[i]]=t[n[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(2),p=o(3),u=o(4),c=o(5),f=o(6),r=function(t){function r(){var o=null!==t&&t.apply(this,arguments)||this;return o.state={renderTooltipItem:!1,targetElement:null},o.title="",o.top=0,o.left=0,o.handleMouseLeave=function(t){var e=t.target;f.isTooltipElement(e&&e.className)||o.hideToolTip(t)},o.handleMouseOver=function(t){var e=t.target;f.isTooltipElement(e)||o.openedElement===e||(""!==e.title?o.isVisible(e)&&(o.state.renderTooltipItem&&c.dispatchEvent(o.props.onClose,t,o,void 0),o.showToolTip(t)):o.hideToolTip(t))},o.handleOnOpenEvent=function(t){void 0!==o.targetElement.title&&c.dispatchEvent(o.props.onOpen,t,o,void 0)},o.handleBodyMousemove=function(t){o.top=t.clientY,o.left=t.clientX,document&&(o.targetElement=t.target||document.body)},o.position=function(t){var e=f.getDomRect(o.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.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 i(r,t),r.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},r.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeout),this.openTimeout=void 0,document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},r.prototype.render=function(){var o=this;if(this.props.children){var t=this.props,e=t.children,n=s(t,["children"]),i=null;return a.createElement("div",{onMouseOver:function(t){i&&i.handleMouseOver(t)},onMouseLeave:function(t){i&&i.handleMouseLeave(t)}},a.createElement(r,l({ref:function(t){return i=t}},n)),e)}return void 0!==this.targetElement&&this.targetElement.hasAttribute("title")&&document&&this.state.renderTooltipItem&&p.createPortal(a.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",tabIndex:0},a.createElement("div",{className:"k-tooltip",style:{position:"relative"}},a.createElement("div",{className:"k-tooltip-content"},o.props.content&&a.createElement(o.props.content,{title:o.title,target:o.state.targetElement})||o.title),o.props.showCallout&&a.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)},r.prototype.showToolTip=function(t){var e=this;this.openedElement&&this.openedElement.setAttribute("title",this.title);var o=this.openedElement=t.target;if(this.title=o.title,o.setAttribute("title",""),clearTimeout(this.openTimeout),!this.props.openDelay)return this.setState({renderTooltipItem:!0,targetElement:o}),void this.handleOnOpenEvent(t);t.persist(),this.openTimeout=setTimeout(function(){e.setState({renderTooltipItem:!0,targetElement:e.targetElement}),e.targetElement.hasAttribute("title")&&e.handleOnOpenEvent(t)},this.props.openDelay)},r.prototype.hideToolTip=function(t){this.openedElement&&this.openedElement.setAttribute("title",this.title),this.openedElement&&this.state.renderTooltipItem&&(this.setState({renderTooltipItem:!1}),c.dispatchEvent(this.props.onClose,t,this,void 0)),this.openedElement=null},r.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},r.propTypes={anchorElement:u.oneOf(["pointer","target"]),content:u.func,filter:u.func,openDelay:u.number,position:u.oneOf(["right","left","top","bottom","auto"])},r.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0},r}(a.Component);e.Tooltip=r},function(t,e){t.exports=o},function(t,e){t.exports=r},function(t,e){t.exports=n},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,i){switch(i){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,i){switch(i){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){for(var t=e.parentNode;t;){if("k-tooltip"===t.className)return!0;t=t.parentNode}return 0<o.toolTipSelectors.filter(function(t){return t===e.className}).length}}])}}});
{
"name": "@progress/kendo-react-tooltip",
"version": "2.2.0-dev.201810121327",
"version": "2.2.0",
"description": "KendoReact Tooltip package",

@@ -30,3 +30,3 @@ "repository": {

"dependencies": {
"@progress/kendo-react-common": "2.2.0-dev.201810121327",
"@progress/kendo-react-common": "2.2.0",
"prop-types": "^15.6.0"

@@ -33,0 +33,0 @@ },

@@ -7,3 +7,3 @@ <a href="https://www.telerik.com/kendo-react-ui/" target="_blank">

This package is part of the Progress [KendoReact](https://www.telerik.com/kendo-react-ui/) suite.
This package is part of the Progress [KendoReact suite](https://www.telerik.com/kendo-react-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-native).

@@ -14,2 +14,4 @@ ## License

To acquire a license you can follow this [link](https://www.telerik.com/kendo-react-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-purchase-npm-native-pricing#pricing).
## Resources

@@ -16,0 +18,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc