@data-ui/shared
Advanced tools
Comparing version 0.0.76 to 0.0.77
function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}import React from"react";import PropTypes from"prop-types";import localPoint from"@vx/event/build/localPoint";import withTooltip from"@vx/tooltip/build/enhancers/withTooltip";import TooltipWithBounds,{withTooltipPropTypes as vxTooltipPropTypes}from"@vx/tooltip/build/tooltips/TooltipWithBounds";export{default as Tooltip}from"@vx/tooltip/build/tooltips/Tooltip";export var withTooltipPropTypes={onMouseMove:PropTypes.func,// expects to be called like func({ event, datum }) | ||
onMouseLeave:PropTypes.func,// expects to be called like func({ event, datum }) | ||
tooltipData:PropTypes.any};export var propTypes=_extends({},vxTooltipPropTypes,{children:PropTypes.oneOfType([PropTypes.object,PropTypes.func]).isRequired,className:PropTypes.string,HoverStyles:PropTypes.oneOfType([PropTypes.object,PropTypes.func]),renderTooltip:PropTypes.func,styles:PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),TooltipComponent:PropTypes.oneOfType([PropTypes.object,PropTypes.func]),tooltipProps:PropTypes.object,// eslint-disable-line react/forbid-prop-types | ||
tooltipTimeout:PropTypes.number});var defaultProps={className:null,HoverStyles:function a(){return React.createElement("style",{type:"text/css"},"\n .vx-arc:hover,\n .vx-bar:hover,\n .vx-glyph-dot:hover {\n opacity: 0.7;\n }\n ")},renderTooltip:null,styles:{display:"inline-block",position:"relative"},TooltipComponent:TooltipWithBounds,tooltipProps:null,tooltipTimeout:200},WithTooltip=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,c.handleMouseMove=c.handleMouseMove.bind(_assertThisInitialized(_assertThisInitialized(c))),c.handleMouseLeave=c.handleMouseLeave.bind(_assertThisInitialized(_assertThisInitialized(c))),c.tooltipTimeout=null,c}_inheritsLoose(b,a);var c=b.prototype;return c.componentWillUnmount=function a(){this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)},c.handleMouseMove=function h(a){var b=a.event,c=a.datum,d=a.coords,e=_objectWithoutPropertiesLoose(a,["event","datum","coords"]),f=this.props.showTooltip;this.tooltipTimeout&&clearTimeout(this.tooltipTimeout);var g={x:0,y:0};b&&b.target&&b.target.ownerSVGElement&&(g=localPoint(b.target.ownerSVGElement,b)),g=_extends({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:_extends({event:b,datum:c},e)})},c.handleMouseLeave=function d(){var a=this.props,b=a.tooltipTimeout,c=a.hideTooltip;this.tooltipTimeout=setTimeout(function(){c()},b)},c.render=function o(){var a=this.props,b=a.children,c=a.className,d=a.HoverStyles,e=a.tooltipData,f=a.tooltipOpen,g=a.tooltipLeft,h=a.tooltipTop,i=a.tooltipProps,j=a.renderTooltip,k=a.styles,l=a.TooltipComponent,m={onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,tooltipData:e},n=j&&f&&l&&j(e);return React.createElement("div",{style:k,className:c},"function"==typeof b?b(m):React.cloneElement(React.Children.only(b),m),!!n&&React.createElement(l,_extends({key:Math.random(),top:h,left:g},i),n),d&&React.createElement(d,null))},b}(React.PureComponent);WithTooltip.propTypes=propTypes,WithTooltip.defaultProps=defaultProps;export default withTooltip(WithTooltip); | ||
tooltipTimeout:PropTypes.number});var defaultProps={className:null,HoverStyles:function a(){return React.createElement("style",{type:"text/css"},"\n .vx-arc:hover,\n .vx-bar:hover,\n .vx-glyph-dot:hover {\n opacity: 0.7;\n }\n ")},renderTooltip:null,styles:{display:"inline-block",position:"relative"},TooltipComponent:TooltipWithBounds,tooltipProps:null,tooltipTimeout:200},WithTooltip=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,c.handleMouseMove=c.handleMouseMove.bind(_assertThisInitialized(_assertThisInitialized(c))),c.handleMouseLeave=c.handleMouseLeave.bind(_assertThisInitialized(_assertThisInitialized(c))),c.tooltipTimeout=null,c}_inheritsLoose(b,a);var c=b.prototype;return c.componentWillUnmount=function a(){this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)},c.handleMouseMove=function h(a){var b=a.event,c=a.datum,d=a.coords,e=_objectWithoutPropertiesLoose(a,["event","datum","coords"]),f=this.props.showTooltip;this.tooltipTimeout&&clearTimeout(this.tooltipTimeout);var g={x:0,y:0};b&&b.target&&"focus"!==b.type&&b.target.ownerSVGElement&&(g=localPoint(b.target.ownerSVGElement,b)),g=_extends({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:_extends({event:b,datum:c},e)})},c.handleMouseLeave=function d(){var a=this.props,b=a.tooltipTimeout,c=a.hideTooltip;this.tooltipTimeout=setTimeout(function(){c()},b)},c.render=function o(){var a=this.props,b=a.children,c=a.className,d=a.HoverStyles,e=a.tooltipData,f=a.tooltipOpen,g=a.tooltipLeft,h=a.tooltipTop,i=a.tooltipProps,j=a.renderTooltip,k=a.styles,l=a.TooltipComponent,m={onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,tooltipData:e},n=j&&f&&l&&j(e);return React.createElement("div",{style:k,className:c},"function"==typeof b?b(m):React.cloneElement(React.Children.only(b),m),!!n&&React.createElement(l,_extends({key:Math.random(),top:h,left:g},i),n),d&&React.createElement(d,null))},b}(React.PureComponent);WithTooltip.propTypes=propTypes,WithTooltip.defaultProps=defaultProps;export default withTooltip(WithTooltip); |
"use strict";exports.__esModule=!0,exports.default=exports.propTypes=exports.withTooltipPropTypes=exports.Tooltip=void 0;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_localPoint=_interopRequireDefault(require("@vx/event/build/localPoint")),_withTooltip=_interopRequireDefault(require("@vx/tooltip/build/enhancers/withTooltip")),_TooltipWithBounds=_interopRequireWildcard(require("@vx/tooltip/build/tooltips/TooltipWithBounds")),_Tooltip=_interopRequireDefault(require("@vx/tooltip/build/tooltips/Tooltip"));exports.Tooltip=_Tooltip.default;function _interopRequireWildcard(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};d.get||d.set?Object.defineProperty(b,c,d):b[c]=a[c]}return b.default=a,b}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var withTooltipPropTypes={onMouseMove:_propTypes.default.func,// expects to be called like func({ event, datum }) | ||
onMouseLeave:_propTypes.default.func,// expects to be called like func({ event, datum }) | ||
tooltipData:_propTypes.default.any};exports.withTooltipPropTypes=withTooltipPropTypes;var propTypes=_extends({},_TooltipWithBounds.withTooltipPropTypes,{children:_propTypes.default.oneOfType([_propTypes.default.object,_propTypes.default.func]).isRequired,className:_propTypes.default.string,HoverStyles:_propTypes.default.oneOfType([_propTypes.default.object,_propTypes.default.func]),renderTooltip:_propTypes.default.func,styles:_propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.number])),TooltipComponent:_propTypes.default.oneOfType([_propTypes.default.object,_propTypes.default.func]),tooltipProps:_propTypes.default.object,// eslint-disable-line react/forbid-prop-types | ||
tooltipTimeout:_propTypes.default.number});exports.propTypes=propTypes;var defaultProps={className:null,HoverStyles:function a(){return _react.default.createElement("style",{type:"text/css"},"\n .vx-arc:hover,\n .vx-bar:hover,\n .vx-glyph-dot:hover {\n opacity: 0.7;\n }\n ")},renderTooltip:null,styles:{display:"inline-block",position:"relative"},TooltipComponent:_TooltipWithBounds.default,tooltipProps:null,tooltipTimeout:200},WithTooltip=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,c.handleMouseMove=c.handleMouseMove.bind(_assertThisInitialized(_assertThisInitialized(c))),c.handleMouseLeave=c.handleMouseLeave.bind(_assertThisInitialized(_assertThisInitialized(c))),c.tooltipTimeout=null,c}_inheritsLoose(b,a);var c=b.prototype;return c.componentWillUnmount=function a(){this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)},c.handleMouseMove=function h(a){var b=a.event,c=a.datum,d=a.coords,e=_objectWithoutPropertiesLoose(a,["event","datum","coords"]),f=this.props.showTooltip;this.tooltipTimeout&&clearTimeout(this.tooltipTimeout);var g={x:0,y:0};b&&b.target&&b.target.ownerSVGElement&&(g=(0,_localPoint.default)(b.target.ownerSVGElement,b)),g=_extends({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:_extends({event:b,datum:c},e)})},c.handleMouseLeave=function d(){var a=this.props,b=a.tooltipTimeout,c=a.hideTooltip;this.tooltipTimeout=setTimeout(function(){c()},b)},c.render=function o(){var a=this.props,b=a.children,c=a.className,d=a.HoverStyles,e=a.tooltipData,f=a.tooltipOpen,g=a.tooltipLeft,h=a.tooltipTop,i=a.tooltipProps,j=a.renderTooltip,k=a.styles,l=a.TooltipComponent,m={onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,tooltipData:e},n=j&&f&&l&&j(e);return _react.default.createElement("div",{style:k,className:c},"function"==typeof b?b(m):_react.default.cloneElement(_react.default.Children.only(b),m),!!n&&_react.default.createElement(l,_extends({key:Math.random(),top:h,left:g},i),n),d&&_react.default.createElement(d,null))},b}(_react.default.PureComponent);WithTooltip.propTypes=propTypes,WithTooltip.defaultProps=defaultProps;var _default=(0,_withTooltip.default)(WithTooltip);exports.default=_default; | ||
tooltipTimeout:_propTypes.default.number});exports.propTypes=propTypes;var defaultProps={className:null,HoverStyles:function a(){return _react.default.createElement("style",{type:"text/css"},"\n .vx-arc:hover,\n .vx-bar:hover,\n .vx-glyph-dot:hover {\n opacity: 0.7;\n }\n ")},renderTooltip:null,styles:{display:"inline-block",position:"relative"},TooltipComponent:_TooltipWithBounds.default,tooltipProps:null,tooltipTimeout:200},WithTooltip=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,c.handleMouseMove=c.handleMouseMove.bind(_assertThisInitialized(_assertThisInitialized(c))),c.handleMouseLeave=c.handleMouseLeave.bind(_assertThisInitialized(_assertThisInitialized(c))),c.tooltipTimeout=null,c}_inheritsLoose(b,a);var c=b.prototype;return c.componentWillUnmount=function a(){this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)},c.handleMouseMove=function h(a){var b=a.event,c=a.datum,d=a.coords,e=_objectWithoutPropertiesLoose(a,["event","datum","coords"]),f=this.props.showTooltip;this.tooltipTimeout&&clearTimeout(this.tooltipTimeout);var g={x:0,y:0};b&&b.target&&"focus"!==b.type&&b.target.ownerSVGElement&&(g=(0,_localPoint.default)(b.target.ownerSVGElement,b)),g=_extends({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:_extends({event:b,datum:c},e)})},c.handleMouseLeave=function d(){var a=this.props,b=a.tooltipTimeout,c=a.hideTooltip;this.tooltipTimeout=setTimeout(function(){c()},b)},c.render=function o(){var a=this.props,b=a.children,c=a.className,d=a.HoverStyles,e=a.tooltipData,f=a.tooltipOpen,g=a.tooltipLeft,h=a.tooltipTop,i=a.tooltipProps,j=a.renderTooltip,k=a.styles,l=a.TooltipComponent,m={onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,tooltipData:e},n=j&&f&&l&&j(e);return _react.default.createElement("div",{style:k,className:c},"function"==typeof b?b(m):_react.default.cloneElement(_react.default.Children.only(b),m),!!n&&_react.default.createElement(l,_extends({key:Math.random(),top:h,left:g},i),n),d&&_react.default.createElement(d,null))},b}(_react.default.PureComponent);WithTooltip.propTypes=propTypes,WithTooltip.defaultProps=defaultProps;var _default=(0,_withTooltip.default)(WithTooltip);exports.default=_default; |
{ | ||
"name": "@data-ui/shared", | ||
"version": "0.0.76", | ||
"version": "0.0.77", | ||
"description": "Shared @data-ui components used across multiple packages", | ||
@@ -52,3 +52,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@data-ui/theme": "^0.0.76", | ||
"@data-ui/theme": "^0.0.77", | ||
"@vx/event": "^0.0.165", | ||
@@ -81,3 +81,3 @@ "@vx/group": "^0.0.165", | ||
}, | ||
"gitHead": "9080d40ec61cfe5aee5a03e629dd9dd32144ab81" | ||
"gitHead": "a546784396e0502422332d53114cedad37ae9fb3" | ||
} |
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
15887
+ Added@data-ui/theme@0.0.77(transitive)
- Removed@data-ui/theme@0.0.76(transitive)
Updated@data-ui/theme@^0.0.77