From 69f24fefc3c4784ddd943c1b25b37d18b2a9b0aa Mon Sep 17 00:00:00 2001 From: HO <93981322+VWSCoronaDashboard19@users.noreply.github.com> Date: Wed, 26 Oct 2022 11:19:39 +0200 Subject: [PATCH] Coronathermometer component extension with collapsible (#4470) * COR-1135: dynamic-thermometer (#4464) * feat: new descriptions added to thermometer * feat: fixed color mapping and changes some logic * feat: add icon direction function and type Co-authored-by: VWSCoronaDashboard27 Co-authored-by: VWSCoronaDashboard19 * Feature/cor 1159 collapsible thermometer description (#4468) * imported CollapsibleSection and imported IndicatorLevelDescription component * Sanity keys added for this ticket * added component structure and elements * Responsive and sizes * Adjusted to the right colors * Update packages/app/src/components/collapsible/collapsible-section.tsx Co-authored-by: VWSCoronaDashboard25 <98813868+VWSCoronaDashboard25@users.noreply.github.com> * Update packages/app/src/domain/topical/components/indicator-level-description.tsx Co-authored-by: VWSCoronaDashboard25 <98813868+VWSCoronaDashboard25@users.noreply.github.com> * fix: resolve review feedback * fix: solved PR feedback * chore: fix single character variable Co-authored-by: VWSCoronaDashboard21 Co-authored-by: VWSCoronaDashboard25 <98813868+VWSCoronaDashboard25@users.noreply.github.com> * Merging sanity changes from both branches * sanity changes * Fix: fixing stuck focus-state * FIX: Fixing breakpoint glitching * FIX: no user selecting * FEAT: Move the article link outside the collapsible * FIX: variable typo Co-authored-by: VWSCoronaDashboard27 <111750729+VWSCoronaDashboard27@users.noreply.github.com> Co-authored-by: VWSCoronaDashboard27 Co-authored-by: J <93984341+VWSCoronaDashboard18@users.noreply.github.com> Co-authored-by: VWSCoronaDashboard21 Co-authored-by: VWSCoronaDashboard25 <98813868+VWSCoronaDashboard25@users.noreply.github.com> --- packages/app/schema/topical/icon.json | 1 + .../collapsible/collapsible-section.tsx | 68 +- .../difference-indicator/tile-difference.tsx | 25 +- .../components/severity-indicator-label.tsx | 18 +- .../severity-indicator-tile/constants.ts | 2 +- .../logic/map-string-to-colors.ts | 15 + .../logic/set-trend-icon.tsx | 11 + .../severity-indicator-tile.tsx | 38 +- .../components/timeline/timeline-bar-part.tsx | 20 + .../src/components/timeline/timeline-bar.tsx | 25 + .../components/timeline/timeline-event.tsx | 22 + .../app/src/components/timeline/timeline.tsx | 39 + packages/app/src/domain/topical/common.ts | 5 + .../indicator-level-description.tsx | 37 + .../topical/components/topical-tile.tsx | 32 +- packages/app/src/domain/topical/index.ts | 4 +- packages/app/src/domain/topical/types.ts | 6 + packages/app/src/pages/index.tsx | 96 +- .../app/src/queries/get-elements-query.ts | 53 +- packages/cms/src/data/data-structure.ts | 955 ++++++++---------- packages/cms/src/elements/schemas/index.ts | 2 + .../schemas/thermometer-event-collection.ts | 24 + .../src/elements/schemas/thermometer-event.ts | 80 ++ .../cms/src/elements/schemas/thermometer.ts | 17 + packages/cms/src/lokalize/key-mutations.csv | 39 + packages/common/src/types/data.ts | 551 +++++----- packages/icons/icons.md | 1 + packages/icons/src/icon-name2filename.ts | 2 + packages/icons/src/svg/coronathermometer.svg | 6 + 29 files changed, 1250 insertions(+), 944 deletions(-) create mode 100644 packages/app/src/components/severity-indicator-tile/logic/map-string-to-colors.ts create mode 100644 packages/app/src/components/severity-indicator-tile/logic/set-trend-icon.tsx create mode 100644 packages/app/src/components/timeline/timeline-bar-part.tsx create mode 100644 packages/app/src/components/timeline/timeline-bar.tsx create mode 100644 packages/app/src/components/timeline/timeline-event.tsx create mode 100644 packages/app/src/components/timeline/timeline.tsx create mode 100644 packages/app/src/domain/topical/components/indicator-level-description.tsx create mode 100644 packages/app/src/domain/topical/types.ts create mode 100644 packages/cms/src/elements/schemas/thermometer-event-collection.ts create mode 100644 packages/cms/src/elements/schemas/thermometer-event.ts create mode 100644 packages/cms/src/elements/schemas/thermometer.ts create mode 100644 packages/icons/src/svg/coronathermometer.svg diff --git a/packages/app/schema/topical/icon.json b/packages/app/schema/topical/icon.json index 5b1eaf0250..9af0334a15 100644 --- a/packages/app/schema/topical/icon.json +++ b/packages/app/schema/topical/icon.json @@ -34,6 +34,7 @@ "Close", "CloseThick", "ContactBeroepen", + "Coronathermometer", "Coronavirus", "Cross", "Database", diff --git a/packages/app/src/components/collapsible/collapsible-section.tsx b/packages/app/src/components/collapsible/collapsible-section.tsx index c7d6ee461b..a6afe2285f 100644 --- a/packages/app/src/components/collapsible/collapsible-section.tsx +++ b/packages/app/src/components/collapsible/collapsible-section.tsx @@ -6,20 +6,18 @@ import { isAtBottomOfPage } from '~/utils/is-at-bottom-of-page'; import { isElementAtTopOfViewport } from '~/utils/is-element-at-top-of-viewport'; import { useCollapsible } from '~/utils/use-collapsible'; import { Anchor } from '../typography'; +import { colors } from '@corona-dashboard/common'; interface CollapsibleSectionProps extends BoxProps { summary: string; children: ReactNode; id?: string; hideBorder?: boolean; + textColor?: string; + borderColor?: string; } -export const CollapsibleSection = ({ - summary, - children, - id, - hideBorder, -}: CollapsibleSectionProps) => { +export const CollapsibleSection = ({ summary, children, id, hideBorder, textColor = colors.blue8, borderColor = colors.gray2 }: CollapsibleSectionProps) => { const section = useRef(null); const collapsible = useCollapsible(); @@ -53,32 +51,18 @@ export const CollapsibleSection = ({ }, [toggle, id]); return ( - - {collapsible.button( - - - {summary} - {id && ( - - )} - - {collapsible.chevron} - - )} - + + collapsible.toggle()}> + + {summary} + {id && ( + + )} + + {collapsible.button()} + {collapsible.content({children})} ); @@ -86,7 +70,7 @@ export const CollapsibleSection = ({ const StyledAnchor = styled(Anchor)( css({ - color: 'gray2', + color: colors.gray2, px: 3, py: 1, width: 0, @@ -94,34 +78,38 @@ const StyledAnchor = styled(Anchor)( position: 'absolute', right: '100%', '&:hover, &:focus': { - color: 'blue', + color: colors.blue1, }, }) ); -const Summary = styled.button( +interface SummaryProps { + textColor: string; +} +const Summary = styled.div((summaryProps: SummaryProps) => css({ display: 'flex', - alignItems: 'flex-start', + alignItems: 'center', justifyContent: 'space-between', overflow: 'visible', width: '100%', - m: 0, - p: 3, + margin: 0, + padding: 3, bg: 'transparent', border: 'none', - color: 'blue8', + color: summaryProps.textColor, fontFamily: 'body', fontWeight: 'bold', fontSize: '1.25rem', textAlign: 'left', position: 'relative', cursor: 'pointer', + userSelect: 'none', '&:focus': { outlineWidth: '1px', outlineStyle: 'dashed', - outlineColor: 'blue8', + outlineColor: colors.blue8, }, [StyledAnchor]: { opacity: 0 }, diff --git a/packages/app/src/components/difference-indicator/tile-difference.tsx b/packages/app/src/components/difference-indicator/tile-difference.tsx index eb00f2a1ea..199df5690f 100644 --- a/packages/app/src/components/difference-indicator/tile-difference.tsx +++ b/packages/app/src/components/difference-indicator/tile-difference.tsx @@ -24,10 +24,7 @@ export function TileDifference({ const text = commonTexts.toe_en_afname; const { difference } = value; - const formattedDifference = formatNumber( - Math.abs(difference), - maximumFractionDigits ? maximumFractionDigits : undefined - ); + const formattedDifference = formatNumber(Math.abs(difference), maximumFractionDigits ? maximumFractionDigits : undefined); let content; let containerWithIcon; @@ -41,17 +38,13 @@ export function TileDifference({ if (difference < 0) { content = isAmount ? text.waarde_minder : text.waarde_lager; - containerWithIcon = ( - } color="primary" /> - ); + containerWithIcon = } color="primary" />; } if (!content) { content = text.waarde_gelijk; - containerWithIcon = ( - } color="neutral" /> - ); + containerWithIcon = } color="neutral" />; } return ( @@ -67,18 +60,10 @@ export function TileDifference({ strong: (props) => {props.children}, }} content={replaceVariablesInText( - `${content} ${ - showOldDateUnix - ? content === text.waarde_gelijk - ? text.vorige_waarde_geljk_datum - : text.vorige_waarde_datum - : text.vorige_waarde - }`, + `${content} ${showOldDateUnix ? (content === text.waarde_gelijk ? text.vorige_waarde_geljk_datum : text.vorige_waarde_datum) : text.vorige_waarde}`, { amount: `${formattedDifference}${isPercentage ? '%' : ''}`, - date: showOldDateUnix - ? formatDateFromSeconds(value.old_date_unix) - : '', + date: showOldDateUnix ? formatDateFromSeconds(value.old_date_unix) : '', } )} /> diff --git a/packages/app/src/components/severity-indicator-tile/components/severity-indicator-label.tsx b/packages/app/src/components/severity-indicator-tile/components/severity-indicator-label.tsx index 605b984d3c..1b51d47403 100644 --- a/packages/app/src/components/severity-indicator-tile/components/severity-indicator-label.tsx +++ b/packages/app/src/components/severity-indicator-tile/components/severity-indicator-label.tsx @@ -12,18 +12,9 @@ interface SeverityIndicatorLabelProps { level: SeverityLevel; } -export const SeverityIndicatorLabel = ({ - label, - level, -}: SeverityIndicatorLabelProps) => { +export const SeverityIndicatorLabel = ({ label, level }: SeverityIndicatorLabelProps) => { return ( - + {level} {label} @@ -31,10 +22,9 @@ export const SeverityIndicatorLabel = ({ ); }; -const SeverityIndicatorLevel = styled.div` +export const SeverityIndicatorLevel = styled.div` align-items: center; - background-color: ${({ level }: { level: SeverityLevel }) => - getSeverityColor(level as SeverityLevels)}; + background-color: ${({ level }: { level: SeverityLevel }) => getSeverityColor(level as SeverityLevels)}; border-radius: 50%; color: ${colors.white}; display: flex; diff --git a/packages/app/src/components/severity-indicator-tile/constants.ts b/packages/app/src/components/severity-indicator-tile/constants.ts index 54c24ea26e..34dd4c24bf 100644 --- a/packages/app/src/components/severity-indicator-tile/constants.ts +++ b/packages/app/src/components/severity-indicator-tile/constants.ts @@ -1,4 +1,4 @@ export const TOPICAL_SEVERITY_INDICATOR_TILE_MAX_WIDTH = 930; export const SEVERITY_INDICATOR_TILE_COLUMN_MIN_WIDTH = 250; export const SEVERITY_LEVELS_LIST = ['1', '2', '3', '4']; -export const THERMOMETER_ICON_NAME = 'Stopwatch'; \ No newline at end of file +export const THERMOMETER_ICON_NAME = 'Coronathermometer'; \ No newline at end of file diff --git a/packages/app/src/components/severity-indicator-tile/logic/map-string-to-colors.ts b/packages/app/src/components/severity-indicator-tile/logic/map-string-to-colors.ts new file mode 100644 index 0000000000..586a57a6eb --- /dev/null +++ b/packages/app/src/components/severity-indicator-tile/logic/map-string-to-colors.ts @@ -0,0 +1,15 @@ +import { colors } from "@corona-dashboard/common"; +import { ICON_COLOR_GREEN, ICON_COLOR_RED } from "~/domain/topical/common"; + +/** + * Match strings from Sanity to certain color codes + */ + +export const mapStringToColors = (color: string | undefined) => { + switch (color) { + case ICON_COLOR_RED: + return colors.red2; + case ICON_COLOR_GREEN: + return colors.green3; + } + }; \ No newline at end of file diff --git a/packages/app/src/components/severity-indicator-tile/logic/set-trend-icon.tsx b/packages/app/src/components/severity-indicator-tile/logic/set-trend-icon.tsx new file mode 100644 index 0000000000..7ec38cf891 --- /dev/null +++ b/packages/app/src/components/severity-indicator-tile/logic/set-trend-icon.tsx @@ -0,0 +1,11 @@ +import { Down, Up } from '@corona-dashboard/icons'; +import { ICON_DIRECTION_DOWN } from '~/domain/topical/common'; + +/** + * Set the correction icon for specific direction that is beign passed. + * */ + +export const setTrendIcon = (direction: string) => { + if (direction === ICON_DIRECTION_DOWN) return ; + return ; +}; diff --git a/packages/app/src/components/severity-indicator-tile/severity-indicator-tile.tsx b/packages/app/src/components/severity-indicator-tile/severity-indicator-tile.tsx index 286066395d..72af790548 100644 --- a/packages/app/src/components/severity-indicator-tile/severity-indicator-tile.tsx +++ b/packages/app/src/components/severity-indicator-tile/severity-indicator-tile.tsx @@ -1,24 +1,34 @@ import { colors } from '@corona-dashboard/common'; import css from '@styled-system/css'; +import styled from 'styled-components'; import { space } from '~/style/theme'; import { Box } from '~/components/base'; import { Markdown } from '~/components/markdown'; +import { BoldText, InlineText } from '~/components/typography'; +import { TrendIcon } from '~/domain/topical/types'; import { SeverityIndicatorLabel } from './components/severity-indicator-label'; import { SeverityIndicator } from './components/severity-indicator'; +import { SEVERITY_INDICATOR_TILE_COLUMN_MIN_WIDTH } from './constants'; import { getSeverityColor } from './logic/get-severity-color'; import { SeverityLevels } from './types'; -import { InlineText } from '../typography'; -import { SEVERITY_INDICATOR_TILE_COLUMN_MIN_WIDTH } from '~/components/severity-indicator-tile/constants'; +import { mapStringToColors } from './logic/map-string-to-colors'; +import { setTrendIcon } from '~/components/severity-indicator-tile/logic/set-trend-icon'; interface SeverityIndicatorTileProps { description: string; label: string; level: SeverityLevels; - footerText: string; title: string; + sourceLabel: string; + datesLabel: string; + levelDescription: string; + trendIcon: TrendIcon | null; } -export const SeverityIndicatorTile = ({ description, label, level, title, footerText }: SeverityIndicatorTileProps) => { +export const SeverityIndicatorTile = ({ description, label, level, title, datesLabel, sourceLabel, levelDescription, trendIcon }: SeverityIndicatorTileProps) => { + const hasIconProps = trendIcon?.direction && trendIcon?.color; + const iconColor = trendIcon?.color.toUpperCase(); + return ( - + + + + {datesLabel} @@ -43,10 +56,21 @@ export const SeverityIndicatorTile = ({ description, label, level, title, footer + + {hasIconProps && {setTrendIcon(trendIcon.direction)}} + + + - {footerText} + {sourceLabel} ); }; + +const TrendIconWrapper = styled.span` + color: ${({ color }) => color}; + flex-shrink: 0; + width: 20px; +`; diff --git a/packages/app/src/components/timeline/timeline-bar-part.tsx b/packages/app/src/components/timeline/timeline-bar-part.tsx new file mode 100644 index 0000000000..71a63dfa72 --- /dev/null +++ b/packages/app/src/components/timeline/timeline-bar-part.tsx @@ -0,0 +1,20 @@ +import { transparentize } from 'polished'; +import { Box } from '../base'; +import { getSeverityColor } from '../severity-indicator-tile/logic/get-severity-color'; +import { SeverityLevel, SeverityLevels } from '../severity-indicator-tile/types'; +import { TimelineEvent } from './timeline-event'; + +interface TimelineBarPartsProps { + level: SeverityLevel; + size: number; + width: string; + isLast?: boolean; +} + +export const TimelineBarPart = ({ level, size = 10, width, isLast }: TimelineBarPartsProps) => { + return ( + + + + ); +}; diff --git a/packages/app/src/components/timeline/timeline-bar.tsx b/packages/app/src/components/timeline/timeline-bar.tsx new file mode 100644 index 0000000000..1607537499 --- /dev/null +++ b/packages/app/src/components/timeline/timeline-bar.tsx @@ -0,0 +1,25 @@ +import { colors } from '@corona-dashboard/common'; +import { ReactNode } from 'react'; +import { Box } from '../base'; + +interface TimelineBarProps { + height: number; + children?: ReactNode; +} + +export const TimelineBar = ({ children, height }: TimelineBarProps) => { + return ( + + + + {children} + + + ); +}; diff --git a/packages/app/src/components/timeline/timeline-event.tsx b/packages/app/src/components/timeline/timeline-event.tsx new file mode 100644 index 0000000000..ef07a334b8 --- /dev/null +++ b/packages/app/src/components/timeline/timeline-event.tsx @@ -0,0 +1,22 @@ +import { colors } from '@corona-dashboard/common'; +import { Box } from '../base'; +import { getSeverityColor } from '../severity-indicator-tile/logic/get-severity-color'; +import { SeverityLevel, SeverityLevels } from '../severity-indicator-tile/types'; + +interface TimelineEventProps { + level: SeverityLevel; + size: number; + isLast?: boolean; +} + +export const TimelineEvent = ({ level, size, isLast }: TimelineEventProps) => { + return ( + + ); +}; diff --git a/packages/app/src/components/timeline/timeline.tsx b/packages/app/src/components/timeline/timeline.tsx new file mode 100644 index 0000000000..d7fd33122f --- /dev/null +++ b/packages/app/src/components/timeline/timeline.tsx @@ -0,0 +1,39 @@ +import { space } from '~/style/theme'; +import { Box } from '../base'; +import { SeverityLevels } from '../severity-indicator-tile/types'; +import { TimelineBar } from './timeline-bar'; +import { TimelineBarPart } from './timeline-bar-part'; + +interface TimelineProps { + timelineEvents?: ThermometerEventConfig[]; + size?: number; +} + +interface ThermometerEventConfig { + title: string; + description: string; + start: number; + end?: number; + level: number; +} + +export const Timeline = ({ timelineEvents, size = 10 }: TimelineProps) => { + const height = size; + + return ( + + + {timelineEvents && + timelineEvents.map((timelineEvent, index) => ( + + ))} + + + ); +}; diff --git a/packages/app/src/domain/topical/common.ts b/packages/app/src/domain/topical/common.ts index e565aeecfc..98edc1a0d2 100644 --- a/packages/app/src/domain/topical/common.ts +++ b/packages/app/src/domain/topical/common.ts @@ -3,3 +3,8 @@ import { colors } from '@corona-dashboard/common'; export const COLOR_HAS_ONE_SHOT = colors.scale.blue[0]; export const COLOR_FULLY_VACCINATED = colors.primary; export const COLOR_FULLY_BOOSTERED = colors.scale.blue[5]; + +export const ICON_DIRECTION_UP = 'UP' +export const ICON_DIRECTION_DOWN = 'DOWN' +export const ICON_COLOR_RED = 'RED' +export const ICON_COLOR_GREEN = 'GREEN' \ No newline at end of file diff --git a/packages/app/src/domain/topical/components/indicator-level-description.tsx b/packages/app/src/domain/topical/components/indicator-level-description.tsx new file mode 100644 index 0000000000..11e65a4f85 --- /dev/null +++ b/packages/app/src/domain/topical/components/indicator-level-description.tsx @@ -0,0 +1,37 @@ +import css from '@styled-system/css'; +import { SeverityIndicatorLevel } from '~/components/severity-indicator-tile/components/severity-indicator-label'; +import { SeverityLevel } from '~/components/severity-indicator-tile/types'; +import { replaceVariablesInText } from '~/utils'; +import { asResponsiveArray } from '~/style/utils'; +import { Text, BoldText } from '~/components/typography'; +import { space } from '~/style/theme'; +import { Box } from '~/components/base'; + +interface IndicatorLevelDescriptionProps { + level: SeverityLevel; + label: string; + description: string; +} + +export const IndicatorLevelDescription = ({ level, label, description }: IndicatorLevelDescriptionProps) => { + return ( +
  • + + {level} + {label} + + {replaceVariablesInText(description.split('**').join(''), { + label: label.toLowerCase(), + })} + + +
  • + ); +}; diff --git a/packages/app/src/domain/topical/components/topical-tile.tsx b/packages/app/src/domain/topical/components/topical-tile.tsx index fa27a25dbd..0258c3e5b8 100644 --- a/packages/app/src/domain/topical/components/topical-tile.tsx +++ b/packages/app/src/domain/topical/components/topical-tile.tsx @@ -7,16 +7,13 @@ import { TextWithIcon } from '~/components/text-with-icon'; import { asResponsiveArray } from '~/style/utils'; import { colors } from '@corona-dashboard/common'; import DynamicIcon from '~/components/get-icon-by-name'; -import { ChevronRight, Down, Up } from '@corona-dashboard/icons'; +import { ChevronRight } from '@corona-dashboard/icons'; import { Markdown } from '~/components/markdown'; import { TopicalIcon } from '@corona-dashboard/common/src/types'; import { KpiValue } from '~/components'; import { useIntl } from '~/intl'; - -type TrendIcon = { - direction: 'UP' | 'DOWN'; - color: string; -}; +import { TrendIcon } from '../types'; +import { setTrendIcon } from '~/components/severity-indicator-tile/logic/set-trend-icon'; type Cta = { label: string; @@ -35,7 +32,8 @@ interface TopicalTileProps { export function TopicalTile({ title, tileIcon, trendIcon, dynamicDescription, kpiValue, cta }: TopicalTileProps) { const { formatNumber } = useIntl(); - const formatedKpiValue = typeof kpiValue === 'number' ? formatNumber(kpiValue) : typeof kpiValue === 'string' ? kpiValue : false; + const formattedKpiValue = typeof kpiValue === 'number' ? formatNumber(kpiValue) : typeof kpiValue === 'string' ? kpiValue : false; + return ( {title} - {!formatedKpiValue && trendIcon && ( - - {trendIcon.direction === 'DOWN' && } - {trendIcon.direction === 'UP' && } - - )} + {!formattedKpiValue && trendIcon && {setTrendIcon(trendIcon.direction)}} - {formatedKpiValue && ( + {formattedKpiValue && ( - - {trendIcon && ( - - {trendIcon.direction === 'DOWN' && } - {trendIcon.direction === 'UP' && } - - )} + + {trendIcon && {setTrendIcon(trendIcon.direction)}} )} @@ -102,7 +90,7 @@ export function TopicalTile({ title, tileIcon, trendIcon, dynamicDescription, kp
    - + diff --git a/packages/app/src/domain/topical/index.ts b/packages/app/src/domain/topical/index.ts index 08533cc0bc..48b1dca114 100644 --- a/packages/app/src/domain/topical/index.ts +++ b/packages/app/src/domain/topical/index.ts @@ -5,4 +5,6 @@ export { TopicalMeasureTile } from './components/topical-measure-tile'; export { TopicalSectionHeader } from './components/topical-section-header'; export { TopicalThemeHeader } from './components/topical-theme-header'; export { TopicalTile } from './components/topical-tile'; -export * from './components/search'; \ No newline at end of file +export { IndicatorLevelDescription } from './components/indicator-level-description'; + +export * from './components/search'; diff --git a/packages/app/src/domain/topical/types.ts b/packages/app/src/domain/topical/types.ts new file mode 100644 index 0000000000..bf4214fd6a --- /dev/null +++ b/packages/app/src/domain/topical/types.ts @@ -0,0 +1,6 @@ +import { ICON_DIRECTION_DOWN, ICON_DIRECTION_UP } from '~/domain/topical/common'; + +export type TrendIcon = { + direction: typeof ICON_DIRECTION_UP | typeof ICON_DIRECTION_DOWN; + color: string; +}; diff --git a/packages/app/src/pages/index.tsx b/packages/app/src/pages/index.tsx index fd27a36a75..639eed99c2 100644 --- a/packages/app/src/pages/index.tsx +++ b/packages/app/src/pages/index.tsx @@ -1,19 +1,35 @@ import { Box, Spacer } from '~/components/base'; -import { MaxWidth } from '~/components'; +import styled from 'styled-components'; +import { css } from '@styled-system/css'; +import { Markdown, MaxWidth } from '~/components'; import { Layout } from '~/domain/layout'; -import { Search, TopicalArticlesList, TopicalHeader, TopicalLinksList, TopicalMeasureTile, TopicalSectionHeader, TopicalThemeHeader, TopicalTile } from '~/domain/topical'; +import { + Search, + TopicalArticlesList, + TopicalHeader, + TopicalLinksList, + TopicalMeasureTile, + TopicalSectionHeader, + TopicalThemeHeader, + TopicalTile, + IndicatorLevelDescription, +} from '~/domain/topical'; import { isPresent } from 'ts-is-present'; import { Languages, SiteText } from '~/locale'; import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; import { getTopicalPageData } from '~/queries/get-topical-page-data'; -import { getLastGeneratedDate, getLokalizeTexts, selectTopicalData } from '~/static-props/get-data'; +import { createGetContent, getLastGeneratedDate, getLokalizeTexts, selectTopicalData } from '~/static-props/get-data'; import { useDynamicLokalizeTexts } from '~/utils/cms/use-dynamic-lokalize-texts'; -import { colors } from '@corona-dashboard/common'; +import { colors, MetricName } from '@corona-dashboard/common'; import { SeverityIndicatorTile } from '~/components/severity-indicator-tile/severity-indicator-tile'; import { replaceVariablesInText } from '~/utils'; -import { SeverityLevels } from '~/components/severity-indicator-tile/types'; -import { useBreakpoints } from '~/utils/use-breakpoints'; +import { SeverityLevel, SeverityLevels } from '~/components/severity-indicator-tile/types'; import { THERMOMETER_ICON_NAME, TOPICAL_SEVERITY_INDICATOR_TILE_MAX_WIDTH, SEVERITY_LEVELS_LIST } from '~/components/severity-indicator-tile/constants'; +import { TrendIcon } from '~/domain/topical/types'; +import { CollapsibleSection } from '~/components/collapsible'; +import { Timeline } from '~/components/timeline/timeline'; +import { ElementsQueryResult, getElementsQuery, getThermometerEvents } from '~/queries/get-elements-query'; +import { GetStaticPropsContext } from 'next'; const selectLokalizeTexts = (siteText: SiteText) => ({ hospitalText: siteText.pages.hospital_page.nl, @@ -32,7 +48,22 @@ export const getStaticProps = createGetStaticProps( getTopicalPageData('nl', []), ({ locale }: { locale: keyof Languages }) => ({ selectedTopicalData: selectTopicalData(locale), - }) + }), + async (context: GetStaticPropsContext) => { + const { content } = await createGetContent<{ + elements: ElementsQueryResult; + }>((context) => { + const { locale } = context; + return `{ + "elements": ${getElementsQuery('nl', ['' as MetricName], locale)} + }`; + })(context); + return { + content: { + elements: content.elements, + }, + }; + } ); const Home = (props: StaticProps) => { @@ -40,8 +71,6 @@ const Home = (props: StaticProps) => { const { textNl, textShared } = useDynamicLokalizeTexts(pageText, selectLokalizeTexts); - const breakpoints = useBreakpoints(); - const metadata = { ...textNl.nationaal_metadata, title: textNl.metadata.title, @@ -54,7 +83,8 @@ const Home = (props: StaticProps) => { md: `repeat(3, 1fr)`, }; - const currentSeverityLevel = textNl.thermometer.indicator.level as SeverityLevels; + const currentSeverityLevel = textNl.thermometer.current_indicator_level as SeverityLevels; + const currentSeverityLevelTexts = textNl.thermometer.indicator[`level_${currentSeverityLevel}`]; return ( @@ -63,27 +93,51 @@ const Home = (props: StaticProps) => { + {SEVERITY_LEVELS_LIST.includes(currentSeverityLevel) && ( - + + + + + + + + + + {Object.values(SeverityLevels).map((severityLevel, index) => { + const indicatorTexts = textNl.thermometer.indicator[`level_${severityLevel}`]; + return ( + + ); + })} + + + + + )} + {selectedTopicalData.themes .sort((a, b) => a.index - b.index) @@ -168,4 +222,12 @@ const Home = (props: StaticProps) => { ); }; +const OrderedList = styled.ol( + css({ + listStyleType: 'none', + margin: 0, + padding: 0, + }) +); + export default Home; diff --git a/packages/app/src/queries/get-elements-query.ts b/packages/app/src/queries/get-elements-query.ts index 1378d10191..ef95d65a2e 100644 --- a/packages/app/src/queries/get-elements-query.ts +++ b/packages/app/src/queries/get-elements-query.ts @@ -5,11 +5,7 @@ function formatStringArray(array: string[]) { return `[${array.map((x) => `'${x}'`).join(',')}]`; } -export function getElementsQuery( - scope: K, - metricNames: MetricName[], - locale: string -) { +export function getElementsQuery(scope: K, metricNames: MetricName[], locale: string) { const query = `// groq { 'timeSeries': *[ @@ -28,6 +24,19 @@ export function getElementsQuery( }}, warning }, + 'thermometer': *[ + _type == 'thermometerEventCollection' + ]{ + _id, + name, + thermometerEvents[]{ + 'title': title.${locale}, + 'description': description.${locale}, + 'level': level, + date, + dateEnd + } + }, 'kpi': *[ _type == 'kpi' && scope == '${scope}' @@ -89,6 +98,16 @@ type CmsTimelineEventCollection = { timelineEvents: CmsTimelineEventConfig[]; }; +type CmsThermometerEventConfig = CmsTimelineEventConfig & { + level: number; +}; + +type CmsThermometerElement = { + _id: string; + name: string; + thermometerEvents: CmsThermometerEventConfig[]; +}; + type CmsKpiElement = ElementBase; type CmsChoroplethElement = ElementBase; @@ -99,6 +118,7 @@ type CmsWarningElement = { export type ElementsQueryResult = { timeSeries: CmsTimeSeriesElement[]; + thermometer: CmsThermometerElement[]; kpi: CmsKpiElement[]; choropleth: CmsChoroplethElement[]; warning: CmsWarningElement[]; @@ -108,16 +128,8 @@ export type ElementsQueryResult = { * Get the timeline configuration from the correct element and convert it to the * right format. */ -export function getTimelineEvents( - elements: CmsTimeSeriesElement[], - metricName: MetricName, - metricProperty?: string -) { - const timelineEventCollections = elements.find( - (x) => - x.metricName === metricName && - (!metricProperty || x.metricProperty === metricProperty) - )?.timelineEventCollections; +export function getTimelineEvents(elements: CmsTimeSeriesElement[], metricName: MetricName, metricProperty?: string) { + const timelineEventCollections = elements.find((x) => x.metricName === metricName && (!metricProperty || x.metricProperty === metricProperty))?.timelineEventCollections; return timelineEventCollections ? timelineEventCollections.flatMap((collection) => @@ -131,11 +143,8 @@ export function getTimelineEvents( : undefined; } -export function getWarning( - elements: CmsWarningElement[], - metricName: MetricName -) { - return ( - elements.find((x) => x.metricName === metricName)?.warning || undefined - ); +export const getThermometerEvents = (elements: CmsThermometerElement[], name: string) => elements.find((element) => element.name === name)?.thermometerEvents; + +export function getWarning(elements: CmsWarningElement[], metricName: MetricName) { + return elements.find((x) => x.metricName === metricName)?.warning || undefined; } diff --git a/packages/cms/src/data/data-structure.ts b/packages/cms/src/data/data-structure.ts index 9b177b66eb..b59a48b4fb 100644 --- a/packages/cms/src/data/data-structure.ts +++ b/packages/cms/src/data/data-structure.ts @@ -4,581 +4,486 @@ */ export const dataStructure = { gm: { - deceased_rivm: ["covid_daily", "covid_daily_moving_average", "covid_total"], + deceased_rivm: ['covid_daily', 'covid_daily_moving_average', 'covid_total'], hospital_nice: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_moving_average", - "admissions_on_date_of_admission_moving_average_rounded", - "admissions_on_date_of_reporting", - ], - tested_overall: [ - "infected", - "infected_moving_average", - "infected_moving_average_rounded", - "infected_per_100k", - "infected_per_100k_moving_average", - ], - sewer: [ - "average", - "total_number_of_samples", - "sampled_installation_count", - "total_installation_count", + 'admissions_on_date_of_admission', + 'admissions_on_date_of_admission_moving_average', + 'admissions_on_date_of_admission_moving_average_rounded', + 'admissions_on_date_of_reporting', ], + tested_overall: ['infected', 'infected_moving_average', 'infected_moving_average_rounded', 'infected_per_100k', 'infected_per_100k_moving_average'], + sewer: ['average', 'total_number_of_samples', 'sampled_installation_count', 'total_installation_count'], vaccine_coverage_per_age_group: [ - "age_group_range", - "fully_vaccinated_percentage", - "booster_shot_percentage", - "has_one_shot_percentage", - "birthyear_range", - "fully_vaccinated_percentage_label", - "booster_shot_percentage_label", - "has_one_shot_percentage_label", + 'age_group_range', + 'autumn_2022_vaccinated_percentage', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'birthyear_range', + 'autumn_2022_vaccinated_percentage_label', + 'fully_vaccinated_percentage_label', + 'booster_shot_percentage_label', ], vaccine_coverage_per_age_group_archived: [ - "age_group_range", - "fully_vaccinated_percentage", - "has_one_shot_percentage", - "birthyear_range", - "fully_vaccinated_percentage_label", - "has_one_shot_percentage_label", - ], - booster_coverage: ["age_group", "percentage", "percentage_label"], + 'age_group_range', + 'fully_vaccinated_percentage', + 'has_one_shot_percentage', + 'birthyear_range', + 'fully_vaccinated_percentage_label', + 'has_one_shot_percentage_label', + ], + vaccine_coverage_per_age_group_archived_20220908: [ + 'age_group_range', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'has_one_shot_percentage', + 'birthyear_range', + 'fully_vaccinated_percentage_label', + 'booster_shot_percentage_label', + 'has_one_shot_percentage_label', + ], + booster_coverage: ['age_group', 'percentage', 'percentage_label'], }, gm_collection: { - hospital_nice: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_per_100000", - "admissions_on_date_of_reporting", - ], - hospital_nice_choropleth: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_per_100000", - "admissions_on_date_of_reporting", - ], - tested_overall: ["infected_per_100k", "infected"], - sewer: ["average", "total_installation_count"], + hospital_nice: ['admissions_on_date_of_admission', 'admissions_on_date_of_admission_per_100000', 'admissions_on_date_of_reporting'], + hospital_nice_choropleth: ['admissions_on_date_of_admission', 'admissions_on_date_of_admission_per_100000', 'admissions_on_date_of_reporting'], + tested_overall: ['infected_per_100k', 'infected'], + sewer: ['average', 'total_installation_count'], vaccine_coverage_per_age_group: [ - "age_group_range", - "fully_vaccinated_percentage", - "has_one_shot_percentage", - "booster_shot_percentage", - "birthyear_range", - "fully_vaccinated_percentage_label", - "has_one_shot_percentage_label", - "booster_shot_percentage_label", + 'age_group_range', + 'autumn_2022_vaccinated_percentage', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'birthyear_range', + 'autumn_2022_vaccinated_percentage_label', + 'fully_vaccinated_percentage_label', + 'booster_shot_percentage_label', ], }, nl: { - booster_shot_administered: [ - "administered_total", - "ggd_administered_total", - "others_administered_total", - ], - repeating_shot_administered: ["ggd_administered_total"], - booster_coverage: ["age_group", "percentage"], - doctor: ["covid_symptoms_per_100k", "covid_symptoms"], - g_number: ["g_number"], - infectious_people: ["margin_low", "estimate", "margin_high"], + booster_shot_administered: ['administered_total', 'ggd_administered_total', 'others_administered_total'], + repeating_shot_administered: ['ggd_administered_total'], + booster_coverage: ['age_group', 'percentage'], + doctor: ['covid_symptoms_per_100k', 'covid_symptoms'], + g_number: ['g_number'], + infectious_people: ['margin_low', 'estimate', 'margin_high'], intensive_care_nice: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_moving_average", - "admissions_on_date_of_admission_moving_average_rounded", - "admissions_on_date_of_reporting", + 'admissions_on_date_of_admission', + 'admissions_on_date_of_admission_moving_average', + 'admissions_on_date_of_admission_moving_average_rounded', + 'admissions_on_date_of_reporting', ], intensive_care_nice_per_age_group: [ - "admissions_age_0_19_per_million", - "admissions_age_20_29_per_million", - "admissions_age_30_39_per_million", - "admissions_age_40_49_per_million", - "admissions_age_50_59_per_million", - "admissions_age_60_69_per_million", - "admissions_age_70_79_per_million", - "admissions_age_80_89_per_million", - "admissions_age_90_plus_per_million", - "admissions_overall_per_million", - ], - tested_overall: [ - "infected", - "infected_moving_average", - "infected_moving_average_rounded", - "infected_per_100k", - "infected_per_100k_moving_average", - ], + 'admissions_age_0_19_per_million', + 'admissions_age_20_29_per_million', + 'admissions_age_30_39_per_million', + 'admissions_age_40_49_per_million', + 'admissions_age_50_59_per_million', + 'admissions_age_60_69_per_million', + 'admissions_age_70_79_per_million', + 'admissions_age_80_89_per_million', + 'admissions_age_90_plus_per_million', + 'admissions_overall_per_million', + ], + tested_overall: ['infected', 'infected_moving_average', 'infected_moving_average_rounded', 'infected_per_100k', 'infected_per_100k_moving_average'], tested_per_age_group: [ - "infected_age_0_9_per_100k", - "infected_age_10_19_per_100k", - "infected_age_20_29_per_100k", - "infected_age_30_39_per_100k", - "infected_age_40_49_per_100k", - "infected_age_50_59_per_100k", - "infected_age_60_69_per_100k", - "infected_age_70_79_per_100k", - "infected_age_80_89_per_100k", - "infected_age_90_plus_per_100k", - "infected_overall_per_100k", - ], - reproduction: ["index_low", "index_average", "index_high"], - sewer: ["average"], + 'infected_age_0_9_per_100k', + 'infected_age_10_19_per_100k', + 'infected_age_20_29_per_100k', + 'infected_age_30_39_per_100k', + 'infected_age_40_49_per_100k', + 'infected_age_50_59_per_100k', + 'infected_age_60_69_per_100k', + 'infected_age_70_79_per_100k', + 'infected_age_80_89_per_100k', + 'infected_age_90_plus_per_100k', + 'infected_overall_per_100k', + ], + reproduction: ['index_low', 'index_average', 'index_high'], + sewer: ['average'], hospital_nice: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_moving_average", - "admissions_on_date_of_admission_moving_average_rounded", - "admissions_on_date_of_reporting", + 'admissions_on_date_of_admission', + 'admissions_on_date_of_admission_moving_average', + 'admissions_on_date_of_admission_moving_average_rounded', + 'admissions_on_date_of_reporting', ], hospital_nice_per_age_group: [ - "admissions_age_0_19_per_million", - "admissions_age_20_29_per_million", - "admissions_age_30_39_per_million", - "admissions_age_40_49_per_million", - "admissions_age_50_59_per_million", - "admissions_age_60_69_per_million", - "admissions_age_70_79_per_million", - "admissions_age_80_89_per_million", - "admissions_age_90_plus_per_million", - "admissions_overall_per_million", - ], - hospital_lcps: ["beds_occupied_covid"], - intensive_care_lcps: [ - "beds_occupied_covid", - "beds_occupied_non_covid", - "beds_occupied_covid_percentage", - ], + 'admissions_age_0_19_per_million', + 'admissions_age_20_29_per_million', + 'admissions_age_30_39_per_million', + 'admissions_age_40_49_per_million', + 'admissions_age_50_59_per_million', + 'admissions_age_60_69_per_million', + 'admissions_age_70_79_per_million', + 'admissions_age_80_89_per_million', + 'admissions_age_90_plus_per_million', + 'admissions_overall_per_million', + ], + hospital_lcps: ['beds_occupied_covid'], + intensive_care_lcps: ['beds_occupied_covid', 'beds_occupied_non_covid', 'beds_occupied_covid_percentage'], tested_ggd: [ - "infected", - "infected_moving_average", - "infected_percentage", - "infected_percentage_moving_average", - "tested_total", - "tested_total_moving_average", - "tested_total_moving_average_rounded", - ], - tested_ggd_archived: [ - "infected_percentage", - "infected_percentage_moving_average", - ], + 'infected', + 'infected_moving_average', + 'infected_percentage', + 'infected_percentage_moving_average', + 'tested_total', + 'tested_total_moving_average', + 'tested_total_moving_average_rounded', + ], + tested_ggd_archived: ['infected_percentage', 'infected_percentage_moving_average'], nursing_home: [ - "newly_infected_people", - "newly_infected_people_moving_average", - "deceased_daily", - "deceased_daily_moving_average", - "newly_infected_locations", - "infected_locations_total", - "infected_locations_percentage", + 'newly_infected_people', + 'newly_infected_people_moving_average', + 'deceased_daily', + 'deceased_daily_moving_average', + 'newly_infected_locations', + 'infected_locations_total', + 'infected_locations_percentage', ], disability_care: [ - "newly_infected_people", - "newly_infected_people_moving_average", - "deceased_daily", - "deceased_daily_moving_average", - "newly_infected_locations", - "infected_locations_total", - "infected_locations_percentage", + 'newly_infected_people', + 'newly_infected_people_moving_average', + 'deceased_daily', + 'deceased_daily_moving_average', + 'newly_infected_locations', + 'infected_locations_total', + 'infected_locations_percentage', ], behavior: [ - "number_of_participants", - "curfew_compliance", - "curfew_compliance_trend", - "wash_hands_compliance", - "wash_hands_compliance_trend", - "keep_distance_compliance", - "keep_distance_compliance_trend", - "work_from_home_compliance", - "work_from_home_compliance_trend", - "avoid_crowds_compliance", - "avoid_crowds_compliance_trend", - "symptoms_stay_home_if_mandatory_compliance", - "symptoms_stay_home_if_mandatory_compliance_trend", - "symptoms_get_tested_compliance", - "symptoms_get_tested_compliance_trend", - "wear_mask_public_indoors_compliance", - "wear_mask_public_indoors_compliance_trend", - "wear_mask_public_transport_compliance", - "wear_mask_public_transport_compliance_trend", - "sneeze_cough_elbow_compliance", - "sneeze_cough_elbow_compliance_trend", - "max_visitors_compliance", - "max_visitors_compliance_trend", - "ventilate_home_compliance", - "ventilate_home_compliance_trend", - "selftest_visit_compliance", - "selftest_visit_compliance_trend", - "curfew_support", - "curfew_support_trend", - "wash_hands_support", - "wash_hands_support_trend", - "keep_distance_support", - "keep_distance_support_trend", - "work_from_home_support", - "work_from_home_support_trend", - "avoid_crowds_support", - "avoid_crowds_support_trend", - "symptoms_stay_home_if_mandatory_support", - "symptoms_stay_home_if_mandatory_support_trend", - "symptoms_get_tested_support", - "symptoms_get_tested_support_trend", - "wear_mask_public_indoors_support", - "wear_mask_public_indoors_support_trend", - "wear_mask_public_transport_support", - "wear_mask_public_transport_support_trend", - "sneeze_cough_elbow_support", - "sneeze_cough_elbow_support_trend", - "max_visitors_support", - "max_visitors_support_trend", - "ventilate_home_support", - "ventilate_home_support_trend", - "selftest_visit_support", - "selftest_visit_support_trend", - ], - behavior_get_tested_support_per_age_group: [ - "percentage_average", - "percentage_70_plus", - "percentage_55_69", - "percentage_40_54", - "percentage_25_39", - "percentage_16_24", - ], - behavior_annotations: [ - "behavior_indicator", - "message_title_nl", - "message_title_en", - "message_desc_nl", - "message_desc_en", - ], - deceased_rivm: ["covid_daily", "covid_daily_moving_average", "covid_total"], - deceased_rivm_per_age_group: [ - "age_group_range", - "age_group_percentage", - "covid_percentage", - ], - deceased_cbs: ["registered", "expected", "expected_min", "expected_max"], - elderly_at_home: [ - "positive_tested_daily", - "positive_tested_daily_moving_average", - "positive_tested_daily_per_100k", - "deceased_daily", - "deceased_daily_moving_average", - ], - vaccine_vaccinated_or_support: [ - "percentage_average", - "percentage_70_plus", - "percentage_55_69", - "percentage_40_54", - "percentage_25_39", - "percentage_16_24", - ], - corona_melder_app_download: ["count"], - corona_melder_app_warning: ["count"], - vaccine_coverage: [ - "booster_vaccinated", - "partially_vaccinated", - "fully_vaccinated", - "partially_or_fully_vaccinated", - ], - vaccine_delivery_estimate: ["total"], - vaccine_delivery_per_supplier: [ - "total", - "bio_n_tech_pfizer", - "moderna", - "astra_zeneca", - "cure_vac", - "janssen", - "sanofi", - "is_estimate", - "week_number", - "date_of_report_unix", - ], - vaccine_administered: [ - "pfizer", - "moderna", - "astra_zeneca", - "cure_vac", - "janssen", - "sanofi", - "novavax", - "total", - ], - vaccine_administered_doctors: ["estimated"], - vaccine_administered_ggd_ghor: ["reported"], - vaccine_administered_ggd: ["estimated"], - vaccine_administered_hospitals_and_care_institutions: ["estimated"], - vaccine_administered_total: ["estimated", "reported"], - vaccine_administered_planned: ["doses"], + 'number_of_participants', + 'curfew_compliance', + 'curfew_compliance_trend', + 'wash_hands_compliance', + 'wash_hands_compliance_trend', + 'keep_distance_compliance', + 'keep_distance_compliance_trend', + 'work_from_home_compliance', + 'work_from_home_compliance_trend', + 'avoid_crowds_compliance', + 'avoid_crowds_compliance_trend', + 'symptoms_stay_home_if_mandatory_compliance', + 'symptoms_stay_home_if_mandatory_compliance_trend', + 'symptoms_get_tested_compliance', + 'symptoms_get_tested_compliance_trend', + 'wear_mask_public_indoors_compliance', + 'wear_mask_public_indoors_compliance_trend', + 'wear_mask_public_transport_compliance', + 'wear_mask_public_transport_compliance_trend', + 'sneeze_cough_elbow_compliance', + 'sneeze_cough_elbow_compliance_trend', + 'max_visitors_compliance', + 'max_visitors_compliance_trend', + 'ventilate_home_compliance', + 'ventilate_home_compliance_trend', + 'selftest_visit_compliance', + 'selftest_visit_compliance_trend', + 'curfew_support', + 'curfew_support_trend', + 'wash_hands_support', + 'wash_hands_support_trend', + 'keep_distance_support', + 'keep_distance_support_trend', + 'work_from_home_support', + 'work_from_home_support_trend', + 'avoid_crowds_support', + 'avoid_crowds_support_trend', + 'symptoms_stay_home_if_mandatory_support', + 'symptoms_stay_home_if_mandatory_support_trend', + 'symptoms_get_tested_support', + 'symptoms_get_tested_support_trend', + 'wear_mask_public_indoors_support', + 'wear_mask_public_indoors_support_trend', + 'wear_mask_public_transport_support', + 'wear_mask_public_transport_support_trend', + 'sneeze_cough_elbow_support', + 'sneeze_cough_elbow_support_trend', + 'max_visitors_support', + 'max_visitors_support_trend', + 'ventilate_home_support', + 'ventilate_home_support_trend', + 'selftest_visit_support', + 'selftest_visit_support_trend', + ], + behavior_get_tested_support_per_age_group: ['percentage_average', 'percentage_70_plus', 'percentage_55_69', 'percentage_40_54', 'percentage_25_39', 'percentage_16_24'], + behavior_annotations: ['behavior_indicator', 'message_title_nl', 'message_title_en', 'message_desc_nl', 'message_desc_en'], + deceased_rivm: ['covid_daily', 'covid_daily_moving_average', 'covid_total'], + deceased_rivm_per_age_group: ['age_group_range', 'age_group_percentage', 'covid_percentage'], + deceased_cbs: ['registered', 'expected', 'expected_min', 'expected_max'], + elderly_at_home: ['positive_tested_daily', 'positive_tested_daily_moving_average', 'positive_tested_daily_per_100k', 'deceased_daily', 'deceased_daily_moving_average'], + vaccine_vaccinated_or_support: ['percentage_average', 'percentage_70_plus', 'percentage_55_69', 'percentage_40_54', 'percentage_25_39', 'percentage_16_24'], + corona_melder_app_download: ['count'], + corona_melder_app_warning: ['count'], + vaccine_coverage: ['booster_vaccinated', 'partially_vaccinated', 'fully_vaccinated', 'partially_or_fully_vaccinated'], + vaccine_delivery_estimate: ['total'], + vaccine_delivery_per_supplier: ['total', 'bio_n_tech_pfizer', 'moderna', 'astra_zeneca', 'cure_vac', 'janssen', 'sanofi', 'is_estimate', 'week_number', 'date_of_report_unix'], + vaccine_administered: ['pfizer', 'moderna', 'astra_zeneca', 'cure_vac', 'janssen', 'sanofi', 'novavax', 'total'], + vaccine_administered_doctors: ['estimated'], + vaccine_administered_ggd_ghor: ['reported'], + vaccine_administered_ggd: ['estimated'], + vaccine_administered_hospitals_and_care_institutions: ['estimated'], + vaccine_administered_total: ['estimated', 'reported'], + vaccine_administered_planned: ['doses'], vaccine_coverage_per_age_group: [ - "age_group_range", - "age_group_percentage", - "age_group_total", - "fully_vaccinated", - "booster_shot", - "has_one_shot", - "fully_vaccinated_percentage", - "booster_shot_percentage", - "has_one_shot_percentage", - "date_of_report_unix", - "birthyear_range", + 'age_group_range', + 'age_group_percentage', + 'age_group_total', + 'autumn_2022_vaccinated', + 'fully_vaccinated', + 'booster_shot', + 'autumn_2022_vaccinated_percentage', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'date_of_report_unix', + 'birthyear_range', ], vaccine_coverage_per_age_group_archived: [ - "age_group_range", - "age_group_percentage", - "age_group_total", - "fully_vaccinated", - "has_one_shot", - "fully_vaccinated_percentage", - "has_one_shot_percentage", - "date_of_report_unix", - "birthyear_range", + 'age_group_range', + 'age_group_percentage', + 'age_group_total', + 'fully_vaccinated', + 'has_one_shot', + 'fully_vaccinated_percentage', + 'has_one_shot_percentage', + 'date_of_report_unix', + 'birthyear_range', + ], + vaccine_coverage_per_age_group_archived_20220908: [ + 'age_group_range', + 'age_group_percentage', + 'age_group_total', + 'fully_vaccinated', + 'booster_shot', + 'has_one_shot', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'has_one_shot_percentage', + 'date_of_report_unix', + 'birthyear_range', ], vaccine_coverage_per_age_group_estimated: [ - "age_18_plus_fully_vaccinated", - "age_18_plus_has_one_shot", - "age_18_plus_birthyear", - "age_12_plus_fully_vaccinated", - "age_12_plus_has_one_shot", - "age_12_plus_birthyear", + 'age_60_plus_autumn_2022_vaccinated', + 'age_60_plus_birthyear', + 'age_18_plus_fully_vaccinated', + 'age_18_plus_has_one_shot', + 'age_18_plus_birthyear', + 'age_12_plus_autumn_2022_vaccinated', + 'age_12_plus_fully_vaccinated', + 'age_12_plus_has_one_shot', + 'age_12_plus_birthyear', + ], + vaccine_coverage_per_age_group_estimated_archived_20220908: [ + 'age_18_plus_fully_vaccinated', + 'age_18_plus_has_one_shot', + 'age_18_plus_birthyear', + 'age_12_plus_fully_vaccinated', + 'age_12_plus_has_one_shot', + 'age_12_plus_birthyear', ], vaccine_stock: [ - "total_available", - "total_not_available", - "bio_n_tech_pfizer_available", - "bio_n_tech_pfizer_not_available", - "bio_n_tech_pfizer_total", - "moderna_available", - "moderna_not_available", - "moderna_total", - "astra_zeneca_available", - "astra_zeneca_not_available", - "astra_zeneca_total", - "janssen_available", - "janssen_not_available", - "janssen_total", - ], - variants: ["variant_code", "values", "last_value"], + 'total_available', + 'total_not_available', + 'bio_n_tech_pfizer_available', + 'bio_n_tech_pfizer_not_available', + 'bio_n_tech_pfizer_total', + 'moderna_available', + 'moderna_not_available', + 'moderna_total', + 'astra_zeneca_available', + 'astra_zeneca_not_available', + 'astra_zeneca_total', + 'janssen_available', + 'janssen_not_available', + 'janssen_total', + ], + variants: ['variant_code', 'values', 'last_value'], }, + topical: {}, vr: { - g_number: ["g_number"], - sewer: ["average"], - tested_overall: [ - "infected", - "infected_moving_average", - "infected_moving_average_rounded", - "infected_per_100k", - "infected_per_100k_moving_average", - ], + g_number: ['g_number'], + sewer: ['average'], + tested_overall: ['infected', 'infected_moving_average', 'infected_moving_average_rounded', 'infected_per_100k', 'infected_per_100k_moving_average'], hospital_nice: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_moving_average", - "admissions_on_date_of_admission_moving_average_rounded", - "admissions_on_date_of_reporting", + 'admissions_on_date_of_admission', + 'admissions_on_date_of_admission_moving_average', + 'admissions_on_date_of_admission_moving_average_rounded', + 'admissions_on_date_of_reporting', ], tested_ggd: [ - "infected", - "infected_moving_average", - "infected_percentage", - "infected_percentage_moving_average", - "tested_total", - "tested_total_moving_average", - "tested_total_moving_average_rounded", - ], - tested_ggd_archived: [ - "infected_percentage", - "infected_percentage_moving_average", - ], + 'infected', + 'infected_moving_average', + 'infected_percentage', + 'infected_percentage_moving_average', + 'tested_total', + 'tested_total_moving_average', + 'tested_total_moving_average_rounded', + ], + tested_ggd_archived: ['infected_percentage', 'infected_percentage_moving_average'], nursing_home: [ - "newly_infected_people", - "newly_infected_people_moving_average", - "newly_infected_locations", - "infected_locations_total", - "infected_locations_percentage", - "deceased_daily", - "deceased_daily_moving_average", + 'newly_infected_people', + 'newly_infected_people_moving_average', + 'newly_infected_locations', + 'infected_locations_total', + 'infected_locations_percentage', + 'deceased_daily', + 'deceased_daily_moving_average', ], disability_care: [ - "newly_infected_people", - "newly_infected_people_moving_average", - "newly_infected_locations", - "infected_locations_total", - "infected_locations_percentage", - "deceased_daily", - "deceased_daily_moving_average", + 'newly_infected_people', + 'newly_infected_people_moving_average', + 'newly_infected_locations', + 'infected_locations_total', + 'infected_locations_percentage', + 'deceased_daily', + 'deceased_daily_moving_average', ], behavior: [ - "number_of_participants", - "curfew_compliance", - "curfew_compliance_trend", - "wash_hands_compliance", - "wash_hands_compliance_trend", - "keep_distance_compliance", - "keep_distance_compliance_trend", - "work_from_home_compliance", - "work_from_home_compliance_trend", - "avoid_crowds_compliance", - "avoid_crowds_compliance_trend", - "wear_mask_public_indoors_compliance", - "wear_mask_public_indoors_compliance_trend", - "sneeze_cough_elbow_compliance", - "sneeze_cough_elbow_compliance_trend", - "max_visitors_compliance", - "max_visitors_compliance_trend", - "ventilate_home_compliance", - "ventilate_home_compliance_trend", - "selftest_visit_compliance", - "selftest_visit_compliance_trend", - "curfew_support", - "curfew_support_trend", - "wash_hands_support", - "wash_hands_support_trend", - "keep_distance_support", - "keep_distance_support_trend", - "work_from_home_support", - "work_from_home_support_trend", - "avoid_crowds_support", - "avoid_crowds_support_trend", - "wear_mask_public_indoors_support", - "wear_mask_public_indoors_support_trend", - "sneeze_cough_elbow_support", - "sneeze_cough_elbow_support_trend", - "max_visitors_support", - "max_visitors_support_trend", - "ventilate_home_support", - "ventilate_home_support_trend", - "selftest_visit_support", - "selftest_visit_support_trend", - ], - deceased_rivm: ["covid_daily", "covid_daily_moving_average", "covid_total"], - deceased_cbs: ["registered", "expected", "expected_min", "expected_max"], - elderly_at_home: [ - "positive_tested_daily", - "positive_tested_daily_moving_average", - "positive_tested_daily_per_100k", - "deceased_daily", - "deceased_daily_moving_average", - ], - tested_overall_sum: ["infected_per_100k"], - hospital_nice_sum: ["admissions_per_1m"], + 'number_of_participants', + 'curfew_compliance', + 'curfew_compliance_trend', + 'wash_hands_compliance', + 'wash_hands_compliance_trend', + 'keep_distance_compliance', + 'keep_distance_compliance_trend', + 'work_from_home_compliance', + 'work_from_home_compliance_trend', + 'avoid_crowds_compliance', + 'avoid_crowds_compliance_trend', + 'wear_mask_public_indoors_compliance', + 'wear_mask_public_indoors_compliance_trend', + 'sneeze_cough_elbow_compliance', + 'sneeze_cough_elbow_compliance_trend', + 'max_visitors_compliance', + 'max_visitors_compliance_trend', + 'ventilate_home_compliance', + 'ventilate_home_compliance_trend', + 'selftest_visit_compliance', + 'selftest_visit_compliance_trend', + 'curfew_support', + 'curfew_support_trend', + 'wash_hands_support', + 'wash_hands_support_trend', + 'keep_distance_support', + 'keep_distance_support_trend', + 'work_from_home_support', + 'work_from_home_support_trend', + 'avoid_crowds_support', + 'avoid_crowds_support_trend', + 'wear_mask_public_indoors_support', + 'wear_mask_public_indoors_support_trend', + 'sneeze_cough_elbow_support', + 'sneeze_cough_elbow_support_trend', + 'max_visitors_support', + 'max_visitors_support_trend', + 'ventilate_home_support', + 'ventilate_home_support_trend', + 'selftest_visit_support', + 'selftest_visit_support_trend', + ], + deceased_rivm: ['covid_daily', 'covid_daily_moving_average', 'covid_total'], + deceased_cbs: ['registered', 'expected', 'expected_min', 'expected_max'], + elderly_at_home: ['positive_tested_daily', 'positive_tested_daily_moving_average', 'positive_tested_daily_per_100k', 'deceased_daily', 'deceased_daily_moving_average'], + tested_overall_sum: ['infected_per_100k'], + hospital_nice_sum: ['admissions_per_1m'], situations: [ - "has_sufficient_data", - "situations_known_percentage", - "situations_known_total", - "investigations_total", - "home_and_visits", - "work", - "school_and_day_care", - "health_care", - "gathering", - "travel", - "hospitality", - "other", + 'has_sufficient_data', + 'situations_known_percentage', + 'situations_known_total', + 'investigations_total', + 'home_and_visits', + 'work', + 'school_and_day_care', + 'health_care', + 'gathering', + 'travel', + 'hospitality', + 'other', ], vaccine_coverage_per_age_group: [ - "age_group_range", - "fully_vaccinated_percentage", - "booster_shot_percentage", - "has_one_shot_percentage", - "birthyear_range", - "fully_vaccinated_percentage_label", - "booster_shot_percentage_label", - "has_one_shot_percentage_label", + 'age_group_range', + 'autumn_2022_vaccinated_percentage', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'birthyear_range', + 'autumn_2022_vaccinated_percentage_label', + 'fully_vaccinated_percentage_label', + 'booster_shot_percentage_label', ], vaccine_coverage_per_age_group_archived: [ - "age_group_range", - "fully_vaccinated_percentage", - "has_one_shot_percentage", - "birthyear_range", - "fully_vaccinated_percentage_label", - "has_one_shot_percentage_label", - ], - booster_coverage: ["age_group", "percentage", "percentage_label"], + 'age_group_range', + 'fully_vaccinated_percentage', + 'has_one_shot_percentage', + 'birthyear_range', + 'fully_vaccinated_percentage_label', + 'has_one_shot_percentage_label', + ], + vaccine_coverage_per_age_group_archived_20220908: [ + 'age_group_range', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'has_one_shot_percentage', + 'birthyear_range', + 'fully_vaccinated_percentage_label', + 'booster_shot_percentage_label', + 'has_one_shot_percentage_label', + ], + booster_coverage: ['age_group', 'percentage', 'percentage_label'], }, vr_collection: { - hospital_nice: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_per_100000", - "admissions_on_date_of_reporting", - ], - hospital_nice_choropleth: [ - "admissions_on_date_of_admission", - "admissions_on_date_of_admission_per_100000", - "admissions_on_date_of_reporting", - ], - tested_overall: ["infected_per_100k", "infected"], - nursing_home: [ - "newly_infected_people", - "newly_infected_locations", - "infected_locations_total", - "infected_locations_percentage", - "deceased_daily", - ], - sewer: ["average"], + hospital_nice: ['admissions_on_date_of_admission', 'admissions_on_date_of_admission_per_100000', 'admissions_on_date_of_reporting'], + hospital_nice_choropleth: ['admissions_on_date_of_admission', 'admissions_on_date_of_admission_per_100000', 'admissions_on_date_of_reporting'], + tested_overall: ['infected_per_100k', 'infected'], + nursing_home: ['newly_infected_people', 'newly_infected_locations', 'infected_locations_total', 'infected_locations_percentage', 'deceased_daily'], + sewer: ['average'], behavior: [ - "number_of_participants", - "curfew_compliance", - "curfew_compliance_trend", - "wash_hands_compliance", - "wash_hands_compliance_trend", - "keep_distance_compliance", - "keep_distance_compliance_trend", - "work_from_home_compliance", - "work_from_home_compliance_trend", - "avoid_crowds_compliance", - "avoid_crowds_compliance_trend", - "wear_mask_public_indoors_compliance", - "wear_mask_public_indoors_compliance_trend", - "sneeze_cough_elbow_compliance", - "sneeze_cough_elbow_compliance_trend", - "max_visitors_compliance", - "max_visitors_compliance_trend", - "ventilate_home_compliance", - "ventilate_home_compliance_trend", - "curfew_support", - "curfew_support_trend", - "wash_hands_support", - "wash_hands_support_trend", - "keep_distance_support", - "keep_distance_support_trend", - "work_from_home_support", - "work_from_home_support_trend", - "avoid_crowds_support", - "avoid_crowds_support_trend", - "wear_mask_public_indoors_support", - "wear_mask_public_indoors_support_trend", - "sneeze_cough_elbow_support", - "sneeze_cough_elbow_support_trend", - "max_visitors_support", - "max_visitors_support_trend", - "ventilate_home_support", - "ventilate_home_support_trend", - ], - disability_care: [ - "newly_infected_people", - "newly_infected_locations", - "infected_locations_total", - "infected_locations_percentage", - "deceased_daily", - ], - elderly_at_home: [ - "positive_tested_daily", - "positive_tested_daily_per_100k", - "deceased_daily", - ], - situations: [ - "has_sufficient_data", - "home_and_visits", - "work", - "school_and_day_care", - "health_care", - "gathering", - "travel", - "hospitality", - "other", - ], + 'number_of_participants', + 'curfew_compliance', + 'curfew_compliance_trend', + 'wash_hands_compliance', + 'wash_hands_compliance_trend', + 'keep_distance_compliance', + 'keep_distance_compliance_trend', + 'work_from_home_compliance', + 'work_from_home_compliance_trend', + 'avoid_crowds_compliance', + 'avoid_crowds_compliance_trend', + 'wear_mask_public_indoors_compliance', + 'wear_mask_public_indoors_compliance_trend', + 'sneeze_cough_elbow_compliance', + 'sneeze_cough_elbow_compliance_trend', + 'max_visitors_compliance', + 'max_visitors_compliance_trend', + 'ventilate_home_compliance', + 'ventilate_home_compliance_trend', + 'curfew_support', + 'curfew_support_trend', + 'wash_hands_support', + 'wash_hands_support_trend', + 'keep_distance_support', + 'keep_distance_support_trend', + 'work_from_home_support', + 'work_from_home_support_trend', + 'avoid_crowds_support', + 'avoid_crowds_support_trend', + 'wear_mask_public_indoors_support', + 'wear_mask_public_indoors_support_trend', + 'sneeze_cough_elbow_support', + 'sneeze_cough_elbow_support_trend', + 'max_visitors_support', + 'max_visitors_support_trend', + 'ventilate_home_support', + 'ventilate_home_support_trend', + ], + disability_care: ['newly_infected_people', 'newly_infected_locations', 'infected_locations_total', 'infected_locations_percentage', 'deceased_daily'], + elderly_at_home: ['positive_tested_daily', 'positive_tested_daily_per_100k', 'deceased_daily'], + situations: ['has_sufficient_data', 'home_and_visits', 'work', 'school_and_day_care', 'health_care', 'gathering', 'travel', 'hospitality', 'other'], vaccine_coverage_per_age_group: [ - "age_group_range", - "fully_vaccinated_percentage", - "has_one_shot_percentage", - "booster_shot_percentage", - "birthyear_range", - "fully_vaccinated_percentage_label", - "has_one_shot_percentage_label", - "booster_shot_percentage_label", + 'age_group_range', + 'autumn_2022_vaccinated_percentage', + 'fully_vaccinated_percentage', + 'booster_shot_percentage', + 'birthyear_range', + 'autumn_2022_vaccinated_percentage_label', + 'fully_vaccinated_percentage_label', + 'booster_shot_percentage_label', ], }, }; diff --git a/packages/cms/src/elements/schemas/index.ts b/packages/cms/src/elements/schemas/index.ts index df6f0cd6ab..a06a408d71 100644 --- a/packages/cms/src/elements/schemas/index.ts +++ b/packages/cms/src/elements/schemas/index.ts @@ -3,4 +3,6 @@ export * from './kpi'; export * from './time-series'; export * from './timeline-event'; export * from './timeline-event-collection'; +export * from './thermometer-event'; +export * from './thermometer-event-collection'; export * from './warning'; diff --git a/packages/cms/src/elements/schemas/thermometer-event-collection.ts b/packages/cms/src/elements/schemas/thermometer-event-collection.ts new file mode 100644 index 0000000000..b7d7c87a51 --- /dev/null +++ b/packages/cms/src/elements/schemas/thermometer-event-collection.ts @@ -0,0 +1,24 @@ +import { FaTags } from 'react-icons/fa'; +import type { Rule } from '~/sanity'; + +export const thermometerEventCollection = { + name: 'thermometerEventCollection', + type: 'document', + title: 'Thermometer Event Collection', + icon: FaTags, + fields: [ + { + title: 'Naam', + name: 'name', + type: 'string', + validation: (x: Rule) => x.required(), + }, + { + title: 'Thermometer Events', + name: 'thermometerEvents', + type: 'array', + of: [{ type: 'thermometerEvent' }], + validation: (x: Rule) => x.required().min(1), + }, + ], +}; diff --git a/packages/cms/src/elements/schemas/thermometer-event.ts b/packages/cms/src/elements/schemas/thermometer-event.ts new file mode 100644 index 0000000000..dbab4d99e0 --- /dev/null +++ b/packages/cms/src/elements/schemas/thermometer-event.ts @@ -0,0 +1,80 @@ +import { isDefined } from 'ts-is-present'; +import { Rule } from '~/sanity'; +import { localeStringValidation } from '../../language/locale-validation'; + +import { SeverityLevels } from '@corona-dashboard/app/src/components/severity-indicator-tile/types'; + +const REQUIRED = (rule: Rule) => rule.required(); +const REQUIRED_MIN_MAX = (rule: Rule, min: number, max: number) => rule.required().min(min).max(max); + +const SEVERITY_LEVELS = Object.values(SeverityLevels).map((severityLevel) => parseInt(severityLevel, 10)); + +const THERMOMETER_MIN_VALUE = Math.min(...SEVERITY_LEVELS); +const THERMOMETER_MAX_VALUE = Math.max(...SEVERITY_LEVELS); + +const DATE_FORMAT = 'YYYY-MM-DD'; + +export const thermometerEvent = { + name: 'thermometerEvent', + type: 'object', + title: 'Thermometer Event', + fields: [ + { + title: 'Titel', + name: 'title', + type: 'localeString', + validation: localeStringValidation((rule) => rule.required().max(60).error('Titels zijn gelimiteerd tot maximaal 60 tekens')), + options: { + ignoreLanguageSwitcher: true, + }, + }, + { + title: 'Omschrijving', + name: 'description', + type: 'localeText', + validation: REQUIRED, + options: { + ignoreLanguageSwitcher: true, + }, + }, + { + title: 'Level', + name: 'level', + type: 'number', + validation: (rule: Rule) => REQUIRED_MIN_MAX(rule, THERMOMETER_MIN_VALUE, THERMOMETER_MAX_VALUE), + options: { + ignoreLanguageSwitcher: true, + }, + }, + { + title: 'Datum', + name: 'date', + type: 'date', + options: { + dateFormat: DATE_FORMAT, + }, + validation: REQUIRED, + }, + { + title: 'Einddatum (optioneel)', + name: 'dateEnd', + type: 'date', + options: { + dateFormat: DATE_FORMAT, + }, + }, + ], + preview: { + select: { + title: 'title.nl', + date: 'date', + dateEnd: 'dateEnd', + }, + prepare(x: { title: string; date: string; dateEnd?: string }) { + return { + title: x.title, + subtitle: [x.date, x.dateEnd].filter(isDefined).join(' tot '), + }; + }, + }, +}; diff --git a/packages/cms/src/elements/schemas/thermometer.ts b/packages/cms/src/elements/schemas/thermometer.ts new file mode 100644 index 0000000000..8e134de56c --- /dev/null +++ b/packages/cms/src/elements/schemas/thermometer.ts @@ -0,0 +1,17 @@ +import { commonFields, commonPreview } from './shared'; + +export const thermometer = { + name: 'thermometer', + type: 'document', + title: 'Thermometer', + fields: [ + ...commonFields, + { + title: 'Thermometer Event Collections', + name: 'thermometerEventCollections', + type: 'array', + of: [{ type: 'reference', to: [{ type: 'thermometerEventCollection' }] }], + }, + ], + preview: commonPreview, +}; diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index 4683d23390..0d18fb1338 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -30,4 +30,43 @@ timestamp,action,key,document_id,move_to 2022-10-13T12:16:30.506Z,add,pages.vaccinations_page.vr.vaccination_coverage.top_level_information_block.dates,Hbf18OLBqHEYSTRqYPuVtR,__ 2022-10-13T12:16:31.512Z,add,pages.vaccinations_page.vr.vaccination_coverage.top_level_information_block.reference.href,Hbf18OLBqHEYSTRqYPuWBB,__ 2022-10-13T12:16:32.533Z,add,pages.vaccinations_page.vr.vaccination_coverage.top_level_information_block.title,hisQZuyoPo60cR6z1YNuqw,__ +2022-10-21T08:27:05.448Z,add,pages.topical_page.nl.thermometer.current_indicator_level,K48I3DmxlzVCAHe3YoBCIQ,__ +2022-10-21T08:27:06.474Z,add,pages.topical_page.nl.thermometer.indicator_for_level_1.title,i1eZmWfHjT5bLGKFlhIEjW,__ +2022-10-21T08:27:07.488Z,add,pages.topical_page.nl.thermometer.indicator_for_level_1.description,NYpb1u6P0tqViLcixo7gEh,__ +2022-10-21T08:27:08.466Z,add,pages.topical_page.nl.thermometer.indicator_for_level_1.label,NYpb1u6P0tqViLcixo7gxG,__ +2022-10-21T08:27:09.489Z,add,pages.topical_page.nl.thermometer.indicator_for_level_2.title,i1eZmWfHjT5bLGKFlhIFdW,__ +2022-10-21T08:27:10.505Z,add,pages.topical_page.nl.thermometer.indicator_for_level_2.description,K48I3DmxlzVCAHe3YoBCYs,__ +2022-10-21T08:27:11.516Z,add,pages.topical_page.nl.thermometer.indicator_for_level_2.label,K48I3DmxlzVCAHe3YoBCma,__ +2022-10-21T08:27:12.533Z,add,pages.topical_page.nl.thermometer.indicator_for_level_3.title,K48I3DmxlzVCAHe3YoBDBG,__ +2022-10-21T08:27:13.553Z,add,pages.topical_page.nl.thermometer.indicator_for_level_3.description,K48I3DmxlzVCAHe3YoBDOy,__ +2022-10-21T08:27:14.559Z,add,pages.topical_page.nl.thermometer.indicator_for_level_3.label,K48I3DmxlzVCAHe3YoBDXC,__ +2022-10-21T08:27:15.571Z,add,pages.topical_page.nl.thermometer.indicator_for_level_4.title,i1eZmWfHjT5bLGKFlhIGQW,__ +2022-10-21T08:27:16.560Z,add,pages.topical_page.nl.thermometer.indicator_for_level_4.description,i1eZmWfHjT5bLGKFlhIGb1,__ +2022-10-21T08:27:17.602Z,add,pages.topical_page.nl.thermometer.indicator_for_level_4.label,i1eZmWfHjT5bLGKFlhIGlW,__ +2022-10-21T08:27:18.593Z,add,pages.topical_page.nl.thermometer.article_reference,NYpb1u6P0tqViLcixo7iYI,__ +2022-10-21T08:27:19.629Z,add,pages.topical_page.nl.thermometer.collapsible_title,K48I3DmxlzVCAHe3YoBE46,__ 2022-10-20T08:52:25.474Z,delete,pages.intensive_care_page.nl.kpi_bedbezetting.barscale_screenreader_text,jDbv30Y7XYH5kl8ZaovZD6,__ +2022-10-19T11:41:12.347Z,add,pages.topical_page.nl.thermometer.indicator.source_label,65tvoiVcF0tDaAwdlNm7IM,__ +2022-10-19T11:41:13.292Z,add,pages.topical_page.nl.thermometer.indicator.dates_label,Z4981ecxxAauoAYZ8R2IO1,__ +2022-10-19T11:41:14.265Z,add,pages.topical_page.nl.thermometer.indicator.trend_icon.direction,Z4981ecxxAauoAYZ8R2IYZ,__ +2022-10-19T11:41:15.281Z,add,pages.topical_page.nl.thermometer.indicator.trend_icon.color,Z4981ecxxAauoAYZ8R2J0h,__ +2022-10-19T11:41:16.315Z,add,pages.topical_page.nl.thermometer.indicator.level_description,65tvoiVcF0tDaAwdlNm7cu,__ +2022-10-19T11:41:16.318Z,delete,pages.topical_page.nl.thermometer.indicator.footerText,yWf5NF9ZnuFvbcgji0hw3P,__ + +2022-10-25T08:15:14.501Z,delete,pages.topical_page.nl.thermometer.indicator.footerText,yWf5NF9ZnuFvbcgji0hw3P,__ +2022-10-25T08:15:14.501Z,delete,pages.topical_page.nl.thermometer.indicator.level,HGRlaxydJ6CFBj9zrvVENP,__ +2022-10-25T08:15:14.501Z,delete,pages.topical_page.nl.thermometer.indicator_for_level_2.description,K48I3DmxlzVCAHe3YoBCYs,__ +2022-10-25T08:15:14.501Z,delete,pages.topical_page.nl.thermometer.indicator_for_level_2.label,K48I3DmxlzVCAHe3YoBCma,__ +2022-10-25T08:15:14.502Z,delete,pages.topical_page.nl.thermometer.indicator_for_level_2.title,i1eZmWfHjT5bLGKFlhIFdW,__ +2022-10-25T08:15:14.502Z,move,pages.topical_page.nl.thermometer.indicator_for_level_1.description,NYpb1u6P0tqViLcixo7gEh,pages.topical_page.nl.thermometer.indicator.level_1.description +2022-10-25T08:15:14.502Z,move,pages.topical_page.nl.thermometer.indicator_for_level_1.label,NYpb1u6P0tqViLcixo7gxG,pages.topical_page.nl.thermometer.indicator.level_1.label +2022-10-25T08:15:14.502Z,move,pages.topical_page.nl.thermometer.indicator_for_level_1.title,i1eZmWfHjT5bLGKFlhIEjW,pages.topical_page.nl.thermometer.indicator.level_1.title +2022-10-25T08:15:14.502Z,move,pages.topical_page.nl.thermometer.indicator.description,HGRlaxydJ6CFBj9zrvVDpr,pages.topical_page.nl.thermometer.indicator.level_2.description +2022-10-25T08:15:14.502Z,move,pages.topical_page.nl.thermometer.indicator.label,7OLL6UA2lzERNM4xv33W7O,pages.topical_page.nl.thermometer.indicator.level_2.label +2022-10-25T08:15:14.502Z,move,pages.topical_page.nl.thermometer.indicator.title,7OLL6UA2lzERNM4xv1bLOt,pages.topical_page.nl.thermometer.indicator.level_2.title +2022-10-25T08:15:14.503Z,move,pages.topical_page.nl.thermometer.indicator_for_level_3.description,K48I3DmxlzVCAHe3YoBDOy,pages.topical_page.nl.thermometer.indicator.level_3.description +2022-10-25T08:15:14.503Z,move,pages.topical_page.nl.thermometer.indicator_for_level_3.label,K48I3DmxlzVCAHe3YoBDXC,pages.topical_page.nl.thermometer.indicator.level_3.label +2022-10-25T08:15:14.503Z,move,pages.topical_page.nl.thermometer.indicator_for_level_3.title,K48I3DmxlzVCAHe3YoBDBG,pages.topical_page.nl.thermometer.indicator.level_3.title +2022-10-25T08:15:14.503Z,move,pages.topical_page.nl.thermometer.indicator_for_level_4.description,i1eZmWfHjT5bLGKFlhIGb1,pages.topical_page.nl.thermometer.indicator.level_4.description +2022-10-25T08:15:14.503Z,move,pages.topical_page.nl.thermometer.indicator_for_level_4.label,i1eZmWfHjT5bLGKFlhIGlW,pages.topical_page.nl.thermometer.indicator.level_4.label +2022-10-25T08:15:14.503Z,move,pages.topical_page.nl.thermometer.indicator_for_level_4.title,i1eZmWfHjT5bLGKFlhIGQW,pages.topical_page.nl.thermometer.indicator.level_4.title diff --git a/packages/common/src/types/data.ts b/packages/common/src/types/data.ts index cad089f59b..0437e0c5c6 100644 --- a/packages/common/src/types/data.ts +++ b/packages/common/src/types/data.ts @@ -1,8 +1,8 @@ /** - * This file was automatically generated by json-schema-to-typescript. - * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, - * and run 'yarn generate-data-types' to regenerate this file. - */ +* This file was automatically generated by json-schema-to-typescript. +* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, +* and run 'yarn generate-data-types' to regenerate this file. +*/ export type GmCode = string; @@ -111,7 +111,7 @@ export interface GmVaccineCoveragePerAgeGroup { values: GmVaccineCoveragePerAgeGroupValue[]; } export interface GmVaccineCoveragePerAgeGroupValue { - age_group_range: '12+' | '18+' | '60+'; + age_group_range: "12+" | "18+" | "60+"; autumn_2022_vaccinated_percentage: number | null; fully_vaccinated_percentage: number | null; booster_shot_percentage: number | null; @@ -126,7 +126,7 @@ export interface GmVaccineCoveragePerAgeGroupArchived { values: GmVaccineCoveragePerAgeGroupArchivedValue[]; } export interface GmVaccineCoveragePerAgeGroupArchivedValue { - age_group_range: '12+' | '18+'; + age_group_range: "12+" | "18+"; fully_vaccinated_percentage: number | null; has_one_shot_percentage: number | null; birthyear_range: string; @@ -139,7 +139,7 @@ export interface GmVaccineCoveragePerAgeGroupArchived_20220908 { values: GmVaccineCoveragePerAgeGroupArchived_20220908Value[]; } export interface GmVaccineCoveragePerAgeGroupArchived_20220908Value { - age_group_range: '12+' | '18+'; + age_group_range: "12+" | "18+"; fully_vaccinated_percentage: number | null; booster_shot_percentage: number | null; has_one_shot_percentage: number | null; @@ -154,14 +154,14 @@ export interface GmBoosterCoverage { values: GmBoosterCoverageValue[]; } export interface GmBoosterCoverageValue { - age_group?: '12+' | '18+'; + age_group?: "12+" | "18+"; percentage: number; percentage_label: string | null; date_unix: number; date_of_insertion_unix: number; } -export type GmCollectionId = 'GM_COLLECTION'; +export type GmCollectionId = "GM_COLLECTION"; export interface GmCollection { last_generated: string; @@ -199,7 +199,7 @@ export interface GmCollectionSewer { } export interface GmCollectionVaccineCoveragePerAgeGroup { gmcode: string; - age_group_range: '12+' | '18+' | '60+'; + age_group_range: "12+" | "18+" | "60+"; autumn_2022_vaccinated_percentage: number | null; fully_vaccinated_percentage: number | null; booster_shot_percentage: number | null; @@ -211,7 +211,7 @@ export interface GmCollectionVaccineCoveragePerAgeGroup { date_of_insertion_unix: number; } -export type NlId = 'NL'; +export type NlId = "NL"; export interface Nl { last_generated: string; @@ -314,26 +314,26 @@ export interface NlNamedDifference { } export interface NamedDifferenceDecimal { variant_code: - | 'B_1_1_529' - | 'BA_1' - | 'BA_2' - | 'BA_4' - | 'BA_4_6' - | 'BA_5' - | 'BA_2+S:L452X' - | 'BA_2_12_1' - | 'BA_3' - | 'B_1_617_2' - | 'B_1_351' - | 'P_1' - | 'B_1_1_7' - | 'B_1_621' - | 'C_37' - | 'BA_2_75' - | 'BA_2_75_2' - | 'BF_7' - | 'other_table' - | 'other_graph'; + | "B_1_1_529" + | "BA_1" + | "BA_2" + | "BA_4" + | "BA_4_6" + | "BA_5" + | "BA_2+S:L452X" + | "BA_2_12_1" + | "BA_3" + | "B_1_617_2" + | "B_1_351" + | "P_1" + | "B_1_1_7" + | "B_1_621" + | "C_37" + | "BA_2_75" + | "BA_2_75_2" + | "BF_7" + | "other_table" + | "other_graph"; old_value: number; difference: number; old_date_unix: number; @@ -363,7 +363,7 @@ export interface NlBoosterCoverage { values: NlBoosterCoverageValue[]; } export interface NlBoosterCoverageValue { - age_group?: '12+' | '18+'; + age_group?: "12+" | "18+"; percentage: number; date_unix: number; date_of_insertion_unix: number; @@ -595,57 +595,57 @@ export interface NlBehavior { export interface NlBehaviorValue { number_of_participants: number; curfew_compliance?: number | null; - curfew_compliance_trend: ('up' | 'down' | 'equal') | null; + curfew_compliance_trend: ("up" | "down" | "equal") | null; wash_hands_compliance?: number | null; - wash_hands_compliance_trend: ('up' | 'down' | 'equal') | null; + wash_hands_compliance_trend: ("up" | "down" | "equal") | null; keep_distance_compliance?: number | null; - keep_distance_compliance_trend: ('up' | 'down' | 'equal') | null; + keep_distance_compliance_trend: ("up" | "down" | "equal") | null; work_from_home_compliance?: number | null; - work_from_home_compliance_trend: ('up' | 'down' | 'equal') | null; + work_from_home_compliance_trend: ("up" | "down" | "equal") | null; avoid_crowds_compliance?: number | null; - avoid_crowds_compliance_trend: ('up' | 'down' | 'equal') | null; + avoid_crowds_compliance_trend: ("up" | "down" | "equal") | null; symptoms_stay_home_if_mandatory_compliance?: number | null; - symptoms_stay_home_if_mandatory_compliance_trend?: ('up' | 'down' | 'equal') | null; + symptoms_stay_home_if_mandatory_compliance_trend?: ("up" | "down" | "equal") | null; symptoms_get_tested_compliance?: number | null; - symptoms_get_tested_compliance_trend?: ('up' | 'down' | 'equal') | null; + symptoms_get_tested_compliance_trend?: ("up" | "down" | "equal") | null; wear_mask_public_indoors_compliance?: number | null; - wear_mask_public_indoors_compliance_trend: ('up' | 'down' | 'equal') | null; + wear_mask_public_indoors_compliance_trend: ("up" | "down" | "equal") | null; wear_mask_public_transport_compliance?: number | null; - wear_mask_public_transport_compliance_trend?: ('up' | 'down' | 'equal') | null; + wear_mask_public_transport_compliance_trend?: ("up" | "down" | "equal") | null; sneeze_cough_elbow_compliance?: number | null; - sneeze_cough_elbow_compliance_trend: ('up' | 'down' | 'equal') | null; + sneeze_cough_elbow_compliance_trend: ("up" | "down" | "equal") | null; max_visitors_compliance?: number | null; - max_visitors_compliance_trend: ('up' | 'down' | 'equal') | null; + max_visitors_compliance_trend: ("up" | "down" | "equal") | null; ventilate_home_compliance?: number | null; - ventilate_home_compliance_trend: ('up' | 'down' | 'equal') | null; + ventilate_home_compliance_trend: ("up" | "down" | "equal") | null; selftest_visit_compliance?: number | null; - selftest_visit_compliance_trend: ('up' | 'down' | 'equal') | null; + selftest_visit_compliance_trend: ("up" | "down" | "equal") | null; curfew_support?: number | null; - curfew_support_trend: ('up' | 'down' | 'equal') | null; + curfew_support_trend: ("up" | "down" | "equal") | null; wash_hands_support?: number | null; - wash_hands_support_trend: ('up' | 'down' | 'equal') | null; + wash_hands_support_trend: ("up" | "down" | "equal") | null; keep_distance_support?: number | null; - keep_distance_support_trend: ('up' | 'down' | 'equal') | null; + keep_distance_support_trend: ("up" | "down" | "equal") | null; work_from_home_support?: number | null; - work_from_home_support_trend: ('up' | 'down' | 'equal') | null; + work_from_home_support_trend: ("up" | "down" | "equal") | null; avoid_crowds_support?: number | null; - avoid_crowds_support_trend: ('up' | 'down' | 'equal') | null; + avoid_crowds_support_trend: ("up" | "down" | "equal") | null; symptoms_stay_home_if_mandatory_support?: number | null; - symptoms_stay_home_if_mandatory_support_trend?: ('up' | 'down' | 'equal') | null; + symptoms_stay_home_if_mandatory_support_trend?: ("up" | "down" | "equal") | null; symptoms_get_tested_support?: number | null; - symptoms_get_tested_support_trend?: ('up' | 'down' | 'equal') | null; + symptoms_get_tested_support_trend?: ("up" | "down" | "equal") | null; wear_mask_public_indoors_support?: number | null; - wear_mask_public_indoors_support_trend: ('up' | 'down' | 'equal') | null; + wear_mask_public_indoors_support_trend: ("up" | "down" | "equal") | null; wear_mask_public_transport_support?: number | null; - wear_mask_public_transport_support_trend?: ('up' | 'down' | 'equal') | null; + wear_mask_public_transport_support_trend?: ("up" | "down" | "equal") | null; sneeze_cough_elbow_support?: number | null; - sneeze_cough_elbow_support_trend: ('up' | 'down' | 'equal') | null; + sneeze_cough_elbow_support_trend: ("up" | "down" | "equal") | null; max_visitors_support?: number | null; - max_visitors_support_trend: ('up' | 'down' | 'equal') | null; + max_visitors_support_trend: ("up" | "down" | "equal") | null; ventilate_home_support?: number | null; - ventilate_home_support_trend: ('up' | 'down' | 'equal') | null; + ventilate_home_support_trend: ("up" | "down" | "equal") | null; selftest_visit_support?: number | null; - selftest_visit_support_trend: ('up' | 'down' | 'equal') | null; + selftest_visit_support_trend: ("up" | "down" | "equal") | null; date_start_unix: number; date_end_unix: number; date_of_insertion_unix: number; @@ -668,11 +668,11 @@ export interface NlBehaviorPerAgeGroup { date_end_unix: number; } export interface NlBehaviorPerAgeGroupValue { - '16_24': number | null; - '25_39': number | null; - '40_54': number | null; - '55_69': number | null; - '70_plus': number | null; + "16_24": number | null; + "25_39": number | null; + "40_54": number | null; + "55_69": number | null; + "70_plus": number | null; } export interface NlBehaviorGetTestedSupportPerAgeGroup { values: NlBehaviorGetTestedSupportPerAgeGroupValue[]; @@ -694,19 +694,19 @@ export interface NlBehaviorAnnotations { } export interface NlBehaviorAnnotations1 { behavior_indicator: - | 'wash_hands' - | 'curfew' - | 'keep_distance' - | 'work_from_home' - | 'avoid_crowds' - | 'symptoms_stay_home_if_mandatory' - | 'symptoms_get_tested' - | 'wear_mask_public_indoors' - | 'wear_mask_public_transport' - | 'sneeze_cough_elbow' - | 'max_visitors' - | 'ventilate_home' - | 'selftest_visit'; + | "wash_hands" + | "curfew" + | "keep_distance" + | "work_from_home" + | "avoid_crowds" + | "symptoms_stay_home_if_mandatory" + | "symptoms_get_tested" + | "wear_mask_public_indoors" + | "wear_mask_public_transport" + | "sneeze_cough_elbow" + | "max_visitors" + | "ventilate_home" + | "selftest_visit"; message_title_nl: string; message_title_en: string; message_desc_nl: string; @@ -968,7 +968,7 @@ export interface NlVaccineCoveragePerAgeGroup { values: NlVaccineCoveragePerAgeGroupValue[]; } export interface NlVaccineCoveragePerAgeGroupValue { - age_group_range: '5-11' | '12-17' | '18-29' | '30-39' | '40-49' | '50-59' | '60-69' | '70-79' | '80+'; + age_group_range: "5-11" | "12-17" | "18-29" | "30-39" | "40-49" | "50-59" | "60-69" | "70-79" | "80+"; age_group_percentage: number; age_group_total: number; autumn_2022_vaccinated: number | null; @@ -986,7 +986,7 @@ export interface NlVaccineCoveragePerAgeGroupArchived { values: NlVaccineCoveragePerAgeGroupArchivedValue[]; } export interface NlVaccineCoveragePerAgeGroupArchivedValue { - age_group_range: '5-11' | '12-17' | '18-30' | '31-40' | '41-50' | '51-60' | '61-70' | '71-80' | '81+'; + age_group_range: "5-11" | "12-17" | "18-30" | "31-40" | "41-50" | "51-60" | "61-70" | "71-80" | "81+"; age_group_percentage: number; age_group_total: number; fully_vaccinated: number; @@ -1002,7 +1002,7 @@ export interface NlVaccineCoveragePerAgeGroupArchived_20220908 { values: NlVaccineCoveragePerAgeGroupArchived_20220908Value[]; } export interface NlVaccineCoveragePerAgeGroupArchived_20220908Value { - age_group_range: '5-11' | '12-17' | '18-29' | '30-39' | '40-49' | '50-59' | '60-69' | '70-79' | '80+'; + age_group_range: "5-11" | "12-17" | "18-29" | "30-39" | "40-49" | "50-59" | "60-69" | "70-79" | "80+"; age_group_percentage: number; age_group_total: number; fully_vaccinated: number; @@ -1074,26 +1074,26 @@ export interface NlVariants { } export interface NlVariantsVariant { variant_code: - | 'B_1_1_529' - | 'BA_1' - | 'BA_2' - | 'BA_4' - | 'BA_4_6' - | 'BA_5' - | 'BA_2+S:L452X' - | 'BA_2_12_1' - | 'BA_3' - | 'B_1_617_2' - | 'B_1_351' - | 'P_1' - | 'B_1_1_7' - | 'B_1_621' - | 'C_37' - | 'BA_2_75' - | 'BA_2_75_2' - | 'BF_7' - | 'other_table' - | 'other_graph'; + | "B_1_1_529" + | "BA_1" + | "BA_2" + | "BA_4" + | "BA_4_6" + | "BA_5" + | "BA_2+S:L452X" + | "BA_2_12_1" + | "BA_3" + | "B_1_617_2" + | "B_1_351" + | "P_1" + | "B_1_1_7" + | "B_1_621" + | "C_37" + | "BA_2_75" + | "BA_2_75_2" + | "BF_7" + | "other_table" + | "other_graph"; values: NlVariantsVariantValue[]; last_value: NlVariantsVariantValue; } @@ -1111,135 +1111,136 @@ export interface NlVariantsVariantValue { } export type TopicalIcon = - | 'AfstandSporten' - | 'AlcoholVerkoop' - | 'Archive' - | 'Arrow' - | 'Arts' - | 'Avondklok' - | 'BarChart' - | 'BasisregelsAfstand' - | 'BasisregelsDrukte' - | 'BasisregelsElleboog' - | 'BasisregelsGeenBezoek' - | 'BasisregelsHandenwassen' - | 'BasisregelsMondkapje' - | 'BasisregelsTesten' - | 'Bevolking' - | 'Bezoek' - | 'Bibliotheek' - | 'BinnenMetZitplaats' - | 'BinnenZonderZitplaats' - | 'Binnensporten' - | 'Binnensportlocaties' - | 'Boosterprik' - | 'Calendar' - | 'Check' - | 'Checked' - | 'ChevronDown' - | 'ChevronRight' - | 'Clock' - | 'Close' - | 'CloseThick' - | 'ContactBeroepen' - | 'Coronavirus' - | 'Cross' - | 'Database' - | 'DoorstroomEvenementen' - | 'Dot' - | 'Down' - | 'Download' - | 'EenPersoonDoorgestreept' - | 'Elderly' - | 'Expand' - | 'Experimenteel' - | 'External' - | 'Eye' - | 'FrisseLucht' - | 'GedeeltelijkOpenRugzak' - | 'GeenEntertainment' - | 'GeenMaxAantalBezoekers' - | 'GeenWedstrijden' - | 'Gehandicaptenzorg' - | 'GeorganiseerdeKunstEnCultuurbeoefening' - | 'GgdTesten' - | 'Groepen' - | 'HealthCare' - | 'HomeAndVisits' - | 'HorecaEnEvenementenBestellen' - | 'HorecaEnEvenementenEtendrinken' - | 'HorecaEnEvenementenEvenementen' - | 'HorecaEvenementen' - | 'Hospitality' - | 'Information' - | 'IntensiveCareOpnames' - | 'Klachten' - | 'Klok210001' - | 'KunstCultuur' - | 'KunstcultuurMusea' - | 'Line' - | 'Locaties' - | 'Location' - | 'Lopend' - | 'Maatregelen' - | 'MaxAantalBezoekers' - | 'MaxVisitors' - | 'MedischeScreening' - | 'MeerInformatie' - | 'MeerdaagseEvenementen' - | 'Menu' - | 'Mondkapje' - | 'Nederland' - | 'Notification' - | 'OnderwijsEnKinderopvangNoodopvang' - | 'OnderwijsEnKinderopvangOpAfstand' - | 'OntmoetingenBezoek' - | 'OpenbaarVervoer' - | 'Openingstijden' - | 'Other' - | 'Overige' - | 'Phone' - | 'Recreatie' - | 'Reizen' - | 'ReproductieGraf' - | 'Reproductiegetal' - | 'Rioolvirus' - | 'SearchIcon' - | 'SearchIconBold' - | 'SportBuiten' - | 'SportMetZweetband' - | 'SportWedstrijden' - | 'Stap1HorecaMax' - | 'Stap1HorecaPertafel' - | 'Stap1HorecaVerplaatsen' - | 'Stap1OnderwijsBibliotheek' - | 'Stap1OnderwijsOpen' - | 'Stap1Theorie' - | 'Stap1Thuisbezoek' - | 'Stap1Uitvaarten' - | 'Stap1WinkelsAlleen' - | 'Stap1WinkelsMarkten' - | 'Stap1WinkelsOpen' - | 'Stopwatch' - | 'Taxi' - | 'Testbewijs' - | 'Toegangsbewijzen' - | 'Travel' - | 'Unchecked' - | 'Up' - | 'Vaccinaties' - | 'Varianten' - | 'Verpleeghuis' - | 'VervoerEnReizenBuitenland' - | 'VervoerEnReizenOv' - | 'Vliegen' - | 'Warn' - | 'Warning' - | 'WinkelenEnBoodschappenAlcohol' - | 'WinkelenEnBoodschappenOpen' - | 'Work' - | 'Ziekenhuis' - | 'Ziektegolf'; + | "AfstandSporten" + | "AlcoholVerkoop" + | "Archive" + | "Arrow" + | "Arts" + | "Avondklok" + | "BarChart" + | "BasisregelsAfstand" + | "BasisregelsDrukte" + | "BasisregelsElleboog" + | "BasisregelsGeenBezoek" + | "BasisregelsHandenwassen" + | "BasisregelsMondkapje" + | "BasisregelsTesten" + | "Bevolking" + | "Bezoek" + | "Bibliotheek" + | "BinnenMetZitplaats" + | "BinnenZonderZitplaats" + | "Binnensporten" + | "Binnensportlocaties" + | "Boosterprik" + | "Calendar" + | "Check" + | "Checked" + | "ChevronDown" + | "ChevronRight" + | "Clock" + | "Close" + | "CloseThick" + | "ContactBeroepen" + | "Coronathermometer" + | "Coronavirus" + | "Cross" + | "Database" + | "DoorstroomEvenementen" + | "Dot" + | "Down" + | "Download" + | "EenPersoonDoorgestreept" + | "Elderly" + | "Expand" + | "Experimenteel" + | "External" + | "Eye" + | "FrisseLucht" + | "GedeeltelijkOpenRugzak" + | "GeenEntertainment" + | "GeenMaxAantalBezoekers" + | "GeenWedstrijden" + | "Gehandicaptenzorg" + | "GeorganiseerdeKunstEnCultuurbeoefening" + | "GgdTesten" + | "Groepen" + | "HealthCare" + | "HomeAndVisits" + | "HorecaEnEvenementenBestellen" + | "HorecaEnEvenementenEtendrinken" + | "HorecaEnEvenementenEvenementen" + | "HorecaEvenementen" + | "Hospitality" + | "Information" + | "IntensiveCareOpnames" + | "Klachten" + | "Klok210001" + | "KunstCultuur" + | "KunstcultuurMusea" + | "Line" + | "Locaties" + | "Location" + | "Lopend" + | "Maatregelen" + | "MaxAantalBezoekers" + | "MaxVisitors" + | "MedischeScreening" + | "MeerInformatie" + | "MeerdaagseEvenementen" + | "Menu" + | "Mondkapje" + | "Nederland" + | "Notification" + | "OnderwijsEnKinderopvangNoodopvang" + | "OnderwijsEnKinderopvangOpAfstand" + | "OntmoetingenBezoek" + | "OpenbaarVervoer" + | "Openingstijden" + | "Other" + | "Overige" + | "Phone" + | "Recreatie" + | "Reizen" + | "ReproductieGraf" + | "Reproductiegetal" + | "Rioolvirus" + | "SearchIcon" + | "SearchIconBold" + | "SportBuiten" + | "SportMetZweetband" + | "SportWedstrijden" + | "Stap1HorecaMax" + | "Stap1HorecaPertafel" + | "Stap1HorecaVerplaatsen" + | "Stap1OnderwijsBibliotheek" + | "Stap1OnderwijsOpen" + | "Stap1Theorie" + | "Stap1Thuisbezoek" + | "Stap1Uitvaarten" + | "Stap1WinkelsAlleen" + | "Stap1WinkelsMarkten" + | "Stap1WinkelsOpen" + | "Stopwatch" + | "Taxi" + | "Testbewijs" + | "Toegangsbewijzen" + | "Travel" + | "Unchecked" + | "Up" + | "Vaccinaties" + | "Varianten" + | "Verpleeghuis" + | "VervoerEnReizenBuitenland" + | "VervoerEnReizenOv" + | "Vliegen" + | "Warn" + | "Warning" + | "WinkelenEnBoodschappenAlcohol" + | "WinkelenEnBoodschappenOpen" + | "Work" + | "Ziekenhuis" + | "Ziektegolf"; export interface Topical { version: string; @@ -1272,12 +1273,12 @@ export interface TopicalTheme { } export interface TopicalThemeTile { index: number; - kpiValue?: number | null | string; + kpiValue: number | null | string; title: MultilanguageString; dynamicDescription: MultilanguageString; trendIcon: { - direction: 'UP' | 'DOWN'; - color: 'GREEN' | 'RED'; + direction: "UP" | "DOWN"; + color: "GREEN" | "RED"; } | null; tileIcon: TopicalIcon; cta: { @@ -1483,45 +1484,45 @@ export interface VrBehavior { export interface VrBehaviorValue { number_of_participants: number; curfew_compliance?: number | null; - curfew_compliance_trend: ('up' | 'down' | 'equal') | null; + curfew_compliance_trend: ("up" | "down" | "equal") | null; wash_hands_compliance?: number | null; - wash_hands_compliance_trend: ('up' | 'down' | 'equal') | null; + wash_hands_compliance_trend: ("up" | "down" | "equal") | null; keep_distance_compliance?: number | null; - keep_distance_compliance_trend: ('up' | 'down' | 'equal') | null; + keep_distance_compliance_trend: ("up" | "down" | "equal") | null; work_from_home_compliance?: number | null; - work_from_home_compliance_trend: ('up' | 'down' | 'equal') | null; + work_from_home_compliance_trend: ("up" | "down" | "equal") | null; avoid_crowds_compliance?: number | null; - avoid_crowds_compliance_trend: ('up' | 'down' | 'equal') | null; + avoid_crowds_compliance_trend: ("up" | "down" | "equal") | null; wear_mask_public_indoors_compliance?: number | null; - wear_mask_public_indoors_compliance_trend: ('up' | 'down' | 'equal') | null; + wear_mask_public_indoors_compliance_trend: ("up" | "down" | "equal") | null; sneeze_cough_elbow_compliance?: number | null; - sneeze_cough_elbow_compliance_trend: ('up' | 'down' | 'equal') | null; + sneeze_cough_elbow_compliance_trend: ("up" | "down" | "equal") | null; max_visitors_compliance?: number | null; - max_visitors_compliance_trend: ('up' | 'down' | 'equal') | null; + max_visitors_compliance_trend: ("up" | "down" | "equal") | null; ventilate_home_compliance?: number | null; - ventilate_home_compliance_trend: ('up' | 'down' | 'equal') | null; + ventilate_home_compliance_trend: ("up" | "down" | "equal") | null; selftest_visit_compliance?: number | null; - selftest_visit_compliance_trend: ('up' | 'down' | 'equal') | null; + selftest_visit_compliance_trend: ("up" | "down" | "equal") | null; curfew_support?: number | null; - curfew_support_trend: ('up' | 'down' | 'equal') | null; + curfew_support_trend: ("up" | "down" | "equal") | null; wash_hands_support?: number | null; - wash_hands_support_trend: ('up' | 'down' | 'equal') | null; + wash_hands_support_trend: ("up" | "down" | "equal") | null; keep_distance_support?: number | null; - keep_distance_support_trend: ('up' | 'down' | 'equal') | null; + keep_distance_support_trend: ("up" | "down" | "equal") | null; work_from_home_support?: number | null; - work_from_home_support_trend: ('up' | 'down' | 'equal') | null; + work_from_home_support_trend: ("up" | "down" | "equal") | null; avoid_crowds_support?: number | null; - avoid_crowds_support_trend: ('up' | 'down' | 'equal') | null; + avoid_crowds_support_trend: ("up" | "down" | "equal") | null; wear_mask_public_indoors_support?: number | null; - wear_mask_public_indoors_support_trend: ('up' | 'down' | 'equal') | null; + wear_mask_public_indoors_support_trend: ("up" | "down" | "equal") | null; sneeze_cough_elbow_support?: number | null; - sneeze_cough_elbow_support_trend: ('up' | 'down' | 'equal') | null; + sneeze_cough_elbow_support_trend: ("up" | "down" | "equal") | null; max_visitors_support?: number | null; - max_visitors_support_trend: ('up' | 'down' | 'equal') | null; + max_visitors_support_trend: ("up" | "down" | "equal") | null; ventilate_home_support?: number | null; - ventilate_home_support_trend: ('up' | 'down' | 'equal') | null; + ventilate_home_support_trend: ("up" | "down" | "equal") | null; selftest_visit_support?: number | null; - selftest_visit_support_trend: ('up' | 'down' | 'equal') | null; + selftest_visit_support_trend: ("up" | "down" | "equal") | null; date_start_unix: number; date_end_unix: number; date_of_insertion_unix: number; @@ -1612,7 +1613,7 @@ export interface VrVaccineCoveragePerAgeGroup { values: VrVaccineCoveragePerAgeGroupValue[]; } export interface VrVaccineCoveragePerAgeGroupValue { - age_group_range: '12+' | '18+' | '60+'; + age_group_range: "12+" | "18+" | "60+"; autumn_2022_vaccinated_percentage: number | null; fully_vaccinated_percentage: number | null; booster_shot_percentage: number | null; @@ -1627,7 +1628,7 @@ export interface VrVaccineCoveragePerAgeGroupArchived { values: VrVaccineCoveragePerAgeGroupArchivedValue[]; } export interface VrVaccineCoveragePerAgeGroupArchivedValue { - age_group_range: '12+' | '18+'; + age_group_range: "12+" | "18+"; fully_vaccinated_percentage: number | null; has_one_shot_percentage: number | null; birthyear_range: string; @@ -1640,7 +1641,7 @@ export interface VrVaccineCoveragePerAgeGroupArchived_20220908 { values: VrVaccineCoveragePerAgeGroupArchived_20220908Value[]; } export interface VrVaccineCoveragePerAgeGroupArchived_20220908Value { - age_group_range: '12+' | '18+'; + age_group_range: "12+" | "18+"; fully_vaccinated_percentage: number | null; booster_shot_percentage: number | null; has_one_shot_percentage: number | null; @@ -1655,14 +1656,14 @@ export interface VrBoosterCoverage { values: VrBoosterCoverageValue[]; } export interface VrBoosterCoverageValue { - age_group?: '12+' | '18+'; + age_group?: "12+" | "18+"; percentage: number; percentage_label: string | null; date_unix: number; date_of_insertion_unix: number; } -export type VrCollectionId = 'VR_COLLECTION'; +export type VrCollectionId = "VR_COLLECTION"; export interface VrCollection { last_generated: string; @@ -1715,41 +1716,41 @@ export interface VrCollectionBehavior { vrcode: string; number_of_participants: number; curfew_compliance?: number | null; - curfew_compliance_trend: ('up' | 'down' | 'equal') | null; + curfew_compliance_trend: ("up" | "down" | "equal") | null; wash_hands_compliance?: number | null; - wash_hands_compliance_trend: ('up' | 'down' | 'equal') | null; + wash_hands_compliance_trend: ("up" | "down" | "equal") | null; keep_distance_compliance?: number | null; - keep_distance_compliance_trend: ('up' | 'down' | 'equal') | null; + keep_distance_compliance_trend: ("up" | "down" | "equal") | null; work_from_home_compliance?: number | null; - work_from_home_compliance_trend: ('up' | 'down' | 'equal') | null; + work_from_home_compliance_trend: ("up" | "down" | "equal") | null; avoid_crowds_compliance?: number | null; - avoid_crowds_compliance_trend: ('up' | 'down' | 'equal') | null; + avoid_crowds_compliance_trend: ("up" | "down" | "equal") | null; wear_mask_public_indoors_compliance?: number | null; - wear_mask_public_indoors_compliance_trend: ('up' | 'down' | 'equal') | null; + wear_mask_public_indoors_compliance_trend: ("up" | "down" | "equal") | null; sneeze_cough_elbow_compliance?: number | null; - sneeze_cough_elbow_compliance_trend: ('up' | 'down' | 'equal') | null; + sneeze_cough_elbow_compliance_trend: ("up" | "down" | "equal") | null; max_visitors_compliance?: number | null; - max_visitors_compliance_trend: ('up' | 'down' | 'equal') | null; + max_visitors_compliance_trend: ("up" | "down" | "equal") | null; ventilate_home_compliance?: number | null; - ventilate_home_compliance_trend: ('up' | 'down' | 'equal') | null; + ventilate_home_compliance_trend: ("up" | "down" | "equal") | null; curfew_support?: number | null; - curfew_support_trend: ('up' | 'down' | 'equal') | null; + curfew_support_trend: ("up" | "down" | "equal") | null; wash_hands_support?: number | null; - wash_hands_support_trend: ('up' | 'down' | 'equal') | null; + wash_hands_support_trend: ("up" | "down" | "equal") | null; keep_distance_support?: number | null; - keep_distance_support_trend: ('up' | 'down' | 'equal') | null; + keep_distance_support_trend: ("up" | "down" | "equal") | null; work_from_home_support?: number | null; - work_from_home_support_trend: ('up' | 'down' | 'equal') | null; + work_from_home_support_trend: ("up" | "down" | "equal") | null; avoid_crowds_support?: number | null; - avoid_crowds_support_trend: ('up' | 'down' | 'equal') | null; + avoid_crowds_support_trend: ("up" | "down" | "equal") | null; wear_mask_public_indoors_support?: number | null; - wear_mask_public_indoors_support_trend: ('up' | 'down' | 'equal') | null; + wear_mask_public_indoors_support_trend: ("up" | "down" | "equal") | null; sneeze_cough_elbow_support?: number | null; - sneeze_cough_elbow_support_trend: ('up' | 'down' | 'equal') | null; + sneeze_cough_elbow_support_trend: ("up" | "down" | "equal") | null; max_visitors_support?: number | null; - max_visitors_support_trend: ('up' | 'down' | 'equal') | null; + max_visitors_support_trend: ("up" | "down" | "equal") | null; ventilate_home_support?: number | null; - ventilate_home_support_trend: ('up' | 'down' | 'equal') | null; + ventilate_home_support_trend: ("up" | "down" | "equal") | null; date_start_unix: number; date_end_unix: number; date_of_insertion_unix: number; @@ -1789,7 +1790,7 @@ export interface VrCollectionSituations { } export interface VrCollectionVaccineCoveragePerAgeGroup { vrcode: string; - age_group_range: '12+' | '18+' | '60+'; + age_group_range: "12+" | "18+" | "60+"; autumn_2022_vaccinated_percentage: number | null; fully_vaccinated_percentage: number | null; booster_shot_percentage: number | null; diff --git a/packages/icons/icons.md b/packages/icons/icons.md index 42055033bc..ede4332b51 100644 --- a/packages/icons/icons.md +++ b/packages/icons/icons.md @@ -35,6 +35,7 @@ See below an overview of all the available icons in this package. This file is g | Close |
    Close
    | | CloseThick |
    CloseThick
    | | ContactBeroepen |
    ContactBeroepen
    | +| Coronathermometer |
    Coronathermometer
    | | Coronavirus |
    Coronavirus
    | | Cross |
    Cross
    | | Database |
    Database
    | diff --git a/packages/icons/src/icon-name2filename.ts b/packages/icons/src/icon-name2filename.ts index 7380f4b364..37d0b3dc65 100644 --- a/packages/icons/src/icon-name2filename.ts +++ b/packages/icons/src/icon-name2filename.ts @@ -30,6 +30,7 @@ export type IconName = | 'Close' | 'CloseThick' | 'ContactBeroepen' + | 'Coronathermometer' | 'Coronavirus' | 'Cross' | 'Database' @@ -161,6 +162,7 @@ export const iconName2filename: Record = { Close: 'close.svg', CloseThick: 'close_thick.svg', ContactBeroepen: 'contact_beroepen.svg', + Coronathermometer: 'coronathermometer.svg', Coronavirus: 'coronavirus.svg', Cross: 'cross.svg', Database: 'database.svg', diff --git a/packages/icons/src/svg/coronathermometer.svg b/packages/icons/src/svg/coronathermometer.svg new file mode 100644 index 0000000000..bd516c336f --- /dev/null +++ b/packages/icons/src/svg/coronathermometer.svg @@ -0,0 +1,6 @@ + + + + + +