Skip to content

Commit

Permalink
Update Rapid to v2.2.5
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@meta.com>
  • Loading branch information
tsmock committed May 7, 2024
1 parent 8ce70d1 commit ecc6b22
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"private": false,
"dependencies": {
"@hotosm/id": "^2.21.1",
"@hotosm/underpass-ui": "^0.0.4",
"@hotosm/iso-countries-languages": "^1.1.2",
"@hotosm/underpass-ui": "^0.0.4",
"@mapbox/mapbox-gl-draw": "^1.4.3",
"@mapbox/mapbox-gl-geocoder": "^5.0.2",
"@mapbox/mapbox-gl-language": "^0.10.1",
"@placemarkio/geo-viewport": "^1.0.2",
"@rapideditor/rapid": "^2.1.1",
"@rapideditor/rapid": "^2.2.5",
"@sentry/react": "^7.102.0",
"@tanstack/react-query": "^4.29.7",
"@tanstack/react-query-devtools": "^4.29.7",
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/rapidEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function RapidEditor({

useEffect(() => {
const containerRoot = document.getElementById('rapid-container-root');
const editListener = () => updateDisableState(setDisable, context.systems.edits);
const editListener = () => updateDisableState(setDisable, context.systems.editor);
if (context && dom) {
containerRoot.appendChild(dom);
// init the ui or restart if it was loaded previously
Expand All @@ -240,19 +240,19 @@ function RapidEditor({
/* Perform tasks after Rapid has started up */
promise.then(() => {
/* Keep track of edits */
const editSystem = context.systems.edits;
const editSystem = context.systems.editor;

editSystem.on('change', editListener);
editSystem.on('stablechange', editListener);
editSystem.on('reset', editListener);
});
}
return () => {
if (containerRoot?.childNodes && dom in containerRoot.childNodes) {
document.getElementById('rapid-container-root')?.removeChild(dom);
}
if (context?.systems?.edits) {
const editSystem = context.systems.edits;
editSystem.off('change', editListener);
if (context?.systems?.editor) {
const editSystem = context.systems.editor;
editSystem.off('stablechange', editListener);
editSystem.off('reset', editListener);
}
};
Expand Down
35 changes: 25 additions & 10 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@
"@pixi/core" "7.4.0"
"@pixi/math" "7.4.0"

"@rapideditor/rapid@^2.1.1":
"@rapideditor/rapid@^2.2.5":
version "2.2.5"
resolved "https://registry.yarnpkg.com/@rapideditor/rapid/-/rapid-2.2.5.tgz#627e86c2ee5d4f5f9c25223403bb39715da67fc8"
integrity sha512-b5AZ4bZAAqadTc3lKQ+LgJ1lldImmoK/eDFAhxNtHqPdTO+oTTyg+GqW2Fl8mD06n2IBosBpIKh8J56beQvLkQ==
Expand Down Expand Up @@ -3384,9 +3384,9 @@
"@types/responselike" "^1.0.0"

"@types/chai@^4.3.11":
version "4.3.14"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.14.tgz#ae3055ea2be43c91c9fd700a36d67820026d96e6"
integrity sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w==
version "4.3.16"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.16.tgz#b1572967f0b8b60bf3f87fe1d854a5604ea70c82"
integrity sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==

"@types/connect-history-api-fallback@^1.3.5":
version "1.5.4"
Expand Down Expand Up @@ -3476,7 +3476,12 @@
"@types/qs" "*"
"@types/serve-static" "*"

"@types/geojson@*", "@types/geojson@^7946.0", "@types/geojson@^7946.0.13":
"@types/geojson@*", "@types/geojson@^7946.0":
version "7946.0.10"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249"
integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==

"@types/geojson@^7946.0.13":
version "7946.0.14"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613"
integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==
Expand Down Expand Up @@ -3625,9 +3630,9 @@
undici-types "~5.26.4"

"@types/normalize-package-data@^2.4.0":
version "2.4.4"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==
version "2.4.1"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==

"@types/parse-json@^4.0.0":
version "4.0.2"
Expand All @@ -3639,7 +3644,12 @@
resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb"
integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==

"@types/pbf@*", "@types/pbf@^3.0.5":
"@types/pbf@*":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@types/pbf/-/pbf-3.0.2.tgz#8d291ad68b4b8c533e96c174a2e3e6399a59ed61"
integrity sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==

"@types/pbf@^3.0.5":
version "3.0.5"
resolved "https://registry.yarnpkg.com/@types/pbf/-/pbf-3.0.5.tgz#a9495a58d8c75be4ffe9a0bd749a307715c07404"
integrity sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA==
Expand Down Expand Up @@ -4973,7 +4983,12 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599:
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001587:
version "1.0.30001588"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz#07f16b65a7f95dba82377096923947fb25bce6e3"
integrity sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==

caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001599:
version "1.0.30001614"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz#f894b4209376a0bf923d67d9c361d96b1dfebe39"
integrity sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==
Expand Down

0 comments on commit ecc6b22

Please sign in to comment.