@cdc/map 4.24.12 → 4.25.2-25
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 +50119 -48822
- package/examples/annotation/index.json +1 -1
- package/examples/custom-map-layers.json +1 -1
- package/examples/default-geocode.json +2 -2
- package/examples/example-city-state.json +1 -1
- 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 -396
- package/src/_stories/CdcMap.Filters.stories.tsx +19 -0
- 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/_stories/_mock/wastewater-map.json +210 -206
- package/src/components/Annotation/Annotation.Draggable.tsx +34 -43
- package/src/components/Annotation/AnnotationDropdown.tsx +4 -4
- package/src/components/CityList.tsx +3 -9
- package/src/components/DataTable.tsx +8 -9
- package/src/components/EditorPanel/components/EditorPanel.tsx +255 -490
- 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 +4 -3
- package/src/components/UsaMap/components/TerritoriesSection.tsx +66 -0
- package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +15 -16
- 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/index.html
CHANGED
|
@@ -13,19 +13,13 @@
|
|
|
13
13
|
min-height: 100vh;
|
|
14
14
|
}
|
|
15
15
|
</style>
|
|
16
|
-
<link
|
|
17
|
-
rel="stylesheet prefetch"
|
|
18
|
-
href="https://www.cdc.gov/TemplatePackage/contrib/libs/bootstrap/latest/css/bootstrap.min.css?_=39423"
|
|
19
|
-
/>
|
|
20
|
-
<link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/4.0/assets/css/app.min.css?_=39423" />
|
|
16
|
+
<link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/5.0/css/app.min.css?_=71669" />
|
|
21
17
|
</head>
|
|
22
18
|
|
|
23
19
|
<body>
|
|
24
20
|
<!-- DEFAULT EXAMPLES -->
|
|
25
|
-
|
|
21
|
+
<div class="react-container" data-config="/examples/private/nhis.json"></div>
|
|
26
22
|
<!-- <div class="react-container" data-config="/examples/hex-colors.json"></div> -->
|
|
27
|
-
<!-- <div class="react-container" data-config="/examples/private/map.json"></div> -->
|
|
28
|
-
<!-- <div class="react-container" data-config="/examples/private/zika-issue.json"></div> -->
|
|
29
23
|
<!-- <div class="react-container react-container--maps" data-config="/examples/annotation/index.json">/</div> -->
|
|
30
24
|
|
|
31
25
|
<!-- <div class="react-container react-container--maps" data-config="/examples/private/tooltip-issue.json"></div> -->
|
|
@@ -34,9 +28,12 @@
|
|
|
34
28
|
<!-- <div class="react-container react-container--maps" data-config="/examples/private/map-text-wrap.json"></div> -->
|
|
35
29
|
<!-- <div class="react-container react-container--maps" data-config="/examples/private/tooltip-issue.json"></div> -->
|
|
36
30
|
<!-- <div class="react-container react-container--maps" data-config="/examples/test.json"></div> -->
|
|
37
|
-
|
|
31
|
+
<!-- <div class="react-container react-container--maps" data-config="/examples/default-usa-regions.json"></div> -->
|
|
38
32
|
<!-- <div class="react-container react-container--maps" data-config="/examples/default-usa.json"></div> -->
|
|
39
|
-
<!-- <div
|
|
33
|
+
<!-- <div
|
|
34
|
+
class="react-container react-container--maps"
|
|
35
|
+
data-config="https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/US-County-Level-Map.json"
|
|
36
|
+
></div> -->
|
|
40
37
|
<!-- <div class="react-container react-container--maps" data-config="/examples/default-geocode.json"></div> -->
|
|
41
38
|
<!-- <div class="react-container react-container--maps" data-config="/examples/default-single-state.json"></div> -->
|
|
42
39
|
<!-- <div class="react-container react-container--maps" data-config="/examples/bubble-us.json"></div> -->
|
|
@@ -46,17 +43,18 @@
|
|
|
46
43
|
<!-- <div class="react-container" data-config="/examples/private/wastewater.json"></div> -->
|
|
47
44
|
|
|
48
45
|
<!-- TP4 EXAMPLES -->
|
|
49
|
-
<!-- <div class="react-container react-container--maps" data-config="/examples/private/solr.json"></div> -->
|
|
50
46
|
<!-- <div class="react-container react-container--maps" data-config="/examples/custom-map-layers.json"></div> -->
|
|
51
|
-
<!-- <div class="react-container react-container--maps" data-config="/examples/example-city-stateBAD.json"></div> -->
|
|
52
47
|
<!-- <div class="react-container react-container--maps" data-config="/examples/private/world-map.json"></div> -->
|
|
53
48
|
<!-- <div class="react-container react-container--maps" data-config="/examples/default-hex.json"></div> -->
|
|
54
49
|
<!-- <div class="react-container react-container--maps" data-config="/examples/default-hex.json"></div> -->
|
|
55
50
|
<!-- <div class="react-container react-container--maps" data-config="/examples/hex-with-arrows.json"></div> -->
|
|
56
51
|
|
|
57
52
|
<!-- TP4 EXAMPLES -->
|
|
58
|
-
<div class="react-container react-container
|
|
59
|
-
<!-- <div
|
|
53
|
+
<div class="react-container react-container--maps" data-config="/examples/example-city-state.json"></div>
|
|
54
|
+
<!-- <div
|
|
55
|
+
class="react-container react-container--maps"
|
|
56
|
+
data-config="/examples/example-city-state-no-territories.json"
|
|
57
|
+
></div> -->
|
|
60
58
|
<!-- <div class="react-container react-container--maps" data-config="/examples/example-world-map.json"></div> -->
|
|
61
59
|
<!-- <div class="react-container react-container--maps" data-config="/examples/default-hex.json"></div> -->
|
|
62
60
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/map",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.2-25",
|
|
4
4
|
"description": "React component for visualizing tabular data on a map of the United States or the world.",
|
|
5
5
|
"moduleName": "CdcMap",
|
|
6
6
|
"main": "dist/cdcmap",
|
|
@@ -25,10 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@cdc/core": "^4.
|
|
28
|
+
"@cdc/core": "^4.25.2-25",
|
|
29
29
|
"@emotion/core": "^10.0.28",
|
|
30
30
|
"@emotion/react": "^11.1.5",
|
|
31
|
+
"@googlemaps/markerclusterer": "^2.5.3",
|
|
31
32
|
"@hello-pangea/dnd": "^16.2.0",
|
|
33
|
+
"@react-google-maps/api": "^2.20.3",
|
|
32
34
|
"@visx/geo": "^1.13.0",
|
|
33
35
|
"chroma": "0.0.1",
|
|
34
36
|
"chroma-js": "^2.1.0",
|
|
@@ -38,9 +40,12 @@
|
|
|
38
40
|
"d3-zoom": "^3.0.0",
|
|
39
41
|
"html-react-parser": "^3.0.8",
|
|
40
42
|
"html2canvas": "^1.0.0-rc.7",
|
|
43
|
+
"leaflet": "^1.9.4",
|
|
41
44
|
"lodash.debounce": "^4.0.8",
|
|
42
45
|
"papaparse": "^5.3.0",
|
|
43
46
|
"react-accessible-accordion": "^3.0.1",
|
|
47
|
+
"react-leaflet": "^4.2.1",
|
|
48
|
+
"react-leaflet-markercluster": "^4.1.1",
|
|
44
49
|
"react-table": "^7.5.0",
|
|
45
50
|
"react-tag-autocomplete": "^6.0.0",
|
|
46
51
|
"react-tooltip": "5.8.2-beta.3",
|
|
@@ -52,5 +57,5 @@
|
|
|
52
57
|
"react": "^18.2.0",
|
|
53
58
|
"react-dom": "^18.2.0"
|
|
54
59
|
},
|
|
55
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f00bd8a0fc746def7cc23b91ef49a03a3ceac65e"
|
|
56
61
|
}
|