@cdc/map 4.24.12 → 4.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdcmap.js +51010 -49337
- package/examples/annotation/index.json +1 -1
- package/examples/custom-map-layers.json +1 -1
- package/examples/default-geocode.json +2 -2
- package/examples/private/DEV-9989.json +229 -0
- package/examples/private/ardi.json +180 -0
- package/examples/private/colors 2.json +416 -0
- package/examples/private/colors.json +416 -0
- package/examples/private/colors.json.zip +0 -0
- package/examples/private/customColors.json +45348 -0
- package/examples/private/mmr.json +246 -0
- package/examples/private/test.json +1632 -0
- package/index.html +12 -14
- package/package.json +8 -3
- package/src/CdcMap.tsx +126 -394
- package/src/_stories/CdcMap.Legend.Gradient.stories.tsx +9 -0
- package/src/_stories/CdcMap.stories.tsx +1 -1
- package/src/_stories/GoogleMap.stories.tsx +19 -0
- package/src/_stories/_mock/DEV-10148.json +859 -0
- package/src/_stories/_mock/DEV-9989.json +229 -0
- package/src/_stories/_mock/example-city-state.json +1 -1
- package/src/_stories/_mock/google-map.json +819 -0
- package/src/components/Annotation/Annotation.Draggable.tsx +34 -43
- package/src/components/Annotation/AnnotationDropdown.tsx +4 -4
- package/src/components/CityList.tsx +2 -2
- package/src/components/DataTable.tsx +8 -9
- package/src/components/EditorPanel/components/EditorPanel.tsx +96 -270
- package/src/components/GoogleMap/components/GoogleMap.tsx +67 -0
- package/src/components/GoogleMap/index.tsx +3 -0
- package/src/components/Legend/components/Legend.tsx +40 -30
- package/src/components/Legend/components/LegendItem.Hex.tsx +7 -3
- package/src/components/Legend/components/index.scss +22 -16
- package/src/components/Modal.tsx +6 -5
- package/src/components/NavigationMenu.tsx +5 -4
- package/src/components/UsaMap/components/TerritoriesSection.tsx +56 -0
- package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +3 -3
- package/src/components/UsaMap/components/UsaMap.County.tsx +1 -1
- package/src/components/UsaMap/components/UsaMap.Region.tsx +12 -8
- package/src/components/UsaMap/components/UsaMap.SingleState.tsx +2 -2
- package/src/components/UsaMap/components/UsaMap.State.tsx +23 -29
- package/src/components/WorldMap/WorldMap.tsx +3 -5
- package/src/context.ts +0 -12
- package/src/data/initial-state.js +2 -2
- package/src/data/supported-geos.js +23 -3
- package/src/helpers/applyColorToLegend.ts +3 -3
- package/src/helpers/closeModal.ts +9 -0
- package/src/helpers/handleMapAriaLabels.ts +38 -0
- package/src/helpers/indexOfIgnoreType.ts +8 -0
- package/src/helpers/navigationHandler.ts +21 -0
- package/src/helpers/toTitleCase.ts +44 -0
- package/src/helpers/validateFipsCodeLength.ts +30 -0
- package/src/hooks/useResizeObserver.ts +42 -0
- package/src/hooks/useTooltip.ts +4 -2
- package/src/index.jsx +1 -0
- package/src/scss/editor-panel.scss +2 -1
- package/src/scss/filters.scss +0 -5
- package/src/scss/main.scss +57 -61
- package/src/scss/map.scss +1 -13
- package/src/types/MapConfig.ts +20 -11
- package/src/types/MapContext.ts +4 -12
package/src/types/MapContext.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { type MapConfig
|
|
1
|
+
import { type MapConfig } from './MapConfig'
|
|
2
|
+
import { type ViewPort } from '@cdc/core/types/ViewPort'
|
|
2
3
|
|
|
3
4
|
export type MapContext = {
|
|
4
5
|
applyLegendToRow
|
|
5
6
|
applyTooltipsToGeo
|
|
6
|
-
|
|
7
|
-
columnsInData
|
|
8
|
-
currentViewport: ViewportSize
|
|
7
|
+
currentViewport: ViewPort
|
|
9
8
|
data
|
|
10
9
|
displayDataAsText
|
|
11
10
|
displayGeoName
|
|
@@ -16,7 +15,6 @@ export type MapContext = {
|
|
|
16
15
|
handleCircleClick: Function
|
|
17
16
|
handleDragStateChange: Function
|
|
18
17
|
isDraggingAnnotation: boolean
|
|
19
|
-
handleMapAriaLabels
|
|
20
18
|
hasZoom
|
|
21
19
|
innerContainerRef
|
|
22
20
|
isDashboard
|
|
@@ -25,7 +23,6 @@ export type MapContext = {
|
|
|
25
23
|
isFilterValueSupported: boolean
|
|
26
24
|
loadConfig
|
|
27
25
|
logo: string
|
|
28
|
-
navigationHandler
|
|
29
26
|
position
|
|
30
27
|
resetLegendToggles
|
|
31
28
|
runtimeFilters
|
|
@@ -38,13 +35,8 @@ export type MapContext = {
|
|
|
38
35
|
setRuntimeFilters
|
|
39
36
|
setRuntimeLegend
|
|
40
37
|
setSharedFilterValue
|
|
41
|
-
setState
|
|
38
|
+
setState: (newState: MapConfig) => MapConfig
|
|
42
39
|
state: MapConfig
|
|
43
|
-
supportedCities
|
|
44
|
-
supportedCounties
|
|
45
|
-
supportedCountries
|
|
46
|
-
supportedTerritories
|
|
47
|
-
titleCase
|
|
48
40
|
viewport
|
|
49
41
|
setStateToShow: (string) => void
|
|
50
42
|
stateToShow: string
|