@cdc/map 4.25.7 → 4.25.10
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/.claude/settings.local.json +30 -0
- package/CLAUDE.local.md +0 -0
- package/dist/cdcmap.js +54785 -53159
- package/examples/private/c.json +290 -0
- package/examples/private/canvas-city-hover.json +787 -0
- package/examples/private/d.json +345 -0
- package/examples/private/filter-map.json +909 -0
- package/examples/private/g.json +1 -0
- package/examples/private/h.json +105911 -0
- package/examples/private/measles-data.json +378 -0
- package/examples/private/measles.json +211 -0
- package/examples/private/north-dakota.json +1132 -0
- package/examples/private/rsv-data.json +532 -0
- package/examples/private/state-with-pattern.json +883 -0
- package/examples/private/test.json +222 -640
- package/index.html +1 -1
- package/package.json +26 -5
- package/src/CdcMap.tsx +28 -8
- package/src/CdcMapComponent.tsx +230 -306
- package/src/_stories/CdcMap.Filters.stories.tsx +2 -2
- package/src/_stories/CdcMap.Legend.Gradient.stories.tsx +3 -3
- package/src/_stories/CdcMap.Legend.stories.tsx +7 -4
- package/src/_stories/CdcMap.Patterns.stories.tsx +2 -2
- package/src/_stories/CdcMap.Table.stories.tsx +2 -2
- package/src/_stories/CdcMap.stories.tsx +18 -11
- package/src/_stories/GoogleMap.stories.tsx +2 -2
- package/src/_stories/UsaMap.NoData.stories.tsx +2 -2
- package/src/_stories/_mock/equal-number.json +1109 -0
- package/src/_stories/_mock/multi-state.json +21389 -0
- package/src/_stories/_mock/us-bubble-cities.json +306 -0
- package/src/components/BubbleList.tsx +16 -12
- package/src/components/CityList.tsx +88 -110
- package/src/components/DataTable.tsx +44 -12
- package/src/components/EditorPanel/components/EditorPanel.tsx +201 -203
- package/src/components/EditorPanel/components/HexShapeSettings.tsx +3 -2
- package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +7 -5
- package/src/components/Geo.tsx +2 -0
- package/src/components/Legend/components/Legend.tsx +117 -93
- package/src/components/Legend/components/LegendGroup/Legend.Group.tsx +10 -7
- package/src/components/MapContainer.tsx +52 -0
- package/src/components/MapControls.tsx +44 -0
- package/src/components/Modal.tsx +2 -8
- package/src/components/NavigationMenu.tsx +13 -1
- package/src/components/UsaMap/components/SingleState/SingleState.CountyOutput.tsx +24 -7
- package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +21 -15
- package/src/components/UsaMap/components/TerritoriesSection.tsx +2 -2
- package/src/components/UsaMap/components/UsaMap.County.tsx +112 -33
- package/src/components/UsaMap/components/UsaMap.Region.tsx +23 -5
- package/src/components/UsaMap/components/UsaMap.SingleState.tsx +38 -26
- package/src/components/UsaMap/components/UsaMap.State.tsx +28 -10
- package/src/components/UsaMap/helpers/map.ts +16 -8
- package/src/components/WorldMap/WorldMap.tsx +116 -11
- package/src/components/ZoomControls.tsx +6 -9
- package/src/context/LegendMemoContext.tsx +30 -0
- package/src/context.ts +1 -39
- package/src/data/initial-state.js +143 -128
- package/src/data/supported-geos.js +202 -4
- package/src/helpers/addUIDs.ts +8 -8
- package/src/helpers/applyColorToLegend.ts +122 -45
- package/src/helpers/applyLegendToRow.ts +15 -13
- package/src/helpers/componentHelpers.ts +8 -0
- package/src/helpers/constants.ts +12 -0
- package/src/helpers/dataTableHelpers.ts +6 -0
- package/src/helpers/displayGeoName.ts +12 -7
- package/src/helpers/formatLegendLocation.ts +1 -3
- package/src/helpers/generateRuntimeLegend.ts +192 -340
- package/src/helpers/generateRuntimeLegendHash.ts +4 -2
- package/src/helpers/getColumnNames.ts +1 -1
- package/src/helpers/getPatternForRow.ts +36 -0
- package/src/helpers/getStatesPicked.ts +14 -0
- package/src/helpers/handleMapAriaLabels.ts +2 -2
- package/src/helpers/index.ts +11 -3
- package/src/helpers/isLegendItemDisabled.ts +16 -0
- package/src/helpers/mapObserverHelpers.ts +40 -0
- package/src/helpers/resetLegendToggles.ts +3 -2
- package/src/helpers/toggleLegendActive.ts +6 -11
- package/src/helpers/urlDataHelpers.ts +70 -0
- package/src/hooks/useGeoClickHandler.ts +35 -1
- package/src/hooks/useLegendMemo.ts +17 -0
- package/src/hooks/useMapLayers.tsx +5 -4
- package/src/hooks/useStateZoom.tsx +137 -88
- package/src/hooks/useTooltip.ts +1 -2
- package/src/index.jsx +6 -3
- package/src/scss/main.scss +23 -12
- package/src/store/map.actions.ts +2 -2
- package/src/store/map.reducer.ts +21 -10
- package/src/test/CdcMap.test.jsx +11 -0
- package/src/types/MapConfig.ts +25 -17
- package/src/types/MapContext.ts +2 -8
- package/src/types/runtimeLegend.ts +12 -10
- package/vite.config.js +2 -7
- package/vitest.config.ts +16 -0
- package/src/_stories/_mock/floating-point.json +0 -427
- package/src/coreStyles_map.scss +0 -3
- package/src/helpers/colorDistributions.ts +0 -12
- package/src/helpers/generateColorsArray.ts +0 -14
- package/src/helpers/getStatePicked.ts +0 -8
- package/src/helpers/tests/generateColorsArray.test.ts +0 -18
- package/src/helpers/tests/generateRuntimeLegendHash.test.ts +0 -11
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": [],
|
|
3
|
+
"general": {
|
|
4
|
+
"navigationTarget": "_self",
|
|
5
|
+
"noStateFoundMessage": "Map Unavailable",
|
|
6
|
+
"annotationDropdownText": "Annotations",
|
|
7
|
+
"geoBorderColor": "darkGray",
|
|
8
|
+
"headerColor": "theme-blue",
|
|
9
|
+
"title": "",
|
|
10
|
+
"showTitle": true,
|
|
11
|
+
"showSidebar": true,
|
|
12
|
+
"showDownloadMediaButton": false,
|
|
13
|
+
"displayAsHex": false,
|
|
14
|
+
"displayStateLabels": false,
|
|
15
|
+
"territoriesAlwaysShow": false,
|
|
16
|
+
"language": "en",
|
|
17
|
+
"geoType": "us-county",
|
|
18
|
+
"geoLabelOverride": "Sewershed",
|
|
19
|
+
"hasRegions": false,
|
|
20
|
+
"fullBorder": false,
|
|
21
|
+
"type": "us-geocode",
|
|
22
|
+
"convertFipsCodes": true,
|
|
23
|
+
"palette": {
|
|
24
|
+
"isReversed": false
|
|
25
|
+
},
|
|
26
|
+
"allowMapZoom": false,
|
|
27
|
+
"hideGeoColumnInTooltip": false,
|
|
28
|
+
"hidePrimaryColumnInTooltip": false,
|
|
29
|
+
"statesPicked": [
|
|
30
|
+
{
|
|
31
|
+
"fipsCode": "01",
|
|
32
|
+
"stateName": "Alabama"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"expandDataTable": false,
|
|
36
|
+
"introText": "",
|
|
37
|
+
"subtext": "<div class=\"text-left ml-3 pb-3\" >\nWastewater measles data available on this site may not represent all jurisdictions currently conducting monitoring. Some states and local health departments may publish additional data on their own webpages. CDC continues to work closely with partners to integrate these data into national reporting.\n\nFor Utah, please visit: <a href=\"https://avrpublic.dhhs.utah.gov/uwss/\">Utah Department of Health and Human Services</a>.\n</div>\n\n<div class=\"text-left ml-3 pb-3\">Data <span class=\"date\">FromDB</span></div>\n<p class=\"float-right\"><a href=\"/wcms/vizdata/NCEZID_DIDRI/measles/nwssmeaslessitemapnocoords.csv\">Download Data</a></p>",
|
|
38
|
+
"footnotes": ""
|
|
39
|
+
},
|
|
40
|
+
"type": "map",
|
|
41
|
+
"color": "pinkpurple",
|
|
42
|
+
"columns": {
|
|
43
|
+
"geo": {
|
|
44
|
+
"name": "Sewershed",
|
|
45
|
+
"label": "Location",
|
|
46
|
+
"tooltip": false,
|
|
47
|
+
"dataTable": true
|
|
48
|
+
},
|
|
49
|
+
"primary": {
|
|
50
|
+
"dataTable": true,
|
|
51
|
+
"tooltip": true,
|
|
52
|
+
"prefix": "",
|
|
53
|
+
"suffix": "",
|
|
54
|
+
"name": "Detection_Category",
|
|
55
|
+
"label": "Detection Category",
|
|
56
|
+
"roundToPlace": 0
|
|
57
|
+
},
|
|
58
|
+
"navigate": {
|
|
59
|
+
"name": ""
|
|
60
|
+
},
|
|
61
|
+
"latitude": {
|
|
62
|
+
"name": "Latitude"
|
|
63
|
+
},
|
|
64
|
+
"longitude": {
|
|
65
|
+
"name": "Longitude"
|
|
66
|
+
},
|
|
67
|
+
"additionalColumn1": {
|
|
68
|
+
"label": "State/Territory",
|
|
69
|
+
"dataTable": true,
|
|
70
|
+
"tooltips": false,
|
|
71
|
+
"prefix": "",
|
|
72
|
+
"suffix": "",
|
|
73
|
+
"name": "State/Territory",
|
|
74
|
+
"tooltip": true
|
|
75
|
+
},
|
|
76
|
+
"additionalColumn2": {
|
|
77
|
+
"label": "Counties Served",
|
|
78
|
+
"dataTable": true,
|
|
79
|
+
"tooltips": false,
|
|
80
|
+
"prefix": "",
|
|
81
|
+
"suffix": "",
|
|
82
|
+
"name": "Counties_Served",
|
|
83
|
+
"tooltip": true
|
|
84
|
+
},
|
|
85
|
+
"additionalColumn4": {
|
|
86
|
+
"label": "Population Served",
|
|
87
|
+
"dataTable": true,
|
|
88
|
+
"tooltips": false,
|
|
89
|
+
"prefix": "",
|
|
90
|
+
"suffix": "",
|
|
91
|
+
"name": "Population_Served",
|
|
92
|
+
"useCommas": true,
|
|
93
|
+
"tooltip": true
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"legend": {
|
|
97
|
+
"descriptions": {},
|
|
98
|
+
"specialClasses": [],
|
|
99
|
+
"unified": false,
|
|
100
|
+
"singleColumn": false,
|
|
101
|
+
"singleRow": true,
|
|
102
|
+
"verticalSorted": false,
|
|
103
|
+
"showSpecialClassesLast": false,
|
|
104
|
+
"dynamicDescription": false,
|
|
105
|
+
"type": "category",
|
|
106
|
+
"numberOfItems": 3,
|
|
107
|
+
"position": "bottom",
|
|
108
|
+
"title": "Select a detection type below to add or remove it from the map.",
|
|
109
|
+
"style": "circles",
|
|
110
|
+
"subStyle": "linear blocks",
|
|
111
|
+
"tickRotation": "",
|
|
112
|
+
"singleColumnLegend": false,
|
|
113
|
+
"hideBorder": false,
|
|
114
|
+
"groupBy": "",
|
|
115
|
+
"categoryValuesOrder": [
|
|
116
|
+
"Detection",
|
|
117
|
+
"No Detection",
|
|
118
|
+
"No Data",
|
|
119
|
+
"H5 Detection",
|
|
120
|
+
"No Samples in Last Week"
|
|
121
|
+
],
|
|
122
|
+
"additionalCategories": [
|
|
123
|
+
"Detection",
|
|
124
|
+
""
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"filters": [],
|
|
128
|
+
"table": {
|
|
129
|
+
"wrapColumns": false,
|
|
130
|
+
"label": "Data Table",
|
|
131
|
+
"expanded": false,
|
|
132
|
+
"limitHeight": false,
|
|
133
|
+
"height": "",
|
|
134
|
+
"caption": "",
|
|
135
|
+
"showDownloadUrl": false,
|
|
136
|
+
"showDataTableLink": true,
|
|
137
|
+
"showDownloadLinkBelow": false,
|
|
138
|
+
"showFullGeoNameInCSV": false,
|
|
139
|
+
"forceDisplay": true,
|
|
140
|
+
"download": false,
|
|
141
|
+
"indexLabel": "Sewershed",
|
|
142
|
+
"cellMinWidth": "0",
|
|
143
|
+
"collapsible": true
|
|
144
|
+
},
|
|
145
|
+
"tooltips": {
|
|
146
|
+
"appearanceType": "hover",
|
|
147
|
+
"linkLabel": "Learn More",
|
|
148
|
+
"opacity": 90,
|
|
149
|
+
"capitalizeLabels": true
|
|
150
|
+
},
|
|
151
|
+
"visual": {
|
|
152
|
+
"minBubbleSize": 1,
|
|
153
|
+
"maxBubbleSize": 20,
|
|
154
|
+
"extraBubbleBorder": false,
|
|
155
|
+
"cityStyle": "circle",
|
|
156
|
+
"cityStyleLabel": "",
|
|
157
|
+
"showBubbleZeros": false,
|
|
158
|
+
"additionalCityStyles": [],
|
|
159
|
+
"geoCodeCircleSize": "5"
|
|
160
|
+
},
|
|
161
|
+
"mapPosition": {
|
|
162
|
+
"coordinates": [
|
|
163
|
+
0,
|
|
164
|
+
30
|
|
165
|
+
],
|
|
166
|
+
"zoom": 1
|
|
167
|
+
},
|
|
168
|
+
"map": {
|
|
169
|
+
"layers": [],
|
|
170
|
+
"patterns": []
|
|
171
|
+
},
|
|
172
|
+
"hexMap": {
|
|
173
|
+
"type": "",
|
|
174
|
+
"shapeGroups": [
|
|
175
|
+
{
|
|
176
|
+
"legendTitle": "",
|
|
177
|
+
"legendDescription": "",
|
|
178
|
+
"items": [
|
|
179
|
+
{
|
|
180
|
+
"key": "",
|
|
181
|
+
"shape": "Arrow Up",
|
|
182
|
+
"column": "",
|
|
183
|
+
"operator": "=",
|
|
184
|
+
"value": ""
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"filterBehavior": "Filter Change",
|
|
191
|
+
"filterIntro": "",
|
|
192
|
+
"dataFileName": "/wcms/vizdata/NCEZID_DIDRI/measles/nwssmeaslessitemap.json",
|
|
193
|
+
"dataFileSourceType": "url",
|
|
194
|
+
"dataDescription": {
|
|
195
|
+
"horizontal": false,
|
|
196
|
+
"series": false
|
|
197
|
+
},
|
|
198
|
+
"version": "4.25.8",
|
|
199
|
+
"dataUrl": "/examples/private/measles-data.json",
|
|
200
|
+
"migrations": {
|
|
201
|
+
"addColorMigration": true
|
|
202
|
+
},
|
|
203
|
+
"customColors": [
|
|
204
|
+
"#6b0057",
|
|
205
|
+
"#6b0057",
|
|
206
|
+
"#6b0057",
|
|
207
|
+
"#5bc2b9",
|
|
208
|
+
"#e0e0e0",
|
|
209
|
+
"#e0e0e0"
|
|
210
|
+
]
|
|
211
|
+
}
|