From 5567408170e52f00d8a726ba892ef27128e0e758 Mon Sep 17 00:00:00 2001 From: samshara Date: Thu, 11 Apr 2024 17:39:42 +0545 Subject: [PATCH] feat: refactor global map and aside view for alerts --- package.json | 2 +- src/components/GlobalFooter/styles.module.css | 3 +- src/utils/map.ts | 3 +- src/utils/selectors.ts | 41 ++ .../AlertListItem/AlertDetail/index.tsx | 37 -- .../Home/AlertMap/AlertListItem/i18n.json | 6 - .../Home/AlertMap/AlertListItem/index.tsx | 175 ------ .../AlertMap/AlertListItem/styles.module.css | 3 - .../Home/AlertMap/CountryListItem/i18n.json | 6 - .../Home/AlertMap/CountryListItem/index.tsx | 51 -- .../CountryListItem/styles.module.css | 32 -- src/views/Home/AlertMap/Filters/i18n.json | 9 - src/views/Home/AlertMap/Filters/index.tsx | 110 ---- .../Home/AlertMap/Filters/styles.module.css | 5 - .../Home/AlertMap/RegionListItem/i18n.json | 6 - .../Home/AlertMap/RegionListItem/index.tsx | 79 --- .../AlertMap/RegionListItem/styles.module.css | 13 - src/views/Home/AlertMap/index.tsx | 384 ------------- src/views/Home/AlertMap/styles.module.css | 66 --- .../AlertsAside/CountryListItem/index.tsx | 45 ++ .../CountryListItem/styles.module.css | 12 + src/views/Home/Alerts/AlertsAside/i18n.json | 6 + src/views/Home/Alerts/AlertsAside/index.tsx | 72 +++ .../Home/Alerts/AlertsAside/styles.module.css | 13 + src/views/Home/Alerts/AlertsMap/index.tsx | 88 +++ .../Home/Alerts/AlertsMap/styles.module.css | 8 + src/views/Home/{AlertMap => Alerts}/i18n.json | 4 +- src/views/Home/Alerts/index.tsx | 91 ++++ src/views/Home/Alerts/styles.module.css | 34 ++ src/views/Home/index.tsx | 13 +- yarn.lock | 503 ++++++++++-------- 31 files changed, 705 insertions(+), 1215 deletions(-) create mode 100644 src/utils/selectors.ts delete mode 100644 src/views/Home/AlertMap/AlertListItem/AlertDetail/index.tsx delete mode 100644 src/views/Home/AlertMap/AlertListItem/i18n.json delete mode 100644 src/views/Home/AlertMap/AlertListItem/index.tsx delete mode 100644 src/views/Home/AlertMap/AlertListItem/styles.module.css delete mode 100644 src/views/Home/AlertMap/CountryListItem/i18n.json delete mode 100644 src/views/Home/AlertMap/CountryListItem/index.tsx delete mode 100644 src/views/Home/AlertMap/CountryListItem/styles.module.css delete mode 100644 src/views/Home/AlertMap/Filters/i18n.json delete mode 100644 src/views/Home/AlertMap/Filters/index.tsx delete mode 100644 src/views/Home/AlertMap/Filters/styles.module.css delete mode 100644 src/views/Home/AlertMap/RegionListItem/i18n.json delete mode 100644 src/views/Home/AlertMap/RegionListItem/index.tsx delete mode 100644 src/views/Home/AlertMap/RegionListItem/styles.module.css delete mode 100644 src/views/Home/AlertMap/index.tsx delete mode 100644 src/views/Home/AlertMap/styles.module.css create mode 100644 src/views/Home/Alerts/AlertsAside/CountryListItem/index.tsx create mode 100644 src/views/Home/Alerts/AlertsAside/CountryListItem/styles.module.css create mode 100644 src/views/Home/Alerts/AlertsAside/i18n.json create mode 100644 src/views/Home/Alerts/AlertsAside/index.tsx create mode 100644 src/views/Home/Alerts/AlertsAside/styles.module.css create mode 100644 src/views/Home/Alerts/AlertsMap/index.tsx create mode 100644 src/views/Home/Alerts/AlertsMap/styles.module.css rename src/views/Home/{AlertMap => Alerts}/i18n.json (87%) create mode 100644 src/views/Home/Alerts/index.tsx create mode 100644 src/views/Home/Alerts/styles.module.css diff --git a/package.json b/package.json index eb4f3cb6..6b5d0d62 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "vite-plugin-compression2": "^1.0.0", "vite-plugin-radar": "^0.9.2", "vite-plugin-svgr": "^4.2.0", - "vite-plugin-webfont-dl": "^3.9.1", + "vite-plugin-webfont-dl": "3.9.2", "vite-tsconfig-paths": "^4.2.2", "vitest": "^1.1.0" } diff --git a/src/components/GlobalFooter/styles.module.css b/src/components/GlobalFooter/styles.module.css index a8bdacb8..1da81718 100644 --- a/src/components/GlobalFooter/styles.module.css +++ b/src/components/GlobalFooter/styles.module.css @@ -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); @@ -50,4 +49,4 @@ @media print { display: none; } -} \ No newline at end of file +} diff --git a/src/utils/map.ts b/src/utils/map.ts index 6d709788..4db792b9 100644 --- a/src/utils/map.ts +++ b/src/utils/map.ts @@ -17,7 +17,7 @@ export const defaultNavControlPosition: ControlPosition = 'top-right'; export const defaultMapOptions: Omit = { logoPosition: 'bottom-left' as const, - zoom: 1.5, + zoom: 1, minZoom: 1, maxZoom: 18, scrollZoom: false, @@ -26,7 +26,6 @@ export const defaultMapOptions: Omit>; - -export interface AlertProps { - data: CountryAlertType; - onExpandClick: (alertId: string | undefined) => void; -} - -function AlertDetail(props: AlertProps) { - const { - data, - onExpandClick, - } = props; - - return ( - - {data?.infos?.map((alert) => ( - -
- {alert?.event} -
-
- {alert?.category} -
- - ))} -
- ) -} - -export default AlertDetail; diff --git a/src/views/Home/AlertMap/AlertListItem/i18n.json b/src/views/Home/AlertMap/AlertListItem/i18n.json deleted file mode 100644 index d15e35b0..00000000 --- a/src/views/Home/AlertMap/AlertListItem/i18n.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "namespace": "alertDetails", - "strings": { - "alertViewDetails": "Alert List Details" - } -} \ No newline at end of file diff --git a/src/views/Home/AlertMap/AlertListItem/index.tsx b/src/views/Home/AlertMap/AlertListItem/index.tsx deleted file mode 100644 index 97dfacc8..00000000 --- a/src/views/Home/AlertMap/AlertListItem/index.tsx +++ /dev/null @@ -1,175 +0,0 @@ -import { - useCallback, - useMemo, - useState, -} from 'react'; -import { isDefined } from '@togglecorp/fujs'; -import { gql, useQuery } from '@apollo/client'; -import { useTranslation } from '@ifrc-go/ui/hooks'; -import { - Button, - Container, - Pager, - TextOutput, -} from '@ifrc-go/ui'; - -import { - CountryAlertsListQuery, - CountryAlertsListQueryVariables, -} from '#generated/types'; - -import i18n from './i18n.json'; -import styles from './styles.module.css'; -import { ChevronLeftLineIcon } from '@ifrc-go/icons'; - -const COUNTRY_ALERTS_LIST = gql` - query CountryAlertsList( - $country: ID!, - $pagination: OffsetPaginationInput - ) { - public { - alerts( - filters: { - country: { - pk: $country - } - } - pagination: $pagination - ) { - items { - id - info { - event - category - alertId - } - } - } - } - } -`; - -const defaultMaxItemsPerPage = 10; - -type CountryAlertType = NonNullable>; - -const countryAlertKeySelector = (alert: CountryAlertType) => alert.id; - -export interface Props { - countryId: string; - handleAlertClick: (countryId: string | undefined) => void; - activeAlertId: string | undefined; -} - -function AlertDetail(props: Props) { - const { - countryId, - handleAlertClick, - activeAlertId, - } = props; - - const strings = useTranslation(i18n); - - const [activePage, setActivePage] = useState(1); - - const variables = useMemo(() => ({ - country: countryId, - pagination: { - offset: (activePage - 1) * defaultMaxItemsPerPage, - limit: defaultMaxItemsPerPage, - }, - }), [activePage]); - - const { - data: countryAlertsResponse, - loading: countryAlertsLoading, - } = useQuery( - COUNTRY_ALERTS_LIST, { - variables, - }); - - // const setActiveCountryIdSafe = useCallback( - // (countryId: string | undefined) => { - // setActiveCountryId(countryId); - // onActiveCountryChange(countryId); - // }, - // [onActiveCountryChange, setActiveCountryId], - // ); - - // const alertListRendererParams = useCallback( - // (_: string | number, alert: CountryAlertType): Props => ({ - // countryId: activeCountryId, - // onActiveCountryChange: setActiveCountryIdSafe, - // }), - // [activeCountryId, setActiveCountryIdSafe], - // ); - - console.log('alert', activeAlertId); - - return ( - - )} - contentViewType="vertical" - // actions={isDefined(countryId) && ( - // - // )} - > - {/* - {alert.event} - {alert.category} - */} - {countryAlertsResponse?.public?.alerts?.items?.map((alerts) => ( -
- -
- ))} - {/* {countryAlertsLoading && } - {isDefined(countryAlertsResponse) && ( - - )} */} -
- ); -} - -export default AlertDetail; diff --git a/src/views/Home/AlertMap/AlertListItem/styles.module.css b/src/views/Home/AlertMap/AlertListItem/styles.module.css deleted file mode 100644 index e7f2d20d..00000000 --- a/src/views/Home/AlertMap/AlertListItem/styles.module.css +++ /dev/null @@ -1,3 +0,0 @@ -.alerts { - display: flex; -} diff --git a/src/views/Home/AlertMap/CountryListItem/i18n.json b/src/views/Home/AlertMap/CountryListItem/i18n.json deleted file mode 100644 index 4f648d37..00000000 --- a/src/views/Home/AlertMap/CountryListItem/i18n.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "namespace": "countryDetails", - "strings": { - "countryViewDetails": "View Details" - } -} \ No newline at end of file diff --git a/src/views/Home/AlertMap/CountryListItem/index.tsx b/src/views/Home/AlertMap/CountryListItem/index.tsx deleted file mode 100644 index 75892cb6..00000000 --- a/src/views/Home/AlertMap/CountryListItem/index.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { ChevronRightLineIcon } from '@ifrc-go/icons'; -import { - Button, - Container, -} from '@ifrc-go/ui'; -import { useTranslation } from '@ifrc-go/ui/hooks'; - -import { CountryListQuery } from '#generated/types'; - -import i18n from './i18n.json'; -import styles from './styles.module.css'; - -type CountryType = NonNullable['allCountries']>[number]; - -export interface CountryProps { - data: CountryType; - onExpandClick: (alertId: string | undefined) => void; - bbox?: number[][] | undefined; -} - -function CountryListItem(props: CountryProps) { - const { - data, - onExpandClick, - bbox, - } = props; - - const strings = useTranslation(i18n); - - return ( - - - - )} - /> - ); -} - -export default CountryListItem; diff --git a/src/views/Home/AlertMap/CountryListItem/styles.module.css b/src/views/Home/AlertMap/CountryListItem/styles.module.css deleted file mode 100644 index 14ee0020..00000000 --- a/src/views/Home/AlertMap/CountryListItem/styles.module.css +++ /dev/null @@ -1,32 +0,0 @@ -.country-info { - .country-list-item { - gap: 0; - - .icon { - align-self: flex-end; - font-size: var(--go-ui-height-icon-multiplier); - }:hover { - .icon { - animation: wiggle var(--go-ui-duration-transition-slow) ease-in-out; - } - } - } - - @keyframes wiggle { - 0% { - transform: translateX(0); - } - - 25% { - transform: translateX(-0.1rem); - } - - 50% { - transform: translateX(0.1rem); - } - - 100% { - transform: translateX(0); - } - } -} \ No newline at end of file diff --git a/src/views/Home/AlertMap/Filters/i18n.json b/src/views/Home/AlertMap/Filters/i18n.json deleted file mode 100644 index f9dadf6b..00000000 --- a/src/views/Home/AlertMap/Filters/i18n.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "namespace": "alertFilters", - "strings": { - "alertCountries": "All countries", - "alertUrgency": "Select Urgency type", - "alertSeverity": "Select Severity type", - "alertCertainty": "Select Certainty type" - } -} diff --git a/src/views/Home/AlertMap/Filters/index.tsx b/src/views/Home/AlertMap/Filters/index.tsx deleted file mode 100644 index 1df4e838..00000000 --- a/src/views/Home/AlertMap/Filters/index.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { useCallback } from 'react'; -import { MultiSelectInput } from '@ifrc-go/ui'; -import { useTranslation } from '@ifrc-go/ui/hooks'; -import { stringNameSelector } from '@ifrc-go/ui/utils'; -import { EntriesAsList } from '@togglecorp/toggle-form'; - -import { - AlertEnumsQuery, - CountryListQuery, -} from '#generated/types'; - -import i18n from './i18n.json'; -import styles from './styles.module.css'; - -type CountryType = NonNullable['countries']>['items']>[number]; - -interface AlertFilters { - key: string; - label: string; -} - -const countryKeySelector = (country: CountryType) => country?.id; - -const keySelector = (alert: AlertFilters) => alert?.key; -const labelSelector = (alert: AlertFilters) => alert?.label; - -export interface FilterValue { - countries: string[]; - regions: string[]; - urgencyList: string[]; - severityList: string[]; - certaintyList: string[]; -} - -interface Props { - value: FilterValue; - onChange: React.Dispatch>; - countries?: NonNullable; - urgencyList?: NonNullable; - severityList?: NonNullable; - certaintyList?: NonNullable; -} - -function Filters(props: Props) { - const { - value, - onChange, - countries, - urgencyList, - severityList, - certaintyList, - } = props; - - const strings = useTranslation(i18n); - - const handleChange = useCallback( - (...args: EntriesAsList) => { - const [val, key] = args; - onChange((prevValue): FilterValue => ({ - ...prevValue, - [key]: val, - })); - }, - [onChange], - ); - - return ( -
- - - - -
- ); -} - -export default Filters; diff --git a/src/views/Home/AlertMap/Filters/styles.module.css b/src/views/Home/AlertMap/Filters/styles.module.css deleted file mode 100644 index 07a3bfcd..00000000 --- a/src/views/Home/AlertMap/Filters/styles.module.css +++ /dev/null @@ -1,5 +0,0 @@ -.filters { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); - grid-gap: var(--go-ui-spacing-md); -} diff --git a/src/views/Home/AlertMap/RegionListItem/i18n.json b/src/views/Home/AlertMap/RegionListItem/i18n.json deleted file mode 100644 index fd58cb69..00000000 --- a/src/views/Home/AlertMap/RegionListItem/i18n.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "namespace": "ongoingAlertRegion", - "strings": { - "regionList": "Region List" - } -} diff --git a/src/views/Home/AlertMap/RegionListItem/index.tsx b/src/views/Home/AlertMap/RegionListItem/index.tsx deleted file mode 100644 index 879fe4f9..00000000 --- a/src/views/Home/AlertMap/RegionListItem/index.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { useMemo } from 'react'; -import { - gql, - useQuery, -} from '@apollo/client'; -import { - BlockLoading, - Container, -} from '@ifrc-go/ui'; -import { useTranslation } from '@ifrc-go/ui/hooks'; - -import { - Admin1ListQuery, - Admin1ListQueryVariables, -} from '#generated/types'; - -import i18n from './i18n.json'; -import styles from './styles.module.css'; - -const ADMIN1_LIST = gql` -query Admin1List { - public { - admin1s { - items { - countryId - name - } - } - } - } -`; - -export interface RegionProps { - countryId: string | undefined; -} - -function RegionListItem(props: RegionProps) { - const { - countryId, - } = props; - - const strings = useTranslation(i18n); - - const { - data: admin1ListResponse, - loading: admin1ListLoading, - } = useQuery( - ADMIN1_LIST, - ); - - const filteredAdmins = useMemo(() => { - if (!countryId || !admin1ListResponse?.public?.admin1s?.items) return []; - - return admin1ListResponse.public.admin1s.items - .filter((item) => countryId.includes(item.countryId)) - .map((item) => item.name); - }, [countryId, admin1ListResponse]); - - return ( - - {admin1ListLoading && } -
- {filteredAdmins.map((name) => ( -
- {name} -
- ))} -
-
- ); -} - -export default RegionListItem; diff --git a/src/views/Home/AlertMap/RegionListItem/styles.module.css b/src/views/Home/AlertMap/RegionListItem/styles.module.css deleted file mode 100644 index 1fbd139c..00000000 --- a/src/views/Home/AlertMap/RegionListItem/styles.module.css +++ /dev/null @@ -1,13 +0,0 @@ -.alerts { - .content { - display: flex; - flex-direction: column; - gap: var(--go-ui-spacing-lg); - - .alert-details { - display: flex; - flex-direction: column; - gap: var(--go-ui-spacing-2xs); - } - } -} diff --git a/src/views/Home/AlertMap/index.tsx b/src/views/Home/AlertMap/index.tsx deleted file mode 100644 index 01b9e5ad..00000000 --- a/src/views/Home/AlertMap/index.tsx +++ /dev/null @@ -1,384 +0,0 @@ -import { - useCallback, - useMemo, - useState, -} from 'react'; -import { Link } from 'react-router-dom'; -import { - gql, - useQuery, -} from '@apollo/client'; -import { ChevronLeftLineIcon } from '@ifrc-go/icons'; -import { - Button, - Container, - List, - Tab, - TabList, - TabPanel, - Tabs, -} from '@ifrc-go/ui'; -import { useTranslation } from '@ifrc-go/ui/hooks'; -import { - _cs, - isDefined, - isNotDefined, - unique, -} from '@togglecorp/fujs'; -import { - MapBounds, - MapContainer, - MapLayer, -} from '@togglecorp/re-map'; -import type { - FillLayer, - LngLatBoundsLike, -} from 'mapbox-gl'; - -import BaseMap from '#components/domain/BaseMap'; -import MapPopup from '#components/MapPopup'; -import { - AlertEnumsQuery, - AlertEnumsQueryVariables, - CountryListQuery, - CountryListQueryVariables, -} from '#generated/types'; -import useDebouncedValue from '#hooks/useDebouncedValue'; -import useInputState from '#hooks/useInputState'; -import { - COLOR_LIGHT_GREY, - COLOR_PRIMARY_RED, - DEFAULT_MAP_PADDING, - DURATION_MAP_ZOOM, -} from '#utils/constants'; - -import CountryListItem, { CountryProps } from './CountryListItem'; -import Filters, { FilterValue } from './Filters'; -import RegionListItem from './RegionListItem'; -import AlertListItem from './AlertListItem'; - -import i18n from './i18n.json'; -import styles from './styles.module.css'; - -const COUNTRIES_LIST = gql` -query CountryList { - public { - allCountries { - alertCount - name - id - iso3 - } - } -}`; - -const ALERT_ENUMS = gql` -query AlertEnums { - enums { - AlertInfoCertainty { - key - label - } - AlertInfoUrgency { - label - key - } - AlertInfoSeverity { - key - label - } - } -}`; - -const defaultFilterValue: FilterValue = { - countries: [], - regions: [], - urgencyList: [], - severityList: [], - certaintyList: [], -}; - -type CountryType = NonNullable['allCountries']>[number]; - -export type AlertPointFeature = GeoJSON.Feature; - -type AlertPointProperties = { - id: string | number, -} - -type Props = { - className?: string; - bbox: LngLatBoundsLike | undefined; - onActiveCountryChange: (countryId: string | undefined) => void; - activeCountryId: string | undefined; -} - -const countryKeySelector = (country: CountryType) => country?.id; - -interface ClickedPoint { - feature: GeoJSON.Feature; - lngLat: mapboxgl.LngLatLike; -} - -function OngoingAlertMap(props: Props) { - const { - className, - bbox, - activeCountryId, - onActiveCountryChange, - } = props; - - const strings = useTranslation(i18n); - const [filters, setFilters] = useInputState(defaultFilterValue); - const [activeAlertId, setActiveAlertId] = useState(); - const [activeLearnOption, setActiveLearnOption] = useState('admin-1'); - - const { - data: countryResponse, - loading: countryLoading, - } = useQuery( - COUNTRIES_LIST, - ); - - const { - data: alertEnumsResponse, - } = useQuery( - ALERT_ENUMS, - ); - - const filteredCountries = countryResponse?.public.allCountries.filter( - country => country.alertCount > 0 - ); - - const [ - clickedPointProperties, - setClickedPointProperties, - ] = useState(); - - const handlePointClose = useCallback( - () => { - setClickedPointProperties(undefined); - }, - [setClickedPointProperties], - ); - - const setActiveCountryIdSafe = useCallback( - (countryId: string | undefined) => { - onActiveCountryChange(countryId); - }, - [onActiveCountryChange], - ); - - const countryListRendererParams = useCallback( - (_: string | number, country: CountryType): CountryProps => ({ - data: country, - onExpandClick: setActiveCountryIdSafe, - }), - [setActiveCountryIdSafe], - ); - - const handleCountryClick = useCallback(( - feature: mapboxgl.MapboxGeoJSONFeature, - lngLat: mapboxgl.LngLatLike, - ) => { - setClickedPointProperties({ - feature: feature as unknown as ClickedPoint['feature'], - lngLat, - }); - return false; - }, []); - - const [bounds, setBounds] = useState(bbox); - const boundsSafe = useDebouncedValue(bounds); - - const countryFillOptions = useMemo>(() => { - if (isNotDefined(filteredCountries)) { - return { - type: 'fill', - layout: { - visibility: 'visible', - }, - }; - } - const uniqueCountries = unique( - filteredCountries, - (item) => item.iso3, - ); - - return { - type: 'fill', - paint: { - 'fill-opacity': 1, - 'fill-color': [ - 'match', - ['get', 'iso3'], - ...uniqueCountries.flatMap( - (country) => [ - country.iso3.toUpperCase(), - COLOR_PRIMARY_RED, - ], - ), - COLOR_LIGHT_GREY, - ], - }, - layout: { - visibility: 'visible', - }, - }; - }, [countryResponse]); - - const handleAlertClick = useCallback( - (id: string | undefined) => { - setActiveAlertId(id); - onActiveCountryChange(undefined); - }, [onActiveCountryChange], - ); - - return ( - - {strings.mapViewAllSources} - - )} - filters={( - - )} - > - - )} - > - - {clickedPointProperties?.lngLat && ( - - Map - - )} - {boundsSafe && ( - - )} - - - )} - > - {strings.backToAlertsLabel} - - )} - > - {isDefined(countryResponse) && isNotDefined(activeCountryId) && isNotDefined(activeAlertId) && ( - - )} - - {isDefined(activeCountryId) && ( - - - - Admin-1 - - - Alerts - - - -
- - {isDefined(activeCountryId) && ( - - )} - - - {isDefined(activeCountryId) && ( - - )} - - - )} - - - ); -} - -export default OngoingAlertMap; diff --git a/src/views/Home/AlertMap/styles.module.css b/src/views/Home/AlertMap/styles.module.css deleted file mode 100644 index 102837bc..00000000 --- a/src/views/Home/AlertMap/styles.module.css +++ /dev/null @@ -1,66 +0,0 @@ -.alert-map { - display: flex; - flex-direction: column; - - .sources { - color: var(--go-ui-color-text); - font-weight: var(--go-ui-font-weight-medium); - } - - .sources:hover { - color: var(--go-ui-color-primary-red); - } - - .countries { - display: flex; - flex-basis: calc(14vw + 16rem); - flex-direction: column; - gap: var(--go-ui-spacing-md); - background-color: var(--go-ui-color-background); - - .content { - overflow: auto; - } - } - - .main-content { - display: flex; - gap: var(--go-ui-spacing-md); - height: 40rem; - - .map-container { - flex-grow: 1; - } - - .country-list { - display: flex; - flex-basis: calc(14vw + 16rem); - flex-direction: column; - gap: var(--go-ui-spacing-md); - background-color: var(--go-ui-color-background); - - .content { - overflow: auto; - - .country { - .name { - font-size: var(--go-ui-font-size-sm); - } - } - } - } - - @media screen and (max-width: 50rem) { - flex-direction: column; - height: initial; - - .map-container { - height: min(40rem, 60vh); - } - - .country-list { - flex-basis: unset; - } - } - } -} \ No newline at end of file diff --git a/src/views/Home/Alerts/AlertsAside/CountryListItem/index.tsx b/src/views/Home/Alerts/AlertsAside/CountryListItem/index.tsx new file mode 100644 index 00000000..235157e2 --- /dev/null +++ b/src/views/Home/Alerts/AlertsAside/CountryListItem/index.tsx @@ -0,0 +1,45 @@ +import { + Button, + Container, +} from '@ifrc-go/ui'; + +import { CountryListQuery } from '#generated/types'; + +import styles from './styles.module.css'; + +type CountryType = NonNullable['allCountries']>[number]; + +export interface CountryProps { + data: CountryType; + onCountryClick: (id: string) => void; +} + +function CountryListItem(props: CountryProps) { + const { + data, + onCountryClick, + } = props; + + return ( + + {data.name} + + )} + headingDescription={`(${data.filteredAlertCount})`} + headingLevel={5} + key={data.id} + /> + ); +} + +export default CountryListItem; diff --git a/src/views/Home/Alerts/AlertsAside/CountryListItem/styles.module.css b/src/views/Home/Alerts/AlertsAside/CountryListItem/styles.module.css new file mode 100644 index 00000000..20396ba9 --- /dev/null +++ b/src/views/Home/Alerts/AlertsAside/CountryListItem/styles.module.css @@ -0,0 +1,12 @@ +.country-list-item { + display: flex; + .header { + display: flex; + .heading-container { + display: flex; + .heading { + flex-grow: 0; + } + } + } +} diff --git a/src/views/Home/Alerts/AlertsAside/i18n.json b/src/views/Home/Alerts/AlertsAside/i18n.json new file mode 100644 index 00000000..4460965d --- /dev/null +++ b/src/views/Home/Alerts/AlertsAside/i18n.json @@ -0,0 +1,6 @@ +{ + "namespace": "alertsAside", + "strings": { + "heading": "Countries" + } +} diff --git a/src/views/Home/Alerts/AlertsAside/index.tsx b/src/views/Home/Alerts/AlertsAside/index.tsx new file mode 100644 index 00000000..317b0ab6 --- /dev/null +++ b/src/views/Home/Alerts/AlertsAside/index.tsx @@ -0,0 +1,72 @@ +import { useCallback } from 'react'; +import { + Container, + List, +} from '@ifrc-go/ui'; +import { useTranslation } from '@ifrc-go/ui/hooks'; +import { _cs } from '@togglecorp/fujs'; + +import { CountryListQuery } from '#generated/types'; +import { stringIdSelector } from '#utils/selectors'; + +import CountryListItem from './CountryListItem'; + +import i18n from './i18n.json'; +import styles from './styles.module.css'; + +type CountryType = NonNullable['allCountries']>[number]; + +interface Props { + className?: string; + countriesWithAlert?: CountryType[]; + alertsPending: boolean; + alertsFetchError: boolean; + alertsFiltered: boolean; +} + +function AlertsAside(props: Props) { + const { + className, + countriesWithAlert, + alertsPending, + alertsFetchError, + alertsFiltered, + } = props; + + const strings = useTranslation(i18n); + + const handleCountryClick = useCallback((id: string) => { + console.warn('id', id); + }, []); + + const rendererParams = useCallback( + (_: string, value: CountryType) => ({ + data: value, + onCountryClick: handleCountryClick, + }), + [handleCountryClick], + ); + + return ( + + + + ); +} + +export default AlertsAside; diff --git a/src/views/Home/Alerts/AlertsAside/styles.module.css b/src/views/Home/Alerts/AlertsAside/styles.module.css new file mode 100644 index 00000000..4c8637dd --- /dev/null +++ b/src/views/Home/Alerts/AlertsAside/styles.module.css @@ -0,0 +1,13 @@ +.alert-aside { + display: flex; + + .main-content { + display: flex; + + .country-list { + display: flex; + flex-direction: column; + gap: var(--go-ui-spacing-xs); + } + } +} diff --git a/src/views/Home/Alerts/AlertsMap/index.tsx b/src/views/Home/Alerts/AlertsMap/index.tsx new file mode 100644 index 00000000..5064fb61 --- /dev/null +++ b/src/views/Home/Alerts/AlertsMap/index.tsx @@ -0,0 +1,88 @@ +import { useMemo } from 'react'; +import { + _cs, + isNotDefined, + unique, +} from '@togglecorp/fujs'; +import { + MapContainer, + MapLayer, +} from '@togglecorp/re-map'; +import type { FillLayer } from 'mapbox-gl'; + +import BaseMap from '#components/domain/BaseMap'; +import { CountryListQuery } from '#generated/types'; +import { + COLOR_LIGHT_GREY, + COLOR_PRIMARY_RED, +} from '#utils/constants'; + +import styles from './styles.module.css'; + +type CountryType = NonNullable['allCountries']>[number]; + +interface Props { + className?: string; + countriesWithAlert?: CountryType[]; +} + +function AlertsMap(props: Props) { + const { countriesWithAlert, className } = props; + + const countryFillOptions = useMemo>(() => { + if (isNotDefined(countriesWithAlert)) { + return { + type: 'fill', + layout: { + visibility: 'visible', + }, + }; + } + + const uniqueCountries = unique( + countriesWithAlert, + (item) => item.iso3, + ); + + return { + type: 'fill', + paint: { + 'fill-opacity': 1, + 'fill-color': [ + 'match', + ['get', 'iso3'], + ...uniqueCountries.flatMap( + (country) => [ + country.iso3.toUpperCase(), + COLOR_PRIMARY_RED, + ], + ), + COLOR_LIGHT_GREY, + ], + }, + layout: { + visibility: 'visible', + }, + }; + }, [countriesWithAlert]); + + return ( +
+ + )} + > + + +
+ ); +} + +export default AlertsMap; diff --git a/src/views/Home/Alerts/AlertsMap/styles.module.css b/src/views/Home/Alerts/AlertsMap/styles.module.css new file mode 100644 index 00000000..36d04f43 --- /dev/null +++ b/src/views/Home/Alerts/AlertsMap/styles.module.css @@ -0,0 +1,8 @@ +.alerts-map { + display: flex; + + .map-container { + flex-grow: 1; + } +} + diff --git a/src/views/Home/AlertMap/i18n.json b/src/views/Home/Alerts/i18n.json similarity index 87% rename from src/views/Home/AlertMap/i18n.json rename to src/views/Home/Alerts/i18n.json index 7a7cf09a..7627d8cf 100644 --- a/src/views/Home/AlertMap/i18n.json +++ b/src/views/Home/Alerts/i18n.json @@ -1,5 +1,5 @@ { - "namespace": "ongoingAlertMap", + "namespace": "alerts", "strings": { "mapHeading": "All Ongoing Alerts", "mapViewAllSources": "View All Sources", @@ -7,4 +7,4 @@ "backToAlertsLabel": "Back to Alerts", "alertViewDetails": "View Details" } -} \ No newline at end of file +} diff --git a/src/views/Home/Alerts/index.tsx b/src/views/Home/Alerts/index.tsx new file mode 100644 index 00000000..019d582b --- /dev/null +++ b/src/views/Home/Alerts/index.tsx @@ -0,0 +1,91 @@ +import { Link } from 'react-router-dom'; +import { + gql, + useQuery, +} from '@apollo/client'; +import { Container } from '@ifrc-go/ui'; +import { useTranslation } from '@ifrc-go/ui/hooks'; +import { _cs } from '@togglecorp/fujs'; + +import { + CountryListQuery, + CountryListQueryVariables, +} from '#generated/types'; + +import AlertsAside from './AlertsAside'; +import AlertsMap from './AlertsMap'; + +import i18n from './i18n.json'; +import styles from './styles.module.css'; + +const COUNTRIES_LIST = gql` +query CountryList { + public { + allCountries(alertFilters: {}) { + name + id + iso3 + filteredAlertCount + } + } +} +`; + +export type AlertPointFeature = GeoJSON.Feature; + +type AlertPointProperties = { + id: string | number, +} + +interface Props { + className?: string; +} + +function Alerts(props: Props) { + const { className } = props; + + const strings = useTranslation(i18n); + + const { + data: countryResponse, + loading: countryLoading, + } = useQuery( + COUNTRIES_LIST, + ); + + const countriesWithAlert = countryResponse?.public.allCountries.filter( + (country) => (country?.filteredAlertCount ?? 0) > 0, + ); + + return ( + + {strings.mapViewAllSources} + + )} + > + + + + ); +} + +export default Alerts; diff --git a/src/views/Home/Alerts/styles.module.css b/src/views/Home/Alerts/styles.module.css new file mode 100644 index 00000000..b4bb4b1d --- /dev/null +++ b/src/views/Home/Alerts/styles.module.css @@ -0,0 +1,34 @@ +.alert-map { + display: flex; + flex-direction: column; + + .main-content { + display: flex; + flex-grow: 1; + height: 45rem; + gap: var(--go-ui-spacing-md); + + .alerts-map { + flex-grow: 1; + } + + .alerts-aside { + display: flex; + flex-basis: 30%; + overflow: auto; + } + + @media screen and (max-width: 50rem) { + flex-direction: column; + height: initial; + + .alerts-map { + height: min(40rem, 60vh); + } + + .alerts-aside { + flex-basis: unset; + } + } + } +} diff --git a/src/views/Home/index.tsx b/src/views/Home/index.tsx index 91adca70..fa1aba84 100644 --- a/src/views/Home/index.tsx +++ b/src/views/Home/index.tsx @@ -5,13 +5,12 @@ import { TabPanel, Tabs, } from '@ifrc-go/ui'; - import { useTranslation } from '@ifrc-go/ui/hooks'; import Page from '#components/Page'; -import OngoingAlertMap from '../AlertMap'; -import AlertTable from '../AlertTable'; +import OngoingAlertMap from './AlertMap'; +import Alerts from './Alerts'; import i18n from './i18n.json'; import styles from './styles.module.css'; @@ -22,8 +21,6 @@ export function Component() { const strings = useTranslation(i18n); const [activeTab, setActiveTab] = useState('map'); - const [activeCountryId, setActiveCountryId] = useState(); - return ( + + ); } diff --git a/yarn.lock b/yarn.lock index 9c6ffae7..793d40fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,9 +21,9 @@ integrity sha512-gFPqTG7otEJ8uP6wrhDv6mqwGWYZKNvAcCq6u9hOj0c+IKCEsY4L1oC9trPq2SaWIzAfHvqfBDxF591JkMf+kg== "@apollo/client@^3.9.9": - version "3.9.10" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.10.tgz#f381f67f3559cb5f5b66ce9183f84f49616acbe4" - integrity sha512-w8i/Lk1P0vvWZF0Xb00XPonn79/0rgRJ1vopBlVudVuy9QP29/NZXK0rI2xJIN6VrKuEqJZaVGJC+7k23I2sfA== + version "3.9.11" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.11.tgz#737e5c35c21d6f3b78423033ad81837a8a6992e0" + integrity sha512-H7e9m7cRcFO93tokwzqrsbnfKorkpV24xU30hFH5u2g6B+c1DMo/ouyF/YrBPdrTzqxQCjTUmds/FLmJ7626GA== dependencies: "@graphql-typed-document-node/core" "^3.1.1" "@wry/caches" "^1.0.0" @@ -1837,7 +1837,7 @@ resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234" integrity sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ== -"@mapbox/mapbox-gl-draw@^1.4.3": +"@mapbox/mapbox-gl-draw@^1.2.0": version "1.4.3" resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-draw/-/mapbox-gl-draw-1.4.3.tgz#3f95362fdeabcffcb46f3392f24bf5914e7be817" integrity sha512-03qIJgyGmm0IoTZbV/cfODru9jRGogi4LcQ3maxIJDKccq1gY3ofgt2UYPkeU143ElxitZahEythNQv1NpsLhg== @@ -2137,88 +2137,6 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.1.tgz#299eee74b7d87e116083ac5b1ce8dd9434668294" integrity sha512-wQGI+LY/Py20zdUPq+XCem7JcPOyzIJBm3dli+56DJsQOHbnXZFEwgmnC6el1TPAfC8lBT3m+z69RmLykNUbew== -"@sentry-internal/feedback@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.109.0.tgz#4657d7f36a1de3be466f42735d295e212b7eca11" - integrity sha512-EL7N++poxvJP9rYvh6vSu24tsKkOveNCcCj4IM7+irWPjsuD2GLYYlhp/A/Mtt9l7iqO4plvtiQU5HGk7smcTQ== - dependencies: - "@sentry/core" "7.109.0" - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - -"@sentry-internal/replay-canvas@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.109.0.tgz#9a00857994a9487428296feed4a9ddf2d62bab84" - integrity sha512-Lh/K60kmloR6lkPUcQP0iamw7B/MdEUEx/ImAx4tUSMrLj+IoUEcq/ECgnnVyQkJq59+8nPEKrVLt7x6PUPEjw== - dependencies: - "@sentry/core" "7.109.0" - "@sentry/replay" "7.109.0" - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - -"@sentry-internal/tracing@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.109.0.tgz#3effaa132c41a65378fa98146aea61228d528953" - integrity sha512-PzK/joC5tCuh2R/PRh+7dp+uuZl7pTsBIjPhVZHMTtb9+ls65WkdZJ1/uKXPouyz8NOo9Xok7aEvEo9seongyw== - dependencies: - "@sentry/core" "7.109.0" - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - -"@sentry/browser@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.109.0.tgz#13b2623f43047f292cf7d6070128a7501e008693" - integrity sha512-yx+OFG+Ab9qUDDgV9ZDv8M9O9Mqr0fjKta/LMlWALYLjzkMvxsPlRPFj7oMBlHqOTVLDeg7lFYmsA8wyWQ8Z8g== - dependencies: - "@sentry-internal/feedback" "7.109.0" - "@sentry-internal/replay-canvas" "7.109.0" - "@sentry-internal/tracing" "7.109.0" - "@sentry/core" "7.109.0" - "@sentry/replay" "7.109.0" - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - -"@sentry/core@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.109.0.tgz#7a02f4af4a676950f6555f552a2a232d4458fcd5" - integrity sha512-xwD4U0IlvvlE/x/g/W1I8b4Cfb16SsCMmiEuBf6XxvAa3OfWBxKoqLifb3GyrbxMC4LbIIZCN/SvLlnGJPgszA== - dependencies: - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - -"@sentry/react@^7.81.1": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.109.0.tgz#ae8a2950d2022e83f1bccd8b994f0096f3dd1682" - integrity sha512-KqXoDh6LVhNO+FLdM5LiTGpuorFvjoBPQ4nPGIVbjeMY/KZIau3kFxR142EvCApxmD69yvS5EhMnEqlNdaQPGw== - dependencies: - "@sentry/browser" "7.109.0" - "@sentry/core" "7.109.0" - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - hoist-non-react-statics "^3.3.2" - -"@sentry/replay@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.109.0.tgz#f50fb0140c81fce660c44cc93c35988898b8348b" - integrity sha512-hCDjbTNO7ErW/XsaBXlyHFsUhneyBUdTec1Swf98TFEfVqNsTs6q338aUcaR8dGRLbLrJ9YU9D1qKq++v5h2CA== - dependencies: - "@sentry-internal/tracing" "7.109.0" - "@sentry/core" "7.109.0" - "@sentry/types" "7.109.0" - "@sentry/utils" "7.109.0" - -"@sentry/types@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.109.0.tgz#d8778358114ed05be734661cc9e1e261f4494947" - integrity sha512-egCBnDv3YpVFoNzRLdP0soVrxVLCQ+rovREKJ1sw3rA2/MFH9WJ+DZZexsX89yeAFzy1IFsCp7/dEqudusml6g== - -"@sentry/utils@7.109.0": - version "7.109.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.109.0.tgz#7078e1400197abc1b0c436679bef980639500a86" - integrity sha512-3RjxMOLMBwZ5VSiH84+o/3NY2An4Zldjz0EbfEQNRY9yffRiCPJSQiCJID8EoylCFOh/PAhPimBhqbtWJxX6iw== - dependencies: - "@sentry/types" "7.109.0" - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -2307,74 +2225,74 @@ "@svgr/hast-util-to-babel-ast" "8.0.0" svg-parser "^2.0.4" -"@swc/core-darwin-arm64@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.12.tgz#4aa5080adaeea415dcdb6139415dabe1680933f3" - integrity sha512-BZUUq91LGJsLI2BQrhYL3yARkcdN4TS3YGNS6aRYUtyeWrGCTKHL90erF2BMU2rEwZLLkOC/U899R4o4oiSHfA== - -"@swc/core-darwin-x64@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.4.12.tgz#77a2125679948f320e6038b6d62a477a3fa0e37b" - integrity sha512-Wkk8rq1RwCOgg5ybTlfVtOYXLZATZ+QjgiBNM7pIn03A5/zZicokNTYd8L26/mifly2e74Dz34tlIZBT4aTGDA== - -"@swc/core-linux-arm-gnueabihf@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.12.tgz#f753e321ce75f18d7355f8d96398af2ae45a7528" - integrity sha512-8jb/SN67oTQ5KSThWlKLchhU6xnlAlnmnLCCOKK1xGtFS6vD+By9uL+qeEY2krV98UCRTf68WSmC0SLZhVoz5A== - -"@swc/core-linux-arm64-gnu@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.12.tgz#1c90b90a84036155459752d51291571b06d2d79c" - integrity sha512-DhW47DQEZKCdSq92v5F03rqdpjRXdDMqxfu4uAlZ9Uo1wJEGvY23e1SNmhji2sVHsZbBjSvoXoBLk0v00nSG8w== - -"@swc/core-linux-arm64-musl@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.12.tgz#847cf769ab3ac8fe6cf04d8562f0bfa8f08f7016" - integrity sha512-PR57pT3TssnCRvdsaKNsxZy9N8rFg9AKA1U7W+LxbZ/7Z7PHc5PjxF0GgZpE/aLmU6xOn5VyQTlzjoamVkt05g== - -"@swc/core-linux-x64-gnu@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.12.tgz#cf2f4bd510063829752b61ab718453027f66c0e9" - integrity sha512-HLZIWNHWuFIlH+LEmXr1lBiwGQeCshKOGcqbJyz7xpqTh7m2IPAxPWEhr/qmMTMsjluGxeIsLrcsgreTyXtgNA== - -"@swc/core-linux-x64-musl@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.12.tgz#88ac9534879d4a2dd9daf3c2381dd38f456628b0" - integrity sha512-M5fBAtoOcpz2YQAFtNemrPod5BqmzAJc8pYtT3dVTn1MJllhmLHlphU8BQytvoGr1PHgJL8ZJBlBGdt70LQ7Mw== - -"@swc/core-win32-arm64-msvc@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.12.tgz#6cb733748eaf6e3a11c38c43fa54ee316c779648" - integrity sha512-K8LjjgZ7VQFtM+eXqjfAJ0z+TKVDng3r59QYn7CL6cyxZI2brLU3lNknZcUFSouZD+gsghZI/Zb8tQjVk7aKDQ== - -"@swc/core-win32-ia32-msvc@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.12.tgz#85c86fd2c22e3868a07c7eac165be10abb7ef999" - integrity sha512-hflO5LCxozngoOmiQbDPyvt6ODc5Cu9AwTJP9uH/BSMPdEQ6PCnefuUOJLAKew2q9o+NmDORuJk+vgqQz9Uzpg== - -"@swc/core-win32-x64-msvc@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.12.tgz#50e313d906b8c3d107a7639ea6fbf8156e82c894" - integrity sha512-3A4qMtddBDbtprV5edTB/SgJn9L+X5TL7RGgS3eWtEgn/NG8gA80X/scjf1v2MMeOsrcxiYhnemI2gXCKuQN2g== +"@swc/core-darwin-arm64@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.13.tgz#9b1ff4477a9b9eb76275e1dd1af52fbe8d11a0d3" + integrity sha512-36P72FLpm5iq85IvoEjBvi22DiqkkEIanJ1M0E8bkxcFHUbjBrYfPY9T6cpPyK5oQqkaTBvNAc3j1BlVD6IH6w== + +"@swc/core-darwin-x64@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.4.13.tgz#a293492337e337404742988897f7d3befce83d4b" + integrity sha512-ye7OgKpDdyA8AMIVVdmD1ICDaFXgoEXORnVO8bBHyul0WN71yUBZMX+YxEx2lpWtiftA2vY/1MAuOR80vHkBCw== + +"@swc/core-linux-arm-gnueabihf@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.13.tgz#685016a0b2ed7195e2aa78d92a0aea0dc2567610" + integrity sha512-+x593Jlmu4c3lJtZUKRejWpV2MAij1Js5nmQLLdjo6ChR2D4B2rzj3iMiKn5gITew7fraF9t3fvXALdWh7HmUg== + +"@swc/core-linux-arm64-gnu@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.13.tgz#ef4fd6552c508e2196bad152330123205d34dca7" + integrity sha512-0x8OVw4dfyNerrs/9eZX9wNnmvwbwXSMCi+LbE6Xt1pXOIwvoLtFIXcV3NsrlkFboO3sr5UAQIwDxKqbIZA9pQ== + +"@swc/core-linux-arm64-musl@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.13.tgz#214b7d3469366e880a3d69b23846ad217203b798" + integrity sha512-Z9c4JiequtZvngPcxbCuAOkmWBxi2vInZbjjhD5I+Q9oiJdXUz1t2USGwsGPS41Xvk1BOA3ecK2Sn1ilY3titg== + +"@swc/core-linux-x64-gnu@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.13.tgz#f165ab1baa4cc7eea997ee58db7eb860608f4b1d" + integrity sha512-ChatHtk+vX0Ke5QG+jO+rIapw/KwZsi9MedCBHFXHH6iWF4z8d51cJeN68ykcn+vAXzjNeFNdlNy5Vbkd1zAqg== + +"@swc/core-linux-x64-musl@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.13.tgz#18c3748ca0aa50a4062ee61de7b41af92c3753c7" + integrity sha512-0Pz39YR530mXpsztwQkmEKdkkZy4fY4Smdh4pkm6Ly8Nndyo0te/l4bcAGqN24Jp7aVwF/QSy14SAtw4HRjU9g== + +"@swc/core-win32-arm64-msvc@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.13.tgz#89f60481ad06b39ca6b9e56593564fb9bd86b886" + integrity sha512-LVZfhlD+jHcAbz5NN+gAJ1BEasB0WpcvUzcsJt0nQSRsojgzPzFjJ+fzEBnvT7SMtqKkrnVJ0OmDYeh88bDRpw== + +"@swc/core-win32-ia32-msvc@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.13.tgz#8f4bff548e3eae7b7ef0667f31866c5b5ee4dbfa" + integrity sha512-78hxHWUvUZtWsnhcf8DKwhBcNFJw+j4y4fN2B9ioXmBWX2tIyw+BqUHOrismOtjPihaZmwe/Ok2e4qmkawE2fw== + +"@swc/core-win32-x64-msvc@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.13.tgz#57fb58f6c81526b17c432db3159bf540bd977a12" + integrity sha512-WSfy1u2Xde6jU7UpHIInCUMW98Zw9iZglddKUAvmr1obkZji5U6EX0Oca3asEJdZPFb+2lMLjt0Mh5a1YisROg== "@swc/core@^1.3.107": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.4.12.tgz#72350b3d44187b33980c159d9481f7e47816386b" - integrity sha512-QljRxTaUajSLB9ui93cZ38/lmThwIw/BPxjn+TphrYN6LPU3vu9/ykjgHtlpmaXDDcngL4K5i396E7iwwEUxYg== + version "1.4.13" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.4.13.tgz#c679664cae722fc404a59fc6d687e80bf7dbae99" + integrity sha512-rOtusBE+2gaeRkAJn5E4zp5yzZekZOypzSOz5ZG6P1hFbd+Cc26fWEdK6sUSnrkkvTd0Oj33KXLB/4UkbK/UHA== dependencies: "@swc/counter" "^0.1.2" "@swc/types" "^0.1.5" optionalDependencies: - "@swc/core-darwin-arm64" "1.4.12" - "@swc/core-darwin-x64" "1.4.12" - "@swc/core-linux-arm-gnueabihf" "1.4.12" - "@swc/core-linux-arm64-gnu" "1.4.12" - "@swc/core-linux-arm64-musl" "1.4.12" - "@swc/core-linux-x64-gnu" "1.4.12" - "@swc/core-linux-x64-musl" "1.4.12" - "@swc/core-win32-arm64-msvc" "1.4.12" - "@swc/core-win32-ia32-msvc" "1.4.12" - "@swc/core-win32-x64-msvc" "1.4.12" + "@swc/core-darwin-arm64" "1.4.13" + "@swc/core-darwin-x64" "1.4.13" + "@swc/core-linux-arm-gnueabihf" "1.4.13" + "@swc/core-linux-arm64-gnu" "1.4.13" + "@swc/core-linux-arm64-musl" "1.4.13" + "@swc/core-linux-x64-gnu" "1.4.13" + "@swc/core-linux-x64-musl" "1.4.13" + "@swc/core-win32-arm64-msvc" "1.4.13" + "@swc/core-win32-ia32-msvc" "1.4.13" + "@swc/core-win32-x64-msvc" "1.4.13" "@swc/counter@^0.1.2", "@swc/counter@^0.1.3": version "0.1.3" @@ -2403,6 +2321,14 @@ "@babel/runtime-corejs3" "^7.22.3" "@togglecorp/fujs" "^2.1.0" +"@togglecorp/toggle-form@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@togglecorp/toggle-form/-/toggle-form-2.0.4.tgz#2098ae24d6a37020d19a60162fff457e7a9eedf3" + integrity sha512-+EzRzXK/PKlisu44yARpxOkoeowz+0oKk2Rl3CdhxtBfTVfzG28aHAklDTubTBssS8hneGBTav2aInCqmwChfg== + dependencies: + "@babel/runtime-corejs3" "^7.22.3" + "@togglecorp/fujs" "^2.1.1" + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -2423,6 +2349,63 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@turf/bbox@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/bbox/-/bbox-6.5.0.tgz#bec30a744019eae420dac9ea46fb75caa44d8dc5" + integrity sha512-RBbLaao5hXTYyyg577iuMtDB8ehxMlUqHEJiMs8jT1GHkFhr6sYre3lmLsPeYEi/ZKj5TP5tt7fkzNdJ4GIVyw== + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/buffer@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/buffer/-/buffer-6.5.0.tgz#22bd0d05b4e1e73eaebc69b8f574a410ff704842" + integrity sha512-qeX4N6+PPWbKqp1AVkBVWFerGjMYMUyencwfnkCesoznU6qvfugFHNAngNqIBVnJjZ5n8IFyOf+akcxnrt9sNg== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/center" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + "@turf/projection" "^6.5.0" + d3-geo "1.7.1" + turf-jsts "*" + +"@turf/center@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/center/-/center-6.5.0.tgz#3bcb6bffcb8ba147430cfea84aabaed5dbdd4f07" + integrity sha512-T8KtMTfSATWcAX088rEDKjyvQCBkUsLnK/Txb6/8WUXIeOZyHu42G7MkdkHRoHtwieLdduDdmPLFyTdG5/e7ZQ== + dependencies: + "@turf/bbox" "^6.5.0" + "@turf/helpers" "^6.5.0" + +"@turf/clone@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/clone/-/clone-6.5.0.tgz#895860573881ae10a02dfff95f274388b1cda51a" + integrity sha512-mzVtTFj/QycXOn6ig+annKrM6ZlimreKYz6f/GSERytOpgzodbQyOgkfwru100O1KQhhjSudKK4DsQ0oyi9cTw== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/helpers@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/helpers/-/helpers-6.5.0.tgz#f79af094bd6b8ce7ed2bd3e089a8493ee6cae82e" + integrity sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw== + +"@turf/meta@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/meta/-/meta-6.5.0.tgz#b725c3653c9f432133eaa04d3421f7e51e0418ca" + integrity sha512-RrArvtsV0vdsCBegoBtOalgdSOfkBrTJ07VkpiCnq/491W67hnMWmDu7e6Ztw0C3WldRYTXkg3SumfdzZxLBHA== + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/projection@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@turf/projection/-/projection-6.5.0.tgz#d2aad862370bf03f2270701115464a8406c144b2" + integrity sha512-/Pgh9mDvQWWu8HRxqpM+tKz8OzgauV+DiOcr3FCjD6ubDnrrmMJlsf6fFJmggw93mtVPrZRL6yyi9aYCQBOIvg== + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + "@types/estree@1.0.5", "@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -2470,7 +2453,7 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== -"@types/node@*": +"@types/node@*", "@types/node@^20.1.3": version "20.12.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== @@ -2482,13 +2465,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/node@^20.1.3": - version "20.12.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.5.tgz#74c4f31ab17955d0b5808cdc8fd2839526ad00b3" - integrity sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw== - dependencies: - undici-types "~5.26.4" - "@types/normalize-package-data@^2.4.0": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -2500,9 +2476,9 @@ integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== "@types/react-dom@^18.2.22": - version "18.2.24" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.24.tgz#8dda8f449ae436a7a6e91efed8035d4ab03ff759" - integrity sha512-cN6upcKd8zkGy4HU9F1+/s98Hrp6D4MOcippK4PoE8OZRngohHZpbJn1GsaDLz87MqvHNoT13nHvNqM9ocRHZg== + version "18.2.25" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.25.tgz#2946a30081f53e7c8d585eb138277245caedc521" + integrity sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA== dependencies: "@types/react" "*" @@ -2524,9 +2500,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^18.0.28": - version "18.2.74" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.74.tgz#2d52eb80e4e7c4ea8812c89181d6d590b53f958c" - integrity sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw== + version "18.2.77" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.77.tgz#af2f857b6a6dfb6ca89ec102ebc147b1f1616880" + integrity sha512-CUT9KUUF+HytDM7WiXKLF9qUSg4tGImwy4FXTlfEDPEkkNUzJ7rVFolYweJ9fS1ljoIaP7M7Rdjc5eUm/Yu5AA== dependencies: "@types/prop-types" "*" csstype "^3.0.2" @@ -2687,44 +2663,44 @@ dependencies: "@swc/core" "^1.3.107" -"@vitest/expect@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.4.0.tgz#d64e17838a20007fecd252397f9b96a1ca81bfb0" - integrity sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA== +"@vitest/expect@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.5.0.tgz#961190510a2723bd4abf5540bcec0a4dfd59ef14" + integrity sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA== dependencies: - "@vitest/spy" "1.4.0" - "@vitest/utils" "1.4.0" + "@vitest/spy" "1.5.0" + "@vitest/utils" "1.5.0" chai "^4.3.10" -"@vitest/runner@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.4.0.tgz#907c2d17ad5975b70882c25ab7a13b73e5a28da9" - integrity sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg== +"@vitest/runner@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.5.0.tgz#1f7cb78ee4064e73e53d503a19c1b211c03dfe0c" + integrity sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ== dependencies: - "@vitest/utils" "1.4.0" + "@vitest/utils" "1.5.0" p-limit "^5.0.0" pathe "^1.1.1" -"@vitest/snapshot@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.4.0.tgz#2945b3fb53767a3f4f421919e93edfef2935b8bd" - integrity sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A== +"@vitest/snapshot@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.5.0.tgz#cd2d611fd556968ce8fb6b356a09b4593c525947" + integrity sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A== dependencies: magic-string "^0.30.5" pathe "^1.1.1" pretty-format "^29.7.0" -"@vitest/spy@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.4.0.tgz#cf953c93ae54885e801cbe6b408a547ae613f26c" - integrity sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q== +"@vitest/spy@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.5.0.tgz#1369a1bec47f46f18eccfa45f1e8fbb9b5e15e77" + integrity sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w== dependencies: tinyspy "^2.2.0" -"@vitest/utils@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.4.0.tgz#ea6297e0d329f9ff0a106f4e1f6daf3ff6aad3f0" - integrity sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg== +"@vitest/utils@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.5.0.tgz#90c9951f4516f6d595da24876b58e615f6c99863" + integrity sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A== dependencies: diff-sequences "^29.6.3" estree-walker "^3.0.3" @@ -2817,6 +2793,11 @@ dependencies: tslib "^2.3.0" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + abab@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" @@ -3170,6 +3151,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + auto-bind@~4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/auto-bind/-/auto-bind-4.0.0.tgz#e3589fc6c2da8f7ca43ba9f84fa52a744fc997fb" @@ -4139,9 +4125,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: - version "1.0.30001606" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001606.tgz#b4d5f67ab0746a3b8b5b6d1f06e39c51beb39a9e" - integrity sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg== + version "1.0.30001608" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001608.tgz#7ae6e92ffb300e4b4ec2f795e0abab456ec06cc0" + integrity sha512-cjUJTQkk9fQlJR2s4HMuPMvTiRggl0rAVMtthQuyOlDWuqHXqN8azLq+pi8B2TjwKJ32diHjUqRIKeFX4z1FoA== capital-case@^1.0.4: version "1.0.4" @@ -4643,6 +4629,18 @@ csv@^5.5.3: csv-stringify "^5.6.5" stream-transform "^2.1.3" +d3-array@1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" + integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw== + +d3-geo@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.7.1.tgz#44bbc7a218b1fd859f3d8fd7c443ca836569ce99" + integrity sha512-O4AempWAr+P5qbk2bC2FuN/sDW4z+dN2wDf9QV3bxQt4M5HfOEeXLgJ/UKQW0+o1Dj8BE+L5kiDbdWUMjsmQpw== + dependencies: + d3-array "1" + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" @@ -4954,9 +4952,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.4.668: - version "1.4.729" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.729.tgz#8477d21e2a50993781950885b2731d92ad532c00" - integrity sha512-bx7+5Saea/qu14kmPTDHQxkp2UnziG3iajUQu3BxFvCOnpAJdDbMV4rSl+EqFDkkpNNVUFlR1kDfpL59xfy1HA== + version "1.4.735" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.735.tgz#c32914ef2cd0a3a545a3def841d253a31a8a93be" + integrity sha512-pkYpvwg8VyOTQAeBqZ7jsmpCjko1Qc6We1ZtZCjRyYbT5v4AIUKDy5cQTRotQlSSZmMr8jqpEt6JtOj5k7lR7A== emoji-regex@^10.3.0: version "10.3.0" @@ -5651,6 +5649,13 @@ find-yarn-workspace-root2@1.2.16: micromatch "^4.0.2" pkg-dir "^4.2.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + flat-cache@^3, flat-cache@^3.0.4, flat-cache@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" @@ -5753,6 +5758,16 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -5977,7 +5992,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -6669,7 +6684,7 @@ is-windows@^1.0.0, is-windows@^1.0.1: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -6834,7 +6849,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.1, json-stable-stringify@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== @@ -6937,6 +6952,13 @@ kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kleur@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" @@ -7609,6 +7631,14 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -7803,6 +7833,27 @@ pascal-case@^3.1.2: no-case "^3.0.4" tslib "^2.0.3" +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" + path-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/path-case/-/path-case-3.0.4.tgz#9168645334eb942658375c56f80b4c0cb5f82c6f" @@ -7994,10 +8045,10 @@ postcss-custom-media@^10.0.4: "@csstools/css-tokenizer" "^2.2.4" "@csstools/media-query-list-parser" "^2.1.9" -postcss-custom-properties@^13.3.6: - version "13.3.6" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-13.3.6.tgz#f18f3105ab33b8cb2e69da38192a415f6e4c0ea8" - integrity sha512-vVVIwQbJiIz+PBLMIWA6XMi53Zg66/f474KolA7x0Das6EwkATc/9ZvM6zZx2gs7ZhcgVHjmWBbHkK9FlCgLeA== +postcss-custom-properties@^13.3.7: + version "13.3.7" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-13.3.7.tgz#87f8ce173b147dc5e7e7d7f36123042b2572afd6" + integrity sha512-0N9F/GUCr/D0IazjzHahyYW2bQVDT6qDtEudiGHAhMd3XqhfM3VmfYVlkc/40DOhsPtngSNb54/Ctu8msvFOvQ== dependencies: "@csstools/cascade-layer-name-parser" "^1.0.9" "@csstools/css-parser-algorithms" "^2.6.1" @@ -8131,9 +8182,9 @@ postcss-place@^9.0.1: postcss-value-parser "^4.2.0" postcss-preset-env@^9.5.2: - version "9.5.4" - resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-9.5.4.tgz#ea01cc1eb404a9b80f3375a62b50d36d6f27415a" - integrity sha512-o/jOlJjhm4f6rI5q1f+4Og3tz1cjaO50er9ndk7ZdcXHjWOH49kMAhqDC/nQifypQkOAiAmF46dPt3pZM+Cwbg== + version "9.5.5" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-9.5.5.tgz#b44aa9110007d92c6d5d157b615d9cff15ac1664" + integrity sha512-tg71KfEgTHMM+C4LpWtKfHFWEunfWj1JThq/Odsw60MOowcffBrMAcSBDE+imftW5/BD3mpOiiTL6c+KcnGaLQ== dependencies: "@csstools/postcss-cascade-layers" "^4.0.4" "@csstools/postcss-color-function" "^3.0.13" @@ -8176,7 +8227,7 @@ postcss-preset-env@^9.5.2: postcss-color-hex-alpha "^9.0.4" postcss-color-rebeccapurple "^9.0.3" postcss-custom-media "^10.0.4" - postcss-custom-properties "^13.3.6" + postcss-custom-properties "^13.3.7" postcss-custom-selectors "^7.1.8" postcss-dir-pseudo-class "^8.0.1" postcss-double-position-gradients "^5.0.6" @@ -8873,7 +8924,7 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== -rimraf@2: +rimraf@2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -9158,6 +9209,11 @@ slash@^1.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg== +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -9791,7 +9847,7 @@ tinybench@^2.5.1: resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== -tinypool@^0.8.2: +tinypool@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.3.tgz#e17d0a5315a7d425f875b05f7af653c225492d39" integrity sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw== @@ -9971,6 +10027,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +turf-jsts@*: + version "1.2.3" + resolved "https://registry.yarnpkg.com/turf-jsts/-/turf-jsts-1.2.3.tgz#59757f542afbff9a577bbf411f183b8f48d38aa4" + integrity sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -10267,10 +10328,10 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vite-node@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.4.0.tgz#265529d60570ca695ceb69391f87f92847934ad8" - integrity sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw== +vite-node@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.5.0.tgz#7f74dadfecb15bca016c5ce5ef85e5cc4b82abf2" + integrity sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw== dependencies: cac "^6.7.14" debug "^4.3.4" @@ -10322,7 +10383,7 @@ vite-plugin-svgr@^4.2.0: "@svgr/core" "^8.1.0" "@svgr/plugin-jsx" "^8.1.0" -vite-plugin-webfont-dl@^3.9.1: +vite-plugin-webfont-dl@3.9.2: version "3.9.2" resolved "https://registry.yarnpkg.com/vite-plugin-webfont-dl/-/vite-plugin-webfont-dl-3.9.2.tgz#990ecdf164757ed9699cb94f43cefa0f95e8ad89" integrity sha512-kAjWbYdWz/fgvSIo5xjzca1F7EkM9ZMEQikFCoJr4u58srYtYAqyDTGQOxU1tCCCLLfktDnKFZKIFlXPay8j/Q== @@ -10353,15 +10414,15 @@ vite@^5.0.0, vite@^5.2.6: fsevents "~2.3.3" vitest@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.4.0.tgz#f5c812aaf5023818b89b7fc667fa45327396fece" - integrity sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw== - dependencies: - "@vitest/expect" "1.4.0" - "@vitest/runner" "1.4.0" - "@vitest/snapshot" "1.4.0" - "@vitest/spy" "1.4.0" - "@vitest/utils" "1.4.0" + version "1.5.0" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.5.0.tgz#6ebb396bd358650011a9c96c18fa614b668365c1" + integrity sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw== + dependencies: + "@vitest/expect" "1.5.0" + "@vitest/runner" "1.5.0" + "@vitest/snapshot" "1.5.0" + "@vitest/spy" "1.5.0" + "@vitest/utils" "1.5.0" acorn-walk "^8.3.2" chai "^4.3.10" debug "^4.3.4" @@ -10373,9 +10434,9 @@ vitest@^1.1.0: std-env "^3.5.0" strip-literal "^2.0.0" tinybench "^2.5.1" - tinypool "^0.8.2" + tinypool "^0.8.3" vite "^5.0.0" - vite-node "1.4.0" + vite-node "1.5.0" why-is-node-running "^2.2.2" vlq@^0.2.1: @@ -10719,7 +10780,7 @@ yaml-ast-parser@^0.0.43: resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb" integrity sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A== -yaml@^2.3.1: +yaml@^2.2.2, yaml@^2.3.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.1.tgz#2e57e0b5e995292c25c75d2658f0664765210eed" integrity sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==