From d54cc95bfc52d259a63afeb7abc1d8bfdd41840f Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Thu, 20 Apr 2017 22:03:44 +0800 Subject: [PATCH] feat: migrate to "create-react-class" package * Closes #463 --- src/lib/Circle.js | 4 +++- src/lib/DirectionsRenderer.js | 4 +++- src/lib/FusionTablesLayer.js | 4 +++- src/lib/GoogleMap.js | 4 +++- src/lib/InfoWindow.js | 4 +++- src/lib/KmlLayer.js | 4 +++- src/lib/Marker.js | 4 +++- src/lib/OverlayView.js | 4 +++- src/lib/Polygon.js | 4 +++- src/lib/Polyline.js | 4 +++- src/lib/Rectangle.js | 4 +++- src/lib/TrafficLayer.js | 4 +++- src/lib/_Skeleton.js | 4 +++- src/lib/addons/InfoBox.js | 4 +++- src/lib/addons/MarkerClusterer.js | 4 +++- src/lib/drawing/DrawingManager.js | 4 +++- src/lib/places/SearchBox.js | 4 +++- src/lib/visualization/HeatmapLayer.js | 4 +++- 18 files changed, 54 insertions(+), 18 deletions(-) diff --git a/src/lib/Circle.js b/src/lib/Circle.js index 4609e8ce..21ec9793 100644 --- a/src/lib/Circle.js +++ b/src/lib/Circle.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -102,7 +104,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `Circle`, diff --git a/src/lib/DirectionsRenderer.js b/src/lib/DirectionsRenderer.js index 55e81504..8ed7a195 100644 --- a/src/lib/DirectionsRenderer.js +++ b/src/lib/DirectionsRenderer.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -66,7 +68,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `DirectionsRenderer`, diff --git a/src/lib/FusionTablesLayer.js b/src/lib/FusionTablesLayer.js index 0908df20..92c82cc3 100644 --- a/src/lib/FusionTablesLayer.js +++ b/src/lib/FusionTablesLayer.js @@ -3,6 +3,8 @@ import _ from 'lodash'; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from 'react'; import { @@ -55,7 +57,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `FusionTablesLayer`, diff --git a/src/lib/GoogleMap.js b/src/lib/GoogleMap.js index 5e8a2bb4..2701e969 100644 --- a/src/lib/GoogleMap.js +++ b/src/lib/GoogleMap.js @@ -5,6 +5,8 @@ import invariant from "invariant"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -151,7 +153,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `GoogleMap`, diff --git a/src/lib/InfoWindow.js b/src/lib/InfoWindow.js index 36e1906d..6b58eb35 100644 --- a/src/lib/InfoWindow.js +++ b/src/lib/InfoWindow.js @@ -5,6 +5,8 @@ import invariant from "invariant"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React, Children } from "react"; import { @@ -96,7 +98,7 @@ function openInfoWindow(context, infoWindow) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `InfoWindow`, diff --git a/src/lib/KmlLayer.js b/src/lib/KmlLayer.js index 625b630c..963e4fbf 100644 --- a/src/lib/KmlLayer.js +++ b/src/lib/KmlLayer.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -80,7 +82,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `KmlLayer`, diff --git a/src/lib/Marker.js b/src/lib/Marker.js index 1cc5dde2..b5a10ccc 100644 --- a/src/lib/Marker.js +++ b/src/lib/Marker.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -182,7 +184,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `Marker`, diff --git a/src/lib/OverlayView.js b/src/lib/OverlayView.js index b54b8afc..da351002 100644 --- a/src/lib/OverlayView.js +++ b/src/lib/OverlayView.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -60,7 +62,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `OverlayView`, diff --git a/src/lib/Polygon.js b/src/lib/Polygon.js index 4037d41f..9f765f06 100644 --- a/src/lib/Polygon.js +++ b/src/lib/Polygon.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -94,7 +96,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `Polygon`, diff --git a/src/lib/Polyline.js b/src/lib/Polyline.js index efa9b543..55b4dd58 100644 --- a/src/lib/Polyline.js +++ b/src/lib/Polyline.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -90,7 +92,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `Polyline`, diff --git a/src/lib/Rectangle.js b/src/lib/Rectangle.js index a48cbe63..bade1f87 100644 --- a/src/lib/Rectangle.js +++ b/src/lib/Rectangle.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -92,7 +94,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `Rectangle`, diff --git a/src/lib/TrafficLayer.js b/src/lib/TrafficLayer.js index 15130fce..60c79312 100644 --- a/src/lib/TrafficLayer.js +++ b/src/lib/TrafficLayer.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -54,7 +56,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `TrafficLayer`, diff --git a/src/lib/_Skeleton.js b/src/lib/_Skeleton.js index 27c2e098..c582b253 100644 --- a/src/lib/_Skeleton.js +++ b/src/lib/_Skeleton.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -52,7 +54,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `Skeleton`, diff --git a/src/lib/addons/InfoBox.js b/src/lib/addons/InfoBox.js index 10f15237..89107f87 100644 --- a/src/lib/addons/InfoBox.js +++ b/src/lib/addons/InfoBox.js @@ -4,6 +4,8 @@ import invariant from "invariant"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React, Children } from "react"; import { @@ -91,7 +93,7 @@ function openInfoBox(context, infoBox) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `InfoBox`, diff --git a/src/lib/addons/MarkerClusterer.js b/src/lib/addons/MarkerClusterer.js index 5546f4ed..31643f9a 100644 --- a/src/lib/addons/MarkerClusterer.js +++ b/src/lib/addons/MarkerClusterer.js @@ -2,6 +2,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import MarkerClustererPlus from "marker-clusterer-plus"; @@ -166,7 +168,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `MarkerClusterer`, diff --git a/src/lib/drawing/DrawingManager.js b/src/lib/drawing/DrawingManager.js index a148198d..7a20d1b3 100644 --- a/src/lib/drawing/DrawingManager.js +++ b/src/lib/drawing/DrawingManager.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -68,7 +70,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `DrawingManager`, diff --git a/src/lib/places/SearchBox.js b/src/lib/places/SearchBox.js index 2ab18a65..2d7adaf1 100644 --- a/src/lib/places/SearchBox.js +++ b/src/lib/places/SearchBox.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -63,7 +65,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `SearchBox`, diff --git a/src/lib/visualization/HeatmapLayer.js b/src/lib/visualization/HeatmapLayer.js index c41daa82..d973cd3b 100644 --- a/src/lib/visualization/HeatmapLayer.js +++ b/src/lib/visualization/HeatmapLayer.js @@ -3,6 +3,8 @@ import _ from "lodash"; import PropTypes from "prop-types"; +import createReactClass from "create-react-class"; + import { default as React } from "react"; import { @@ -57,7 +59,7 @@ function getInstanceFromComponent(component) { } export default _.flowRight( - React.createClass, + createReactClass, enhanceElement(getInstanceFromComponent, publicMethodMap, eventMap, controlledPropUpdaterMap), )({ displayName: `HeatmapLayer`,