From 73f0e51298866db9afb83c1c9086c6e9234ff131 Mon Sep 17 00:00:00 2001 From: Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> Date: Sat, 26 Jun 2021 13:00:52 -0700 Subject: overflow issue --- package-lock.json | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 253 insertions(+), 3 deletions(-) (limited to 'package-lock.json') diff --git a/package-lock.json b/package-lock.json index 3637b14ac..9032ebba8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -370,6 +370,21 @@ "prop-types": "^15.7.2" } }, + "@googlemaps/js-api-loader": { + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@googlemaps/js-api-loader/-/js-api-loader-1.11.4.tgz", + "integrity": "sha512-atFTSgEXXsE7mOsOIInUKG4JApu/NdyZR79Ed6jF92MjVQTcD6dz/Xo8djf4cIetnq4WYQmetem0d8/uS4o8oQ==", + "requires": { + "fast-deep-equal": "^3.1.3" + }, + "dependencies": { + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + } + } + }, "@hig/flyout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@hig/flyout/-/flyout-1.2.1.tgz", @@ -417,6 +432,65 @@ "resolved": "https://registry.npmjs.org/@log4js-node/log4js-api/-/log4js-api-1.0.2.tgz", "integrity": "sha512-6SJfx949YEWooh/CUPpJ+F491y4BYJmknz4hUN1+RHvKoUEynKbRmhnwbk/VLmh4OthLLDNCyWXfbh4DG1cTXA==" }, + "@mapbox/geojson-rewind": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.1.tgz", + "integrity": "sha512-eL7fMmfTBKjrb+VFHXCGv9Ot0zc3C0U+CwXo1IrP+EPwDczLoXv34Tgq3y+2mPSFNVUXgU42ILWJTC7145KPTA==", + "requires": { + "get-stream": "^6.0.1", + "minimist": "^1.2.5" + }, + "dependencies": { + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + } + } + }, + "@mapbox/geojson-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz", + "integrity": "sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw==" + }, + "@mapbox/jsonlint-lines-primitives": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", + "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=" + }, + "@mapbox/mapbox-gl-supported": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.0.tgz", + "integrity": "sha512-zu4udqYiBrKMQKwpKJ4hhPON7tz0QR/JZ3iGpHnNWFmH3Sv/ysxlICATUtGCFpsyJf2v1WpFhlzaZ3GhhKmPMA==" + }, + "@mapbox/point-geometry": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", + "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=" + }, + "@mapbox/tiny-sdf": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-1.2.5.tgz", + "integrity": "sha512-cD8A/zJlm6fdJOk6DqPUV8mcpyJkRz2x2R+/fYcWDYG3oWbG7/L7Yl/WqQ1VZCjnL9OTIMAn6c+BC5Eru4sQEw==" + }, + "@mapbox/unitbezier": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", + "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=" + }, + "@mapbox/vector-tile": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", + "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", + "requires": { + "@mapbox/point-geometry": "~0.1.0" + } + }, + "@mapbox/whoots-js": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", + "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==" + }, "@material-ui/core": { "version": "4.11.0", "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.11.0.tgz", @@ -512,6 +586,27 @@ "react-is": "^16.8.0" } }, + "@react-google-maps/api": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@react-google-maps/api/-/api-2.2.0.tgz", + "integrity": "sha512-kMmzHyveLdEiLP+WN/H4vYEyaDTJn59mXj5Y0BxjJs5SIMhUtYxJ6EeJCV0aRSN+Gq5hYFLheBoy8Pfqtabq5g==", + "requires": { + "@googlemaps/js-api-loader": "1.11.4", + "@react-google-maps/infobox": "2.2.0", + "@react-google-maps/marker-clusterer": "2.2.0", + "invariant": "2.2.4" + } + }, + "@react-google-maps/infobox": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@react-google-maps/infobox/-/infobox-2.2.0.tgz", + "integrity": "sha512-nQbsPdcSTodXaaOgM9CaqyXytBkmollMuaYvERv5zxdoTWT1JvuViSaRbxpc3dYDsEHmp3myLx4ZbDcnOjf7Hg==" + }, + "@react-google-maps/marker-clusterer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@react-google-maps/marker-clusterer/-/marker-clusterer-2.2.0.tgz", + "integrity": "sha512-QaQAfY/FdaSwPmm0JnW9AW+t0ocfUYmuso9WmeIMwTRCqcqNxc4GFe5uT0LDLmsYt/wxAeYoGWVaD8sd/Vquig==" + }, "@react-three/fiber": { "version": "6.0.16", "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-6.0.16.tgz", @@ -848,6 +943,11 @@ "@types/node": "*" } }, + "@types/geojson": { + "version": "7946.0.7", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz", + "integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==" + }, "@types/glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", @@ -911,6 +1011,23 @@ "integrity": "sha512-Ft5BNFmv2pHDgxV5JDsndOWTRJ+56zte0ZpYLowp03tW+K+t8u8YMOzAnpuqPgzX6WO1XpDIUm7u04M8vdDiVQ==", "dev": true }, + "@types/mapbox-gl": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-2.3.0.tgz", + "integrity": "sha512-Vf5f/jWOgSKbQCm1q0KA7n2DrHZHEWT1NvKuWZl5k7LTYaw8LkZXe9AatWD16t5pKFNBVRpg2VVNXX89d7hyPQ==", + "requires": { + "@types/geojson": "*" + } + }, + "@types/mapbox__mapbox-gl-geocoder": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@types/mapbox__mapbox-gl-geocoder/-/mapbox__mapbox-gl-geocoder-4.7.0.tgz", + "integrity": "sha512-I2mPBvibX5F9bTfWpHLFpDhJjUXdCziBcV+1ZW5vADjPqXrP9ee8gvUgTlrbDx5nZ4JyWB6nbQ4U6um9NJZN3g==", + "requires": { + "@types/geojson": "*", + "@types/mapbox-gl": "*" + } + }, "@types/memory-fs": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@types/memory-fs/-/memory-fs-0.3.3.tgz", @@ -4694,6 +4811,11 @@ "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" }, + "csscolorparser": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz", + "integrity": "sha1-s085HupNqPPpgjHizNjfnAQfFxs=" + }, "cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -5564,9 +5686,9 @@ } }, "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", "dev": true }, "double-bits": { @@ -5617,6 +5739,11 @@ "xtend": "^4.0.0" } }, + "earcut": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", + "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==" + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -6970,6 +7097,11 @@ "json-bigint": "^0.3.0" } }, + "geojson-vt": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz", + "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -7018,6 +7150,11 @@ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, + "gl-matrix": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz", + "integrity": "sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==" + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -7228,6 +7365,11 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, + "grid-index": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz", + "integrity": "sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA==" + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -7998,6 +8140,14 @@ "math-codegen": "^0.3.5" } }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -8700,6 +8850,11 @@ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" }, + "kdbush": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", + "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" + }, "keycode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz", @@ -9134,6 +9289,36 @@ "object-visit": "^1.0.0" } }, + "mapbox-gl": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-2.3.1.tgz", + "integrity": "sha512-xGohzbxxdN3UhHMHy0aweaueYwSoOspSg90gi1T7DIl8Ev0YLjl+ApV6VYtNnR1B9lmwDn8jITfG6Y2JiSEuwg==", + "requires": { + "@mapbox/geojson-rewind": "^0.5.0", + "@mapbox/geojson-types": "^1.0.2", + "@mapbox/jsonlint-lines-primitives": "^2.0.2", + "@mapbox/mapbox-gl-supported": "^2.0.0", + "@mapbox/point-geometry": "^0.1.0", + "@mapbox/tiny-sdf": "^1.2.5", + "@mapbox/unitbezier": "^0.0.0", + "@mapbox/vector-tile": "^1.3.1", + "@mapbox/whoots-js": "^3.1.0", + "csscolorparser": "~1.0.3", + "earcut": "^2.2.2", + "geojson-vt": "^3.2.1", + "gl-matrix": "^3.3.0", + "grid-index": "^1.1.0", + "minimist": "^1.2.5", + "murmurhash-js": "^1.0.0", + "pbf": "^3.2.1", + "potpack": "^1.0.1", + "quickselect": "^2.0.0", + "rw": "^1.3.3", + "supercluster": "^7.1.3", + "tinyqueue": "^2.0.3", + "vt-pbf": "^3.1.1" + } + }, "material-colors": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz", @@ -9740,6 +9925,11 @@ "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", "dev": true }, + "murmurhash-js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz", + "integrity": "sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E=" + }, "nan": { "version": "2.14.1", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", @@ -13789,6 +13979,15 @@ "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" }, + "pbf": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", + "requires": { + "ieee754": "^1.1.12", + "resolve-protobuf-schema": "^2.1.0" + } + }, "pbkdf2": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", @@ -14067,6 +14266,11 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" }, + "potpack": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.1.tgz", + "integrity": "sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw==" + }, "prebuild-install": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", @@ -14267,6 +14471,11 @@ "prosemirror-transform": "^1.1.0" } }, + "protocol-buffers-schema": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.5.1.tgz", + "integrity": "sha512-YVCvdhxWNDP8/nJDyXLuM+UFsuPk4+1PB7WGPVDzm3HTHbzFLxQYeW2iZpS4mmnXrQJGBzt230t/BbEb7PrQaw==" + }, "proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -14564,6 +14773,11 @@ "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", "dev": true }, + "quickselect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + }, "raf-schd": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.2.tgz", @@ -15474,6 +15688,14 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, + "resolve-protobuf-schema": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", + "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", + "requires": { + "protocol-buffers-schema": "^3.3.1" + } + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -15543,6 +15765,11 @@ "aproba": "^1.1.1" } }, + "rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -16868,6 +17095,14 @@ "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==" }, + "supercluster": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.3.tgz", + "integrity": "sha512-7+bR4FbF5SYsmkHfDp61QiwCKtwNDyPsddk9TzfsDA5DQr5Goii5CVD2SXjglweFCxjrzVZf945ahqYfUIk8UA==", + "requires": { + "kdbush": "^3.0.0" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -17188,6 +17423,11 @@ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" }, + "tinyqueue": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", + "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" + }, "to-array": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", @@ -18227,6 +18467,16 @@ "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz", "integrity": "sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ==" }, + "vt-pbf": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", + "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", + "requires": { + "@mapbox/point-geometry": "0.1.0", + "@mapbox/vector-tile": "^1.3.1", + "pbf": "^3.2.1" + } + }, "vue-template-compiler": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz", -- cgit v1.2.3-70-g09d2 From d675e32fdf2f4e0ca5a7adf8cbc5b462e81bc7f0 Mon Sep 17 00:00:00 2001 From: Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> Date: Mon, 5 Jul 2021 13:28:54 -0700 Subject: searchbox zoom in and center on search --- package-lock.json | 138 +++++++++ package.json | 2 + .../views/collections/CollectionMapView.scss | 32 --- src/client/views/collections/CollectionMapView.tsx | 127 --------- src/client/views/collections/CollectionView.tsx | 2 +- .../collections/MapView/CollectionMapView.scss | 50 ++++ .../collections/MapView/CollectionMapView.tsx | 312 +++++++++++++++++++++ src/client/views/nodes/PresBox.tsx | 13 +- .../views/presentationview/PresElementBox.tsx | 4 + 9 files changed, 518 insertions(+), 162 deletions(-) delete mode 100644 src/client/views/collections/CollectionMapView.scss delete mode 100644 src/client/views/collections/CollectionMapView.tsx create mode 100644 src/client/views/collections/MapView/CollectionMapView.scss create mode 100644 src/client/views/collections/MapView/CollectionMapView.tsx (limited to 'package-lock.json') diff --git a/package-lock.json b/package-lock.json index 9032ebba8..9f82ee33f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -586,6 +586,134 @@ "react-is": "^16.8.0" } }, + "@reach/auto-id": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.15.2.tgz", + "integrity": "sha512-K7d5qhYBlBHIjy+IpSEAyMeB5VTZ9m0tZdr7xyNd5Fr6oeefHEvJiJGuQpubP5bDoe7ShC3y0VQGFmT0g7KcZg==", + "requires": { + "@reach/utils": "0.15.2", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, + "@reach/combobox": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/combobox/-/combobox-0.15.2.tgz", + "integrity": "sha512-FjF1Tm7rvAI14joBD+2kco9Hlrmsum2ps0Atd4+UJpKAhQFZ2zmxi4oK1WeFavm4LQwuzAV2MFL+7Oe0TgrsUQ==", + "requires": { + "@reach/auto-id": "0.15.2", + "@reach/descendants": "0.15.2", + "@reach/popover": "0.15.2", + "@reach/portal": "0.15.2", + "@reach/utils": "0.15.2", + "prop-types": "^15.7.2", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, + "@reach/descendants": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.15.2.tgz", + "integrity": "sha512-GdQXWVpscss89MOhWh+sL4TnIn0qX1y+Te3wE72aKQrz/QCR69JFEW4wftovmF7rFm4/kDZcp14lMy512U6VlA==", + "requires": { + "@reach/utils": "0.15.2", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, + "@reach/observe-rect": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", + "integrity": "sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==" + }, + "@reach/popover": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.15.2.tgz", + "integrity": "sha512-92Ov7VPXjn4ciOVupeekki03lSMz9NAmw2BjWYE9mVvYWKyDx5jx2srtbkIqUaSCkAVV3KEsFUia8aMm60FDZg==", + "requires": { + "@reach/portal": "0.15.2", + "@reach/rect": "0.15.2", + "@reach/utils": "0.15.2", + "tabbable": "^4.0.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, + "@reach/portal": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.15.2.tgz", + "integrity": "sha512-5x+dchGr4btRnLazwmyCYbSPVJAIrw0eXwhz7Vj9uT/EIp43WzOtTcODdLOoH6Ol2QLjX1Yt/fBjdK9+UAKxSA==", + "requires": { + "@reach/utils": "0.15.2", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, + "@reach/rect": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.15.2.tgz", + "integrity": "sha512-S2lzvvfclUHdvgcfW/eoz0i729HJvG5f6ayVaXcKz+X6LKF9i9Jdhfwsz7b3UmnSCihKNs0cX5tyWfWr1E1JFw==", + "requires": { + "@reach/observe-rect": "1.2.0", + "@reach/utils": "0.15.2", + "prop-types": "^15.7.2", + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, + "@reach/utils": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.15.2.tgz", + "integrity": "sha512-Lr1SJ5X4hEjD/M0TAonURM8wytM/JuPSuIP7t+e5cil34pThyLsBvTGeNfmpSgaLJ5vlsv0x9u6g4SRAEr84Og==", + "requires": { + "tiny-warning": "^1.0.3", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, "@react-google-maps/api": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@react-google-maps/api/-/api-2.2.0.tgz", @@ -17122,6 +17250,11 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "tabbable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-4.0.0.tgz", + "integrity": "sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ==" + }, "table-layout": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", @@ -18341,6 +18474,11 @@ "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.1.tgz", "integrity": "sha512-oFfsyun+bP7RX8X2AskHNTxu+R3QdE/RC5IefMbqptmACAA/gfol1KDD5KRzPsGMa62sWxGZw+Ui43u6x4ddoQ==" }, + "use-places-autocomplete": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/use-places-autocomplete/-/use-places-autocomplete-1.9.3.tgz", + "integrity": "sha512-9N05hAAKttkx3e6WVW6MR2q53v2FN2TbmwAAPES26gUINb8P5ZzHvoT4D/E+NLY3qnGehGffYRm1Iflro29GQQ==" + }, "util": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", diff --git a/package.json b/package.json index 9df32995c..666ebc946 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "@hig/theme-context": "^2.1.3", "@hig/theme-data": "^2.16.1", "@material-ui/core": "^4.11.0", + "@reach/combobox": "^0.15.2", "@react-google-maps/api": "^2.2.0", "@react-three/fiber": "^6.0.16", "@types/cors": "^2.8.8", @@ -270,6 +271,7 @@ "typescript-collections": "^1.3.3", "typescript-language-server": "^0.4.0", "url-loader": "^1.1.2", + "use-places-autocomplete": "^1.9.3", "uuid": "^3.4.0", "valid-url": "^1.0.9", "web-request": "^1.0.7", diff --git a/src/client/views/collections/CollectionMapView.scss b/src/client/views/collections/CollectionMapView.scss deleted file mode 100644 index 874511533..000000000 --- a/src/client/views/collections/CollectionMapView.scss +++ /dev/null @@ -1,32 +0,0 @@ -.collectionMapView { - width: 100%; - height: 100%; - overflow: hidden; - - .collectionMapView-contents { - width: 100%; - height: 100%; - overflow: hidden; - > div { - position: unset !important; // when the sidebar filter flys out, this prevents the map from extending outside the document box - } - } -} - -.loadingWrapper { - width: 100%; - height: 100%; - background-color: pink; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - text-align: center; - - .loadingGif { - align-self: center; - justify-self: center; - width: 50px; - height: 50px; - } -} diff --git a/src/client/views/collections/CollectionMapView.tsx b/src/client/views/collections/CollectionMapView.tsx deleted file mode 100644 index 07755ed71..000000000 --- a/src/client/views/collections/CollectionMapView.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import { GoogleMap, Marker, InfoWindow, LoadScript, GoogleMapProps } from '@react-google-maps/api'; -import { action, computed, Lambda, runInAction } from "mobx"; -import { observer } from "mobx-react"; -import { Doc, DocListCast, Field, FieldResult, Opt } from "../../../fields/Doc"; -import { documentSchema } from "../../../fields/documentSchemas"; -import { Id } from "../../../fields/FieldSymbols"; -import { makeInterface } from "../../../fields/Schema"; -import { Cast, NumCast, ScriptCast, StrCast } from "../../../fields/Types"; -import { LinkManager } from "../../util/LinkManager"; -import { undoBatch, UndoManager } from "../../util/UndoManager"; -import "./CollectionMapView.scss"; -import { CollectionSubView } from "./CollectionSubView"; -import React = require("react"); -import requestPromise = require("request-promise"); - -type MapSchema = makeInterface<[typeof documentSchema]>; -const MapSchema = makeInterface(documentSchema); - -export type LocationData = google.maps.LatLngLiteral & { - address?: string - resolvedAddress?: string; - zoom?: number; -}; - -const mapContainerStyle = { - height: '100%', -}; - - -const defaultCenter = { - lat: 0, - lng: 0, -} -//-----------------------------test map marker----------------------------------- -// const map = new google.maps.Map(document.getElementById('map')!, { -// zoom: 10, -// center: new google.maps.LatLng(-33.92, 151.25), -// mapTypeId: google.maps.MapTypeId.ROADMAP -// }); - -// // test display markers -// let locations = [ -// ['Bondi Beach', -33.890542, 151.274856, 4], -// ['Coogee Beach', -33.923036, 151.259052, 5], -// ['Cronulla Beach', -34.028249, 151.157507, 3], -// ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], -// ['Maroubra Beach', -33.950198, 151.259302, 1] -// ]; - -// const infowindow = new google.maps.InfoWindow(); -// let marker: google.maps.Marker -// let i: number - -// for (i = 0; i < locations.length; i++) { -// marker = new google.maps.Marker({ -// position: new google.maps.LatLng(locations[i][1] as number, locations[i][2] as number), -// map: map -// }); - -// google.maps.event.addListener(marker, 'click', (function (marker, i) { -// return function () { -// infowindow.setContent(locations[i][0] as string); -// infowindow.open(map, marker); -// } -// })(marker, i)); -// } - -//---------------------------------------------------------------- - -@observer -export default class CollectionMapView extends CollectionSubView(MapSchema) { - - - render() { - const { childLayoutPairs } = this; - const { Document, fieldKey, isContentActive: active } = this.props; - - // const { isLoaded, loadError } = useLoadScript({ - // googleMapsApiKey: 'AIzaSyALJU8DfCAqEAS0OqMDCmkE0otlz4H81fg', - // libraries: ['places'] - // }) - - // if (loadError) return "Error loading maps"; - // if (!isLoaded) return "Loading Maps"; - - - return
- -
e.stopPropagation()} - onPointerDown={e => (e.button === 0 && !e.ctrlKey) && e.stopPropagation()} > - -
- - - - -
-
-
-
; - } - -} - -// export default GoogleApiWrapper({ -// // apiKey: process.env.REACT_APP_DASH_GOOGLE_MAPS_API_KEY!, -// apiKey: 'AIzaSyALJU8DfCAqEAS0OqMDCmkE0otlz4H81fg', -// LoadingContainer: () => { -// console.log(process.env.REACT_APP_DASH_GOOGLE_MAPS_API_KEY); -// return
-// -//
; -// } -// })(CollectionMapView) as any; \ No newline at end of file diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index fb60265e3..65188e6f3 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -25,7 +25,7 @@ import { CollectionDockingView } from "./CollectionDockingView"; import { CollectionFreeFormView } from './collectionFreeForm/CollectionFreeFormView'; import { CollectionGridView } from './collectionGrid/CollectionGridView'; import { CollectionLinearView } from './CollectionLinearView'; -import CollectionMapView from './CollectionMapView'; +import CollectionMapView from './MapView/CollectionMapView'; import { CollectionMulticolumnView } from './collectionMulticolumn/CollectionMulticolumnView'; import { CollectionMultirowView } from './collectionMulticolumn/CollectionMultirowView'; import { CollectionPileView } from './CollectionPileView'; diff --git a/src/client/views/collections/MapView/CollectionMapView.scss b/src/client/views/collections/MapView/CollectionMapView.scss new file mode 100644 index 000000000..c76f1d4b9 --- /dev/null +++ b/src/client/views/collections/MapView/CollectionMapView.scss @@ -0,0 +1,50 @@ +.collectionMapView { + width: 100%; + height: 100%; + overflow: hidden; + + .collectionMapView-contents { + width: 100%; + height: 100%; + overflow: hidden; + > div { + position: unset !important; // when the sidebar filter flys out, this prevents the map from extending outside the document box + } + + .map-wrapper { + .searchbox { + box-sizing: border-box; + border: 1px solid transparent; + width: 240px; + height: 32px; + padding: 0 12px; + border-radius: 3px; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); + font-size: 14px; + outline: none; + text-overflow: ellipses; + position: absolute; + left: 50%; + margin-left: -120px; + } + } + } +} + +.loadingWrapper { + width: 100%; + height: 100%; + background-color: pink; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; + + .loadingGif { + align-self: center; + justify-self: center; + width: 50px; + height: 50px; + } +} diff --git a/src/client/views/collections/MapView/CollectionMapView.tsx b/src/client/views/collections/MapView/CollectionMapView.tsx new file mode 100644 index 000000000..b3a5bdbff --- /dev/null +++ b/src/client/views/collections/MapView/CollectionMapView.tsx @@ -0,0 +1,312 @@ +import { GoogleMap, Marker, InfoWindow, InfoBox, LoadScript, GoogleMapProps, StandaloneSearchBox, DrawingManager } from '@react-google-maps/api'; +import { observable, action, computed, Lambda, runInAction } from "mobx"; +import { observer } from "mobx-react"; +import { Doc, DocListCast, Field, FieldResult, Opt } from "../../../../fields/Doc"; +import { documentSchema } from "../../../../fields/documentSchemas"; +import { Id } from "../../../../fields/FieldSymbols"; +import { makeInterface } from "../../../../fields/Schema"; +import { Cast, NumCast, ScriptCast, StrCast } from "../../../../fields/Types"; +import { LinkManager } from "../../../util/LinkManager"; +import { undoBatch, UndoManager } from "../../../util/UndoManager"; +import "./CollectionMapView.scss"; +import { CollectionSubView } from "../CollectionSubView"; +import React = require("react"); +import requestPromise = require("request-promise"); +import ReactDOM from 'react-dom'; + + +type MapSchema = makeInterface<[typeof documentSchema]>; +const MapSchema = makeInterface(documentSchema); + +export type LocationData = { + id?: number; + pos?: { lat: number, lng: number }; +}; + +const mapContainerStyle = { + height: '100%', +}; + +const defaultCenter = { + lat: 38.685, + lng: -115.234, +}; + +@observer +export default class CollectionMapView extends CollectionSubView(MapSchema) { + + @observable private mapRef = null as any; + @observable private selectedPlace: LocationData = { id: undefined, pos: undefined }; + @observable private markerMap = {}; + @observable private center = defaultCenter; + @observable private zoom = 2.5; + @observable private clickedLatLng = null; + @observable private infoWindowOpen = false; + + @observable private myPlaces = [ + { id: 1, pos: { lat: 39.09366509575983, lng: -94.58751660204751 } }, + { id: 2, pos: { lat: 41.82399, lng: -71.41283 } }, + { id: 3, pos: { lat: 47.606214, lng: -122.33207 } }, + { id: 4, pos: { lat: 36.7783, lng: 119.4179 } } + ]; + + // iterate myPlaces to size, center, and zoom map to contain all markers + private fitBounds = (map: any) => { + const bounds = new window.google.maps.LatLngBounds(); + console.log('map bound is:' + bounds); + this.myPlaces.map(place => { + bounds.extend(place.pos); + return place.id; + }); + map.fitBounds(bounds) + } + + // store a reference to google map instance; fit map bounds to contain all markers + @action + private loadHandler = (map: any) => { + this.mapRef = map; + this.fitBounds(map); + + // //add a custom control for button add marker + // //TODO: why this doesn't work + // const google = window.google; + // console.log("google window: " + google) + // const controlButtonDiv = document.createElement('div'); + // ReactDOM.render(, controlButtonDiv); + // map.controls[google.maps.ControlPosition.TOP_RIGHT].push(controlButtonDiv); + } + + @action + private markerClickHandler = (e: MouseEvent, place: LocationData) => { + // set which place was clicked + this.selectedPlace = place + + console.log(this.selectedPlace.id); + console.log(this.selectedPlace.pos); + + // used so clicking a second marker works + if (this.infoWindowOpen) { + this.infoWindowOpen = false; + } + + this.infoWindowOpen = true; + } + + @action + private handleInfoWindowClose = () => { + if (this.infoWindowOpen) { + this.infoWindowOpen = false; + } + this.infoWindowOpen = false; + this.selectedPlace = { id: undefined, pos: undefined }; + } + + // @action + // private markerLoadHandler = (marker: any, place: LocationData) => { + // if (marker != null) { + // this.markerMap[place.id] = marker; + // } + // } + + @action + @undoBatch + private handleDragMarker = (marker: any, place: LocationData) => { + if (marker != null) { + place = { + id: place.id, + pos: { + lat: marker.latLng.lat().toFixed(3), + lng: marker.latLng.lng().toFixed(3) + } + } + + console.log(place); + console.log(this.myPlaces); + } + } + + /** + * func that handles user's search location and zoom/pan on the input location + */ + private searchLocation = () => { + + } + + /** + * func that adds marker to google maps + */ + @undoBatch + private addMarker = () => { + + } + + /** + * func that updates suggested results (and auto-complete) during user input + */ + private handleChange = () => { + + } + + // private mapRef = document.getElementById("map") + // private markers: google.maps.Marker[] = []; + @observable private input: HTMLInputElement | undefined; + + @action + private setInputRef = (element: HTMLInputElement) => { + this.input = element; + console.log("htmlinputelement is:" + this.input) + } + // private searchBox = new window.google.maps.places.SearchBox(this.input); + + private handlePlacesChanged = () => { + const searchBox = new window.google.maps.places.SearchBox(this.input!) + const places = searchBox.getPlaces(); + + console.log(places); + + if (places.length == 0) { return; } + + // // clear out old markers + // this.markers.forEach((marker) => { + // marker.setMap(null); + // }); + // this.markers = [] + + // // for each place, get icon, name, location + const bounds = new window.google.maps.LatLngBounds(); + places.forEach((place) => { + if (!place.geometry || !place.geometry.location) { + console.log("Returned place contains no geometry"); + return; + } + + // const icon = { + // url: place.icon as string, + // size: new google.maps.Size(71, 71), + // origin: new google.maps.Point(0, 0), + // anchor: new google.maps.Point(17, 34), + // scaledSize: new google.maps.Size(25, 25), + // } + + // //create a marker for each place + // this.markers.push( + // new google.maps.Marker({ + // mapRef, + // title: place.name, + // position: place.geometry.location, + // }) + // ); + + if (place.geometry.viewport) { + // only geocodes have viewport + bounds.union(place.geometry.viewport); + } + else { + bounds.extend(place.geometry.location); + } + }); + } + + // private setBounds = () => { + // const places = this.searchBox.getPlaces(); + // if (places.length == 0) { return; } + + // const bounds = new google.maps.LatLngBounds(); + // places.forEach((place) => { + // if (!place.geometry || !place.geometry.location) { + // console.log("Returned place contains no geometry"); + // return; + // } + + // if (place.geometry.viewport) { + // // only geocodes have viewport + // bounds.union(place.geometry.viewport); + // } + // else { + // bounds.extend(place.geometry.location); + // } + // }); + + // return bounds + // } + + private onPolygonComplete = (polygon: any) => { + console.log(polygon) + } + + private onMarkerComplete = (marker: any) => { + this.myPlaces.push(marker) + } + + render() { + const { Document, fieldKey, isContentActive: active } = this.props; + + return
+ +
e.stopPropagation()} + onPointerDown={e => (e.button === 0 && !e.ctrlKey) && e.stopPropagation()} > + +
+ this.loadHandler(map)} + > + + + + + {this.myPlaces.map(place => ( + this.markerLoadHandler(marker, place)} + onClick={e => this.markerClickHandler(e, place)} + draggable={true} + onDragEnd={marker => this.handleDragMarker(marker, place)} + /> + ))} + {this.infoWindowOpen && this.selectedPlace && ( + + + + )} + {/* */} + +
+
+
+
; + } + +} \ No newline at end of file diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index f3fb6ff17..693348613 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -80,7 +80,12 @@ const PresBoxDocument = makeInterface(documentSchema); @observer export class PresBox extends ViewBoxBaseComponent(PresBoxDocument) { public static LayoutString(fieldKey: string) { return FieldView.LayoutString(PresBox, fieldKey); } - + + /** + * transitions & effects for documents + * @param renderDoc + * @param layoutDoc + */ static renderEffectsDoc(renderDoc: any, layoutDoc: Doc) { const effectProps = { left: layoutDoc.presEffectDirection === PresEffect.Left, @@ -258,6 +263,7 @@ export class PresBox extends ViewBoxBaseComponent } } + //TODO: al: it seems currently that tempMedia doesn't stop onslidechange after clicking the button; the time the tempmedia stop depends on the start & end time // No more frames in current doc and next slide is defined, therefore move to next slide nextSlide = (activeNext: Doc) => { const targetNext = Cast(activeNext.presentationTargetDoc, Doc, null); @@ -453,7 +459,7 @@ export class PresBox extends ViewBoxBaseComponent /** * Uses the viewfinder to progressivize through the different views of a single collection. - * @param presTargetDoc: document for which internal zoom is used + * @param activeItem: document for which internal zoom is used */ zoomProgressivizeNext = (activeItem: Doc) => { const targetDoc: Doc = this.targetDoc; @@ -569,6 +575,7 @@ export class PresBox extends ViewBoxBaseComponent load(); } + // The function pauses the auto presentation @action pauseAutoPres = () => { if (this.layoutDoc.presStatus === PresStatus.Autoplay) { @@ -592,6 +599,7 @@ export class PresBox extends ViewBoxBaseComponent }); } + // The function allows for viewing the pres path on toggle @action togglePath = (srcContext: Doc, off?: boolean) => { if (off) { this._pathBoolean = false; @@ -602,6 +610,7 @@ export class PresBox extends ViewBoxBaseComponent } } + // The function allows for expanding the view of pres on toggle @action toggleExpandMode = () => { runInAction(() => this._expandBoolean = !this._expandBoolean); this.rootDoc.expandBoolean = this._expandBoolean; diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index f15d51764..19893af7e 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -164,6 +164,9 @@ export class PresElementBox extends ViewBoxBaseComponent { const miniView: boolean = this.toolbarWidth <= 100; const activeItem = this.rootDoc; @@ -242,6 +245,7 @@ export class PresElementBox extends ViewBoxBaseComponent { -- cgit v1.2.3-70-g09d2 From 5f3486d68dd6a6c2b13acf7127188220a4012290 Mon Sep 17 00:00:00 2001 From: Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> Date: Tue, 6 Jul 2021 19:50:08 -0700 Subject: fix link to map; ownerdocument error --- deploy/index.html | 1 + package-lock.json | 321 +++++++++++++++++++++ package.json | 1 + .../collections/MapView/CollectionMapView.tsx | 206 +++++++------ 4 files changed, 422 insertions(+), 107 deletions(-) (limited to 'package-lock.json') diff --git a/deploy/index.html b/deploy/index.html index dda0c6457..33cc0906a 100644 --- a/deploy/index.html +++ b/deploy/index.html @@ -7,6 +7,7 @@ + -