Skip to content

Commit

Permalink
[DEV-9731] Merge branch 'dev' into feature/DEV-9731
Browse files Browse the repository at this point in the history
  • Loading branch information
Atash3000 committed Jan 11, 2025
2 parents 9ce177c + af89954 commit d73623a
Show file tree
Hide file tree
Showing 23 changed files with 1,102 additions and 17 deletions.
1 change: 1 addition & 0 deletions packages/chart/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ReactDOM from 'react-dom/client'
import CdcChart from './CdcChartWrapper'
import './coreStyles_chart.scss'

import '@cdc/core/styles/cove-main.scss'
import 'react-tooltip/dist/react-tooltip.css'

let isEditor = window.location.href.includes('editor=true')
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/src/components/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Column = ({ data, rowIdx, colIdx }) => {
const handleTitle = config => {
if (!config) return
if (config.type === 'map') return config.general.title
if (config.type === 'markup-include') return config.contentEditor.title
if (config.type === 'markup-include') return config.contentEditor?.title
return config.title
}

Expand Down
1 change: 1 addition & 0 deletions packages/dashboard/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import ReactDOM from 'react-dom/client'

import MultiDashboardWrapper from './CdcDashboard'
import '@cdc/core/styles/cove-main.scss'
import './coreStyles_dashboard.scss'

let isEditor = window.location.href.includes('editor=true')
Expand Down
1 change: 1 addition & 0 deletions packages/data-bite/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import ReactDOM from 'react-dom/client'

import CdcDataBite from './CdcDataBite'
import '@cdc/core/styles/cove-main.scss'
import './coreStyles_databite.scss'

let isEditor = window.location.href.includes('editor=true')
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import ReactDOM from 'react-dom/client'

import CdcEditor from './CdcEditor'
import '@cdc/core/styles/cove-main.scss'
import './coreStyles_editor.scss'

// Allow URL query to preselect a tab in standalone mode
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/samples/valid-geo-point.csv
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Plano,-96.698883,33.019844,79
Portland,-122.658722,45.51223,80
Raleigh,-78.638176,35.779591,81
Reno,-119.813805,39.529633,82
Richmond,-77.43605,37.540726,83
"Richmond, Virginia",-77.43605,37.540726,83
Riverside,-117.375496,33.980602,84
Sacramento,-121.4944,38.581573,85
Saint Paul,-93.089958,44.953705,86
Expand Down
1 change: 1 addition & 0 deletions packages/filtered-text/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import ReactDOM from 'react-dom/client'

import CdcFilteredText from './CdcFilteredText'
import '@cdc/core/styles/cove-main.scss'
import './coreStyles_filteredtext.scss'

//@ts-ignore
Expand Down
4 changes: 2 additions & 2 deletions packages/map/examples/default-geocode.json
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@
"Value": 82
},
{
"City": "Richmond",
"City": "Richmond, Virginia",
"Longitude": "-77.43605",
"Latitude": "37.540726",
"Value": 83
Expand Down Expand Up @@ -811,4 +811,4 @@
"fullBorder": false,
"validated": 4.23,
"version": "4.24.11"
}
}
5 changes: 5 additions & 0 deletions packages/map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"@cdc/core": "^4.24.11",
"@emotion/core": "^10.0.28",
"@emotion/react": "^11.1.5",
"@googlemaps/markerclusterer": "^2.5.3",
"@hello-pangea/dnd": "^16.2.0",
"@react-google-maps/api": "^2.20.3",
"@visx/geo": "^1.13.0",
"chroma": "0.0.1",
"chroma-js": "^2.1.0",
Expand All @@ -38,9 +40,12 @@
"d3-zoom": "^3.0.0",
"html-react-parser": "^3.0.8",
"html2canvas": "^1.0.0-rc.7",
"leaflet": "^1.9.4",
"lodash.debounce": "^4.0.8",
"papaparse": "^5.3.0",
"react-accessible-accordion": "^3.0.1",
"react-leaflet": "^4.2.1",
"react-leaflet-markercluster": "^4.1.1",
"react-table": "^7.5.0",
"react-tag-autocomplete": "^6.0.0",
"react-tooltip": "5.8.2-beta.3",
Expand Down
4 changes: 3 additions & 1 deletion packages/map/src/CdcMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ import Modal from './components/Modal'
import NavigationMenu from './components/NavigationMenu'
import UsaMap from './components/UsaMap'
import WorldMap from './components/WorldMap'
import GoogleMap from './components/GoogleMap'

// Hooks
// hooks
import useTooltip from './hooks/useTooltip'
import useResizeObserver from './hooks/useResizeObserver'

Expand Down Expand Up @@ -1559,6 +1560,7 @@ const CdcMap = ({
{'us-county' === geoType && <UsaMap.County />}
{'world' === geoType && <WorldMap />}
{/* logo is handled in UsaMap.State when applicable */}
{'google-map' === geoType && <GoogleMap />}
{'data' === general.type && logo && ('us' !== geoType || 'us-geocode' === state.general.type) && (
<img src={logo} alt='' className='map-logo' style={{ maxWidth: '50px' }} />
)}
Expand Down
19 changes: 19 additions & 0 deletions packages/map/src/_stories/GoogleMap.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Meta, StoryObj } from '@storybook/react'
import CdcMap from '../CdcMap'
import googleMapConfig from './_mock/google-map.json'
import { editConfigKeys } from '@cdc/chart/src/helpers/configHelpers'

const meta: Meta<typeof CdcMap> = {
title: 'Components/Templates/Map',
component: CdcMap
}

type Story = StoryObj<typeof CdcMap>

export const Google_Map: Story = {
args: {
config: googleMapConfig
}
}

export default meta
Loading

0 comments on commit d73623a

Please sign in to comment.