diff --git a/CHANGELOG.md b/CHANGELOG.md index 9feff4bad..c132bd535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ ## 2.2 +### 2.2.2 (2023-07-26) + +- Add namespace as optional param in OAuthCarto3 type [#750](https://github.com/CartoDB/carto-react/pull/750) +- Add onClick event handler to GoogleMap component [#747](https://github.com/CartoDB/carto-react/pull/747) + ### 2.2.1 (2023-07-21) - Fix MuiList: add more specificity to apply max-height [#748](https://github.com/CartoDB/carto-react/pull/748) diff --git a/lerna.json b/lerna.json index ccfa024df..a7996842f 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ ], "npmClient": "yarn", "useWorkspaces": true, - "version": "2.2.1" + "version": "2.2.2" } diff --git a/packages/react-api/package.json b/packages/react-api/package.json index 7863a06a7..fd368018d 100644 --- a/packages/react-api/package.json +++ b/packages/react-api/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-api", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Api", "author": "CARTO Dev Team", "keywords": [ @@ -64,9 +64,9 @@ "@babel/runtime": "^7.13.9" }, "peerDependencies": { - "@carto/react-core": "^2.2.1", - "@carto/react-redux": "^2.2.1", - "@carto/react-workers": "^2.2.1", + "@carto/react-core": "^2.2.2", + "@carto/react-redux": "^2.2.2", + "@carto/react-workers": "^2.2.2", "@deck.gl/carto": "^8.9.18", "@deck.gl/core": "^8.9.18", "@deck.gl/extensions": "^8.9.18", diff --git a/packages/react-auth/package.json b/packages/react-auth/package.json index 31378e1c0..1f92f998e 100644 --- a/packages/react-auth/package.json +++ b/packages/react-auth/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-auth", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Auth", "author": "CARTO Dev Team", "keywords": [ @@ -64,7 +64,7 @@ "@babel/runtime": "^7.13.9" }, "peerDependencies": { - "@carto/react-core": "^2.2.1", + "@carto/react-core": "^2.2.2", "react": "17.x || 18.x", "react-dom": "17.x || 18.x" } diff --git a/packages/react-basemaps/package.json b/packages/react-basemaps/package.json index c9c17b003..c47886d8d 100644 --- a/packages/react-basemaps/package.json +++ b/packages/react-basemaps/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-basemaps", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Basemaps", "keywords": [ "carto", @@ -64,7 +64,7 @@ "@babel/runtime": "^7.13.9" }, "peerDependencies": { - "@carto/react-core": "^2.2.1", + "@carto/react-core": "^2.2.2", "@deck.gl/google-maps": "^8.9.18", "react": "17.x || 18.x", "react-dom": "17.x || 18.x" diff --git a/packages/react-basemaps/src/basemaps/GoogleMap.js b/packages/react-basemaps/src/basemaps/GoogleMap.js index be1edcecf..9373ca88c 100644 --- a/packages/react-basemaps/src/basemaps/GoogleMap.js +++ b/packages/react-basemaps/src/basemaps/GoogleMap.js @@ -11,6 +11,7 @@ import { debounce } from '@carto/react-core'; * @param { Object } props.viewState - Viewstate, as defined by deck.gl. Just center and zoom level are supported * @param { Layer[] } props.layers - deck.gl layers array * @param { function } props.getTooltip - (Optional) Tooltip handler + * @param { function } props.onClick - (Optional) onClick handler * @param { function } props.onResize - (Optional) onResize handler * @param { function } props.onViewStateChange - (Optional) onViewStateChange handler * @param { string } props.apiKey - Google Maps API Key @@ -24,6 +25,7 @@ export function GoogleMap(props) { viewState, layers, getTooltip, + onClick, onResize, onViewStateChange, apiKey, @@ -90,6 +92,9 @@ export function GoogleMap(props) { const handleViewportChangeDebounced = debounce(handleViewportChange, 200); map.addListener('bounds_changed', handleViewportChangeDebounced); + if (onClick) { + map.addListener('click', onClick); + } map.addListener('resize', () => { onResize && onResize({ diff --git a/packages/react-core/package.json b/packages/react-core/package.json index 0d26b255b..548fc5d47 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-core", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Core", "author": "CARTO Dev Team", "keywords": [ diff --git a/packages/react-redux/package.json b/packages/react-redux/package.json index 7b1300c38..2d748b99a 100644 --- a/packages/react-redux/package.json +++ b/packages/react-redux/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-redux", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Redux", "author": "CARTO Dev Team", "keywords": [ @@ -63,8 +63,8 @@ "@babel/runtime": "^7.13.9" }, "peerDependencies": { - "@carto/react-core": "^2.2.1", - "@carto/react-workers": "^2.2.1", + "@carto/react-core": "^2.2.2", + "@carto/react-workers": "^2.2.2", "@deck.gl/carto": "^8.9.18", "@deck.gl/core": "^8.9.18", "@reduxjs/toolkit": "^1.5.0" diff --git a/packages/react-redux/src/types.d.ts b/packages/react-redux/src/types.d.ts index b5bfccc26..439609dce 100644 --- a/packages/react-redux/src/types.d.ts +++ b/packages/react-redux/src/types.d.ts @@ -16,6 +16,7 @@ export type ViewState = { } type InitialCarto2State = { + accountsUrl?: string, viewState: ViewState, basemap: CartoBasemapsNames | GMapsBasemaps, credentials: Credentials, @@ -24,6 +25,7 @@ type InitialCarto2State = { } type OauthCarto3 = { + namespace?: string, domain: string, clientId: string, organizationId: string, diff --git a/packages/react-ui/package.json b/packages/react-ui/package.json index eb6b8fe8e..793522f5f 100644 --- a/packages/react-ui/package.json +++ b/packages/react-ui/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-ui", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - UI", "author": "CARTO Dev Team", "keywords": [ @@ -78,7 +78,7 @@ "@babel/runtime": "^7.13.9" }, "peerDependencies": { - "@carto/react-core": "^2.2.1", + "@carto/react-core": "^2.2.2", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", "@mui/icons-material": "^5.11.16", diff --git a/packages/react-widgets/package.json b/packages/react-widgets/package.json index cace81e97..e5384daa6 100644 --- a/packages/react-widgets/package.json +++ b/packages/react-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-widgets", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Widgets", "author": "CARTO Dev Team", "keywords": [ @@ -65,11 +65,11 @@ "@babel/runtime": "^7.13.9" }, "peerDependencies": { - "@carto/react-api": "^2.2.1", - "@carto/react-core": "^2.2.1", - "@carto/react-redux": "^2.2.1", - "@carto/react-ui": "^2.2.1", - "@carto/react-workers": "^2.2.1", + "@carto/react-api": "^2.2.2", + "@carto/react-core": "^2.2.2", + "@carto/react-redux": "^2.2.2", + "@carto/react-ui": "^2.2.2", + "@carto/react-workers": "^2.2.2", "@deck.gl/core": "^8.9.18", "@deck.gl/layers": "^8.9.18", "@emotion/react": "^11.10.6", diff --git a/packages/react-workers/package.json b/packages/react-workers/package.json index 386dd34d5..ae4b9d761 100644 --- a/packages/react-workers/package.json +++ b/packages/react-workers/package.json @@ -1,6 +1,6 @@ { "name": "@carto/react-workers", - "version": "2.2.1", + "version": "2.2.2", "description": "CARTO for React - Workers", "author": "CARTO Dev Team", "keywords": [ @@ -62,7 +62,7 @@ }, "dependencies": { "@babel/runtime": "^7.13.9", - "@carto/react-core": "^2.2.1", + "@carto/react-core": "^2.2.2", "@turf/bbox-polygon": "^6.3.0", "@turf/boolean-intersects": "^6.3.0", "@turf/boolean-within": "^6.3.0", diff --git a/yarn.lock b/yarn.lock index 4dbd16470..a6c5c68b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1181,6 +1181,13 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@carto/react-core@^2.2.2": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@carto/react-core/-/react-core-2.2.1.tgz#7cea250c7824a84592bb726792269d7b22bd22dd" + integrity sha512-WkjtwFn5+DwI/u59RKYXyo/ry4Mr4KoWKie2z1SaB3eA/F7pjEK7Udw7TZxJK6YHiR/J1dtwZmXX4Tq5yhTqMQ== + dependencies: + "@babel/runtime" "^7.13.9" + "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"