Merge pull request #5790 from betagouv/dev

2020-12-11-02
This commit is contained in:
LeSim 2020-12-11 15:00:40 +01:00 committed by GitHub
commit 73a274276e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1247 additions and 2405 deletions

View file

@ -118,7 +118,9 @@ const OPTIONAL_LAYERS = [
function buildSources() { function buildSources() {
return Object.fromEntries( return Object.fromEntries(
OPTIONAL_LAYERS.flatMap(({ layers }) => layers).map(([, code]) => [ OPTIONAL_LAYERS.filter(({ id }) => id !== 'cadastres')
.flatMap(({ layers }) => layers)
.map(([, code]) => [
code.toLowerCase().replace(/\./g, '-'), code.toLowerCase().replace(/\./g, '-'),
rasterSource([ignServiceURL(code)], 'IGN-F/Géoportail/MNHN') rasterSource([ignServiceURL(code)], 'IGN-F/Géoportail/MNHN')
]) ])
@ -139,10 +141,10 @@ function rasterSource(tiles, attribution) {
export function buildLayers(ids) { export function buildLayers(ids) {
return OPTIONAL_LAYERS.filter(({ id }) => ids.includes(id)) return OPTIONAL_LAYERS.filter(({ id }) => ids.includes(id))
.flatMap(({ layers }) => layers) .flatMap(({ layers }) => layers)
.map(([, code]) => .flatMap(([, code]) =>
code === 'CADASTRE' code === 'CADASTRE'
? cadastreLayers ? cadastreLayers
: rasterLayer(code.toLowerCase().replace(/\./g, '-')) : [rasterLayer(code.toLowerCase().replace(/\./g, '-'))]
); );
} }

View file

@ -1,21 +1,21 @@
{ {
"dependencies": { "dependencies": {
"@babel/preset-react": "^7.12.10", "@babel/preset-react": "^7.10.4",
"@fortawesome/fontawesome-svg-core": "^1.2.32", "@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/free-solid-svg-icons": "^5.13.0",
"@fortawesome/react-fontawesome": "^0.1.13", "@fortawesome/react-fontawesome": "^0.1.9",
"@mapbox/mapbox-gl-draw": "^1.2.0", "@mapbox/mapbox-gl-draw": "^1.2.0",
"@rails/actiontext": "^6.1.0", "@rails/actiontext": "^6.0.3",
"@rails/activestorage": "^6.1.0", "@rails/activestorage": "^6.0.3",
"@rails/ujs": "^6.1.0", "@rails/ujs": "^6.0.3",
"@rails/webpacker": "5.2.1", "@rails/webpacker": "5.1.1",
"@reach/combobox": "^0.10.2", "@reach/combobox": "^0.10.2",
"@sentry/browser": "^5.29.0", "@sentry/browser": "^5.15.5",
"@tmcw/togeojson": "^4.0.0", "@tmcw/togeojson": "^4.0.0",
"babel-plugin-macros": "^2.8.0", "babel-plugin-macros": "^2.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"chartkick": "^3.2.0", "chartkick": "^3.2.0",
"core-js": "^3.8.1", "core-js": "^3.6.5",
"debounce": "^1.2.0", "debounce": "^1.2.0",
"dom4": "^2.1.5", "dom4": "^2.1.5",
"email-butler": "^1.0.13", "email-butler": "^1.0.13",
@ -30,26 +30,26 @@
"react-intersection-observer": "^8.26.2", "react-intersection-observer": "^8.26.2",
"react-mapbox-gl": "^4.8.6", "react-mapbox-gl": "^4.8.6",
"react-mapbox-gl-draw": "^2.0.4", "react-mapbox-gl-draw": "^2.0.4",
"react-query": "^2.26.4", "react-query": "^2.23.1",
"react-scroll-to-component": "^1.0.2", "react-scroll-to-component": "^1.0.2",
"react-sortable-hoc": "^1.11.0", "react-sortable-hoc": "^1.11.0",
"react-use": "^15.3.4", "react-use": "^15.3.4",
"react_ujs": "^2.6.1", "react_ujs": "^2.6.1",
"select2": "^4.0.13", "select2": "^4.0.13",
"trix": "^1.2.3", "trix": "^1.2.3",
"whatwg-fetch": "^3.5.0" "whatwg-fetch": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@2fd/graphdoc": "^2.4.0", "@2fd/graphdoc": "^2.4.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint": "^7.15.0", "eslint": "^7.0.0",
"eslint-config-prettier": "^7.0.0", "eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.2.0", "eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.21.5", "eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-hooks": "^4.0.2",
"netlify-cli": "^2.69.4", "netlify-cli": "^2.61.2",
"prettier": "^2.2.1", "prettier": "^2.0.5",
"webpack-bundle-analyzer": "^4.2.0", "webpack-bundle-analyzer": "^3.7.0",
"webpack-dev-server": "^3.11.0" "webpack-dev-server": "^3.11.0"
}, },
"scripts": { "scripts": {

3598
yarn.lock

File diff suppressed because it is too large Load diff