@progress/kendo-react-tooltip
Advanced tools
Comparing version 2.7.0-dev.201902260733 to 2.7.0-dev.201902261330
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("prop-types"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["prop-types","react","react-dom"],e):"object"==typeof exports?exports.KendoReactTooltip=e(require("prop-types"),require("react"),require("react-dom")):t.KendoReactTooltip=e(t.PropTypes,t.React,t.ReactDOM)}(window,function(t,e,n){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3);e.Tooltip=o.Tooltip},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},l=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(n[o[r]]=t[o[r]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),a=n(4),s=n(0),c=n(6),p=n(5),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={targetElement:null,open:!1},e.title="",e.top=0,e.left=0,e.handleMouseOut=function(t){var n=document.elementFromPoint(t.clientX,t.clientY);p.isTooltipElement(n)||(c.dispatchEvent(e.props.onClose,t,e,void 0),e.setState({targetElement:null,open:!1}))},e.handleMouseOver=function(t){var n=t.target;e.isVisible(n)&&!p.isTooltipElement(n)&&n!==e.state.targetElement&&(e.showToolTip(t),c.dispatchEvent(e.props.onOpen,t,e,void 0))},e.handleBodyMousemove=function(t){e.top=t.clientY,e.left=t.clientX},e.position=function(t){var n=p.getDomRect(e.state.targetElement);return{left:p.getLeftPosition(e.left,t.offsetWidth,n,e.props.anchorElement,e.props.position),top:p.getTopPosition(e.top,n,t.offsetHeight,e.props.anchorElement,e.props.position)}},e.getTitle=function(t){for(;t;){if(t.title||t.titleExpando)return t.title||t.titleExpando;t=e.props.parentTitle&&t.parentElement||null}return""},e.calloutClassName=function(){switch(e.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 e.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},e}return r(e,t),e.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},e.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeout),this.openTimeout=void 0,document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},e.prototype.render=function(){var t=this;if(this.props.children){var n=this.props,o=n.children,r=l(n,["children"]),s=null;return u.createElement("div",{onMouseOver:function(t){s&&s.handleMouseOver(t)},onMouseOut:function(t){s&&s.handleMouseOut(t)}},u.createElement(e,i({ref:function(t){return s=t}},r)),o)}return this.state.targetElement&&this.title&&document&&a.createPortal(u.createElement("div",{ref:function(e){if(e){var n=t.position(e);e.style.left=n.left+"px",e.style.top=n.top+"px"}},className:"k-animation-container k-animation-container-fixed k-animation-container-shown",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(e){e&&(e.className=t.calloutClassName(),"auto"===t.props.position&&(t.left<window.screen.availWidth/2?e.style.left="25%":e.style.left="75%"))}}))),document.body)},e.prototype.showToolTip=function(t){var e=this,n=t.target;clearTimeout(this.openTimeout),this.title=this.getTitle(t.target),this.title&&(n.titleExpando=n.titleExpando||n.title,n.title=""),this.props.openDelay?this.openTimeout=setTimeout(function(){e.setState({targetElement:n,open:!0})},this.props.openDelay):this.setState({targetElement:n,open:!0})},e.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},e.propTypes={anchorElement:s.oneOf(["pointer","target"]),content:s.func,filter:s.func,openDelay:s.number,position:s.oneOf(["right","left","top","bottom","auto"])},e.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},e}(u.PureComponent);e.Tooltip=f},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.getLeftPosition=function(t,e,n,o,r){switch(r){case"bottom":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;case"left":return"pointer"===o?t-e-10:n.left-e-10;case"right":return"pointer"===o?t+10:n.right+10;case"top":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;default:return"pointer"===o?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?n.left:n.right-e}},e.getTopPosition=function(t,e,n,o,r){switch(r){case"bottom":return"pointer"===o?t+10:e.bottom+10;case"left":case"right":return"pointer"===o?t-n/2:e.top-n/2+e.height/2;case"top":return"pointer"===o?t-n-10:e.top-n-10;default:return"pointer"===o?t<window.innerHeight/2?t+10:t-n-10:t<window.innerHeight/2?e.bottom+10:e.top-n-10}},e.getDomRect=function(t){return null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect()},e.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],e.isTooltipElement=function(t){if(null===t)return!1;for(var n=t;n;){if(null!==n&&"k-tooltip"===n.className)return!0;n=null!==n.parentNode&&n.parentNode}return e.toolTipSelectors.filter(function(e){return e===t.className}).length>0}},function(t,e,n){"use strict";n.r(e);var o,r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(t){return!0!==t&&!!t}).map(function(t){return Array.isArray(t)?r.apply(void 0,t):"object"==typeof t?Object.keys(t).map(function(e,n){return t[n]||t[e]&&e||null}).filter(function(t){return null!==t}).join(" "):t}).filter(function(t){return!!t}).join(" ")},i=function(){var t,e,n="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16);return n},l={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},u=function(){},a=function(){return function(){}}(),s=n(1),c=n(0),p=(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={focused:!1},e.handleFocus=function(t){e.setState({focused:!0})},e.handleBlur=function(t){e.setState({focused:!1})},e}return p(e,t),e.prototype.render=function(){var t=this.props,e=t.label,n=t.id,o=t.className,i=t.value,l=t.placeholder,u=t.valid,a=t.style,c=r({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(i||l),"k-state-invalid":!u&&void 0!==u},o);return s.createElement("span",{className:c,onFocus:this.handleFocus,onBlur:this.handleBlur,style:a},this.props.children,e?n?s.createElement("label",{htmlFor:n,className:"k-label"},e):s.createElement("span",{className:"k-label"},e):null)},e.propTypes={label:c.string,id:c.string,value:c.string,placeholder:c.string,valid:c.bool},e}(s.Component);function d(t,e,n,o){if(t){var r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:n};t.call(void 0,Object.assign(r,o))}}var h=function(){return"undefined"==typeof window};n.d(e,"classNames",function(){return r}),n.d(e,"guid",function(){return i}),n.d(e,"Keys",function(){return l}),n.d(e,"noop",function(){return u}),n.d(e,"FloatingLabel",function(){return f}),n.d(e,"FormComponent",function(){return a}),n.d(e,"dispatchEvent",function(){return d}),n.d(e,"isServerRendering",function(){return h})}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("prop-types"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","react-dom"],e):"object"==typeof exports?exports.KendoReactTooltip=e(require("react"),require("prop-types"),require("react-dom")):t.KendoReactTooltip=e(t.React,t.PropTypes,t.ReactDOM)}(window,function(t,e,n){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3);e.Tooltip=o.Tooltip},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},u=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&(n[o[r]]=t[o[r]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),l=n(4),a=n(1),c=n(6),p=n(5),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={targetElement:null,open:!1},e.title="",e.top=0,e.left=0,e.handleMouseOut=function(t){var n=document.elementFromPoint(t.clientX,t.clientY);p.isTooltipElement(n)||(c.dispatchEvent(e.props.onClose,t,e,void 0),e.setState({targetElement:null,open:!1}))},e.handleMouseOver=function(t){var n=t.target;e.isVisible(n)&&!p.isTooltipElement(n)&&n!==e.state.targetElement&&(e.showToolTip(t),c.dispatchEvent(e.props.onOpen,t,e,void 0))},e.handleBodyMousemove=function(t){e.top=t.clientY,e.left=t.clientX},e.position=function(t){var n=p.getDomRect(e.state.targetElement);return{left:p.getLeftPosition(e.left,t.offsetWidth,n,e.props.anchorElement,e.props.position),top:p.getTopPosition(e.top,n,t.offsetHeight,e.props.anchorElement,e.props.position)}},e.getTitle=function(t){for(;t;){if(t.title||t.titleExpando)return t.title||t.titleExpando;t=e.props.parentTitle&&t.parentElement||null}return""},e.calloutClassName=function(){switch(e.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 e.top<window.innerHeight/2?"k-callout k-callout-n":"k-callout k-callout-s"}},e}return r(e,t),e.prototype.componentDidMount=function(){document&&document.body.addEventListener("mousemove",this.handleBodyMousemove)},e.prototype.componentWillUnmount=function(){clearTimeout(this.openTimeout),this.openTimeout=void 0,document&&document.body.removeEventListener("mousemove",this.handleBodyMousemove)},e.prototype.render=function(){var t=this;if(this.props.children){var n=this.props,o=n.children,r=u(n,["children"]),a=null;return s.createElement("div",{onMouseOver:function(t){a&&a.handleMouseOver(t)},onMouseOut:function(t){a&&a.handleMouseOut(t)}},s.createElement(e,i({ref:function(t){return a=t}},r)),o)}return this.state.targetElement&&this.title&&document&&l.createPortal(s.createElement("div",{ref:function(e){if(e){var n=t.position(e);e.style.left=n.left+"px",e.style.top=n.top+"px"}},className:"k-animation-container k-animation-container-fixed k-animation-container-shown",tabIndex:0},s.createElement("div",{className:"k-tooltip",style:{position:"relative"}},s.createElement("div",{className:"k-tooltip-content"},this.props.content&&s.createElement(this.props.content,{title:this.title,target:this.state.targetElement})||this.title),this.props.showCallout&&s.createElement("div",{ref:function(e){e&&(e.className=t.calloutClassName(),"auto"===t.props.position&&(t.left<window.screen.availWidth/2?e.style.left="25%":e.style.left="75%"))}}))),document.body)},e.prototype.showToolTip=function(t){var e=this,n=t.target;clearTimeout(this.openTimeout),this.title=this.getTitle(t.target),this.title&&(n.titleExpando=n.titleExpando||n.title,n.title=""),this.props.openDelay?this.openTimeout=setTimeout(function(){e.setState({targetElement:n,open:!0})},this.props.openDelay):this.setState({targetElement:n,open:!0})},e.prototype.isVisible=function(t){return!this.props.filter||this.props.filter(t)},e.propTypes={anchorElement:a.oneOf(["pointer","target"]),content:a.func,filter:a.func,openDelay:a.number,position:a.oneOf(["right","left","top","bottom","auto"])},e.defaultProps={anchorElement:"pointer",openDelay:400,position:"auto",showCallout:!0,parentTitle:!1},e}(s.PureComponent);e.Tooltip=f},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.getLeftPosition=function(t,e,n,o,r){switch(r){case"bottom":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;case"left":return"pointer"===o?t-e-10:n.left-e-10;case"right":return"pointer"===o?t+10:n.right+10;case"top":return"pointer"===o?t-e/2:n.left-e/2+n.width/2;default:return"pointer"===o?t<window.screen.availWidth/2?t-10:t-e+10:t<window.screen.availWidth/2?n.left:n.right-e}},e.getTopPosition=function(t,e,n,o,r){switch(r){case"bottom":return"pointer"===o?t+10:e.bottom+10;case"left":case"right":return"pointer"===o?t-n/2:e.top-n/2+e.height/2;case"top":return"pointer"===o?t-n-10:e.top-n-10;default:return"pointer"===o?t<window.innerHeight/2?t+10:t-n-10:t<window.innerHeight/2?e.bottom+10:e.top-n-10}},e.getDomRect=function(t){return null!==t?t.getBoundingClientRect():document.body.getBoundingClientRect()},e.toolTipSelectors=["k-tooltip-content","k-animation-container","k-tooltip","k-tooltip-title","k-tooltip k-tooltip-closable","k-icon k-i-close"],e.isTooltipElement=function(t){if(null===t)return!1;for(var n=t;n;){if(null!==n&&"k-tooltip"===n.className)return!0;n=null!==n.parentNode&&n.parentNode}return e.toolTipSelectors.filter(function(e){return e===t.className}).length>0}},function(t,e,n){"use strict";n.r(e);var o,r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(t){return!0!==t&&!!t}).map(function(t){return Array.isArray(t)?r.apply(void 0,t):"object"==typeof t?Object.keys(t).map(function(e,n){return t[n]||t[e]&&e||null}).filter(function(t){return null!==t}).join(" "):t}).filter(function(t){return!!t}).join(" ")},i=function(){var t,e,n="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(n+="-"),n+=(12===t?4:16===t?3&e|8:e).toString(16);return n},u={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},s=function(){},l=function(){return function(){}}(),a=n(0),c=n(1),p=(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={focused:!1},e.handleFocus=function(t){e.setState({focused:!0})},e.handleBlur=function(t){e.setState({focused:!1})},e}return p(e,t),e.prototype.render=function(){var t=this.props,e=t.label,n=t.id,o=t.className,i=t.value,u=t.placeholder,s=t.valid,l=t.style,c=r({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(i||u),"k-state-invalid":!s&&void 0!==s},o);return a.createElement("span",{className:c,onFocus:this.handleFocus,onBlur:this.handleBlur,style:l},this.props.children,e?n?a.createElement("label",{htmlFor:n,className:"k-label"},e):a.createElement("span",{className:"k-label"},e):null)},e.propTypes={label:c.string,id:c.string,value:c.string,placeholder:c.string,valid:c.bool},e}(a.Component);function d(t,e,n,o){if(t){var r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:n};t.call(void 0,Object.assign(r,o))}}var h=function(){return"undefined"==typeof window},m=function(t,e){return function(n){return e(t(n))}},v=function(t,e,n){return t.addEventListener&&t.addEventListener(e,n)},y=function(t,e,n){return t.removeEventListener&&t.removeEventListener(e,n)},_=function(){},g=function(t){return t.preventDefault()},b=/touch/;function w(t){return t.type.match(b)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,type:t.type,originalEvent:t,isTouch:!0}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,originalEvent:t}}var O=function(t){var e=this,n=t.press;void 0===n&&(n=_);var o=t.drag;void 0===o&&(o=_);var r=t.release;void 0===r&&(r=_);var i=t.mouseOnly;void 0===i&&(i=!1),this._pressHandler=m(w,n),this._dragHandler=m(w,o),this._releaseHandler=m(w,r),this._ignoreMouse=!1,this._mouseOnly=i,this._touchAction,this._touchstart=function(t){1===t.touches.length&&e._pressHandler(t)},this._touchmove=function(t){1===t.touches.length&&e._dragHandler(t)},this._touchend=function(t){0===t.touches.length&&1===t.changedTouches.length&&(e._releaseHandler(t),e._ignoreMouse=!0,setTimeout(e._restoreMouse,2e3))},this._restoreMouse=function(){e._ignoreMouse=!1},this._mousedown=function(t){var n=t.which;n&&n>1||e._ignoreMouse||(v(document,"mousemove",e._mousemove),v(document,"mouseup",e._mouseup),e._pressHandler(t))},this._mousemove=function(t){e._dragHandler(t)},this._mouseup=function(t){y(document,"mousemove",e._mousemove),y(document,"mouseup",e._mouseup),e._releaseHandler(t)},this._pointerdown=function(t){t.isPrimary&&0===t.button&&(v(e._element,"pointermove",e._pointermove),v(e._element,"pointerup",e._pointerup),v(e._element,"contextmenu",g),e._touchAction=t.target.style.touchAction,t.target.style.touchAction="none",t.target.setPointerCapture(t.pointerId),e._pressHandler(t))},this._pointermove=function(t){t.isPrimary&&e._dragHandler(t)},this._pointerup=function(t){t.isPrimary&&(y(e._element,"pointermove",e._pointermove),y(e._element,"pointerup",e._pointerup),y(e._element,"contextmenu",g),t.target.style.touchAction=e._touchAction,t.target.releasePointerCapture(t.pointerId),e._releaseHandler(t))}};O.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},O.prototype.bindTo=function(t){t!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=t,this._bindToCurrent())},O.prototype._bindToCurrent=function(){var t=this._element;this._usePointers()?v(t,"pointerdown",this._pointerdown):(v(t,"mousedown",this._mousedown),this._mouseOnly||(v(t,"touchstart",this._touchstart),v(t,"touchmove",this._touchmove),v(t,"touchend",this._touchend)))},O.prototype._unbindFromCurrent=function(){var t=this._element;if(this._usePointers())return y(t,"pointerdown",this._pointerdown),y(t,"pointermove",this._pointermove),void y(t,"pointerup",this._pointerup);y(t,"mousedown",this._mousedown),this._mouseOnly||(y(t,"touchstart",this._touchstart),y(t,"touchmove",this._touchmove),y(t,"touchend",this._touchend))},O.prototype._usePointers=function(){return!this._mouseOnly&&O.supportPointerEvent()},O.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},O.default=O;var E=O,T=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.element=null,e.draggable=new E({press:function(t){e.element&&e.props.onPress&&e.props.onPress.call(void 0,{target:e,event:t,element:e.element})},drag:function(t){e.element&&e.props.onDrag&&e.props.onDrag.call(void 0,{target:e,event:t,element:e.element})},release:function(t){e.element&&e.props.onRelease&&e.props.onRelease.call(void 0,{target:e,event:t})}}),e}return T(e,t),e.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},e.prototype.componentWillUnmount=function(){this.draggable.destroy()},e.prototype.render=function(){var t=this;return a.cloneElement(a.Children.only(this.props.children),{ref:function(e){return t.element=e}})},e.propTypes={children:c.element.isRequired},e}(a.PureComponent);n.d(e,"classNames",function(){return r}),n.d(e,"guid",function(){return i}),n.d(e,"Keys",function(){return u}),n.d(e,"noop",function(){return s}),n.d(e,"FloatingLabel",function(){return f}),n.d(e,"FormComponent",function(){return l}),n.d(e,"dispatchEvent",function(){return d}),n.d(e,"isServerRendering",function(){return h}),n.d(e,"Draggable",function(){return P})}])}); |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-react-tooltip",["react","@progress/kendo-react-common","react-dom","prop-types"],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),c=o(4),p=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)||(p.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),p.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",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:c.oneOf(["pointer","target"]),content:c.func,filter:c.func,openDelay:c.number,position:c.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=i},function(t,e){t.exports=l},function(t,e){t.exports=n},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","react-dom","@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),c=o(4),p=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)||(p.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),p.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",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:c.oneOf(["pointer","target"]),content:c.func,filter:c.func,openDelay:c.number,position:c.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=i},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,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.7.0-dev.201902260733", | ||
"version": "2.7.0-dev.201902261330", | ||
"description": "KendoReact Tooltip package", | ||
@@ -26,7 +26,7 @@ "repository": { | ||
"peerDependencies": { | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0" | ||
"react": "^16.8.2", | ||
"react-dom": "^16.8.2" | ||
}, | ||
"dependencies": { | ||
"@progress/kendo-react-common": "2.7.0-dev.201902260733", | ||
"@progress/kendo-react-common": "2.7.0-dev.201902261330", | ||
"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
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
76947
+ Added@progress/kendo-react-common@2.7.0-dev.201902261330(transitive)
+ Added@telerik/kendo-draggable@1.9.0(transitive)
- Removed@progress/kendo-react-common@2.7.0-dev.201902260733(transitive)