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 2417cdc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 22 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
50 changes: 36 additions & 14 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,14 @@
aes-js "^3.1.2"
diacritics "^1.3.0"

"@rapideditor/country-coder@^5.2.1", "@rapideditor/country-coder@~5.2.2":
"@rapideditor/country-coder@^5.2.1":
version "5.2.1"
resolved "https://registry.yarnpkg.com/@rapideditor/country-coder/-/country-coder-5.2.1.tgz#e6ebf2506093a6f59feff78c8ec5b0d209776998"
integrity sha512-rPxw/Mxpogi46JDvJLtNOo7pOnxeVumRj6OSIJMJh9pSaoJUJmQqPd6Ep7DzBXew2dUe2G1Jg224FqRdx1j2qg==
dependencies:
which-polygon "^2.2.1"

"@rapideditor/country-coder@~5.2.2":
version "5.2.2"
resolved "https://registry.yarnpkg.com/@rapideditor/country-coder/-/country-coder-5.2.2.tgz#8047de429b30b7795693f418b2903daeaac1a355"
integrity sha512-xGkI+wHX694sFcKKVdy20/uNeHuIiJACnke2vp7LzX22PRPJJv+pcn1OU5nb1urnad275EMfJQR33ayi2hWZOQ==
Expand Down Expand Up @@ -2665,7 +2672,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 +3391,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.11"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.11.tgz#e95050bf79a932cb7305dd130254ccdf9bde671c"
integrity sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==

"@types/connect-history-api-fallback@^1.3.5":
version "1.5.4"
Expand Down Expand Up @@ -3476,7 +3483,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 +3637,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 +3651,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 +4990,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 Expand Up @@ -11146,9 +11168,9 @@ pmtiles@^2.11.0:
fflate "^0.8.0"

polyclip-ts@~0.16.3:
version "0.16.5"
resolved "https://registry.yarnpkg.com/polyclip-ts/-/polyclip-ts-0.16.5.tgz#053e073e640449f1b1a1d88471f8758779d0b030"
integrity sha512-ZchnG0zGZReHgEo3EYzEUi6UmfQFFzNnj6AFU+gBm+IJJ4qG9gL4CwjtCV6oi/PittUPpJLiLJxcn/AgrCBO+g==
version "0.16.3"
resolved "https://registry.yarnpkg.com/polyclip-ts/-/polyclip-ts-0.16.3.tgz#fcba6ad9cbf9ce0e859898e12d77783bab4c67a6"
integrity sha512-qvmV7qhaP5P+OnFqBe+gQDPCQx/PuhfITQOIX9cEtgiyLRfgrXrCLi3SOg71UEQCeuVDaMYJ/08xvFTNneYxiA==
dependencies:
bignumber.js "^9.1.0"
splaytree-ts "^1.0.1"
Expand Down

0 comments on commit 2417cdc

Please sign in to comment.