react-google-maps
Advanced tools
Comparing version 9.0.3 to 9.1.0
@@ -5,2 +5,14 @@ # Change Log | ||
<a name="9.1.0"></a> | ||
# [9.1.0](https://github.com/tomchentw/react-google-maps/compare/v9.0.3...v9.1.0) (2017-10-26) | ||
### Features | ||
* **package.json:** support `react@^16.0.0` ([963716d](https://github.com/tomchentw/react-google-maps/commit/963716d)), closes [#677](https://github.com/tomchentw/react-google-maps/issues/677) [#640](https://github.com/tomchentw/react-google-maps/issues/640) | ||
* **package.json:** upgrade to `recompose@^0.26.0` ([ebb9be8](https://github.com/tomchentw/react-google-maps/commit/ebb9be8)) | ||
* **places/SearchBox:** support `react@^16.0.0` ([94931ae](https://github.com/tomchentw/react-google-maps/commit/94931ae)), closes [#640](https://github.com/tomchentw/react-google-maps/issues/640) [#656](https://github.com/tomchentw/react-google-maps/issues/656) | ||
<a name="9.0.3"></a> | ||
@@ -7,0 +19,0 @@ ## [9.0.3](https://github.com/tomchentw/react-google-maps/compare/v9.0.2...v9.0.3) (2017-10-26) |
@@ -123,17 +123,6 @@ "use strict" | ||
this.handleRenderChildToContainerElement() | ||
/* | ||
* @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox | ||
*/ | ||
var searchBox = new google.maps.places.SearchBox( | ||
this.containerElement.firstChild | ||
) | ||
;(0, _MapChildHelper.construct)( | ||
SearchBox.propTypes, | ||
updaterMap, | ||
this.props, | ||
searchBox | ||
) | ||
this.setState( | ||
(0, _defineProperty3.default)({}, _constants.SEARCH_BOX, searchBox) | ||
) | ||
if (_react2.default.version.match(/^16/)) { | ||
return | ||
} | ||
this.handleInitializeSearchBox() | ||
}, | ||
@@ -144,7 +133,7 @@ }, | ||
value: function componentDidMount() { | ||
;(0, _MapChildHelper.componentDidMount)( | ||
this, | ||
this.state[_constants.SEARCH_BOX], | ||
eventMap | ||
) | ||
var searchBox = this.state[_constants.SEARCH_BOX] | ||
if (_react2.default.version.match(/^16/)) { | ||
searchBox = this.handleInitializeSearchBox() | ||
} | ||
;(0, _MapChildHelper.componentDidMount)(this, searchBox, eventMap) | ||
this.handleMountAtControlPosition() | ||
@@ -184,2 +173,5 @@ }, | ||
this.handleUnmountAtControlPosition() | ||
if (_react2.default.version.match(/^16/)) { | ||
return | ||
} | ||
if (this.containerElement) { | ||
@@ -192,4 +184,28 @@ _reactDom2.default.unmountComponentAtNode(this.containerElement) | ||
{ | ||
key: "handleInitializeSearchBox", | ||
value: function handleInitializeSearchBox() { | ||
/* | ||
* @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox | ||
*/ | ||
var searchBox = new google.maps.places.SearchBox( | ||
this.containerElement.firstChild | ||
) | ||
;(0, _MapChildHelper.construct)( | ||
SearchBox.propTypes, | ||
updaterMap, | ||
this.props, | ||
searchBox | ||
) | ||
this.setState( | ||
(0, _defineProperty3.default)({}, _constants.SEARCH_BOX, searchBox) | ||
) | ||
return searchBox | ||
}, | ||
}, | ||
{ | ||
key: "handleRenderChildToContainerElement", | ||
value: function handleRenderChildToContainerElement() { | ||
if (_react2.default.version.match(/^16/)) { | ||
return | ||
} | ||
_reactDom2.default.unstable_renderSubtreeIntoContainer( | ||
@@ -228,2 +244,8 @@ this, | ||
value: function render() { | ||
if (_react2.default.version.match(/^16/)) { | ||
return _reactDom2.default.createPortal( | ||
_react2.default.Children.only(this.props.children), | ||
this.containerElement | ||
) | ||
} | ||
return false | ||
@@ -230,0 +252,0 @@ }, |
@@ -67,7 +67,10 @@ "use strict" | ||
function construct(propTypes, updaterMap, prevProps, instance) { | ||
var _reduce2 = (0, | ||
_reduce4.default)(propTypes, rdcUncontrolledAndControlledProps, { | ||
nextProps: {}, | ||
prevProps: prevProps, | ||
}), | ||
var _reduce2 = (0, _reduce4.default)( | ||
propTypes, | ||
rdcUncontrolledAndControlledProps, | ||
{ | ||
nextProps: {}, | ||
prevProps: prevProps, | ||
} | ||
), | ||
nextProps = _reduce2.nextProps | ||
@@ -74,0 +77,0 @@ |
{ | ||
"name": "react-google-maps", | ||
"version": "9.0.3", | ||
"version": "9.1.0", | ||
"description": "React.js Google Maps integration component", | ||
@@ -108,3 +108,3 @@ "license": "MIT", | ||
"prop-types": "^15.5.8", | ||
"recompose": "^0.25.0", | ||
"recompose": "^0.26.0", | ||
"scriptjs": "^2.5.8", | ||
@@ -114,4 +114,4 @@ "warning": "^3.0.0" | ||
"peerDependencies": { | ||
"react": "^15.0.0", | ||
"react-dom": "^15.0.0" | ||
"react": "^15.0.0 || ^16.0.0", | ||
"react-dom": "^15.0.0 || ^16.0.0" | ||
}, | ||
@@ -137,4 +137,4 @@ "devDependencies": { | ||
"prettier": "^1.6.1", | ||
"react": "^15.6.1", | ||
"react-dom": "^15.6.1", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-icons": "^2.2.5", | ||
@@ -141,0 +141,0 @@ "react-scripts": "^1.0.13", |
@@ -73,16 +73,14 @@ /* | ||
this.handleRenderChildToContainerElement() | ||
/* | ||
* @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox | ||
*/ | ||
const searchBox = new google.maps.places.SearchBox( | ||
this.containerElement.firstChild | ||
) | ||
construct(SearchBox.propTypes, updaterMap, this.props, searchBox) | ||
this.setState({ | ||
[SEARCH_BOX]: searchBox, | ||
}) | ||
if (React.version.match(/^16/)) { | ||
return | ||
} | ||
this.handleInitializeSearchBox() | ||
} | ||
componentDidMount() { | ||
componentDidMount(this, this.state[SEARCH_BOX], eventMap) | ||
let searchBox = this.state[SEARCH_BOX] | ||
if (React.version.match(/^16/)) { | ||
searchBox = this.handleInitializeSearchBox() | ||
} | ||
componentDidMount(this, searchBox, eventMap) | ||
this.handleMountAtControlPosition() | ||
@@ -116,2 +114,5 @@ } | ||
this.handleUnmountAtControlPosition() | ||
if (React.version.match(/^16/)) { | ||
return | ||
} | ||
if (this.containerElement) { | ||
@@ -123,3 +124,20 @@ ReactDOM.unmountComponentAtNode(this.containerElement) | ||
handleInitializeSearchBox() { | ||
/* | ||
* @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox | ||
*/ | ||
const searchBox = new google.maps.places.SearchBox( | ||
this.containerElement.firstChild | ||
) | ||
construct(SearchBox.propTypes, updaterMap, this.props, searchBox) | ||
this.setState({ | ||
[SEARCH_BOX]: searchBox, | ||
}) | ||
return searchBox | ||
} | ||
handleRenderChildToContainerElement() { | ||
if (React.version.match(/^16/)) { | ||
return | ||
} | ||
ReactDOM.unstable_renderSubtreeIntoContainer( | ||
@@ -152,2 +170,8 @@ this, | ||
render() { | ||
if (React.version.match(/^16/)) { | ||
return ReactDOM.createPortal( | ||
React.Children.only(this.props.children), | ||
this.containerElement | ||
) | ||
} | ||
return false | ||
@@ -154,0 +178,0 @@ } |
@@ -59,16 +59,14 @@ /* global google */ | ||
this.handleRenderChildToContainerElement() | ||
/* | ||
* @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox | ||
*/ | ||
const searchBox = new google.maps.places.SearchBox( | ||
this.containerElement.firstChild | ||
) | ||
construct(SearchBox.propTypes, updaterMap, this.props, searchBox) | ||
this.setState({ | ||
[SEARCH_BOX]: searchBox, | ||
}) | ||
if (React.version.match(/^16/)) { | ||
return | ||
} | ||
this.handleInitializeSearchBox() | ||
} | ||
componentDidMount() { | ||
componentDidMount(this, this.state[SEARCH_BOX], eventMap) | ||
let searchBox = this.state[SEARCH_BOX] | ||
if (React.version.match(/^16/)) { | ||
searchBox = this.handleInitializeSearchBox() | ||
} | ||
componentDidMount(this, searchBox, eventMap) | ||
this.handleMountAtControlPosition() | ||
@@ -102,2 +100,5 @@ } | ||
this.handleUnmountAtControlPosition() | ||
if (React.version.match(/^16/)) { | ||
return | ||
} | ||
if (this.containerElement) { | ||
@@ -109,3 +110,20 @@ ReactDOM.unmountComponentAtNode(this.containerElement) | ||
handleInitializeSearchBox() { | ||
/* | ||
* @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox | ||
*/ | ||
const searchBox = new google.maps.places.SearchBox( | ||
this.containerElement.firstChild | ||
) | ||
construct(SearchBox.propTypes, updaterMap, this.props, searchBox) | ||
this.setState({ | ||
[SEARCH_BOX]: searchBox, | ||
}) | ||
return searchBox | ||
} | ||
handleRenderChildToContainerElement() { | ||
if (React.version.match(/^16/)) { | ||
return | ||
} | ||
ReactDOM.unstable_renderSubtreeIntoContainer( | ||
@@ -138,2 +156,8 @@ this, | ||
render() { | ||
if (React.version.match(/^16/)) { | ||
return ReactDOM.createPortal( | ||
React.Children.only(this.props.children), | ||
this.containerElement | ||
) | ||
} | ||
return false | ||
@@ -140,0 +164,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
489569
14179
+ Addedreact@16.14.0(transitive)
+ Addedreact-dom@16.14.0(transitive)
+ Addedrecompose@0.26.0(transitive)
+ Addedscheduler@0.19.1(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removedreact@15.7.0(transitive)
- Removedreact-dom@15.7.0(transitive)
- Removedrecompose@0.25.1(transitive)
Updatedrecompose@^0.26.0