@cdc/map 4.26.2 → 4.26.4
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/CONFIG.md +235 -0
- package/README.md +70 -24
- package/dist/cdcmap-CY9IcPSi.es.js +6 -0
- package/dist/cdcmap-DlpiY3fQ.es.js +4 -0
- package/dist/cdcmap.js +31260 -27946
- package/examples/{testing-layer-2.json → __data__/testing-layer-2.json} +1 -1
- package/examples/{testing-layer.json → __data__/testing-layer.json} +1 -1
- package/examples/county-hsa-toggle.json +51993 -0
- package/examples/custom-map-layers.json +2 -2
- package/examples/default-county.json +3 -3
- package/examples/minimal-example.json +69 -0
- package/examples/private/annotation-bug.json +642 -0
- package/examples/private/css-issue.json +314 -0
- package/examples/private/region-breaking.json +1639 -0
- package/examples/private/test1.json +27247 -0
- package/package.json +4 -4
- package/src/CdcMap.tsx +3 -14
- package/src/CdcMapComponent.tsx +302 -164
- package/src/_stories/CdcMap.Defaults.smoke.stories.tsx +76 -0
- package/src/_stories/CdcMap.Editor.ColumnsSectionTests.stories.tsx +601 -0
- package/src/_stories/CdcMap.Editor.DataTableSectionTests.stories.tsx +404 -0
- package/src/_stories/CdcMap.Editor.FiltersSectionTests.stories.tsx +229 -0
- package/src/_stories/CdcMap.Editor.GeneralSectionTests.stories.tsx +262 -0
- package/src/_stories/CdcMap.Editor.LegendSectionTests.stories.tsx +541 -0
- package/src/_stories/CdcMap.Editor.MultiCountryWorldMapTests.stories.tsx +359 -0
- package/src/_stories/CdcMap.Editor.PatternSettingsSectionTests.stories.tsx +516 -0
- package/src/_stories/CdcMap.Editor.SmallMultiplesSectionTests.stories.tsx +165 -0
- package/src/_stories/CdcMap.Editor.TextAnnotationsSectionTests.stories.tsx +145 -0
- package/src/_stories/CdcMap.Editor.TypeSectionTests.stories.tsx +312 -0
- package/src/_stories/CdcMap.Editor.VisualSectionTests.stories.tsx +359 -0
- package/src/_stories/CdcMap.Editor.ZoomControlsTests.stories.tsx +88 -0
- package/src/_stories/{CdcMap.stories.tsx → CdcMap.smoke.stories.tsx} +23 -1
- package/src/_stories/Map.HTMLInDataTable.stories.tsx +385 -0
- package/src/_stories/_mock/legends/legend-tests.json +3 -3
- package/src/_stories/_mock/multi-state-show-unselected.json +82 -0
- package/src/cdcMapComponent.styles.css +2 -2
- package/src/components/Annotation/Annotation.Draggable.styles.css +4 -4
- package/src/components/Annotation/AnnotationDropdown.styles.css +1 -1
- package/src/components/Annotation/AnnotationList.styles.css +13 -13
- package/src/components/Annotation/AnnotationList.tsx +1 -1
- package/src/components/EditorPanel/components/EditorPanel.tsx +905 -416
- package/src/components/EditorPanel/components/HexShapeSettings.tsx +1 -1
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +112 -117
- package/src/components/EditorPanel/components/Panels/Panel.PatternSettings-style.css +1 -1
- package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +31 -15
- package/src/components/EditorPanel/components/editorPanel.styles.css +55 -25
- package/src/components/Legend/components/Legend.tsx +12 -7
- package/src/components/Legend/components/LegendGroup/legend.group.css +5 -5
- package/src/components/Legend/components/LegendItem.Hex.tsx +4 -2
- package/src/components/Legend/components/index.scss +2 -3
- package/src/components/NavigationMenu.tsx +2 -1
- package/src/components/SmallMultiples/SmallMultiples.css +5 -5
- package/src/components/SmallMultiples/SynchronizedTooltip.tsx +1 -1
- package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +32 -17
- package/src/components/UsaMap/components/TerritoriesSection.tsx +3 -2
- package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +13 -8
- package/src/components/UsaMap/components/UsaMap.County.tsx +629 -231
- package/src/components/UsaMap/components/UsaMap.Region.styles.css +1 -1
- package/src/components/UsaMap/components/UsaMap.SingleState.styles.css +2 -2
- package/src/components/UsaMap/components/UsaMap.State.tsx +14 -9
- package/src/components/UsaMap/data/cb_2019_us_county_20m.json +75817 -1
- package/src/components/UsaMap/data/hsa_fips_mapping.json +3144 -0
- package/src/components/WorldMap/WorldMap.tsx +10 -13
- package/src/components/WorldMap/data/world-topo-updated.json +1 -0
- package/src/components/WorldMap/data/world-topo.json +1 -1
- package/src/components/WorldMap/worldMap.styles.css +1 -1
- package/src/components/ZoomControls.tsx +49 -18
- package/src/components/zoomControls.styles.css +27 -11
- package/src/data/initial-state.js +15 -5
- package/src/data/legacy-defaults.ts +8 -0
- package/src/data/supported-counties.json +1 -1
- package/src/data/supported-geos.js +19 -0
- package/src/helpers/colors.ts +2 -1
- package/src/helpers/countyTerritories.ts +38 -0
- package/src/helpers/dataTableHelpers.ts +85 -0
- package/src/helpers/displayGeoName.ts +19 -11
- package/src/helpers/getMapContainerClasses.ts +8 -2
- package/src/helpers/getMatchingPatternForRow.ts +67 -0
- package/src/helpers/getPatternForRow.ts +11 -18
- package/src/helpers/tests/countyTerritories.test.ts +87 -0
- package/src/helpers/tests/dataTableHelpers.test.ts +78 -0
- package/src/helpers/tests/displayGeoName.test.ts +17 -0
- package/src/helpers/tests/getMatchingPatternForRow.test.ts +150 -0
- package/src/helpers/tests/getPatternForRow.test.ts +140 -2
- package/src/helpers/urlDataHelpers.ts +7 -1
- package/src/hooks/useApplyTooltipsToGeo.tsx +7 -4
- package/src/hooks/useMapLayers.tsx +1 -1
- package/src/hooks/useResizeObserver.ts +36 -22
- package/src/hooks/useTooltip.test.tsx +64 -0
- package/src/hooks/useTooltip.ts +46 -15
- package/src/scss/editor-panel.scss +1 -1
- package/src/scss/main.scss +140 -6
- package/src/scss/map.scss +9 -4
- package/src/store/map.actions.ts +5 -0
- package/src/store/map.reducer.ts +13 -0
- package/src/test/CdcMap.test.jsx +26 -2
- package/src/types/MapConfig.ts +28 -4
- package/src/types/MapContext.ts +5 -1
- package/topojson-updater/README.txt +1 -1
- package/dist/cdcmap-Cf9_fbQf.es.js +0 -6
- package/examples/__data__/city-state-data.json +0 -668
- package/examples/city-state.json +0 -434
- package/examples/default-world-data.json +0 -1450
- package/examples/new-cities.json +0 -656
- package/src/_stories/CdcMap.Editor.stories.tsx +0 -3475
- package/src/helpers/componentHelpers.ts +0 -8
- package/topojson-updater/package-lock.json +0 -223
- /package/src/_stories/{CdcMap.ColumnWrap.stories.tsx → CdcMap.ColumnWrap.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.DistrictOfColumbia.stories.tsx → CdcMap.DistrictOfColumbia.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Filters.stories.tsx → CdcMap.Filters.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Legend.Gradient.stories.tsx → CdcMap.Legend.Gradient.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Legend.stories.tsx → CdcMap.Legend.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Patterns.stories.tsx → CdcMap.Patterns.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.SmallMultiples.stories.tsx → CdcMap.SmallMultiples.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Table.stories.tsx → CdcMap.Table.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.ZeroColor.stories.tsx → CdcMap.ZeroColor.smoke.stories.tsx} +0 -0
- /package/src/_stories/{GoogleMap.stories.tsx → GoogleMap.smoke.stories.tsx} +0 -0
- /package/src/_stories/{UsaMap.NoData.stories.tsx → UsaMap.NoData.smoke.stories.tsx} +0 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": [],
|
|
3
|
+
"general": {
|
|
4
|
+
"navigationTarget": "_self",
|
|
5
|
+
"noDataMessage": "No State Selected",
|
|
6
|
+
"annotationDropdownText": "Annotations",
|
|
7
|
+
"geoBorderColor": "darkGray",
|
|
8
|
+
"headerColor": "theme-blue",
|
|
9
|
+
"title": "",
|
|
10
|
+
"showTitle": true,
|
|
11
|
+
"titleStyle": "small",
|
|
12
|
+
"showSidebar": true,
|
|
13
|
+
"showDownloadMediaButton": false,
|
|
14
|
+
"displayAsHex": false,
|
|
15
|
+
"displayStateLabels": false,
|
|
16
|
+
"territoriesAlwaysShow": false,
|
|
17
|
+
"language": "en",
|
|
18
|
+
"geoType": "us-county",
|
|
19
|
+
"geoLabelOverride": "Sewershed",
|
|
20
|
+
"hasRegions": false,
|
|
21
|
+
"fullBorder": false,
|
|
22
|
+
"type": "us-geocode",
|
|
23
|
+
"convertFipsCodes": true,
|
|
24
|
+
"palette": {
|
|
25
|
+
"isReversed": false,
|
|
26
|
+
"name": "sequential_pink_purple",
|
|
27
|
+
"version": "1.0",
|
|
28
|
+
"customColors": [
|
|
29
|
+
"#6b0057",
|
|
30
|
+
"#6b0057",
|
|
31
|
+
"#6b0057",
|
|
32
|
+
"#5bc2b9",
|
|
33
|
+
"#e0e0e0",
|
|
34
|
+
"#e0e0e0"
|
|
35
|
+
],
|
|
36
|
+
"backups": [
|
|
37
|
+
{
|
|
38
|
+
"name": "sequential_pink_purple",
|
|
39
|
+
"version": "1.0",
|
|
40
|
+
"isReversed": false
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "sequential_pink_purple",
|
|
44
|
+
"version": "1.0",
|
|
45
|
+
"isReversed": false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "sequential_pink_purple",
|
|
49
|
+
"version": "1.0",
|
|
50
|
+
"isReversed": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "sequential_pink_purple",
|
|
54
|
+
"version": "1.0",
|
|
55
|
+
"isReversed": false
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "sequential_pink_purple",
|
|
59
|
+
"version": "1.0",
|
|
60
|
+
"isReversed": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "sequential_pink_purple",
|
|
64
|
+
"version": "1.0",
|
|
65
|
+
"isReversed": false
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "sequential_pink_purple",
|
|
69
|
+
"version": "1.0",
|
|
70
|
+
"isReversed": false
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "sequential_pink_purple",
|
|
74
|
+
"version": "1.0",
|
|
75
|
+
"isReversed": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "sequential_pink_purple",
|
|
79
|
+
"version": "1.0",
|
|
80
|
+
"isReversed": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "sequential_pink_purple",
|
|
84
|
+
"version": "1.0",
|
|
85
|
+
"isReversed": false
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "sequential_pink_purple",
|
|
89
|
+
"version": "1.0",
|
|
90
|
+
"isReversed": false
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "sequential_pink_purple",
|
|
94
|
+
"version": "1.0",
|
|
95
|
+
"isReversed": false
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"allowMapZoom": false,
|
|
100
|
+
"hideGeoColumnInTooltip": true,
|
|
101
|
+
"hidePrimaryColumnInTooltip": false,
|
|
102
|
+
"hideUnselectedStates": true,
|
|
103
|
+
"statesPicked": [
|
|
104
|
+
{
|
|
105
|
+
"fipsCode": "01",
|
|
106
|
+
"stateName": "Alabama"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"expandDataTable": false,
|
|
110
|
+
"introText": "",
|
|
111
|
+
"subtext": "",
|
|
112
|
+
"footnotes": ""
|
|
113
|
+
},
|
|
114
|
+
"type": "map",
|
|
115
|
+
"columns": {
|
|
116
|
+
"geo": {
|
|
117
|
+
"name": "Sewershed",
|
|
118
|
+
"label": "Location",
|
|
119
|
+
"tooltip": false,
|
|
120
|
+
"dataTable": true,
|
|
121
|
+
"displayColumn": "Sewershed"
|
|
122
|
+
},
|
|
123
|
+
"primary": {
|
|
124
|
+
"dataTable": true,
|
|
125
|
+
"tooltip": true,
|
|
126
|
+
"prefix": "",
|
|
127
|
+
"suffix": "",
|
|
128
|
+
"name": "Detection_Category",
|
|
129
|
+
"label": "Detection Category",
|
|
130
|
+
"roundToPlace": 0
|
|
131
|
+
},
|
|
132
|
+
"navigate": {
|
|
133
|
+
"name": ""
|
|
134
|
+
},
|
|
135
|
+
"latitude": {
|
|
136
|
+
"name": "Latitude"
|
|
137
|
+
},
|
|
138
|
+
"longitude": {
|
|
139
|
+
"name": "Longitude"
|
|
140
|
+
},
|
|
141
|
+
"additionalColumn1": {
|
|
142
|
+
"label": "State/Territory",
|
|
143
|
+
"dataTable": true,
|
|
144
|
+
"tooltips": false,
|
|
145
|
+
"prefix": "",
|
|
146
|
+
"suffix": "",
|
|
147
|
+
"name": "State/Territory",
|
|
148
|
+
"tooltip": true
|
|
149
|
+
},
|
|
150
|
+
"additionalColumn2": {
|
|
151
|
+
"label": "Counties Served",
|
|
152
|
+
"dataTable": true,
|
|
153
|
+
"tooltips": false,
|
|
154
|
+
"prefix": "",
|
|
155
|
+
"suffix": "",
|
|
156
|
+
"name": "Counties_Served",
|
|
157
|
+
"tooltip": true
|
|
158
|
+
},
|
|
159
|
+
"additionalColumn4": {
|
|
160
|
+
"label": "Detection Category",
|
|
161
|
+
"dataTable": false,
|
|
162
|
+
"tooltips": false,
|
|
163
|
+
"prefix": "",
|
|
164
|
+
"suffix": "",
|
|
165
|
+
"name": "Detection_Category",
|
|
166
|
+
"useCommas": false,
|
|
167
|
+
"tooltip": false
|
|
168
|
+
},
|
|
169
|
+
"additionalColumn5": {
|
|
170
|
+
"label": "Population Served",
|
|
171
|
+
"dataTable": true,
|
|
172
|
+
"tooltips": false,
|
|
173
|
+
"prefix": "",
|
|
174
|
+
"suffix": "",
|
|
175
|
+
"name": "Population_Served",
|
|
176
|
+
"tooltip": true,
|
|
177
|
+
"useCommas": true
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"legend": {
|
|
181
|
+
"descriptions": {},
|
|
182
|
+
"specialClasses": [],
|
|
183
|
+
"unified": false,
|
|
184
|
+
"singleColumn": false,
|
|
185
|
+
"singleRow": true,
|
|
186
|
+
"verticalSorted": false,
|
|
187
|
+
"showSpecialClassesLast": false,
|
|
188
|
+
"dynamicDescription": false,
|
|
189
|
+
"type": "category",
|
|
190
|
+
"numberOfItems": 3,
|
|
191
|
+
"position": "bottom",
|
|
192
|
+
"title": "Measles Detection Status",
|
|
193
|
+
"style": "circles",
|
|
194
|
+
"subStyle": "linear blocks",
|
|
195
|
+
"tickRotation": "",
|
|
196
|
+
"singleColumnLegend": false,
|
|
197
|
+
"hideBorder": false,
|
|
198
|
+
"groupBy": "",
|
|
199
|
+
"categoryValuesOrder": [
|
|
200
|
+
"Detection",
|
|
201
|
+
"No Detection",
|
|
202
|
+
"No Data",
|
|
203
|
+
"H5 Detection",
|
|
204
|
+
"No Samples in Last Week"
|
|
205
|
+
],
|
|
206
|
+
"additionalCategories": [
|
|
207
|
+
"Detection",
|
|
208
|
+
""
|
|
209
|
+
],
|
|
210
|
+
"description": "Select a detection type below to add or remove it from the map."
|
|
211
|
+
},
|
|
212
|
+
"filters": [],
|
|
213
|
+
"table": {
|
|
214
|
+
"wrapColumns": true,
|
|
215
|
+
"label": "Data Table",
|
|
216
|
+
"expanded": false,
|
|
217
|
+
"limitHeight": true,
|
|
218
|
+
"height": "499",
|
|
219
|
+
"caption": "",
|
|
220
|
+
"showDownloadUrl": false,
|
|
221
|
+
"showDataTableLink": true,
|
|
222
|
+
"showDownloadLinkBelow": false,
|
|
223
|
+
"showFullGeoNameInCSV": false,
|
|
224
|
+
"forceDisplay": true,
|
|
225
|
+
"download": true,
|
|
226
|
+
"indexLabel": "Site",
|
|
227
|
+
"cellMinWidth": "0",
|
|
228
|
+
"collapsible": true,
|
|
229
|
+
"defaultSort": {
|
|
230
|
+
"column": "additionalColumn4",
|
|
231
|
+
"sortDirection": "asc"
|
|
232
|
+
},
|
|
233
|
+
"downloadVisibleDataOnly": true
|
|
234
|
+
},
|
|
235
|
+
"tooltips": {
|
|
236
|
+
"appearanceType": "hover",
|
|
237
|
+
"linkLabel": "Learn More",
|
|
238
|
+
"opacity": 90,
|
|
239
|
+
"capitalizeLabels": true
|
|
240
|
+
},
|
|
241
|
+
"visual": {
|
|
242
|
+
"border": false,
|
|
243
|
+
"borderColorTheme": false,
|
|
244
|
+
"accent": false,
|
|
245
|
+
"background": false,
|
|
246
|
+
"hideBackgroundColor": false,
|
|
247
|
+
"tp5Treatment": false,
|
|
248
|
+
"tp5Background": false,
|
|
249
|
+
"minBubbleSize": 1,
|
|
250
|
+
"maxBubbleSize": 20,
|
|
251
|
+
"extraBubbleBorder": false,
|
|
252
|
+
"cityStyle": "circle",
|
|
253
|
+
"cityStyleLabel": "",
|
|
254
|
+
"showBubbleZeros": false,
|
|
255
|
+
"additionalCityStyles": [],
|
|
256
|
+
"geoCodeCircleSize": "5"
|
|
257
|
+
},
|
|
258
|
+
"mapPosition": {
|
|
259
|
+
"coordinates": [
|
|
260
|
+
0,
|
|
261
|
+
30
|
|
262
|
+
],
|
|
263
|
+
"zoom": 1
|
|
264
|
+
},
|
|
265
|
+
"map": {
|
|
266
|
+
"layers": [],
|
|
267
|
+
"patterns": []
|
|
268
|
+
},
|
|
269
|
+
"hexMap": {
|
|
270
|
+
"type": "",
|
|
271
|
+
"shapeGroups": [
|
|
272
|
+
{
|
|
273
|
+
"legendTitle": "",
|
|
274
|
+
"legendDescription": "",
|
|
275
|
+
"items": [
|
|
276
|
+
{
|
|
277
|
+
"key": "",
|
|
278
|
+
"shape": "Arrow Up",
|
|
279
|
+
"column": "",
|
|
280
|
+
"operator": "=",
|
|
281
|
+
"value": ""
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
"filterBehavior": "Filter Change",
|
|
288
|
+
"filterIntro": "",
|
|
289
|
+
"smallMultiples": {
|
|
290
|
+
"mode": "",
|
|
291
|
+
"tileColumn": "",
|
|
292
|
+
"tilesPerRowDesktop": 2,
|
|
293
|
+
"tilesPerRowMobile": 1,
|
|
294
|
+
"tileOrderType": "asc",
|
|
295
|
+
"tileOrder": [],
|
|
296
|
+
"tileTitles": {},
|
|
297
|
+
"synchronizedTooltips": true
|
|
298
|
+
},
|
|
299
|
+
"markupVariables": [],
|
|
300
|
+
"enableMarkupVariables": false,
|
|
301
|
+
"dataFileName": "/wcms/vizdata/NCEZID_DIDRI/measles/nwssmeaslessitemap.json",
|
|
302
|
+
"dataFileSourceType": "url",
|
|
303
|
+
"dataDescription": {
|
|
304
|
+
"horizontal": false,
|
|
305
|
+
"series": false
|
|
306
|
+
},
|
|
307
|
+
"version": "4.26.3",
|
|
308
|
+
"dataUrl": "https://www.cdc.gov/wcms/vizdata/NCEZID_DIDRI/measles/nwssmeaslessitemap.json",
|
|
309
|
+
"migrations": {
|
|
310
|
+
"addColorMigration": true
|
|
311
|
+
},
|
|
312
|
+
"dataMetadata": {},
|
|
313
|
+
"locale": "en-US"
|
|
314
|
+
}
|