Skip to content

Commit

Permalink
release 2.18.1, update gatsby-example with [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
JustFly1984 committed Jan 29, 2023
1 parent 3b2a94f commit 0abc911
Show file tree
Hide file tree
Showing 10 changed files with 1,874 additions and 2,132 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
const React = require('react')
const PropTypes = require('prop-types')
const { Provider } = require('react-redux')
const { Map: IMap } = require('immutable')
// const React = require('react')
// const PropTypes = require('prop-types')
// const { Provider } = require('react-redux')
// const { Map: IMap } = require('immutable')

import * as React from 'react'
import { Provider } from 'react-redux'
import { Map as IMap } from 'immutable'

const { createStore, compose, applyMiddleware } = require('redux')

const thunk = require('redux-thunk').default
const reducers = require('./src/reducers').default

exports.wrapRootElement = ({ element }) => {
const configureStore = (initialState = new IMap()) => {
export const wrapRootElement = ({ element }) => {
const configureStore = (initialState = IMap()) => {
const store = createStore(
reducers,
initialState,
Expand All @@ -23,17 +27,17 @@ exports.wrapRootElement = ({ element }) => {

const ConnectedRootElement = <Provider store={store}>{element}</Provider>

ConnectedRootElement.propTypes = {
element: PropTypes.node.isRequired,
}
// ConnectedRootElement.propTypes = {
// element: PropTypes.node.isRequired,
// }

return ConnectedRootElement
}

exports.onPreRenderHTML = () => {
export const onPreRenderHTML = () => {
// console.log('onPreRenderHTML') // eslint-disable-line no-console
}

exports.onRenderBody = (obj) => {
export const onRenderBody = (obj) => {
// console.log('onRenderBody') // eslint-disable-line no-console
}
28 changes: 14 additions & 14 deletions packages/react-google-maps-api-gatsby-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
"access": "public"
},
"resolutions": {
"@babel/core": "7.20.2"
"@babel/core": "7.20.12"
},
"dependencies": {
"@babel/core": "7.20.2",
"@babel/node": "7.20.2",
"@babel/core": "7.20.12",
"@babel/node": "7.20.7",
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "7.18.6",
"@babel/runtime": "7.20.1",
"@react-google-maps/api": "2.17.1",
"@sentry/browser": "7.19.0",
"@babel/runtime": "7.20.13",
"@react-google-maps/api": "2.18.1",
"@sentry/browser": "7.34.0",
"cross-env": "7.0.3",
"gatsby": "4.21.1",
"gatsby-plugin-manifest": "4.21.0",
"gatsby-plugin-purgecss": "6.1.2",
"gatsby-plugin-react-helmet": "5.21.0",
"gatsby-plugin-sitemap": "5.21.0",
"gatsby-plugin-typescript": "4.21.0",
"immutable": "4.1.0",
"gatsby": "5.5.0",
"gatsby-plugin-manifest": "5.5.0",
"gatsby-plugin-purgecss": "6.2.1",
"gatsby-plugin-react-helmet": "6.5.0",
"gatsby-plugin-sitemap": "6.5.0",
"gatsby-plugin-typescript": "5.5.0",
"immutable": "4.2.2",
"intl": "1.2.5",
"prop-types": "15.8.1",
"react-helmet": "6.1.0",
"react-redux": "8.0.5",
"react-refresh": "0.14.0",
"redux": "4.2.0",
"redux": "4.2.1",
"redux-actions": "2.6.5",
"redux-immutable": "4.0.0",
"redux-thunk": "2.4.2",
Expand Down
3,905 changes: 1,803 additions & 2,102 deletions packages/react-google-maps-api-gatsby-example/yarn.lock

Large diffs are not rendered by default.

38 changes: 37 additions & 1 deletion packages/react-google-maps-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
# Changelog

## 2.18.0 GroundOverlayF component, reduce bundle size by externalizing react/jsx-runtime

- TrafficLayerF
- BicyclingLayerF
- TransitLayerF
- DrawingManagerF
- MarkerF
- InfoBoxF
- InfoWindowF
- PolylineF
- PolygonF
- RectangleF
- CircleF
- OverlayViewF
- MarkerClustererF
- HeatmapLayerF
- GroundOverlayF

This components currently for tests only - I've planned to replace PureComponent class based components in 3.0.0 version.

please test in your applications each F component.

TODO:

- LoadScriptF
- GoogleMapF
- DirectionsRendererF
- DirectionsServiceF
- DistanceMatrixServiceF
- KmlLayerF
- AutocompleteF
- StandaloneSearchBoxF
- StreetViewPanoramaF
- StreetViewServiceF

## 2.17.1 OverlayViewF improvements, docs improvements

## 2.17.1 OverlayViewF improvements, docs improvemwnts
## 2.17.0 HeatmapLayerF component

- TrafficLayerF
Expand All @@ -18,6 +53,7 @@
- OverlayViewF
- MarkerClustererF
- HeatmapLayerF
- GroundOverlayF

This components currently for tests only - I've planned to replace PureComponent class based components in 3.0.0 version.

Expand Down
2 changes: 2 additions & 0 deletions packages/react-google-maps-api/src/components/dom/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export function createOverlay(
)

for (const [key, value] of Object.entries(layoutStyles)) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.container.style[key] = value
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ export class Marker extends PureComponent<MarkerProps> {
return child
}

let elementChild: ReactElement<HasMarkerAnchor> = child
const elementChild: ReactElement<HasMarkerAnchor> = child

return cloneElement(elementChild, { anchor: this.marker })
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface GroundOverlayProps {
/** The url of the projected image */
url: string
/** The bounds that the image will be scaled to fit */
bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral
bounds: google.maps.LatLngBoundsLiteral
/** This callback is called when the groundOverlay instance has loaded. It is called with the groundOverlay instance. */
onLoad?: ((groundOverlay: google.maps.GroundOverlay) => void) | undefined
/** This callback is called when the component unmounts. It is called with the groundOverlay instance. */
Expand Down Expand Up @@ -120,7 +120,6 @@ export class GroundOverlay extends PureComponent<GroundOverlayProps, GroundOverl

const groundOverlay = new google.maps.GroundOverlay(this.props.url, this.props.bounds, {
...this.props.options,
// @ts-ignore
map: this.context,
})

Expand Down
2 changes: 1 addition & 1 deletion packages/react-google-maps-api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
dependencies:
fast-deep-equal "^3.1.3"

"@googlemaps/[email protected].13":
"@googlemaps/[email protected].15":
version "2.0.13"
resolved "https://registry.yarnpkg.com/@googlemaps/markerclusterer/-/markerclusterer-2.0.13.tgz#cb61db9be52c9d8b061dfad77dca33b2965e7b2a"
integrity sha512-302GjQ9gsHOK/ef6hif+rJDv+AB3THst02iDCbXH2PS9GFwb/5yuytaLpuzJiqGNG+k2zvTAWTsGY/fQN5DZ7w==
Expand Down

0 comments on commit 0abc911

Please sign in to comment.