@reach/component-component
Advanced tools
Comparing version 0.11.1 to 0.12.0
@@ -10,3 +10,2 @@ 'use strict'; | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes); | ||
@@ -144,3 +143,3 @@ | ||
return Component; | ||
}(React__default['default'].Component); | ||
}(React.Component); | ||
@@ -171,3 +170,4 @@ Component.defaultProps = { | ||
exports.Component = Component; | ||
exports.default = Component; | ||
//# sourceMappingURL=component-component.cjs.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}require("prop-types");var r=function(t){return function(t,e){if(null==t)return{};var r,s,o={},p=Object.keys(t);for(s=0;s<p.length;s++)e.indexOf(r=p[s])>=0||(o[r]=t[r]);return o}(t,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},s=function(t){var e,s;function o(){for(var e,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return(e=t.call.apply(t,[this].concat(s))||this).state=e.props.initialState||e.props.getInitialState(e.props),e._refs=e.props.refs||e.props.getRefs(e.getArgs()),e._setState=function(){var t;return(t=e).setState.apply(t,arguments)},e._forceUpdate=function(){var t;return(t=e).forceUpdate.apply(t,arguments)},e}s=t,(e=o).prototype=Object.create(s.prototype),e.prototype.constructor=e,e.__proto__=s;var p=o.prototype;return p.getArgs=function(){var t=this._setState,e=this._forceUpdate,s=this._refs;return{state:this.state,props:r(this.props),refs:s,setState:t,forceUpdate:e}},p.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},p.shouldComponentUpdate=function(t,e){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:r(t),nextState:e})},p.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:r(this.props),refs:this._refs})},p.componentDidUpdate=function(t,e,s){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:r(t),prevState:e}),s)},p.getSnapshotBeforeUpdate=function(t,e){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:r(t),prevState:e})):null},p.render=function(){var t=this.props,e=t.children,r=t.render;return r?r(this.getArgs()):"function"==typeof e?e(this.getArgs()):e||null},o}(e(t).default.Component);s.defaultProps={getInitialState:function(){},getRefs:function(){return{}}},exports.default=s; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react");require("prop-types");var e=function(t){return function(t,e){if(null==t)return{};var r,s,p={},o=Object.keys(t);for(s=0;s<o.length;s++)e.indexOf(r=o[s])>=0||(p[r]=t[r]);return p}(t,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},r=function(t){var r,s;function p(){for(var e,r=arguments.length,s=new Array(r),p=0;p<r;p++)s[p]=arguments[p];return(e=t.call.apply(t,[this].concat(s))||this).state=e.props.initialState||e.props.getInitialState(e.props),e._refs=e.props.refs||e.props.getRefs(e.getArgs()),e._setState=function(){var t;return(t=e).setState.apply(t,arguments)},e._forceUpdate=function(){var t;return(t=e).forceUpdate.apply(t,arguments)},e}s=t,(r=p).prototype=Object.create(s.prototype),r.prototype.constructor=r,r.__proto__=s;var o=p.prototype;return o.getArgs=function(){var t=this._setState,r=this._forceUpdate,s=this._refs;return{state:this.state,props:e(this.props),refs:s,setState:t,forceUpdate:r}},o.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},o.shouldComponentUpdate=function(t,r){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:e(t),nextState:r})},o.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:e(this.props),refs:this._refs})},o.componentDidUpdate=function(t,r,s){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:e(t),prevState:r}),s)},o.getSnapshotBeforeUpdate=function(t,r){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:e(t),prevState:r})):null},o.render=function(){var t=this.props,e=t.children,r=t.render;return r?r(this.getArgs()):"function"==typeof e?e(this.getArgs()):e||null},p}(t.Component);r.defaultProps={getInitialState:function(){},getRefs:function(){return{}}},exports.Component=r,exports.default=r; | ||
//# sourceMappingURL=component-component.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
import React from 'react'; | ||
import { Component as Component$1 } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -134,3 +134,3 @@ | ||
return Component; | ||
}(React.Component); | ||
}(Component$1); | ||
@@ -162,2 +162,3 @@ Component.defaultProps = { | ||
export default Component; | ||
export { Component }; | ||
//# sourceMappingURL=component-component.esm.js.map |
{ | ||
"name": "@reach/component-component", | ||
"version": "0.11.1", | ||
"version": "0.12.0", | ||
"description": "Declarative React Component Definitions", | ||
@@ -28,3 +28,3 @@ "author": "React Training <hello@reacttraining.com>", | ||
], | ||
"gitHead": "5c6de02db35c1bb69e28d52bf345ea5c5c484013" | ||
"gitHead": "09eeccda6e4597d21545982c53db5c42beddce6b" | ||
} |
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
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
34686
10
289