Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alert Info in Map #22

Merged
merged 11 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend
9 changes: 0 additions & 9 deletions docker-compose.yml

This file was deleted.

17 changes: 17 additions & 0 deletions patches/@turf+bbox+6.5.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/node_modules/@turf/bbox/package.json b/node_modules/@turf/bbox/package.json
index 667487d..609ad20 100644
--- a/node_modules/@turf/bbox/package.json
+++ b/node_modules/@turf/bbox/package.json
@@ -29,11 +29,11 @@
"exports": {
"./package.json": "./package.json",
".": {
+ "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
}
},
- "types": "dist/js/index.d.ts",
"sideEffects": false,
"files": [
"dist"
17 changes: 17 additions & 0 deletions patches/@turf+buffer+6.5.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/node_modules/@turf/buffer/package.json b/node_modules/@turf/buffer/package.json
index f350d3e..8fe4032 100644
--- a/node_modules/@turf/buffer/package.json
+++ b/node_modules/@turf/buffer/package.json
@@ -35,11 +35,11 @@
"exports": {
"./package.json": "./package.json",
".": {
+ "types": "./index.d.ts",
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
}
},
- "types": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
3 changes: 1 addition & 2 deletions src/components/GlobalFooter/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
display: flex;
flex-direction: column;
gap: var(--go-ui-spacing-sm);

.footer-link {
text-decoration: none;
color: var(--go-ui-color-white);
Expand Down Expand Up @@ -50,4 +49,4 @@
@media print {
display: none;
}
}
}
2 changes: 1 addition & 1 deletion src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Navbar(props: Props) {
<div className={styles.brand}>
<Link
className={styles.alertHubTitle}
to="home"
to="/"
>
<img
className={styles.goIcon}
Expand Down
45 changes: 1 addition & 44 deletions src/components/domain/BaseMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Map, {
MapLayer,
MapSource,
} from '@togglecorp/re-map';
import { type SymbolLayer } from 'mapbox-gl';

import {
adminLabelLayerOptions,
Expand All @@ -19,37 +18,8 @@ type overrides = 'mapStyle' | 'mapOptions' | 'navControlShown' | 'navControlPosi
type BaseMapProps = Omit<MapProps, overrides> & {
baseLayers?: React.ReactNode;
withDisclaimer?: boolean;
withoutLabel?: boolean;
} & Partial<Pick<MapProps, overrides>>;

const sourceOptions: mapboxgl.GeoJSONSourceRaw = {
type: 'geojson',
};

const adminLabelOverrideOptions: Omit<SymbolLayer, 'id'> = {
type: 'symbol',
layout: {
'text-field': ['get', 'name'],
'text-font': ['Poppins Regular', 'Arial Unicode MS Regular'],
'text-letter-spacing': 0.15,
'text-line-height': 1.2,
'text-max-width': 8,
'text-justify': 'center',
'text-anchor': 'top',
'text-padding': 2,
'text-size': [
'interpolate', ['linear', 1], ['zoom'],
0, 6,
6, 16,
],
},
paint: {
'text-color': '#000000',
'text-halo-color': '#555555',
'text-halo-width': 0.2,
},
};

function BaseMap(props: BaseMapProps) {
const {
baseLayers,
Expand All @@ -60,7 +30,6 @@ function BaseMap(props: BaseMapProps) {
navControlOptions,
scaleControlShown,
children,
withoutLabel = false,
...otherProps
} = props;

Expand All @@ -77,7 +46,7 @@ function BaseMap(props: BaseMapProps) {
>
<MapSource
sourceKey="composite"
sourceOptions={sourceOptions}
managed={false}
>
<MapLayer
layerKey="admin-0-label"
Expand All @@ -93,18 +62,6 @@ function BaseMap(props: BaseMapProps) {
/>
{baseLayers}
</MapSource>
{!withoutLabel && (
<MapSource
sourceKey="override-labels"
sourceOptions={sourceOptions}
geoJson={undefined}
>
<MapLayer
layerKey="point-circle"
layerOptions={adminLabelOverrideOptions}
/>
</MapSource>
)}
{children}
</Map>
);
Expand Down
235 changes: 0 additions & 235 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,238 +1,3 @@
/* // FIXME: Remove it after the go ui is installed */
:root {
--go-ui-font-family-sans-serif: Poppins, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
--go-ui-font-family-serif: Georgia, Cambria, "Times New Roman", Times, serif;
--go-ui-font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, monospace;

--base-font-size: 0.875rem;
--go-ui-font-size-export: 0.6875rem;

--go-ui-font-size-2xs: calc(var(--base-font-size) * 0.625);
--go-ui-font-size-xs: calc(var(--base-font-size) * 0.75);
--go-ui-font-size-sm: calc(var(--base-font-size) * 0.875);
--go-ui-font-size-md: var(--base-font-size);
--go-ui-font-size-lg: calc(var(--base-font-size) * 1.125);
--go-ui-font-size-xl: calc(var(--base-font-size) * 1.25);
--go-ui-font-size-2xl: calc(var(--base-font-size) * 1.5);
--go-ui-font-size-3xl: calc(var(--base-font-size) * 1.875);
--go-ui-font-size-4xl: calc(var(--base-font-size) * 2.375);


--go-ui-height-icon-multiplier: 1.33em;

--go-ui-height-brand-icon: 2.5rem;
--go-ui-height-social-icon: 2.5rem;
--go-ui-height-key-figure-icon: 3rem;
--go-ui-height-status-icon: 2.5rem;
--go-ui-height-compact-status-icon: 2rem;

--go-ui-line-height-none: 1;
--go-ui-line-height-xs: 1.25;
--go-ui-line-height-sm: 1.375;
--go-ui-line-height-md: 1.5;

--go-ui-font-weight-light: 300;
--go-ui-font-weight-normal: 400;
--go-ui-font-weight-medium: 500;
--go-ui-font-weight-semibold: 600;
--go-ui-font-weight-bold: 700;

--go-ui-width-screen-sm: 640px;
--go-ui-width-screen-md: 768px;
--go-ui-width-screen-lg: 1024px;
--go-ui-width-screen-xl: 1280px;
--go-ui-width-screen-2xl: 1536px;

--base-spacing: 1rem;

--go-ui-spacing-4xs: calc(var(--base-spacing) * 0.0625);
--go-ui-spacing-3xs: calc(var(--base-spacing) * 0.125);
--go-ui-spacing-2xs: calc(var(--base-spacing) * 0.25);
--go-ui-spacing-xs: calc(var(--base-spacing) * 0.4);
--go-ui-spacing-sm: calc(var(--base-spacing) * 0.625);
--go-ui-spacing-md: calc(var(--base-spacing) * 1);
--go-ui-spacing-lg: calc(var(--base-spacing) * 1.5);
--go-ui-spacing-xl: calc(var(--base-spacing) * 2.25);
--go-ui-spacing-2xl: calc(var(--base-spacing) * 3.375);
--go-ui-spacing-3xl: calc(var(--base-spacing) * 5.0625);
--go-ui-spacing-4xl: calc(var(--base-spacing) * 7.5937);
--go-ui-spacing-5xl: calc(var(--base-spacing) * 11.39);

--go-ui-width-separator-sm: 1pt;
--go-ui-width-separator-md: 2pt;
--go-ui-width-separator-lg: 4pt;
--go-ui-width-separator-xl: 8pt;

--go-ui-width-separator-thin: 1pt;
--go-ui-width-separator-small: 2pt;
--go-ui-width-separator-thick: 4pt;
--go-ui-width-separator-medium: 6pt;
--go-ui-width-separator-large: 8pt;
--go-ui-width-separator-dense: 12pt;
--go-ui-width-separator-extra-dense: 14pt;

--go-ui-border-radius-none: 0;
--go-ui-border-radius-sm: 0.125rem;
--go-ui-border-radius-md: 0.25rem;
--go-ui-border-radius-lg: 0.5rem;
--go-ui-border-radius-xl: 0.75rem;
--go-ui-border-radius-2xl: 1rem;
--go-ui-border-radius-3xl: 1.5rem;
--go-ui-border-radius-full: 9999px;

--go-ui-box-shadow-xs: 0 1pt 2pt rgb(0 0 0 / 0.2);
--go-ui-box-shadow-sm: 0 1pt 4pt rgb(0 0 0 / 0.2);
--go-ui-box-shadow-md: 0 1pt 5pt -2pt rgb(0 0 0 / 0.375);
--go-ui-box-shadow-lg: 0 2pt 8pt -4pt rgb(0 0 0 / 0.5);
--go-ui-box-shadow-xl: 0 3pt 16pt -6pt rgb(0 0 0 / 0.5);
--go-ui-box-shadow-2xl: 0 4pt 16pt -6pt rgb(0 0 0 / 1);
--go-ui-box-shadow-inner: inset 0 2pt 4pt 0 rgb(0 0 0 / 0.375);
--go-ui-box-shadow-none: 0 0 #0000;

--go-ui-duration-transition-fast: .1s;
--go-ui-duration-transition-medium: .2s;
--go-ui-duration-transition-slow: .5s;

--go-ui-duration-animation-fast: .5s;
--go-ui-duration-animation-medium: 1s;
--go-ui-duration-animation-slow: 2s;

--go-ui-color-orange: #FF8000;
--go-ui-color-green: #7FB845;
--go-ui-color-blue: #3FA2F7;
--go-ui-color-red: #F75C65;
--go-ui-color-yellow: #d9b100;
--go-ui-color-black: #000000;
--go-ui-color-white: #ffffff;

--go-ui-color-gray-10: #FAFAFA;
--go-ui-color-gray-20: #F2F2F2;
--go-ui-color-gray-30: #E0E0E0;
--go-ui-color-gray-40: #C6C6C6;
--go-ui-color-gray-50: #A8A8A8;
--go-ui-color-gray-60: #8D8D8D;
--go-ui-color-gray-70: #6F6F6F;
--go-ui-color-gray-80: #525252;
--go-ui-color-gray-90: #323232;

--go-ui-color-red-10: #FDD6D9;
--go-ui-color-red-20: #FCC2C5;
--go-ui-color-red-30: #FBADB2;
--go-ui-color-red-40: #FA999F;
--go-ui-color-red-50: #F9858C;
--go-ui-color-red-60: #F87079;
--go-ui-color-red-70: #F75C65;
--go-ui-color-red-80: #F64752;
--go-ui-color-red-90: #F5333F;

--go-ui-color-blue-10: #E0E3E7;
--go-ui-color-blue-20: #CCD2D9;
--go-ui-color-blue-30: #AEB7C2;
--go-ui-color-blue-40: #99A5B3;
--go-ui-color-blue-50: #7D8B9D;
--go-ui-color-blue-60: #67788D;
--go-ui-color-blue-70: #4D617A;
--go-ui-color-blue-80: #344B67;
--go-ui-color-blue-90: #011E41;

--go-ui-color-primary-red: var(--go-ui-color-red-90);
--go-ui-color-primary-blue: var(--go-ui-color-blue-90);
--go-ui-color-primary-gray: var(--go-ui-color-gray-90);

--go-ui-color-red-hover: #DE2934;


--go-ui-color-text-black: rgb(0 0 0 / 1);
--go-ui-color-text: rgb(0 0 0 / 0.8);
--go-ui-color-text-light: rgb(0 0 0 / 0.5);

--go-ui-color-positive: var(--go-ui-color-green);
--go-ui-color-information: var(--go-ui-color-blue);
--go-ui-color-warning: var(--go-ui-color-yellow);
--go-ui-color-negative: var(--go-ui-color-red);

--go-ui-color-separator: rgb(0 0 0 / 0.1);
--go-ui-color-separator-light: rgb(0 0 0 / 0.05);

--go-ui-color-background: #f7f7f7;
--go-ui-color-foreground: #ffffff;

--go-ui-color-element-background: rgb(0 0 0 / .06);
--go-ui-color-readonly-element-background: rgb(0 0 0 / .03);
--go-ui-color-background-overlay: rgb(255 255 255 / .88);
--go-ui-color-background-overlay-dark: rgb(0 0 0 / .5);
--go-ui-color-background-hover: rgb(0 0 0 / .06);

--go-ui-opacity-disabled-element: 0.5;
--go-ui-opacity-chart-point: 0.8;
--go-ui-opacity-message: 0.8;

--go-ui-content-min-height: 13rem;
--go-ui-compact-content-min-height: 7rem;

--go-ui-width-min-modal: 18rem;
--go-ui-height-min-modal: 11rem;

--go-ui-width-modal-sm: 32rem;
--go-ui-height-modal-sm: 100%;

--go-ui-width-modal-md: 42rem;
--go-ui-height-modal-md: 100%;

--go-ui-width-modal-lg: 64rem;
--go-ui-height-modal-lg: 100%;

--go-ui-width-modal-xl: 92rem;
--go-ui-height-modal-xl: 100%;

--go-ui-saturate-0: 0;
--go-ui-saturate-50: 0.5;
--go-ui-saturate-100: 1;
--go-ui-saturate-150: 1.5;
--go-ui-saturate-200: 2;

--go-ui-color-hazard-fi: #b7c992;

--go-ui-color-map-dot-appeals: #f5333f;
--go-ui-color-map-dot-dref: #ff9e00;
--go-ui-color-map-dot-fba: #ff6b00;
--go-ui-color-map-dot-multiple-types: #4c5d9b;

--go-ui-width-content-max: 50rem;
--go-ui-page-header-description-width-max: var(--go-ui-width-content-max);
--go-ui-page-width-max: 90rem;
--mapbox-icon-width: 88px;

--go-ui-export-page-margin: 10mm 10mm 16mm 10mm;

@media screen and (max-width: 40rem) {
--go-ui-font-size-2xs: calc(var(--base-font-size) * 0.625);
--go-ui-font-size-xs: calc(var(--base-font-size) * 0.75);
--go-ui-font-size-sm: calc(var(--base-font-size) * 0.875);
--go-ui-font-size-md: calc(var(--base-font-size) * 1);
--go-ui-font-size-lg: calc(var(--base-font-size) * 1.125);
--go-ui-font-size-xl: calc(var(--base-font-size) * 1.25);
--go-ui-font-size-2xl: calc(var(--base-font-size) * 1.4);
--go-ui-font-size-3xl: calc(var(--base-font-size) * 1.6);
--go-ui-font-size-4xl: calc(var(--base-font-size) * 1.8);
}

@media screen and (max-width: 40rem) {
--go-ui-spacing-4xs: calc(var(--base-spacing) * 0.0625);
--go-ui-spacing-3xs: calc(var(--base-spacing) * 0.125);
--go-ui-spacing-2xs: calc(var(--base-spacing) * 0.25);
--go-ui-spacing-xs: calc(var(--base-spacing) * 0.4);
--go-ui-spacing-sm: calc(var(--base-spacing) * 0.625);
--go-ui-spacing-md: calc(var(--base-spacing) * 1);
--go-ui-spacing-lg: calc(var(--base-spacing) * 1.25);
--go-ui-spacing-xl: calc(var(--base-spacing) * 1.5625);
--go-ui-spacing-2xl: calc(var(--base-spacing) * 1.95);
--go-ui-spacing-3xl: calc(var(--base-spacing) * 2.44);
--go-ui-spacing-4xl: calc(var(--base-spacing) * 3);
--go-ui-spacing-5xl: calc(var(--base-spacing) * 3.8);
}
}

* {
box-sizing: border-box;
}
Expand Down
Loading