@data-ui/shared
Advanced tools
Comparing version 0.0.69 to 0.0.70
@@ -1,1 +0,2 @@ | ||
import _Object$getPrototypeOf from'babel-runtime/core-js/object/get-prototype-of';import _classCallCheck from'babel-runtime/helpers/classCallCheck';import _createClass from'babel-runtime/helpers/createClass';import _possibleConstructorReturn from'babel-runtime/helpers/possibleConstructorReturn';import _inherits from'babel-runtime/helpers/inherits';import React from'react';import PropTypes from'prop-types';var propTypes={children:PropTypes.node,onFocus:PropTypes.func,onBlur:PropTypes.func},defaultProps={children:null,onFocus:null,onBlur:null},FocusBlurHandler=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||_Object$getPrototypeOf(b)).call(this,a));return c.handleOnClick=c.handleOnClick.bind(c),c}return _inherits(b,a),_createClass(b,[{key:'handleOnClick',value:function handleOnClick(a){a.preventDefault()}},{key:'render',value:function render(){var a=this.props,b=a.children,c=a.onFocus,d=a.onBlur;return React.createElement('a',{xlinkHref:(d||c)&&'#',role:'presentation',onBlur:d,onFocus:c,onClick:this.handleOnClick},b)}}]),b}(React.PureComponent);export default FocusBlurHandler;FocusBlurHandler.propTypes=propTypes,FocusBlurHandler.defaultProps=defaultProps,FocusBlurHandler.displayName='FocusBlurHandler'; | ||
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}import React from"react";import PropTypes from"prop-types";var propTypes={children:PropTypes.node,onFocus:PropTypes.func,onBlur:PropTypes.func},defaultProps={children:null,onFocus:null,onBlur:null},FocusBlurHandler=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,c.handleOnClick=c.handleOnClick.bind(_assertThisInitialized(_assertThisInitialized(c))),c}_inheritsLoose(b,a);var c=b.prototype;return c.handleOnClick=function b(a){a.preventDefault()},c.render=function e(){var a=this.props,b=a.children,c=a.onFocus,d=a.onBlur;return React.createElement("a",{// eslint-disable-line jsx-a11y/no-static-element-interactions, jsx-a11y/anchor-is-valid | ||
xlinkHref:(d||c)&&"#",role:"presentation",onBlur:d,onFocus:c,onClick:this.handleOnClick},b)},b}(React.PureComponent);export{FocusBlurHandler as default};FocusBlurHandler.propTypes=propTypes,FocusBlurHandler.defaultProps=defaultProps,FocusBlurHandler.displayName="FocusBlurHandler"; |
@@ -1,1 +0,4 @@ | ||
import _objectWithoutProperties from'babel-runtime/helpers/objectWithoutProperties';import _Object$getPrototypeOf from'babel-runtime/core-js/object/get-prototype-of';import _classCallCheck from'babel-runtime/helpers/classCallCheck';import _createClass from'babel-runtime/helpers/createClass';import _possibleConstructorReturn from'babel-runtime/helpers/possibleConstructorReturn';import _inherits from'babel-runtime/helpers/inherits';import _extends from'babel-runtime/helpers/extends';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,onMouseLeave:PropTypes.func,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});var defaultProps={className:null,HoverStyles:function HoverStyles(){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=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||_Object$getPrototypeOf(b)).call(this,a));return c.handleMouseMove=c.handleMouseMove.bind(c),c.handleMouseLeave=c.handleMouseLeave.bind(c),c.tooltipTimeout=null,c}return _inherits(b,a),_createClass(b,[{key:'componentWillUnmount',value:function componentWillUnmount(){this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)}},{key:'handleMouseMove',value:function handleMouseMove(a){var b=a.event,c=a.datum,d=a.coords,e=_objectWithoutProperties(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)})}},{key:'handleMouseLeave',value:function handleMouseLeave(){var a=this.props,b=a.tooltipTimeout,c=a.hideTooltip;this.tooltipTimeout=setTimeout(function(){c()},b)}},{key:'render',value:function render(){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); | ||
import"core-js/modules/web.dom.iterable";import"core-js/modules/es6.array.iterator";import"core-js/modules/es6.object.keys";import"core-js/modules/es6.object.assign";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)}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}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=Object.assign({},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 | ||
});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=Object.assign({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:Object.assign({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); |
@@ -1,1 +0,1 @@ | ||
export{default as FocusBlurHandler}from'./components/FocusBlurHandler';export{default as WithTooltip,withTooltipPropTypes}from'./enhancer/WithTooltip';export{default as Tooltip}from'@vx/tooltip/build/tooltips/Tooltip'; | ||
export{default as FocusBlurHandler}from"./components/FocusBlurHandler";export{default as WithTooltip,withTooltipPropTypes}from"./enhancer/WithTooltip";export{default as Tooltip}from"@vx/tooltip/build/tooltips/Tooltip"; |
@@ -1,1 +0,2 @@ | ||
'use strict';var _getPrototypeOf=require('babel-runtime/core-js/object/get-prototype-of'),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_classCallCheck2=require('babel-runtime/helpers/classCallCheck'),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require('babel-runtime/helpers/createClass'),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require('babel-runtime/helpers/possibleConstructorReturn'),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=require('babel-runtime/helpers/inherits'),_inherits3=_interopRequireDefault(_inherits2),_react=require('react'),_react2=_interopRequireDefault(_react),_propTypes=require('prop-types'),_propTypes2=_interopRequireDefault(_propTypes);Object.defineProperty(exports,'__esModule',{value:!0});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var propTypes={children:_propTypes2.default.node,onFocus:_propTypes2.default.func,onBlur:_propTypes2.default.func},defaultProps={children:null,onFocus:null,onBlur:null},FocusBlurHandler=function(a){function b(a){(0,_classCallCheck3.default)(this,b);var c=(0,_possibleConstructorReturn3.default)(this,(b.__proto__||(0,_getPrototypeOf2.default)(b)).call(this,a));return c.handleOnClick=c.handleOnClick.bind(c),c}return(0,_inherits3.default)(b,a),(0,_createClass3.default)(b,[{key:'handleOnClick',value:function handleOnClick(a){a.preventDefault()}},{key:'render',value:function render(){var a=this.props,b=a.children,c=a.onFocus,d=a.onBlur;return _react2.default.createElement('a',{xlinkHref:(d||c)&&'#',role:'presentation',onBlur:d,onFocus:c,onClick:this.handleOnClick},b)}}]),b}(_react2.default.PureComponent);exports.default=FocusBlurHandler,FocusBlurHandler.propTypes=propTypes,FocusBlurHandler.defaultProps=defaultProps,FocusBlurHandler.displayName='FocusBlurHandler'; | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}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}var propTypes={children:_propTypes.default.node,onFocus:_propTypes.default.func,onBlur:_propTypes.default.func},defaultProps={children:null,onFocus:null,onBlur:null},FocusBlurHandler=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,c.handleOnClick=c.handleOnClick.bind(_assertThisInitialized(_assertThisInitialized(c))),c}_inheritsLoose(b,a);var c=b.prototype;return c.handleOnClick=function b(a){a.preventDefault()},c.render=function e(){var a=this.props,b=a.children,c=a.onFocus,d=a.onBlur;return _react.default.createElement("a",{// eslint-disable-line jsx-a11y/no-static-element-interactions, jsx-a11y/anchor-is-valid | ||
xlinkHref:(d||c)&&"#",role:"presentation",onBlur:d,onFocus:c,onClick:this.handleOnClick},b)},b}(_react.default.PureComponent);exports.default=FocusBlurHandler,FocusBlurHandler.propTypes=propTypes,FocusBlurHandler.defaultProps=defaultProps,FocusBlurHandler.displayName="FocusBlurHandler"; |
@@ -1,1 +0,4 @@ | ||
'use strict';var _objectWithoutProperties2=require('babel-runtime/helpers/objectWithoutProperties'),_objectWithoutProperties3=_interopRequireDefault(_objectWithoutProperties2),_getPrototypeOf=require('babel-runtime/core-js/object/get-prototype-of'),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_classCallCheck2=require('babel-runtime/helpers/classCallCheck'),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require('babel-runtime/helpers/createClass'),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require('babel-runtime/helpers/possibleConstructorReturn'),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=require('babel-runtime/helpers/inherits'),_inherits3=_interopRequireDefault(_inherits2),_extends2=require('babel-runtime/helpers/extends'),_extends3=_interopRequireDefault(_extends2),_Tooltip=require('@vx/tooltip/build/tooltips/Tooltip');Object.defineProperty(exports,'__esModule',{value:!0}),exports.propTypes=exports.withTooltipPropTypes=exports.Tooltip=void 0;Object.defineProperty(exports,'Tooltip',{enumerable:!0,get:function get(){return _interopRequireDefault(_Tooltip).default}});var _react=require('react'),_react2=_interopRequireDefault(_react),_propTypes=require('prop-types'),_propTypes2=_interopRequireDefault(_propTypes),_localPoint=require('@vx/event/build/localPoint'),_localPoint2=_interopRequireDefault(_localPoint),_withTooltip=require('@vx/tooltip/build/enhancers/withTooltip'),_withTooltip2=_interopRequireDefault(_withTooltip),_TooltipWithBounds=require('@vx/tooltip/build/tooltips/TooltipWithBounds'),_TooltipWithBounds2=_interopRequireDefault(_TooltipWithBounds);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var withTooltipPropTypes=exports.withTooltipPropTypes={onMouseMove:_propTypes2.default.func,onMouseLeave:_propTypes2.default.func,tooltipData:_propTypes2.default.any},propTypes=exports.propTypes=(0,_extends3.default)({},_TooltipWithBounds.withTooltipPropTypes,{children:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.func]).isRequired,className:_propTypes2.default.string,HoverStyles:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.func]),renderTooltip:_propTypes2.default.func,styles:_propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.string,_propTypes2.default.number])),TooltipComponent:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.func]),tooltipProps:_propTypes2.default.object}),defaultProps={className:null,HoverStyles:function HoverStyles(){return _react2.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:_TooltipWithBounds2.default,tooltipProps:null,tooltipTimeout:200},WithTooltip=function(a){function b(a){(0,_classCallCheck3.default)(this,b);var c=(0,_possibleConstructorReturn3.default)(this,(b.__proto__||(0,_getPrototypeOf2.default)(b)).call(this,a));return c.handleMouseMove=c.handleMouseMove.bind(c),c.handleMouseLeave=c.handleMouseLeave.bind(c),c.tooltipTimeout=null,c}return(0,_inherits3.default)(b,a),(0,_createClass3.default)(b,[{key:'componentWillUnmount',value:function componentWillUnmount(){this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)}},{key:'handleMouseMove',value:function handleMouseMove(a){var b=a.event,c=a.datum,d=a.coords,e=(0,_objectWithoutProperties3.default)(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,_localPoint2.default)(b.target.ownerSVGElement,b)),g=(0,_extends3.default)({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:(0,_extends3.default)({event:b,datum:c},e)})}},{key:'handleMouseLeave',value:function handleMouseLeave(){var a=this.props,b=a.tooltipTimeout,c=a.hideTooltip;this.tooltipTimeout=setTimeout(function(){c()},b)}},{key:'render',value:function render(){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 _react2.default.createElement('div',{style:k,className:c},'function'==typeof b?b(m):_react2.default.cloneElement(_react2.default.Children.only(b),m),!!n&&_react2.default.createElement(l,(0,_extends3.default)({key:Math.random(),top:h,left:g},i),n),d&&_react2.default.createElement(d,null))}}]),b}(_react2.default.PureComponent);WithTooltip.propTypes=propTypes,WithTooltip.defaultProps=defaultProps,exports.default=(0,_withTooltip2.default)(WithTooltip); | ||
"use strict";exports.__esModule=!0,exports.default=exports.propTypes=exports.withTooltipPropTypes=exports.Tooltip=void 0,require("core-js/modules/web.dom.iterable"),require("core-js/modules/es6.array.iterator"),require("core-js/modules/es6.object.keys"),require("core-js/modules/es6.object.assign");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 _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)}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}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=Object.assign({},_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 | ||
});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=Object.assign({},g,d),f({tooltipLeft:g.x,tooltipTop:g.y,tooltipData:Object.assign({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; |
@@ -1,1 +0,1 @@ | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:!0});var _FocusBlurHandler=require('./components/FocusBlurHandler');Object.defineProperty(exports,'FocusBlurHandler',{enumerable:!0,get:function get(){return _interopRequireDefault(_FocusBlurHandler).default}});var _WithTooltip=require('./enhancer/WithTooltip');Object.defineProperty(exports,'WithTooltip',{enumerable:!0,get:function get(){return _interopRequireDefault(_WithTooltip).default}}),Object.defineProperty(exports,'withTooltipPropTypes',{enumerable:!0,get:function get(){return _WithTooltip.withTooltipPropTypes}});var _Tooltip=require('@vx/tooltip/build/tooltips/Tooltip');Object.defineProperty(exports,'Tooltip',{enumerable:!0,get:function get(){return _interopRequireDefault(_Tooltip).default}});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}} | ||
"use strict";var _FocusBlurHandler=_interopRequireDefault(require("./components/FocusBlurHandler"));var _WithTooltip=_interopRequireWildcard(require("./enhancer/WithTooltip"));var _Tooltip=_interopRequireDefault(require("@vx/tooltip/build/tooltips/Tooltip"));exports.__esModule=!0,exports.withTooltipPropTypes=exports.Tooltip=exports.WithTooltip=exports.FocusBlurHandler=void 0;exports.FocusBlurHandler=_FocusBlurHandler.default;exports.WithTooltip=_WithTooltip.default,exports.withTooltipPropTypes=_WithTooltip.withTooltipPropTypes;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}} |
{ | ||
"name": "@data-ui/shared", | ||
"version": "0.0.69", | ||
"version": "0.0.70", | ||
"description": "Shared @data-ui components used across multiple packages", | ||
@@ -15,10 +15,9 @@ "sideEffects": false, | ||
"build:esm": "beemo babel ./src --out-dir esm/ --react --esm --minify", | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build": "yarn run build:cjs && yarn run build:esm", | ||
"jest": "beemo jest --react --color --coverage", | ||
"eslint": "beemo eslint \"./{src,test}/**/*.{js,jsx,json,md}\"", | ||
"lint": "npm run prettier && npm run eslint", | ||
"test": "npm run jest", | ||
"eslint": "beemo eslint \"./{src,test}/**/*.{js,jsx,json,md}\" --fix", | ||
"lint": "beemo create-config prettier && yarn run eslint", | ||
"test": "yarn run jest", | ||
"prettier": "beemo prettier \"./{src,test}/**/*.{js,jsx,json,md}\"", | ||
"sync:gitignore": "beemo sync-dotfiles --filter=gitignore", | ||
"prepublish": "npm run build" | ||
"prepublish": "yarn run build" | ||
}, | ||
@@ -45,3 +44,3 @@ "repository": { | ||
"devDependencies": { | ||
"@data-ui/build-config": "^0.0.12", | ||
"@data-ui/build-config": "^0.0.28", | ||
"react": "^16.0.0", | ||
@@ -55,3 +54,4 @@ "react-dom": "^16.0.0" | ||
"dependencies": { | ||
"@data-ui/theme": "^0.0.69", | ||
"@babel/runtime": "^7.1.5", | ||
"@data-ui/theme": "^0.0.70", | ||
"@vx/event": "^0.0.165", | ||
@@ -61,3 +61,2 @@ "@vx/group": "^0.0.165", | ||
"@vx/tooltip": "0.0.165", | ||
"babel-runtime": "^6.26.0", | ||
"d3-array": "^1.2.1", | ||
@@ -79,4 +78,10 @@ "prop-types": "^15.5.10" | ||
} | ||
}, | ||
"jest": { | ||
"transform": { | ||
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest" | ||
} | ||
} | ||
} | ||
}, | ||
"gitHead": "6f695e4c314cd0dfddc096eb7844f1228f5bf159" | ||
} |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
16184
9
29
0
+ Added@babel/runtime@^7.1.5
+ Added@babel/runtime@7.26.0(transitive)
+ Added@data-ui/theme@0.0.70(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removedbabel-runtime@^6.26.0
- Removed@data-ui/theme@0.0.69(transitive)
Updated@data-ui/theme@^0.0.70