From 1fbf59b5db30ad9c676d41efae26197db86bf806 Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Fri, 9 Aug 2024 17:37:35 +0100 Subject: [PATCH] docs(frontend): code structure (#89) An overview of the React app structure. Renames `config/view-layers` to `config/data-layers`, to avoid conflicts with `config/view-layers.ts`. Removes the old Create React App TypeScript config. --- frontend/docs/structure.md | 63 +++++++++++++++++++ .../assets/AssetHoverDescription.tsx | 0 .../assets/asset-view-layer.ts | 0 .../assets/data-access.ts | 0 .../assets/data-formats.ts | 2 +- .../assets/source.ts | 0 .../buildings/buildings-view-layer.ts | 4 +- .../buildings/colors.ts | 0 .../buildings/styles.ts | 0 .../DroughtOptionsHoverDescription.tsx | 0 .../droughtOptions/color-maps.ts | 0 .../droughtOptions/data-access.ts | 0 .../droughtOptions/data-formats.ts | 0 .../drought-options-view-layer.ts | 2 +- .../droughtOptions/metadata.ts | 0 .../droughtOptions/styles.ts | 0 .../DroughtRisksHoverDescription.tsx | 0 .../droughtRisks/color-maps.ts | 0 .../droughtRisks/data-access.ts | 0 .../droughtRisks/data-formats.ts | 0 .../droughtRisks/drought-risk-view-layer.ts | 2 +- .../droughtRisks/metadata.ts | 0 .../droughtRisks/styles.ts | 0 .../hazards/HazardHoverDescription.tsx | 0 .../hazards/HazardLegend.tsx | 0 .../hazards/color-maps.ts | 0 .../hazards/domains.ts | 0 .../hazards/hazard-view-layer.ts | 0 .../hazards/metadata.ts | 0 .../hazards/source.ts | 0 .../marine/MarineHoverDescription.tsx | 0 .../marine/colors.ts | 0 .../marine/domains.ts | 0 .../marine/marine-view-layer.ts | 0 .../marine/styles.ts | 0 .../networks/adaptation-options.json | 0 .../networks/adaptation-sector-layers.json | 0 .../networks/color-maps.ts | 0 .../networks/colors.ts | 0 .../networks/domains.ts | 0 .../networks/hierarchy.ts | 0 .../networks/infrastructure-view-layer.ts | 4 +- .../networks/metadata.ts | 0 .../networks/network-view-layer.ts | 0 .../networks/styles.ts | 0 .../networks/view-layers.ts | 2 +- .../regions/RegionHoverDescription.tsx | 0 .../regions/boundaries-view-layer.ts | 0 .../regions/color-maps.ts | 0 .../regions/metadata.ts | 0 .../regions/population-view-layer.ts | 0 .../regions/region-boundaries-deck-layer.ts | 0 .../regions/region-labels-deck-layer.ts | 0 .../regions/source.ts | 0 .../regions/styles.ts | 0 .../TerrestrialHoverDescription.tsx | 0 .../terrestrial/color-maps.ts | 0 .../terrestrial/colors.ts | 0 .../terrestrial/data-access.ts | 0 .../terrestrial/data-formats.ts | 0 .../terrestrial/domains.ts | 0 .../terrestrial/landuse-hierarchy.ts | 0 .../terrestrial/styles.ts | 0 .../terrestrial/terrestrial-view-layer.ts | 0 frontend/src/config/sections.ts | 12 ++-- .../adaptations/FeatureAdaptationsTable.tsx | 2 +- .../features/FeatureSidebarContent.tsx | 2 +- .../features/damages/DamagesSection.tsx | 2 +- .../details/regions/RegionDetailsContent.tsx | 2 +- .../solutions/SolutionsSidebarContent.tsx | 4 +- .../content/VectorHoverDescription.tsx | 2 +- frontend/src/pages/AssetListPage.tsx | 2 +- frontend/src/react-app-env.d.ts | 1 - frontend/src/sidebar/SidebarContent.tsx | 14 ++--- .../buildings/BuildingsControl.tsx | 2 +- .../buildings/BuildingsSection.tsx | 2 +- .../drought/DroughtsControl.tsx | 4 +- .../drought/DroughtsSection.tsx | 0 .../{ => sections}/hazards/HazardsControl.tsx | 4 +- .../{ => sections}/hazards/HazardsSection.tsx | 0 .../networks/AdaptationControl.tsx | 0 .../networks/DamageSourceControl.tsx | 2 +- .../networks/NetworkControl.tsx | 4 +- .../networks/NetworksSection.tsx | 0 .../{ => sections}/regions/RegionsControl.tsx | 2 +- .../{ => sections}/regions/RegionsSection.tsx | 0 .../solutions/MarineControl.tsx | 2 +- .../solutions/MarineSection.tsx | 0 .../solutions/TerrestrialControl.tsx | 2 +- .../solutions/TerrestrialLandUseTree.tsx | 4 +- .../solutions/TerrestrialSection.tsx | 0 frontend/src/state/data-params.ts | 4 +- .../damage-mapping/damage-map.ts | 2 +- .../damage-mapping/damage-style-params.ts | 2 +- .../drought/drought-parameters.ts | 4 +- .../hazards/hazard-visibility.ts | 2 +- .../networks/network-selection.ts | 2 +- frontend/src/state/data-selection/regions.ts | 2 +- .../data-selection/solutions/landuse-tree.ts | 4 +- .../solutions/marine-filters.ts | 2 +- .../solutions/terrestrial-filters.ts | 2 +- .../src/state/layers/data-layers/buildings.ts | 2 +- .../layers/data-layers/droughtOptions.ts | 6 +- .../state/layers/data-layers/droughtRisks.ts | 6 +- .../src/state/layers/data-layers/hazards.ts | 4 +- .../src/state/layers/data-layers/marine.ts | 4 +- .../src/state/layers/data-layers/networks.ts | 8 +-- .../src/state/layers/data-layers/regions.ts | 4 +- .../state/layers/data-layers/terrestrial.ts | 8 +-- frontend/src/state/layers/ui/labels.ts | 2 +- frontend/src/state/sections.ts | 2 +- 111 files changed, 142 insertions(+), 80 deletions(-) create mode 100644 frontend/docs/structure.md rename frontend/src/config/{view-layers => data-layers}/assets/AssetHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/assets/asset-view-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/assets/data-access.ts (100%) rename frontend/src/config/{view-layers => data-layers}/assets/data-formats.ts (97%) rename frontend/src/config/{view-layers => data-layers}/assets/source.ts (100%) rename frontend/src/config/{view-layers => data-layers}/buildings/buildings-view-layer.ts (93%) rename frontend/src/config/{view-layers => data-layers}/buildings/colors.ts (100%) rename frontend/src/config/{view-layers => data-layers}/buildings/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/DroughtOptionsHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/color-maps.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/data-access.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/data-formats.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/drought-options-view-layer.ts (97%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/metadata.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtOptions/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/DroughtRisksHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/color-maps.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/data-access.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/data-formats.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/drought-risk-view-layer.ts (97%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/metadata.ts (100%) rename frontend/src/config/{view-layers => data-layers}/droughtRisks/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/HazardHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/HazardLegend.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/color-maps.ts (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/domains.ts (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/hazard-view-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/metadata.ts (100%) rename frontend/src/config/{view-layers => data-layers}/hazards/source.ts (100%) rename frontend/src/config/{view-layers => data-layers}/marine/MarineHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/marine/colors.ts (100%) rename frontend/src/config/{view-layers => data-layers}/marine/domains.ts (100%) rename frontend/src/config/{view-layers => data-layers}/marine/marine-view-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/marine/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/adaptation-options.json (100%) rename frontend/src/config/{view-layers => data-layers}/networks/adaptation-sector-layers.json (100%) rename frontend/src/config/{view-layers => data-layers}/networks/color-maps.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/colors.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/domains.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/hierarchy.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/infrastructure-view-layer.ts (78%) rename frontend/src/config/{view-layers => data-layers}/networks/metadata.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/network-view-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/networks/view-layers.ts (99%) rename frontend/src/config/{view-layers => data-layers}/regions/RegionHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/regions/boundaries-view-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/color-maps.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/metadata.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/population-view-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/region-boundaries-deck-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/region-labels-deck-layer.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/source.ts (100%) rename frontend/src/config/{view-layers => data-layers}/regions/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/TerrestrialHoverDescription.tsx (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/color-maps.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/colors.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/data-access.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/data-formats.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/domains.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/landuse-hierarchy.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/styles.ts (100%) rename frontend/src/config/{view-layers => data-layers}/terrestrial/terrestrial-view-layer.ts (100%) delete mode 100644 frontend/src/react-app-env.d.ts rename frontend/src/sidebar/{ => sections}/buildings/BuildingsControl.tsx (91%) rename frontend/src/sidebar/{ => sections}/buildings/BuildingsSection.tsx (92%) rename frontend/src/sidebar/{ => sections}/drought/DroughtsControl.tsx (95%) rename frontend/src/sidebar/{ => sections}/drought/DroughtsSection.tsx (100%) rename frontend/src/sidebar/{ => sections}/hazards/HazardsControl.tsx (92%) rename frontend/src/sidebar/{ => sections}/hazards/HazardsSection.tsx (100%) rename frontend/src/sidebar/{ => sections}/networks/AdaptationControl.tsx (100%) rename frontend/src/sidebar/{ => sections}/networks/DamageSourceControl.tsx (97%) rename frontend/src/sidebar/{ => sections}/networks/NetworkControl.tsx (92%) rename frontend/src/sidebar/{ => sections}/networks/NetworksSection.tsx (100%) rename frontend/src/sidebar/{ => sections}/regions/RegionsControl.tsx (93%) rename frontend/src/sidebar/{ => sections}/regions/RegionsSection.tsx (100%) rename frontend/src/sidebar/{ => sections}/solutions/MarineControl.tsx (96%) rename frontend/src/sidebar/{ => sections}/solutions/MarineSection.tsx (100%) rename frontend/src/sidebar/{ => sections}/solutions/TerrestrialControl.tsx (98%) rename frontend/src/sidebar/{ => sections}/solutions/TerrestrialLandUseTree.tsx (89%) rename frontend/src/sidebar/{ => sections}/solutions/TerrestrialSection.tsx (100%) diff --git a/frontend/docs/structure.md b/frontend/docs/structure.md new file mode 100644 index 00000000..70adc134 --- /dev/null +++ b/frontend/docs/structure.md @@ -0,0 +1,63 @@ +# Code structure + +Author: Jim O'Donnell + +Date: 9 August 2024 + +- `src/` + - `config/` - contains the configuration and code related to the various + datasets and visualisation layers, as well as other pieces of configuration. + - `data-layers/` - config for individual data layers. There should be a folder here for each entry in `config/view-layers.ts` + - `assets/` - common functionality for "vector assets" - vector feature + layers that can have damages data visualised on them. + - `basemaps.ts` - configuration of basemap styles. + - `interaction-groups.ts` - configuration of all the interaction groups + available in the app. + - `map-view.ts` - configuration of the initial map view coordinates, zoom + etc. + - `sections.ts` - style config for the sidebar sections. + - `sources.ts` - functions to build URLs to access datasets in the + vector/raster backends. + - `view-layers.ts` - a list of the view layer IDs used by the map. + - `views.ts` - default sidebar state (visible/hidden, expanded/collapsed etc.) for the individual map views. + - `details/` - UI and logic for displaying details when a vector feature is clicked in the map. + - `lib/` - self-contained library code which should be unrelated to the specific + datasets/content of the app. **NOTE** there is an ESLint rule enforcing that + files inside the `lib` folder cannot import code from any other folder in + the project, to enforce the separation between generic and content-specific + code. + - `map/` - UI, layout and behaviour of the main map view of the app. Contains + also the code for displaying basemap selection, legend for current layers, + tooltip for current hover. + - `pages/` - contents and layouts of the main pages of the app. + - `sidebar/` - the main layer selection sidebar. + - `sections/` - UI components for the controls displayed in various sidebar + sections. Specific to the datasets displayed in the app. + - `ui/` - components shared by the sidebar contents. + - `SidebarContent.tsx` - defining the overall contents of the sidebar. + - `SidebarPanel.tsx` - each section in the sidebar should be composed from `SidebarPanel`. + - `url-state.tsx` - Recoil state synchronising the state of the sidebar + sections to the URL. + - `state/` - Recoil state for the app. + - `data-selection/` - state used by layer selection sidebar. + - `layers/` - state which creates the view layer instances based on app + state and data selection state. + - `data-layers/` - state of the layers pertaining to individual datasets. There should be one file here for each identifier in `config/view-layers.ts`. + - `ui/` - special layers for UI (e.g. feature bounding box layer.) + - `interaction-groups.ts` - state containing all active interaction groups. + - `view-layers.ts` - state combining all active view layers. + - `view-layer-params.ts` - state setting up the dynamic view layer + parameters. + - `map-view/` - map view state and syncing it to the URL. + - `data-params.ts` - view layer data parameters. Updated from the sidebar and used to construct map tile URLs. + - `sections.ts` - section state for individual sidebar sections. + - `view.ts` - view state for individual map views. + - `api-client.ts` - singleton instances of API clients. + - `App.ts` - main React app component. + - `index.css` - global styles (avoid, set styles in components instead.) + - `index.tsx` - Vite app entry point. + - `Nav.tsx` - main navigation component. + - `query-client.ts` - singleton instance of react-query client. + - `theme.ts` - MUI theme configuration. + - `use-is-mobile.ts` - util hook. + - `vite-env.d.ts` - Vite types inclusion. diff --git a/frontend/src/config/view-layers/assets/AssetHoverDescription.tsx b/frontend/src/config/data-layers/assets/AssetHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/assets/AssetHoverDescription.tsx rename to frontend/src/config/data-layers/assets/AssetHoverDescription.tsx diff --git a/frontend/src/config/view-layers/assets/asset-view-layer.ts b/frontend/src/config/data-layers/assets/asset-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/assets/asset-view-layer.ts rename to frontend/src/config/data-layers/assets/asset-view-layer.ts diff --git a/frontend/src/config/view-layers/assets/data-access.ts b/frontend/src/config/data-layers/assets/data-access.ts similarity index 100% rename from frontend/src/config/view-layers/assets/data-access.ts rename to frontend/src/config/data-layers/assets/data-access.ts diff --git a/frontend/src/config/view-layers/assets/data-formats.ts b/frontend/src/config/data-layers/assets/data-formats.ts similarity index 97% rename from frontend/src/config/view-layers/assets/data-formats.ts rename to frontend/src/config/data-layers/assets/data-formats.ts index 1d952ed4..ebcd5a0c 100644 --- a/frontend/src/config/view-layers/assets/data-formats.ts +++ b/frontend/src/config/data-layers/assets/data-formats.ts @@ -1,4 +1,4 @@ -import { HAZARDS_METADATA } from 'config/view-layers/hazards/metadata'; +import { HAZARDS_METADATA } from 'config/data-layers/hazards/metadata'; import { FieldSpec, FormatConfig } from 'lib/data-map/view-layers'; import { isNullish, numFormat, numFormatMoney, paren } from 'lib/helpers'; import startCase from 'lodash/startCase'; diff --git a/frontend/src/config/view-layers/assets/source.ts b/frontend/src/config/data-layers/assets/source.ts similarity index 100% rename from frontend/src/config/view-layers/assets/source.ts rename to frontend/src/config/data-layers/assets/source.ts diff --git a/frontend/src/config/view-layers/buildings/buildings-view-layer.ts b/frontend/src/config/data-layers/buildings/buildings-view-layer.ts similarity index 93% rename from frontend/src/config/view-layers/buildings/buildings-view-layer.ts rename to frontend/src/config/data-layers/buildings/buildings-view-layer.ts index f888afde..8383c352 100644 --- a/frontend/src/config/view-layers/buildings/buildings-view-layer.ts +++ b/frontend/src/config/data-layers/buildings/buildings-view-layer.ts @@ -1,8 +1,8 @@ import { ViewLayer } from 'lib/data-map/view-layers'; import { COLORS } from './colors'; -import { assetViewLayer } from 'config/view-layers/assets/asset-view-layer'; +import { assetViewLayer } from 'config/data-layers/assets/asset-view-layer'; import { border, fillColor } from 'lib/deck/props/style'; -import { assetDataAccessFunction } from 'config/view-layers/assets/data-access'; +import { assetDataAccessFunction } from 'config/data-layers/assets/data-access'; enum BuildingType { commercial = 'commercial', diff --git a/frontend/src/config/view-layers/buildings/colors.ts b/frontend/src/config/data-layers/buildings/colors.ts similarity index 100% rename from frontend/src/config/view-layers/buildings/colors.ts rename to frontend/src/config/data-layers/buildings/colors.ts diff --git a/frontend/src/config/view-layers/buildings/styles.ts b/frontend/src/config/data-layers/buildings/styles.ts similarity index 100% rename from frontend/src/config/view-layers/buildings/styles.ts rename to frontend/src/config/data-layers/buildings/styles.ts diff --git a/frontend/src/config/view-layers/droughtOptions/DroughtOptionsHoverDescription.tsx b/frontend/src/config/data-layers/droughtOptions/DroughtOptionsHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/droughtOptions/DroughtOptionsHoverDescription.tsx rename to frontend/src/config/data-layers/droughtOptions/DroughtOptionsHoverDescription.tsx diff --git a/frontend/src/config/view-layers/droughtOptions/color-maps.ts b/frontend/src/config/data-layers/droughtOptions/color-maps.ts similarity index 100% rename from frontend/src/config/view-layers/droughtOptions/color-maps.ts rename to frontend/src/config/data-layers/droughtOptions/color-maps.ts diff --git a/frontend/src/config/view-layers/droughtOptions/data-access.ts b/frontend/src/config/data-layers/droughtOptions/data-access.ts similarity index 100% rename from frontend/src/config/view-layers/droughtOptions/data-access.ts rename to frontend/src/config/data-layers/droughtOptions/data-access.ts diff --git a/frontend/src/config/view-layers/droughtOptions/data-formats.ts b/frontend/src/config/data-layers/droughtOptions/data-formats.ts similarity index 100% rename from frontend/src/config/view-layers/droughtOptions/data-formats.ts rename to frontend/src/config/data-layers/droughtOptions/data-formats.ts diff --git a/frontend/src/config/view-layers/droughtOptions/drought-options-view-layer.ts b/frontend/src/config/data-layers/droughtOptions/drought-options-view-layer.ts similarity index 97% rename from frontend/src/config/view-layers/droughtOptions/drought-options-view-layer.ts rename to frontend/src/config/data-layers/droughtOptions/drought-options-view-layer.ts index 6b002f79..288ce0bc 100644 --- a/frontend/src/config/view-layers/droughtOptions/drought-options-view-layer.ts +++ b/frontend/src/config/data-layers/droughtOptions/drought-options-view-layer.ts @@ -1,6 +1,6 @@ import { createElement } from 'react'; -import { ASSETS_SOURCE } from 'config/view-layers/assets/source'; +import { ASSETS_SOURCE } from 'config/data-layers/assets/source'; import { colorMap } from 'lib/color-map'; import { ViewLayer } from 'lib/data-map/view-layers'; import { VectorTarget } from 'lib/data-map/types'; diff --git a/frontend/src/config/view-layers/droughtOptions/metadata.ts b/frontend/src/config/data-layers/droughtOptions/metadata.ts similarity index 100% rename from frontend/src/config/view-layers/droughtOptions/metadata.ts rename to frontend/src/config/data-layers/droughtOptions/metadata.ts diff --git a/frontend/src/config/view-layers/droughtOptions/styles.ts b/frontend/src/config/data-layers/droughtOptions/styles.ts similarity index 100% rename from frontend/src/config/view-layers/droughtOptions/styles.ts rename to frontend/src/config/data-layers/droughtOptions/styles.ts diff --git a/frontend/src/config/view-layers/droughtRisks/DroughtRisksHoverDescription.tsx b/frontend/src/config/data-layers/droughtRisks/DroughtRisksHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/droughtRisks/DroughtRisksHoverDescription.tsx rename to frontend/src/config/data-layers/droughtRisks/DroughtRisksHoverDescription.tsx diff --git a/frontend/src/config/view-layers/droughtRisks/color-maps.ts b/frontend/src/config/data-layers/droughtRisks/color-maps.ts similarity index 100% rename from frontend/src/config/view-layers/droughtRisks/color-maps.ts rename to frontend/src/config/data-layers/droughtRisks/color-maps.ts diff --git a/frontend/src/config/view-layers/droughtRisks/data-access.ts b/frontend/src/config/data-layers/droughtRisks/data-access.ts similarity index 100% rename from frontend/src/config/view-layers/droughtRisks/data-access.ts rename to frontend/src/config/data-layers/droughtRisks/data-access.ts diff --git a/frontend/src/config/view-layers/droughtRisks/data-formats.ts b/frontend/src/config/data-layers/droughtRisks/data-formats.ts similarity index 100% rename from frontend/src/config/view-layers/droughtRisks/data-formats.ts rename to frontend/src/config/data-layers/droughtRisks/data-formats.ts diff --git a/frontend/src/config/view-layers/droughtRisks/drought-risk-view-layer.ts b/frontend/src/config/data-layers/droughtRisks/drought-risk-view-layer.ts similarity index 97% rename from frontend/src/config/view-layers/droughtRisks/drought-risk-view-layer.ts rename to frontend/src/config/data-layers/droughtRisks/drought-risk-view-layer.ts index e31c8bf6..db292552 100644 --- a/frontend/src/config/view-layers/droughtRisks/drought-risk-view-layer.ts +++ b/frontend/src/config/data-layers/droughtRisks/drought-risk-view-layer.ts @@ -1,6 +1,6 @@ import { createElement } from 'react'; -import { ASSETS_SOURCE } from 'config/view-layers/assets/source'; +import { ASSETS_SOURCE } from 'config/data-layers/assets/source'; import { colorMap } from 'lib/color-map'; import { ViewLayer } from 'lib/data-map/view-layers'; import { VectorTarget } from 'lib/data-map/types'; diff --git a/frontend/src/config/view-layers/droughtRisks/metadata.ts b/frontend/src/config/data-layers/droughtRisks/metadata.ts similarity index 100% rename from frontend/src/config/view-layers/droughtRisks/metadata.ts rename to frontend/src/config/data-layers/droughtRisks/metadata.ts diff --git a/frontend/src/config/view-layers/droughtRisks/styles.ts b/frontend/src/config/data-layers/droughtRisks/styles.ts similarity index 100% rename from frontend/src/config/view-layers/droughtRisks/styles.ts rename to frontend/src/config/data-layers/droughtRisks/styles.ts diff --git a/frontend/src/config/view-layers/hazards/HazardHoverDescription.tsx b/frontend/src/config/data-layers/hazards/HazardHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/hazards/HazardHoverDescription.tsx rename to frontend/src/config/data-layers/hazards/HazardHoverDescription.tsx diff --git a/frontend/src/config/view-layers/hazards/HazardLegend.tsx b/frontend/src/config/data-layers/hazards/HazardLegend.tsx similarity index 100% rename from frontend/src/config/view-layers/hazards/HazardLegend.tsx rename to frontend/src/config/data-layers/hazards/HazardLegend.tsx diff --git a/frontend/src/config/view-layers/hazards/color-maps.ts b/frontend/src/config/data-layers/hazards/color-maps.ts similarity index 100% rename from frontend/src/config/view-layers/hazards/color-maps.ts rename to frontend/src/config/data-layers/hazards/color-maps.ts diff --git a/frontend/src/config/view-layers/hazards/domains.ts b/frontend/src/config/data-layers/hazards/domains.ts similarity index 100% rename from frontend/src/config/view-layers/hazards/domains.ts rename to frontend/src/config/data-layers/hazards/domains.ts diff --git a/frontend/src/config/view-layers/hazards/hazard-view-layer.ts b/frontend/src/config/data-layers/hazards/hazard-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/hazards/hazard-view-layer.ts rename to frontend/src/config/data-layers/hazards/hazard-view-layer.ts diff --git a/frontend/src/config/view-layers/hazards/metadata.ts b/frontend/src/config/data-layers/hazards/metadata.ts similarity index 100% rename from frontend/src/config/view-layers/hazards/metadata.ts rename to frontend/src/config/data-layers/hazards/metadata.ts diff --git a/frontend/src/config/view-layers/hazards/source.ts b/frontend/src/config/data-layers/hazards/source.ts similarity index 100% rename from frontend/src/config/view-layers/hazards/source.ts rename to frontend/src/config/data-layers/hazards/source.ts diff --git a/frontend/src/config/view-layers/marine/MarineHoverDescription.tsx b/frontend/src/config/data-layers/marine/MarineHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/marine/MarineHoverDescription.tsx rename to frontend/src/config/data-layers/marine/MarineHoverDescription.tsx diff --git a/frontend/src/config/view-layers/marine/colors.ts b/frontend/src/config/data-layers/marine/colors.ts similarity index 100% rename from frontend/src/config/view-layers/marine/colors.ts rename to frontend/src/config/data-layers/marine/colors.ts diff --git a/frontend/src/config/view-layers/marine/domains.ts b/frontend/src/config/data-layers/marine/domains.ts similarity index 100% rename from frontend/src/config/view-layers/marine/domains.ts rename to frontend/src/config/data-layers/marine/domains.ts diff --git a/frontend/src/config/view-layers/marine/marine-view-layer.ts b/frontend/src/config/data-layers/marine/marine-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/marine/marine-view-layer.ts rename to frontend/src/config/data-layers/marine/marine-view-layer.ts diff --git a/frontend/src/config/view-layers/marine/styles.ts b/frontend/src/config/data-layers/marine/styles.ts similarity index 100% rename from frontend/src/config/view-layers/marine/styles.ts rename to frontend/src/config/data-layers/marine/styles.ts diff --git a/frontend/src/config/view-layers/networks/adaptation-options.json b/frontend/src/config/data-layers/networks/adaptation-options.json similarity index 100% rename from frontend/src/config/view-layers/networks/adaptation-options.json rename to frontend/src/config/data-layers/networks/adaptation-options.json diff --git a/frontend/src/config/view-layers/networks/adaptation-sector-layers.json b/frontend/src/config/data-layers/networks/adaptation-sector-layers.json similarity index 100% rename from frontend/src/config/view-layers/networks/adaptation-sector-layers.json rename to frontend/src/config/data-layers/networks/adaptation-sector-layers.json diff --git a/frontend/src/config/view-layers/networks/color-maps.ts b/frontend/src/config/data-layers/networks/color-maps.ts similarity index 100% rename from frontend/src/config/view-layers/networks/color-maps.ts rename to frontend/src/config/data-layers/networks/color-maps.ts diff --git a/frontend/src/config/view-layers/networks/colors.ts b/frontend/src/config/data-layers/networks/colors.ts similarity index 100% rename from frontend/src/config/view-layers/networks/colors.ts rename to frontend/src/config/data-layers/networks/colors.ts diff --git a/frontend/src/config/view-layers/networks/domains.ts b/frontend/src/config/data-layers/networks/domains.ts similarity index 100% rename from frontend/src/config/view-layers/networks/domains.ts rename to frontend/src/config/data-layers/networks/domains.ts diff --git a/frontend/src/config/view-layers/networks/hierarchy.ts b/frontend/src/config/data-layers/networks/hierarchy.ts similarity index 100% rename from frontend/src/config/view-layers/networks/hierarchy.ts rename to frontend/src/config/data-layers/networks/hierarchy.ts diff --git a/frontend/src/config/view-layers/networks/infrastructure-view-layer.ts b/frontend/src/config/data-layers/networks/infrastructure-view-layer.ts similarity index 78% rename from frontend/src/config/view-layers/networks/infrastructure-view-layer.ts rename to frontend/src/config/data-layers/networks/infrastructure-view-layer.ts index a4fdbb7b..25baa34c 100644 --- a/frontend/src/config/view-layers/networks/infrastructure-view-layer.ts +++ b/frontend/src/config/data-layers/networks/infrastructure-view-layer.ts @@ -1,6 +1,6 @@ import { ViewLayer, ViewLayerFunctionOptions } from 'lib/data-map/view-layers'; -import { assetViewLayer } from 'config/view-layers/assets/asset-view-layer'; -import { assetDataAccessFunction } from 'config/view-layers/assets/data-access'; +import { assetViewLayer } from 'config/data-layers/assets/asset-view-layer'; +import { assetDataAccessFunction } from 'config/data-layers/assets/data-access'; export function infrastructureViewLayer( assetId: string, diff --git a/frontend/src/config/view-layers/networks/metadata.ts b/frontend/src/config/data-layers/networks/metadata.ts similarity index 100% rename from frontend/src/config/view-layers/networks/metadata.ts rename to frontend/src/config/data-layers/networks/metadata.ts diff --git a/frontend/src/config/view-layers/networks/network-view-layer.ts b/frontend/src/config/data-layers/networks/network-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/networks/network-view-layer.ts rename to frontend/src/config/data-layers/networks/network-view-layer.ts diff --git a/frontend/src/config/view-layers/networks/styles.ts b/frontend/src/config/data-layers/networks/styles.ts similarity index 100% rename from frontend/src/config/view-layers/networks/styles.ts rename to frontend/src/config/data-layers/networks/styles.ts diff --git a/frontend/src/config/view-layers/networks/view-layers.ts b/frontend/src/config/data-layers/networks/view-layers.ts similarity index 99% rename from frontend/src/config/view-layers/networks/view-layers.ts rename to frontend/src/config/data-layers/networks/view-layers.ts index 389d30a0..8415ea05 100644 --- a/frontend/src/config/view-layers/networks/view-layers.ts +++ b/frontend/src/config/data-layers/networks/view-layers.ts @@ -13,7 +13,7 @@ import { infrastructureViewLayer } from './infrastructure-view-layer'; import { StyleParams, ViewLayer } from 'lib/data-map/view-layers'; import { fillColor, strokeColor } from 'lib/deck/props/style'; import { dataColorMap } from 'lib/deck/props/color-map'; -import { getAssetDataAccessor } from 'config/view-layers/assets/data-access'; +import { getAssetDataAccessor } from 'config/data-layers/assets/data-access'; import { colorMap } from 'lib/color-map'; import { NETWORKS_METADATA } from './metadata'; import { iconType } from 'lib/map-shapes/deck-icon'; diff --git a/frontend/src/config/view-layers/regions/RegionHoverDescription.tsx b/frontend/src/config/data-layers/regions/RegionHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/regions/RegionHoverDescription.tsx rename to frontend/src/config/data-layers/regions/RegionHoverDescription.tsx diff --git a/frontend/src/config/view-layers/regions/boundaries-view-layer.ts b/frontend/src/config/data-layers/regions/boundaries-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/regions/boundaries-view-layer.ts rename to frontend/src/config/data-layers/regions/boundaries-view-layer.ts diff --git a/frontend/src/config/view-layers/regions/color-maps.ts b/frontend/src/config/data-layers/regions/color-maps.ts similarity index 100% rename from frontend/src/config/view-layers/regions/color-maps.ts rename to frontend/src/config/data-layers/regions/color-maps.ts diff --git a/frontend/src/config/view-layers/regions/metadata.ts b/frontend/src/config/data-layers/regions/metadata.ts similarity index 100% rename from frontend/src/config/view-layers/regions/metadata.ts rename to frontend/src/config/data-layers/regions/metadata.ts diff --git a/frontend/src/config/view-layers/regions/population-view-layer.ts b/frontend/src/config/data-layers/regions/population-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/regions/population-view-layer.ts rename to frontend/src/config/data-layers/regions/population-view-layer.ts diff --git a/frontend/src/config/view-layers/regions/region-boundaries-deck-layer.ts b/frontend/src/config/data-layers/regions/region-boundaries-deck-layer.ts similarity index 100% rename from frontend/src/config/view-layers/regions/region-boundaries-deck-layer.ts rename to frontend/src/config/data-layers/regions/region-boundaries-deck-layer.ts diff --git a/frontend/src/config/view-layers/regions/region-labels-deck-layer.ts b/frontend/src/config/data-layers/regions/region-labels-deck-layer.ts similarity index 100% rename from frontend/src/config/view-layers/regions/region-labels-deck-layer.ts rename to frontend/src/config/data-layers/regions/region-labels-deck-layer.ts diff --git a/frontend/src/config/view-layers/regions/source.ts b/frontend/src/config/data-layers/regions/source.ts similarity index 100% rename from frontend/src/config/view-layers/regions/source.ts rename to frontend/src/config/data-layers/regions/source.ts diff --git a/frontend/src/config/view-layers/regions/styles.ts b/frontend/src/config/data-layers/regions/styles.ts similarity index 100% rename from frontend/src/config/view-layers/regions/styles.ts rename to frontend/src/config/data-layers/regions/styles.ts diff --git a/frontend/src/config/view-layers/terrestrial/TerrestrialHoverDescription.tsx b/frontend/src/config/data-layers/terrestrial/TerrestrialHoverDescription.tsx similarity index 100% rename from frontend/src/config/view-layers/terrestrial/TerrestrialHoverDescription.tsx rename to frontend/src/config/data-layers/terrestrial/TerrestrialHoverDescription.tsx diff --git a/frontend/src/config/view-layers/terrestrial/color-maps.ts b/frontend/src/config/data-layers/terrestrial/color-maps.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/color-maps.ts rename to frontend/src/config/data-layers/terrestrial/color-maps.ts diff --git a/frontend/src/config/view-layers/terrestrial/colors.ts b/frontend/src/config/data-layers/terrestrial/colors.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/colors.ts rename to frontend/src/config/data-layers/terrestrial/colors.ts diff --git a/frontend/src/config/view-layers/terrestrial/data-access.ts b/frontend/src/config/data-layers/terrestrial/data-access.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/data-access.ts rename to frontend/src/config/data-layers/terrestrial/data-access.ts diff --git a/frontend/src/config/view-layers/terrestrial/data-formats.ts b/frontend/src/config/data-layers/terrestrial/data-formats.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/data-formats.ts rename to frontend/src/config/data-layers/terrestrial/data-formats.ts diff --git a/frontend/src/config/view-layers/terrestrial/domains.ts b/frontend/src/config/data-layers/terrestrial/domains.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/domains.ts rename to frontend/src/config/data-layers/terrestrial/domains.ts diff --git a/frontend/src/config/view-layers/terrestrial/landuse-hierarchy.ts b/frontend/src/config/data-layers/terrestrial/landuse-hierarchy.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/landuse-hierarchy.ts rename to frontend/src/config/data-layers/terrestrial/landuse-hierarchy.ts diff --git a/frontend/src/config/view-layers/terrestrial/styles.ts b/frontend/src/config/data-layers/terrestrial/styles.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/styles.ts rename to frontend/src/config/data-layers/terrestrial/styles.ts diff --git a/frontend/src/config/view-layers/terrestrial/terrestrial-view-layer.ts b/frontend/src/config/data-layers/terrestrial/terrestrial-view-layer.ts similarity index 100% rename from frontend/src/config/view-layers/terrestrial/terrestrial-view-layer.ts rename to frontend/src/config/data-layers/terrestrial/terrestrial-view-layer.ts diff --git a/frontend/src/config/sections.ts b/frontend/src/config/sections.ts index 82d314a1..82283dac 100644 --- a/frontend/src/config/sections.ts +++ b/frontend/src/config/sections.ts @@ -1,10 +1,10 @@ import { StyleSelectionOption } from 'state/sections'; -import { BUILDING_STYLES } from './view-layers/buildings/styles'; -import { DROUGHT_STYLES } from './view-layers/droughtRisks/styles'; -import { NETWORK_STYLES } from './view-layers/networks/styles'; -import { REGION_STYLES } from './view-layers/regions/styles'; -import { MARINE_STYLES } from './view-layers/marine/styles'; -import { TERRESTRIAL_STYLES } from './view-layers/terrestrial/styles'; +import { BUILDING_STYLES } from './data-layers/buildings/styles'; +import { DROUGHT_STYLES } from './data-layers/droughtRisks/styles'; +import { NETWORK_STYLES } from './data-layers/networks/styles'; +import { REGION_STYLES } from './data-layers/regions/styles'; +import { MARINE_STYLES } from './data-layers/marine/styles'; +import { TERRESTRIAL_STYLES } from './data-layers/terrestrial/styles'; export const SECTIONS_CONFIG: Record }> = { assets: { diff --git a/frontend/src/details/adaptations/FeatureAdaptationsTable.tsx b/frontend/src/details/adaptations/FeatureAdaptationsTable.tsx index a720451c..b4e2472c 100644 --- a/frontend/src/details/adaptations/FeatureAdaptationsTable.tsx +++ b/frontend/src/details/adaptations/FeatureAdaptationsTable.tsx @@ -4,7 +4,7 @@ import { Box } from '@mui/system'; import { ExpandableRow } from 'asset-list/ExpandableRow'; import { SortedAssetTable } from 'asset-list/SortedAssetTable'; import { ListFeature } from 'asset-list/use-sorted-features'; -import { getAssetDataFormats } from 'config/view-layers/assets/data-formats'; +import { getAssetDataFormats } from 'config/data-layers/assets/data-formats'; import { FeatureSidebarContent } from 'details/features/FeatureSidebarContent'; import { BoundingBox, extendBbox } from 'lib/bounding-box'; import { colorMap } from 'lib/color-map'; diff --git a/frontend/src/details/features/FeatureSidebarContent.tsx b/frontend/src/details/features/FeatureSidebarContent.tsx index 97e15e30..a4723d06 100644 --- a/frontend/src/details/features/FeatureSidebarContent.tsx +++ b/frontend/src/details/features/FeatureSidebarContent.tsx @@ -20,7 +20,7 @@ import { WaterPipelineDetails, WaterSupplyNodeDetails, } from './detail-components'; -import { NETWORKS_METADATA } from 'config/view-layers/networks/metadata'; +import { NETWORKS_METADATA } from 'config/data-layers/networks/metadata'; import { ColorBox } from 'map/tooltip/content/ColorBox'; import { ApiClient } from 'lib/api-client'; import { DamagesSection } from './damages/DamagesSection'; diff --git a/frontend/src/details/features/damages/DamagesSection.tsx b/frontend/src/details/features/damages/DamagesSection.tsx index cf18510e..b8654ce8 100644 --- a/frontend/src/details/features/damages/DamagesSection.tsx +++ b/frontend/src/details/features/damages/DamagesSection.tsx @@ -1,7 +1,7 @@ import { Download } from '@mui/icons-material'; import { FormControl, InputLabel, IconButton, MenuItem, Select, Typography } from '@mui/material'; import { Box } from '@mui/system'; -import { HAZARD_DOMAINS } from 'config/view-layers/hazards/domains'; +import { HAZARD_DOMAINS } from 'config/data-layers/hazards/domains'; import { ExpectedDamage, ReturnPeriodDamage } from 'lib/api-client'; import { downloadFile, titleCase, unique } from 'lib/helpers'; import { useSelect } from 'lib/hooks/use-select'; diff --git a/frontend/src/details/regions/RegionDetailsContent.tsx b/frontend/src/details/regions/RegionDetailsContent.tsx index 4f87f2c1..213d17fa 100644 --- a/frontend/src/details/regions/RegionDetailsContent.tsx +++ b/frontend/src/details/regions/RegionDetailsContent.tsx @@ -1,5 +1,5 @@ import { Typography } from '@mui/material'; -import { REGIONS_METADATA } from 'config/view-layers/regions/metadata'; +import { REGIONS_METADATA } from 'config/data-layers/regions/metadata'; import { DataItem } from 'details/features/detail-components'; import { InteractionTarget } from 'lib/data-map/types'; import { numFormat } from 'lib/helpers'; diff --git a/frontend/src/details/solutions/SolutionsSidebarContent.tsx b/frontend/src/details/solutions/SolutionsSidebarContent.tsx index 2661209a..75353691 100644 --- a/frontend/src/details/solutions/SolutionsSidebarContent.tsx +++ b/frontend/src/details/solutions/SolutionsSidebarContent.tsx @@ -1,6 +1,6 @@ import { Typography } from '@mui/material'; -import { terrestrialSlope, terrestrialElevation } from 'config/view-layers/terrestrial/color-maps'; -import { MARINE_HABITATS_LOOKUP } from 'config/view-layers/marine/domains'; +import { terrestrialSlope, terrestrialElevation } from 'config/data-layers/terrestrial/color-maps'; +import { MARINE_HABITATS_LOOKUP } from 'config/data-layers/marine/domains'; import { DataItem } from 'details/features/detail-components'; import { colorMap } from 'lib/color-map'; import startCase from 'lodash/startCase'; diff --git a/frontend/src/map/tooltip/content/VectorHoverDescription.tsx b/frontend/src/map/tooltip/content/VectorHoverDescription.tsx index d3901a3d..6ef687c3 100644 --- a/frontend/src/map/tooltip/content/VectorHoverDescription.tsx +++ b/frontend/src/map/tooltip/content/VectorHoverDescription.tsx @@ -1,5 +1,5 @@ import { Typography } from '@mui/material'; -import { NETWORKS_METADATA } from 'config/view-layers/networks/metadata'; +import { NETWORKS_METADATA } from 'config/data-layers/networks/metadata'; import { DataItem } from 'details/features/detail-components'; import { VectorTarget } from 'lib/data-map/types'; import { FC } from 'react'; diff --git a/frontend/src/pages/AssetListPage.tsx b/frontend/src/pages/AssetListPage.tsx index 725176e4..28fd1f5b 100644 --- a/frontend/src/pages/AssetListPage.tsx +++ b/frontend/src/pages/AssetListPage.tsx @@ -8,7 +8,7 @@ import { SortedAssetTable } from '../asset-list/SortedAssetTable'; import { ListFeature } from '../asset-list/use-sorted-features'; import { ExpandableRow } from 'asset-list/ExpandableRow'; import { FeatureSidebarContent } from 'details/features/FeatureSidebarContent'; -import { getAssetDataFormats } from 'config/view-layers/assets/data-formats'; +import { getAssetDataFormats } from 'config/data-layers/assets/data-formats'; export const AssetListPage = () => { const [layerSpec] = useState({ diff --git a/frontend/src/react-app-env.d.ts b/frontend/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5f..00000000 --- a/frontend/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/frontend/src/sidebar/SidebarContent.tsx b/frontend/src/sidebar/SidebarContent.tsx index 7b74b3cf..6a6ccfce 100644 --- a/frontend/src/sidebar/SidebarContent.tsx +++ b/frontend/src/sidebar/SidebarContent.tsx @@ -4,13 +4,13 @@ import { useRecoilValue } from 'recoil'; import { viewState } from 'state/view'; -import { BuildingsSection } from './buildings/BuildingsSection'; -import { DroughtsSection } from './drought/DroughtsSection'; -import { HazardsSection } from './hazards/HazardsSection'; -import { NetworksSection } from './networks/NetworksSection'; -import { RegionsSection } from './regions/RegionsSection'; -import { MarineSection } from './solutions/MarineSection'; -import { TerrestrialSection } from './solutions/TerrestrialSection'; +import { BuildingsSection } from './sections/buildings/BuildingsSection'; +import { DroughtsSection } from './sections/drought/DroughtsSection'; +import { HazardsSection } from './sections/hazards/HazardsSection'; +import { NetworksSection } from './sections/networks/NetworksSection'; +import { RegionsSection } from './sections/regions/RegionsSection'; +import { MarineSection } from './sections/solutions/MarineSection'; +import { TerrestrialSection } from './sections/solutions/TerrestrialSection'; import { ErrorBoundary } from 'lib/react/ErrorBoundary'; import { MobileTabContentWatcher } from 'pages/map/layouts/mobile/tab-has-content'; diff --git a/frontend/src/sidebar/buildings/BuildingsControl.tsx b/frontend/src/sidebar/sections/buildings/BuildingsControl.tsx similarity index 91% rename from frontend/src/sidebar/buildings/BuildingsControl.tsx rename to frontend/src/sidebar/sections/buildings/BuildingsControl.tsx index e34043a6..2d412de2 100644 --- a/frontend/src/sidebar/buildings/BuildingsControl.tsx +++ b/frontend/src/sidebar/sections/buildings/BuildingsControl.tsx @@ -1,4 +1,4 @@ -import { NETWORKS_METADATA } from 'config/view-layers/networks/metadata'; +import { NETWORKS_METADATA } from 'config/data-layers/networks/metadata'; import { ParamChecklist } from 'lib/controls/params/ParamChecklist'; import { useRecoilState } from 'recoil'; import { LayerLabel } from 'sidebar/ui/LayerLabel'; diff --git a/frontend/src/sidebar/buildings/BuildingsSection.tsx b/frontend/src/sidebar/sections/buildings/BuildingsSection.tsx similarity index 92% rename from frontend/src/sidebar/buildings/BuildingsSection.tsx rename to frontend/src/sidebar/sections/buildings/BuildingsSection.tsx index 5fc7b6ab..980fc8ce 100644 --- a/frontend/src/sidebar/buildings/BuildingsSection.tsx +++ b/frontend/src/sidebar/sections/buildings/BuildingsSection.tsx @@ -1,7 +1,7 @@ import { ErrorBoundary } from 'lib/react/ErrorBoundary'; import { StyleSelection } from 'sidebar/StyleSelection'; import { SidebarPanelSection } from 'sidebar/ui/SidebarPanelSection'; -import { SidebarPanel } from '../SidebarPanel'; +import { SidebarPanel } from 'sidebar/SidebarPanel'; import { BuildingsControl } from './BuildingsControl'; export const BuildingsSection = () => { diff --git a/frontend/src/sidebar/drought/DroughtsControl.tsx b/frontend/src/sidebar/sections/drought/DroughtsControl.tsx similarity index 95% rename from frontend/src/sidebar/drought/DroughtsControl.tsx rename to frontend/src/sidebar/sections/drought/DroughtsControl.tsx index d2005d2f..7a6b2825 100644 --- a/frontend/src/sidebar/drought/DroughtsControl.tsx +++ b/frontend/src/sidebar/sections/drought/DroughtsControl.tsx @@ -2,11 +2,11 @@ import { Checkbox, Divider, FormControlLabel } from '@mui/material'; import { DroughtOptionsVariableType, DROUGHT_OPTIONS_VARIABLE_LABELS, -} from 'config/view-layers/droughtOptions/metadata'; +} from 'config/data-layers/droughtOptions/metadata'; import { DroughtRiskVariableType, DROUGHT_RISK_VARIABLE_LABELS, -} from 'config/view-layers/droughtRisks/metadata'; +} from 'config/data-layers/droughtRisks/metadata'; import { ParamDropdown } from 'lib/controls/ParamDropdown'; import { FC } from 'react'; import { useRecoilState } from 'recoil'; diff --git a/frontend/src/sidebar/drought/DroughtsSection.tsx b/frontend/src/sidebar/sections/drought/DroughtsSection.tsx similarity index 100% rename from frontend/src/sidebar/drought/DroughtsSection.tsx rename to frontend/src/sidebar/sections/drought/DroughtsSection.tsx diff --git a/frontend/src/sidebar/hazards/HazardsControl.tsx b/frontend/src/sidebar/sections/hazards/HazardsControl.tsx similarity index 92% rename from frontend/src/sidebar/hazards/HazardsControl.tsx rename to frontend/src/sidebar/sections/hazards/HazardsControl.tsx index fe0b8dac..1d8a01cd 100644 --- a/frontend/src/sidebar/hazards/HazardsControl.tsx +++ b/frontend/src/sidebar/sections/hazards/HazardsControl.tsx @@ -1,6 +1,6 @@ import { ToggleSection, ToggleSectionGroup } from 'lib/controls/accordion-toggle/ToggleSection'; -import { hazardSelectionState } from '../../state/data-selection/hazards/hazard-selection'; +import { hazardSelectionState } from 'state/data-selection/hazards/hazard-selection'; import { InputRow } from 'sidebar/ui/InputRow'; import { InputSection } from 'sidebar/ui/InputSection'; import { ReturnPeriodControl } from 'sidebar/ui/params/ReturnPeriodControl'; @@ -9,7 +9,7 @@ import { RCPControl } from 'sidebar/ui/params/RCPControl'; import { useRecoilValue } from 'recoil'; import { showDamagesState } from 'state/data-selection/damage-mapping/damage-map'; import { Alert, Box } from '@mui/material'; -import { HAZARDS_UI_ORDER, HAZARDS_METADATA } from 'config/view-layers/hazards/metadata'; +import { HAZARDS_UI_ORDER, HAZARDS_METADATA } from 'config/data-layers/hazards/metadata'; function HazardToggleSection({ hazard, disabled }) { const otherProps = diff --git a/frontend/src/sidebar/hazards/HazardsSection.tsx b/frontend/src/sidebar/sections/hazards/HazardsSection.tsx similarity index 100% rename from frontend/src/sidebar/hazards/HazardsSection.tsx rename to frontend/src/sidebar/sections/hazards/HazardsSection.tsx diff --git a/frontend/src/sidebar/networks/AdaptationControl.tsx b/frontend/src/sidebar/sections/networks/AdaptationControl.tsx similarity index 100% rename from frontend/src/sidebar/networks/AdaptationControl.tsx rename to frontend/src/sidebar/sections/networks/AdaptationControl.tsx diff --git a/frontend/src/sidebar/networks/DamageSourceControl.tsx b/frontend/src/sidebar/sections/networks/DamageSourceControl.tsx similarity index 97% rename from frontend/src/sidebar/networks/DamageSourceControl.tsx rename to frontend/src/sidebar/sections/networks/DamageSourceControl.tsx index 05dcffec..4945d9d0 100644 --- a/frontend/src/sidebar/networks/DamageSourceControl.tsx +++ b/frontend/src/sidebar/sections/networks/DamageSourceControl.tsx @@ -20,7 +20,7 @@ import { damageSourceStateEffect, damageTypeState, } from 'state/data-selection/damage-mapping/damage-map'; -import { HAZARDS_METADATA, HAZARDS_UI_ORDER } from 'config/view-layers/hazards/metadata'; +import { HAZARDS_METADATA, HAZARDS_UI_ORDER } from 'config/data-layers/hazards/metadata'; import { LayerStylePanel } from 'sidebar/ui/LayerStylePanel'; export const DamageSourceControl = () => { diff --git a/frontend/src/sidebar/networks/NetworkControl.tsx b/frontend/src/sidebar/sections/networks/NetworkControl.tsx similarity index 92% rename from frontend/src/sidebar/networks/NetworkControl.tsx rename to frontend/src/sidebar/sections/networks/NetworkControl.tsx index 6c839959..bc9fefcb 100644 --- a/frontend/src/sidebar/networks/NetworkControl.tsx +++ b/frontend/src/sidebar/sections/networks/NetworkControl.tsx @@ -2,14 +2,14 @@ import { FC } from 'react'; import { CheckboxTree } from 'lib/controls/checkbox-tree/CheckboxTree'; -import { NETWORK_LAYERS_HIERARCHY } from 'config/view-layers/networks/hierarchy'; +import { NETWORK_LAYERS_HIERARCHY } from 'config/data-layers/networks/hierarchy'; import { useRecoilState, useRecoilValue } from 'recoil'; import { networkTreeCheckboxState, networkTreeConfig, networkTreeExpandedState, } from 'state/data-selection/networks/network-selection'; -import { NETWORKS_METADATA } from 'config/view-layers/networks/metadata'; +import { NETWORKS_METADATA } from 'config/data-layers/networks/metadata'; import { LayerLabel } from 'sidebar/ui/LayerLabel'; import { showAdaptationsState } from 'state/layers/data-layers/networks'; import { Box } from '@mui/system'; diff --git a/frontend/src/sidebar/networks/NetworksSection.tsx b/frontend/src/sidebar/sections/networks/NetworksSection.tsx similarity index 100% rename from frontend/src/sidebar/networks/NetworksSection.tsx rename to frontend/src/sidebar/sections/networks/NetworksSection.tsx diff --git a/frontend/src/sidebar/regions/RegionsControl.tsx b/frontend/src/sidebar/sections/regions/RegionsControl.tsx similarity index 93% rename from frontend/src/sidebar/regions/RegionsControl.tsx rename to frontend/src/sidebar/sections/regions/RegionsControl.tsx index 39dca925..31bb94ed 100644 --- a/frontend/src/sidebar/regions/RegionsControl.tsx +++ b/frontend/src/sidebar/sections/regions/RegionsControl.tsx @@ -1,6 +1,6 @@ import { ToggleButtonGroup, ToggleButton } from '@mui/material'; import { useRecoilState } from 'recoil'; -import { RegionLevel } from 'config/view-layers/regions/metadata'; +import { RegionLevel } from 'config/data-layers/regions/metadata'; import { regionLevelState } from 'state/data-selection/regions'; import { useCallback } from 'react'; diff --git a/frontend/src/sidebar/regions/RegionsSection.tsx b/frontend/src/sidebar/sections/regions/RegionsSection.tsx similarity index 100% rename from frontend/src/sidebar/regions/RegionsSection.tsx rename to frontend/src/sidebar/sections/regions/RegionsSection.tsx diff --git a/frontend/src/sidebar/solutions/MarineControl.tsx b/frontend/src/sidebar/sections/solutions/MarineControl.tsx similarity index 96% rename from frontend/src/sidebar/solutions/MarineControl.tsx rename to frontend/src/sidebar/sections/solutions/MarineControl.tsx index 3123701f..a7df27a8 100644 --- a/frontend/src/sidebar/solutions/MarineControl.tsx +++ b/frontend/src/sidebar/sections/solutions/MarineControl.tsx @@ -1,7 +1,7 @@ import { MarineLocationFilterType, MARINE_LOCATION_FILTERS, -} from 'config/view-layers/marine/domains'; +} from 'config/data-layers/marine/domains'; import { ParamChecklist } from 'lib/controls/params/ParamChecklist'; import { useRecoilState } from 'recoil'; import { InputSection } from 'sidebar/ui/InputSection'; diff --git a/frontend/src/sidebar/solutions/MarineSection.tsx b/frontend/src/sidebar/sections/solutions/MarineSection.tsx similarity index 100% rename from frontend/src/sidebar/solutions/MarineSection.tsx rename to frontend/src/sidebar/sections/solutions/MarineSection.tsx diff --git a/frontend/src/sidebar/solutions/TerrestrialControl.tsx b/frontend/src/sidebar/sections/solutions/TerrestrialControl.tsx similarity index 98% rename from frontend/src/sidebar/solutions/TerrestrialControl.tsx rename to frontend/src/sidebar/sections/solutions/TerrestrialControl.tsx index 12dbe8fe..132995b1 100644 --- a/frontend/src/sidebar/solutions/TerrestrialControl.tsx +++ b/frontend/src/sidebar/sections/solutions/TerrestrialControl.tsx @@ -2,7 +2,7 @@ import { FormControl, FormLabel, Slider } from '@mui/material'; import { TerrestrialLocationFilterType, TERRESTRIAL_LOCATION_FILTERS, -} from 'config/view-layers/terrestrial/domains'; +} from 'config/data-layers/terrestrial/domains'; import { ParamChecklist } from 'lib/controls/params/ParamChecklist'; import { useRecoilState } from 'recoil'; import { InputSection } from 'sidebar/ui/InputSection'; diff --git a/frontend/src/sidebar/solutions/TerrestrialLandUseTree.tsx b/frontend/src/sidebar/sections/solutions/TerrestrialLandUseTree.tsx similarity index 89% rename from frontend/src/sidebar/solutions/TerrestrialLandUseTree.tsx rename to frontend/src/sidebar/sections/solutions/TerrestrialLandUseTree.tsx index 8f70ba08..1b3bcad8 100644 --- a/frontend/src/sidebar/solutions/TerrestrialLandUseTree.tsx +++ b/frontend/src/sidebar/sections/solutions/TerrestrialLandUseTree.tsx @@ -1,5 +1,5 @@ -import { TERRESTRIAL_LANDUSE_COLORS } from 'config/view-layers/terrestrial/colors'; -import { LANDUSE_HIERARCHY } from 'config/view-layers/terrestrial/landuse-hierarchy'; +import { TERRESTRIAL_LANDUSE_COLORS } from 'config/data-layers/terrestrial/colors'; +import { LANDUSE_HIERARCHY } from 'config/data-layers/terrestrial/landuse-hierarchy'; import { CheckboxTree } from 'lib/controls/checkbox-tree/CheckboxTree'; import { useRecoilState } from 'recoil'; import { LayerLabel } from 'sidebar/ui/LayerLabel'; diff --git a/frontend/src/sidebar/solutions/TerrestrialSection.tsx b/frontend/src/sidebar/sections/solutions/TerrestrialSection.tsx similarity index 100% rename from frontend/src/sidebar/solutions/TerrestrialSection.tsx rename to frontend/src/sidebar/sections/solutions/TerrestrialSection.tsx diff --git a/frontend/src/state/data-params.ts b/frontend/src/state/data-params.ts index db24318a..0cdadfc6 100644 --- a/frontend/src/state/data-params.ts +++ b/frontend/src/state/data-params.ts @@ -1,5 +1,5 @@ -import { HAZARD_DOMAINS } from 'config/view-layers/hazards/domains'; -import { NETWORK_DOMAINS } from 'config/view-layers/networks/domains'; +import { HAZARD_DOMAINS } from 'config/data-layers/hazards/domains'; +import { NETWORK_DOMAINS } from 'config/data-layers/networks/domains'; import { DataParamGroupConfig, Param, diff --git a/frontend/src/state/data-selection/damage-mapping/damage-map.ts b/frontend/src/state/data-selection/damage-mapping/damage-map.ts index e25a39da..81bd01b8 100644 --- a/frontend/src/state/data-selection/damage-mapping/damage-map.ts +++ b/frontend/src/state/data-selection/damage-mapping/damage-map.ts @@ -1,7 +1,7 @@ import forEach from 'lodash/forEach'; import { atom, selector } from 'recoil'; -import { HAZARD_DOMAINS } from 'config/view-layers/hazards/domains'; +import { HAZARD_DOMAINS } from 'config/data-layers/hazards/domains'; import { dataParamOptionsState, dataParamState } from 'state/data-params'; import { hazardSelectionState } from 'state/data-selection/hazards/hazard-selection'; import { networksStyleState } from 'state/data-selection/networks/networks-style'; diff --git a/frontend/src/state/data-selection/damage-mapping/damage-style-params.ts b/frontend/src/state/data-selection/damage-mapping/damage-style-params.ts index aa30d822..64647792 100644 --- a/frontend/src/state/data-selection/damage-mapping/damage-style-params.ts +++ b/frontend/src/state/data-selection/damage-mapping/damage-style-params.ts @@ -2,7 +2,7 @@ import { damageSourceState, damageTypeState } from './damage-map'; import { dataParamsByGroupState } from 'state/data-params'; import { selector } from 'recoil'; import { FieldSpec, StyleParams } from 'lib/data-map/view-layers'; -import { damages } from 'config/view-layers/networks/color-maps'; +import { damages } from 'config/data-layers/networks/color-maps'; export const damagesFieldState = selector({ key: 'eadAccessorState', diff --git a/frontend/src/state/data-selection/drought/drought-parameters.ts b/frontend/src/state/data-selection/drought/drought-parameters.ts index 10fe0803..4860215e 100644 --- a/frontend/src/state/data-selection/drought/drought-parameters.ts +++ b/frontend/src/state/data-selection/drought/drought-parameters.ts @@ -1,5 +1,5 @@ -import { DroughtOptionsVariableType } from 'config/view-layers/droughtOptions/metadata'; -import { DroughtRiskVariableType } from 'config/view-layers/droughtRisks/metadata'; +import { DroughtOptionsVariableType } from 'config/data-layers/droughtOptions/metadata'; +import { DroughtRiskVariableType } from 'config/data-layers/droughtRisks/metadata'; import { atom } from 'recoil'; export const droughtRcpParamState = atom({ diff --git a/frontend/src/state/data-selection/hazards/hazard-visibility.ts b/frontend/src/state/data-selection/hazards/hazard-visibility.ts index 8060be7b..8dd1f8a0 100644 --- a/frontend/src/state/data-selection/hazards/hazard-visibility.ts +++ b/frontend/src/state/data-selection/hazards/hazard-visibility.ts @@ -1,6 +1,6 @@ import { selector } from 'recoil'; -import { HAZARDS_MAP_ORDER } from 'config/view-layers/hazards/metadata'; +import { HAZARDS_MAP_ORDER } from 'config/data-layers/hazards/metadata'; import { damageSourceState, showDamagesState, diff --git a/frontend/src/state/data-selection/networks/network-selection.ts b/frontend/src/state/data-selection/networks/network-selection.ts index a3ddaac9..e8dbbc5b 100644 --- a/frontend/src/state/data-selection/networks/network-selection.ts +++ b/frontend/src/state/data-selection/networks/network-selection.ts @@ -1,4 +1,4 @@ -import { NETWORK_LAYERS_HIERARCHY } from 'config/view-layers/networks/hierarchy'; +import { NETWORK_LAYERS_HIERARCHY } from 'config/data-layers/networks/hierarchy'; import { buildTreeConfig, CheckboxTreeState } from 'lib/controls/checkbox-tree/CheckboxTree'; import mapValues from 'lodash/mapValues'; import { atom, selector } from 'recoil'; diff --git a/frontend/src/state/data-selection/regions.ts b/frontend/src/state/data-selection/regions.ts index dd5637ac..b5d4228d 100644 --- a/frontend/src/state/data-selection/regions.ts +++ b/frontend/src/state/data-selection/regions.ts @@ -1,4 +1,4 @@ -import { RegionLevel } from 'config/view-layers/regions/metadata'; +import { RegionLevel } from 'config/data-layers/regions/metadata'; import { atom, selector } from 'recoil'; import { sectionStyleValueState } from '../sections'; diff --git a/frontend/src/state/data-selection/solutions/landuse-tree.ts b/frontend/src/state/data-selection/solutions/landuse-tree.ts index 01881c73..345b43ac 100644 --- a/frontend/src/state/data-selection/solutions/landuse-tree.ts +++ b/frontend/src/state/data-selection/solutions/landuse-tree.ts @@ -1,5 +1,5 @@ -import { LANDUSE_HIERARCHY } from 'config/view-layers/terrestrial/landuse-hierarchy'; -import { LandUseOption } from 'config/view-layers/terrestrial/domains'; +import { LANDUSE_HIERARCHY } from 'config/data-layers/terrestrial/landuse-hierarchy'; +import { LandUseOption } from 'config/data-layers/terrestrial/domains'; import { buildTreeConfig, CheckboxTreeState } from 'lib/controls/checkbox-tree/CheckboxTree'; import mapValues from 'lodash/mapValues'; import pickBy from 'lodash/pickBy'; diff --git a/frontend/src/state/data-selection/solutions/marine-filters.ts b/frontend/src/state/data-selection/solutions/marine-filters.ts index 03a119bd..507d2208 100644 --- a/frontend/src/state/data-selection/solutions/marine-filters.ts +++ b/frontend/src/state/data-selection/solutions/marine-filters.ts @@ -1,4 +1,4 @@ -import { MarineLocationFilterType } from 'config/view-layers/marine/domains'; +import { MarineLocationFilterType } from 'config/data-layers/marine/domains'; import { atom } from 'recoil'; export type MarineLocationFilters = Record; diff --git a/frontend/src/state/data-selection/solutions/terrestrial-filters.ts b/frontend/src/state/data-selection/solutions/terrestrial-filters.ts index 80132aeb..025d36dd 100644 --- a/frontend/src/state/data-selection/solutions/terrestrial-filters.ts +++ b/frontend/src/state/data-selection/solutions/terrestrial-filters.ts @@ -1,7 +1,7 @@ import { LandUseOption, TerrestrialLocationFilterType, -} from 'config/view-layers/terrestrial/domains'; +} from 'config/data-layers/terrestrial/domains'; import { atom, selector } from 'recoil'; import { landuseFilterState } from './landuse-tree'; diff --git a/frontend/src/state/layers/data-layers/buildings.ts b/frontend/src/state/layers/data-layers/buildings.ts index 27c9a48a..cb1dc1bc 100644 --- a/frontend/src/state/layers/data-layers/buildings.ts +++ b/frontend/src/state/layers/data-layers/buildings.ts @@ -2,7 +2,7 @@ import { selector } from 'recoil'; import { ViewLayer } from 'lib/data-map/view-layers'; import { truthyKeys } from 'lib/helpers'; -import { buildingsViewLayer } from 'config/view-layers/buildings/buildings-view-layer'; +import { buildingsViewLayer } from 'config/data-layers/buildings/buildings-view-layer'; import { buildingSelectionState } from 'state/data-selection/buildings'; import { sectionVisibilityState } from 'state/sections'; diff --git a/frontend/src/state/layers/data-layers/droughtOptions.ts b/frontend/src/state/layers/data-layers/droughtOptions.ts index b180d026..2b4e2e50 100644 --- a/frontend/src/state/layers/data-layers/droughtOptions.ts +++ b/frontend/src/state/layers/data-layers/droughtOptions.ts @@ -1,6 +1,6 @@ -import * as droughtOptionsColorSpecLookup from 'config/view-layers/droughtOptions/color-maps'; -import { droughtOptionsViewLayer } from 'config/view-layers/droughtOptions/drought-options-view-layer'; -import { DROUGHT_OPTIONS_VARIABLES_WITH_RCP } from 'config/view-layers/droughtOptions/metadata'; +import * as droughtOptionsColorSpecLookup from 'config/data-layers/droughtOptions/color-maps'; +import { droughtOptionsViewLayer } from 'config/data-layers/droughtOptions/drought-options-view-layer'; +import { DROUGHT_OPTIONS_VARIABLES_WITH_RCP } from 'config/data-layers/droughtOptions/metadata'; import { ColorSpec, FieldSpec, ViewLayer } from 'lib/data-map/view-layers'; import { selector } from 'recoil'; import { diff --git a/frontend/src/state/layers/data-layers/droughtRisks.ts b/frontend/src/state/layers/data-layers/droughtRisks.ts index 59f513af..3bdf9f28 100644 --- a/frontend/src/state/layers/data-layers/droughtRisks.ts +++ b/frontend/src/state/layers/data-layers/droughtRisks.ts @@ -1,6 +1,6 @@ -import * as droughtRiskColorSpecLookup from 'config/view-layers/droughtRisks/color-maps'; -import { droughtRiskViewLayer } from 'config/view-layers/droughtRisks/drought-risk-view-layer'; -import { DROUGHT_RISK_VARIABLES_WITH_RCP } from 'config/view-layers/droughtRisks/metadata'; +import * as droughtRiskColorSpecLookup from 'config/data-layers/droughtRisks/color-maps'; +import { droughtRiskViewLayer } from 'config/data-layers/droughtRisks/drought-risk-view-layer'; +import { DROUGHT_RISK_VARIABLES_WITH_RCP } from 'config/data-layers/droughtRisks/metadata'; import { ColorSpec, FieldSpec, ViewLayer } from 'lib/data-map/view-layers'; import { selector } from 'recoil'; import { diff --git a/frontend/src/state/layers/data-layers/hazards.ts b/frontend/src/state/layers/data-layers/hazards.ts index 9e81dd23..5cbf0a51 100644 --- a/frontend/src/state/layers/data-layers/hazards.ts +++ b/frontend/src/state/layers/data-layers/hazards.ts @@ -1,5 +1,5 @@ -import { HazardParams } from 'config/view-layers/hazards/domains'; -import { hazardViewLayer } from 'config/view-layers/hazards/hazard-view-layer'; +import { HazardParams } from 'config/data-layers/hazards/domains'; +import { hazardViewLayer } from 'config/data-layers/hazards/hazard-view-layer'; import { ViewLayer } from 'lib/data-map/view-layers'; import { truthyKeys } from 'lib/helpers'; import { selector } from 'recoil'; diff --git a/frontend/src/state/layers/data-layers/marine.ts b/frontend/src/state/layers/data-layers/marine.ts index d3d3b967..1dc25f62 100644 --- a/frontend/src/state/layers/data-layers/marine.ts +++ b/frontend/src/state/layers/data-layers/marine.ts @@ -1,5 +1,5 @@ -import { MARINE_HABITAT_COLORS } from 'config/view-layers/marine/colors'; -import { marineViewLayer } from 'config/view-layers/marine/marine-view-layer'; +import { MARINE_HABITAT_COLORS } from 'config/data-layers/marine/colors'; +import { marineViewLayer } from 'config/data-layers/marine/marine-view-layer'; import { ViewLayer, FieldSpec } from 'lib/data-map/view-layers'; import { selector } from 'recoil'; import { sectionStyleValueState, sectionVisibilityState } from 'state/sections'; diff --git a/frontend/src/state/layers/data-layers/networks.ts b/frontend/src/state/layers/data-layers/networks.ts index 0c96bc43..e4fd9aff 100644 --- a/frontend/src/state/layers/data-layers/networks.ts +++ b/frontend/src/state/layers/data-layers/networks.ts @@ -1,5 +1,5 @@ -import * as networkColorMaps from 'config/view-layers/networks/color-maps'; -import { AdaptationOptionParams } from 'config/view-layers/networks/domains'; +import * as networkColorMaps from 'config/data-layers/networks/color-maps'; +import { AdaptationOptionParams } from 'config/data-layers/networks/domains'; import { ViewLayer, StyleParams, ColorSpec, FieldSpec } from 'lib/data-map/view-layers'; import { StateEffect } from 'lib/recoil/state-effects/types'; import { atom, selector } from 'recoil'; @@ -13,13 +13,13 @@ import { import { networksStyleState } from 'state/data-selection/networks/networks-style'; import { sectionVisibilityState } from 'state/sections'; -import adaptationSectorLayers from 'config/view-layers/networks/adaptation-sector-layers.json'; +import adaptationSectorLayers from 'config/data-layers/networks/adaptation-sector-layers.json'; import uniq from 'lodash/uniq'; import fromPairs from 'lodash/fromPairs'; import mapValues from 'lodash/mapValues'; import { recalculateCheckboxStates } from 'lib/controls/checkbox-tree/CheckboxTree'; import { LayerSpec } from 'asset-list/use-sorted-features'; -import { networkViewLayer } from 'config/view-layers/networks/network-view-layer'; +import { networkViewLayer } from 'config/data-layers/networks/network-view-layer'; export const networksLayerState = selector({ key: 'networkLayersState', diff --git a/frontend/src/state/layers/data-layers/regions.ts b/frontend/src/state/layers/data-layers/regions.ts index f0aa5846..8857cb86 100644 --- a/frontend/src/state/layers/data-layers/regions.ts +++ b/frontend/src/state/layers/data-layers/regions.ts @@ -3,8 +3,8 @@ import { selector } from 'recoil'; import { ViewLayer } from 'lib/data-map/view-layers'; import { sectionVisibilityState } from 'state/sections'; import { regionLevelState, showPopulationState } from 'state/data-selection/regions'; -import { populationViewLayer } from 'config/view-layers/regions/population-view-layer'; -import { regionBoundariesViewLayer } from 'config/view-layers/regions/boundaries-view-layer'; +import { populationViewLayer } from 'config/data-layers/regions/population-view-layer'; +import { regionBoundariesViewLayer } from 'config/data-layers/regions/boundaries-view-layer'; export const regionsLayerState = selector({ key: 'regionsLayerState', diff --git a/frontend/src/state/layers/data-layers/terrestrial.ts b/frontend/src/state/layers/data-layers/terrestrial.ts index e27a2af5..32aa200d 100644 --- a/frontend/src/state/layers/data-layers/terrestrial.ts +++ b/frontend/src/state/layers/data-layers/terrestrial.ts @@ -1,5 +1,5 @@ -import { TERRESTRIAL_LANDUSE_COLORS } from 'config/view-layers/terrestrial/colors'; -import { terrestrialViewLayer } from 'config/view-layers/terrestrial/terrestrial-view-layer'; +import { TERRESTRIAL_LANDUSE_COLORS } from 'config/data-layers/terrestrial/colors'; +import { terrestrialViewLayer } from 'config/data-layers/terrestrial/terrestrial-view-layer'; import { ViewLayer, FieldSpec, ColorSpec } from 'lib/data-map/view-layers'; import { selector } from 'recoil'; import { sectionStyleValueState, sectionVisibilityState } from 'state/sections'; @@ -8,13 +8,13 @@ import { TerrestrialLocationFilters, } from 'state/data-selection/solutions/terrestrial-filters'; import { colorMap } from 'lib/color-map'; -import { terrestrialElevation, terrestrialSlope } from 'config/view-layers/terrestrial/color-maps'; +import { terrestrialElevation, terrestrialSlope } from 'config/data-layers/terrestrial/color-maps'; import { featureProperty } from 'lib/deck/props/data-source'; import { Accessor } from 'lib/deck/props/getters'; import { LandUseOption, TerrestrialLocationFilterType, -} from 'config/view-layers/terrestrial/domains'; +} from 'config/data-layers/terrestrial/domains'; import { truthyKeys } from 'lib/helpers'; import { landuseFilterState } from 'state/data-selection/solutions/landuse-tree'; diff --git a/frontend/src/state/layers/ui/labels.ts b/frontend/src/state/layers/ui/labels.ts index b7fef7e6..18a2d2f0 100644 --- a/frontend/src/state/layers/ui/labels.ts +++ b/frontend/src/state/layers/ui/labels.ts @@ -1,7 +1,7 @@ import { selector } from 'recoil'; import { ViewLayer, viewOnlyLayer } from 'lib/data-map/view-layers'; -import { regionLabelsDeckLayer } from 'config/view-layers/regions/region-labels-deck-layer'; +import { regionLabelsDeckLayer } from 'config/data-layers/regions/region-labels-deck-layer'; import { sectionVisibilityState } from 'state/sections'; import { regionLevelState } from 'state/data-selection/regions'; import { backgroundState, showLabelsState } from 'map/layers/layers-state'; diff --git a/frontend/src/state/sections.ts b/frontend/src/state/sections.ts index 88f9099d..e37c9c11 100644 --- a/frontend/src/state/sections.ts +++ b/frontend/src/state/sections.ts @@ -5,7 +5,7 @@ import { urlSyncEffect } from 'recoil-sync'; import { truthyKeys } from 'lib/helpers'; import { StateEffect } from 'lib/recoil/state-effects/types'; -import { HAZARDS_UI_ORDER } from 'config/view-layers/hazards/metadata'; +import { HAZARDS_UI_ORDER } from 'config/data-layers/hazards/metadata'; import { damageSourceState } from './data-selection/damage-mapping/damage-map'; import { getHazardSelectionAggregate } from './data-selection/hazards/hazard-selection';