react-height
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -147,7 +147,8 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var _props = this.props; | ||
var _ = _props.onHeightReady; | ||
var _onHeightReady = _props.onHeightReady; | ||
var _dirty = _props.dirty; | ||
var hidden = _props.hidden; | ||
var children = _props.children; | ||
var props = _objectWithoutProperties(_props, ['onHeightReady', 'hidden', 'children']); | ||
var props = _objectWithoutProperties(_props, ['onHeightReady', 'dirty', 'hidden', 'children']); | ||
@@ -231,2 +232,4 @@ var dirty = this.state.dirty; | ||
* use `forceUpdate()` when you know deep data structures have changed. | ||
* | ||
* See https://facebook.github.io/react/docs/pure-render-mixin.html | ||
*/ | ||
@@ -263,2 +266,3 @@ var ReactComponentWithPureRenderMixin = { | ||
* See ReactComponentWithPureRenderMixin | ||
* See also https://facebook.github.io/react/docs/shallow-compare.html | ||
*/ | ||
@@ -265,0 +269,0 @@ function shallowCompare(instance, nextProps, nextState) { |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactHeight=e(require("react")):t.ReactHeight=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(1)["default"];t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=r(2),a=n(s),u=r(3),p=a["default"].createClass({displayName:"ReactHeight",propTypes:{children:a["default"].PropTypes.node.isRequired,onHeightReady:a["default"].PropTypes.func.isRequired,hidden:a["default"].PropTypes.bool,dirty:a["default"].PropTypes.bool},getDefaultProps:function(){return{hidden:!1,dirty:!0}},getInitialState:function(){return{height:0,dirty:this.props.dirty}},componentDidMount:function(){var t=this,e=this.wrapper.clientHeight,r=!1;this.setState({height:e,dirty:r},function(){return t.props.onHeightReady(t.state.height)})},componentWillReceiveProps:function(t){var e=t.children,r=t.dirty;(e!==this.props.children||r)&&this.setState({dirty:!0})},shouldComponentUpdate:u.shouldComponentUpdate,componentDidUpdate:function(){var t=this,e=this.wrapper.clientHeight,r=!1;e===this.state.height?this.setState({dirty:r}):this.setState({height:e,dirty:r},function(){return t.props.onHeightReady(t.state.height)})},setWrapperRef:function(t){this.wrapper=t},render:function(){var t=this.props,e=(t.onHeightReady,t.hidden),r=t.children,n=i(t,["onHeightReady","hidden","children"]),s=this.state.dirty;return e&&!s?null:e?a["default"].createElement("div",{style:{height:0,overflow:"hidden"}},a["default"].createElement("div",o({ref:this.setWrapperRef},n),r)):a["default"].createElement("div",o({ref:this.setWrapperRef},n),r)}});e["default"]=p},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(4),i={shouldComponentUpdate:function(t,e){return n(this,t,e)}};t.exports=i},function(t,e,r){"use strict";function n(t,e,r){return!i(t.props,e)||!i(t.state,r)}var i=r(5);t.exports=n},function(t,e){"use strict";function r(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function n(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var s=0;s<n.length;s++)if(!i.call(e,n[s])||!r(t[n[s]],e[n[s]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=n}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactHeight=e(require("react")):t.ReactHeight=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(1)["default"];t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=r(2),a=n(s),u=r(3),p=a["default"].createClass({displayName:"ReactHeight",propTypes:{children:a["default"].PropTypes.node.isRequired,onHeightReady:a["default"].PropTypes.func.isRequired,hidden:a["default"].PropTypes.bool,dirty:a["default"].PropTypes.bool},getDefaultProps:function(){return{hidden:!1,dirty:!0}},getInitialState:function(){return{height:0,dirty:this.props.dirty}},componentDidMount:function(){var t=this,e=this.wrapper.clientHeight,r=!1;this.setState({height:e,dirty:r},function(){return t.props.onHeightReady(t.state.height)})},componentWillReceiveProps:function(t){var e=t.children,r=t.dirty;(e!==this.props.children||r)&&this.setState({dirty:!0})},shouldComponentUpdate:u.shouldComponentUpdate,componentDidUpdate:function(){var t=this,e=this.wrapper.clientHeight,r=!1;e===this.state.height?this.setState({dirty:r}):this.setState({height:e,dirty:r},function(){return t.props.onHeightReady(t.state.height)})},setWrapperRef:function(t){this.wrapper=t},render:function(){var t=this.props,e=(t.onHeightReady,t.dirty,t.hidden),r=t.children,n=i(t,["onHeightReady","dirty","hidden","children"]),s=this.state.dirty;return e&&!s?null:e?a["default"].createElement("div",{style:{height:0,overflow:"hidden"}},a["default"].createElement("div",o({ref:this.setWrapperRef},n),r)):a["default"].createElement("div",o({ref:this.setWrapperRef},n),r)}});e["default"]=p},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(4),i={shouldComponentUpdate:function(t,e){return n(this,t,e)}};t.exports=i},function(t,e,r){"use strict";function n(t,e,r){return!i(t.props,e)||!i(t.state,r)}var i=r(5);t.exports=n},function(t,e){"use strict";function r(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function n(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var s=0;s<n.length;s++)if(!i.call(e,n[s])||!r(t[n[s]],e[n[s]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=n}])}); | ||
//# sourceMappingURL=react-height.min.js.map |
@@ -79,7 +79,8 @@ 'use strict'; | ||
var _props = this.props; | ||
var _ = _props.onHeightReady; | ||
var _onHeightReady = _props.onHeightReady; | ||
var _dirty = _props.dirty; | ||
var hidden = _props.hidden; | ||
var children = _props.children; | ||
var props = _objectWithoutProperties(_props, ['onHeightReady', 'hidden', 'children']); | ||
var props = _objectWithoutProperties(_props, ['onHeightReady', 'dirty', 'hidden', 'children']); | ||
@@ -86,0 +87,0 @@ var dirty = this.state.dirty; |
{ | ||
"name": "react-height", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Component-wrapper to determine and report children elements height", | ||
@@ -47,18 +47,18 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"babel-cli": "6.7.5", | ||
"babel-core": "6.7.6", | ||
"babel-eslint": "6.0.2", | ||
"babel-cli": "6.10.1", | ||
"babel-core": "6.10.4", | ||
"babel-eslint": "6.1.0", | ||
"babel-loader": "6.2.4", | ||
"babel-plugin-transform-object-rest-spread": "6.6.5", | ||
"babel-plugin-webpack-loaders": "0.4.0", | ||
"babel-preset-es2015": "6.6.0", | ||
"babel-preset-react": "6.5.0", | ||
"babel-plugin-transform-object-rest-spread": "6.8.0", | ||
"babel-plugin-webpack-loaders": "0.7.0", | ||
"babel-preset-es2015": "6.9.0", | ||
"babel-preset-react": "6.11.1", | ||
"codecov.io": "0.1.6", | ||
"cross-env": "1.0.7", | ||
"cross-env": "1.0.8", | ||
"css-loader": "0.23.1", | ||
"eslint": "2.7.0", | ||
"eslint-loader": "1.3.0", | ||
"eslint-plugin-react": "4.3.0", | ||
"glob": "7.0.3", | ||
"html-webpack-plugin": "2.15.0", | ||
"eslint": "3.0.0", | ||
"eslint-loader": "1.4.0", | ||
"eslint-plugin-react": "5.2.2", | ||
"glob": "7.0.5", | ||
"html-webpack-plugin": "2.22.0", | ||
"husky": "0.11.4", | ||
@@ -69,13 +69,13 @@ "isparta": "4.0.0", | ||
"parallelshell": "2.0.0", | ||
"react-dom": "15.0.1", | ||
"react": "15.0.1", | ||
"rimraf": "2.5.2", | ||
"sinon": "1.17.3", | ||
"react-dom": "15.2.0", | ||
"react": "15.2.0", | ||
"rimraf": "2.5.3", | ||
"sinon": "1.17.4", | ||
"style-loader": "0.13.1", | ||
"tap-nyan": "0.0.2", | ||
"tap-xunit": "1.3.1", | ||
"tape": "4.5.1", | ||
"webpack": "1.12.14", | ||
"tap-xunit": "1.4.0", | ||
"tape": "4.6.0", | ||
"webpack": "1.13.1", | ||
"webpack-dev-server": "1.14.1" | ||
} | ||
} |
@@ -66,3 +66,9 @@ /* eslint "react/no-did-mount-set-state":0 */ | ||
render() { | ||
const {onHeightReady: _, hidden, children, ...props} = this.props; | ||
const { | ||
onHeightReady: _onHeightReady, | ||
dirty: _dirty, | ||
hidden, | ||
children, | ||
...props | ||
} = this.props; | ||
const {dirty} = this.state; | ||
@@ -69,0 +75,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
497
64177
13
1
0