@cdc/map 4.26.2 → 4.26.3

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.
Files changed (65) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcmap-vr9HZwRt.es.js +6 -0
  3. package/dist/cdcmap.js +26781 -24615
  4. package/examples/private/annotation-bug.json +642 -0
  5. package/package.json +3 -3
  6. package/src/CdcMap.tsx +3 -14
  7. package/src/CdcMapComponent.tsx +214 -159
  8. package/src/_stories/CdcMap.Defaults.stories.tsx +76 -0
  9. package/src/_stories/CdcMap.Editor.stories.tsx +187 -14
  10. package/src/_stories/CdcMap.stories.tsx +11 -1
  11. package/src/_stories/Map.HTMLInDataTable.stories.tsx +385 -0
  12. package/src/_stories/_mock/multi-state-show-unselected.json +82 -0
  13. package/src/cdcMapComponent.styles.css +2 -2
  14. package/src/components/Annotation/Annotation.Draggable.styles.css +4 -4
  15. package/src/components/Annotation/AnnotationDropdown.styles.css +1 -1
  16. package/src/components/Annotation/AnnotationList.styles.css +13 -13
  17. package/src/components/EditorPanel/components/EditorPanel.tsx +426 -58
  18. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings-style.css +1 -1
  19. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +5 -2
  20. package/src/components/EditorPanel/components/editorPanel.styles.css +34 -24
  21. package/src/components/Legend/components/Legend.tsx +9 -4
  22. package/src/components/Legend/components/LegendGroup/legend.group.css +5 -5
  23. package/src/components/Legend/components/index.scss +2 -3
  24. package/src/components/NavigationMenu.tsx +2 -1
  25. package/src/components/SmallMultiples/SmallMultiples.css +5 -5
  26. package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +32 -17
  27. package/src/components/UsaMap/components/TerritoriesSection.tsx +3 -2
  28. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +13 -8
  29. package/src/components/UsaMap/components/UsaMap.County.tsx +410 -183
  30. package/src/components/UsaMap/components/UsaMap.Region.styles.css +1 -1
  31. package/src/components/UsaMap/components/UsaMap.SingleState.styles.css +2 -2
  32. package/src/components/UsaMap/components/UsaMap.State.tsx +13 -8
  33. package/src/components/WorldMap/WorldMap.tsx +10 -13
  34. package/src/components/WorldMap/data/world-topo-updated.json +1 -0
  35. package/src/components/WorldMap/data/world-topo.json +1 -1
  36. package/src/components/WorldMap/worldMap.styles.css +1 -1
  37. package/src/components/ZoomControls.tsx +49 -18
  38. package/src/components/zoomControls.styles.css +27 -11
  39. package/src/data/initial-state.js +14 -5
  40. package/src/data/legacy-defaults.ts +8 -0
  41. package/src/data/supported-geos.js +19 -0
  42. package/src/helpers/colors.ts +2 -1
  43. package/src/helpers/dataTableHelpers.ts +56 -0
  44. package/src/helpers/displayGeoName.ts +19 -11
  45. package/src/helpers/getMapContainerClasses.ts +8 -2
  46. package/src/helpers/getMatchingPatternForRow.ts +67 -0
  47. package/src/helpers/getPatternForRow.ts +11 -18
  48. package/src/helpers/tests/dataTableHelpers.test.ts +78 -0
  49. package/src/helpers/tests/displayGeoName.test.ts +17 -0
  50. package/src/helpers/tests/getMatchingPatternForRow.test.ts +150 -0
  51. package/src/helpers/tests/getPatternForRow.test.ts +140 -2
  52. package/src/helpers/urlDataHelpers.ts +7 -1
  53. package/src/hooks/useResizeObserver.ts +36 -22
  54. package/src/hooks/useTooltip.test.tsx +64 -0
  55. package/src/hooks/useTooltip.ts +28 -8
  56. package/src/scss/editor-panel.scss +1 -1
  57. package/src/scss/main.scss +140 -6
  58. package/src/scss/map.scss +9 -4
  59. package/src/store/map.actions.ts +2 -0
  60. package/src/store/map.reducer.ts +4 -0
  61. package/src/test/CdcMap.test.jsx +2 -2
  62. package/src/types/MapConfig.ts +22 -4
  63. package/src/types/MapContext.ts +3 -1
  64. package/dist/cdcmap-Cf9_fbQf.es.js +0 -6
  65. package/src/helpers/componentHelpers.ts +0 -8
@@ -0,0 +1,642 @@
1
+ {
2
+ "annotations": [
3
+ {
4
+ "text": "Gulf of Mexico",
5
+ "anchorMode": "fixed",
6
+ "fontSize": 16,
7
+ "show": {
8
+ "desktop": true,
9
+ "tablet": true,
10
+ "mobile": true
11
+ },
12
+ "markerType": "arrow",
13
+ "connectorType": "line",
14
+ "colors": {
15
+ "label": "black",
16
+ "connector": "black",
17
+ "marker": "black"
18
+ },
19
+ "selected": true,
20
+ "anchor": {
21
+ "vertical": false,
22
+ "horizontal": false
23
+ },
24
+ "connectionType": "elbow",
25
+ "marker": "arrow",
26
+ "edit": {
27
+ "subject": false,
28
+ "label": true
29
+ },
30
+ "seriesKey": "",
31
+ "x": 595.1254272460938,
32
+ "y": 416.04144287109375,
33
+ "dx": 124.95358276367188,
34
+ "dy": -49.2210693359375,
35
+ "opacity": "52",
36
+ "savedDimensions": [
37
+ 1565.9749755859375,
38
+ 889.7625122070312
39
+ ]
40
+ },
41
+ {
42
+ "text": "test",
43
+ "anchorMode": "fixed",
44
+ "fontSize": 16,
45
+ "show": {
46
+ "desktop": true,
47
+ "tablet": true,
48
+ "mobile": true
49
+ },
50
+ "markerType": "arrow",
51
+ "connectorType": "line",
52
+ "colors": {
53
+ "label": "black",
54
+ "connector": "black",
55
+ "marker": "black"
56
+ },
57
+ "selected": true,
58
+ "anchor": {
59
+ "vertical": false,
60
+ "horizontal": false
61
+ },
62
+ "connectionType": "line",
63
+ "marker": "arrow",
64
+ "edit": {
65
+ "subject": true,
66
+ "label": true
67
+ },
68
+ "seriesKey": "",
69
+ "x": 1124.3250732421875,
70
+ "y": 638.8250122070312,
71
+ "dx": 0,
72
+ "dy": 0,
73
+ "opacity": "100",
74
+ "savedDimensions": [
75
+ 2248.650146484375,
76
+ 1277.6500244140625
77
+ ]
78
+ }
79
+ ],
80
+ "general": {
81
+ "navigationTarget": "_self",
82
+ "noDataMessage": "No State Selected",
83
+ "annotationDropdownText": "Annotations",
84
+ "geoBorderColor": "darkGray",
85
+ "headerColor": "theme-blue",
86
+ "title": "Title",
87
+ "showTitle": true,
88
+ "titleStyle": "small",
89
+ "showSidebar": "hidden",
90
+ "showDownloadMediaButton": false,
91
+ "displayAsHex": false,
92
+ "displayStateLabels": true,
93
+ "territoriesAlwaysShow": false,
94
+ "language": "en",
95
+ "geoType": "us",
96
+ "geoLabelOverride": "",
97
+ "hasRegions": false,
98
+ "fullBorder": false,
99
+ "type": "data",
100
+ "convertFipsCodes": true,
101
+ "palette": {
102
+ "isReversed": false,
103
+ "name": "sequential_blue",
104
+ "version": "1.0",
105
+ "backups": [
106
+ {
107
+ "version": "1.0"
108
+ },
109
+ {
110
+ "name": "sequential_blue",
111
+ "version": "1.0",
112
+ "isReversed": false
113
+ }
114
+ ]
115
+ },
116
+ "allowMapZoom": true,
117
+ "hideGeoColumnInTooltip": false,
118
+ "hidePrimaryColumnInTooltip": false,
119
+ "hideUnselectedStates": true,
120
+ "statesPicked": [],
121
+ "expandDataTable": false
122
+ },
123
+ "type": "map",
124
+ "columns": {
125
+ "geo": {
126
+ "name": "STATE",
127
+ "label": "Location",
128
+ "tooltip": false,
129
+ "dataTable": true,
130
+ "displayColumn": ""
131
+ },
132
+ "primary": {
133
+ "dataTable": true,
134
+ "tooltip": true,
135
+ "prefix": "",
136
+ "suffix": "",
137
+ "name": "Rate",
138
+ "label": "Rate",
139
+ "roundToPlace": 0
140
+ },
141
+ "navigate": {
142
+ "name": ""
143
+ },
144
+ "latitude": {
145
+ "name": ""
146
+ },
147
+ "longitude": {
148
+ "name": ""
149
+ }
150
+ },
151
+ "legend": {
152
+ "descriptions": {},
153
+ "specialClasses": [],
154
+ "unified": false,
155
+ "singleColumn": false,
156
+ "singleRow": false,
157
+ "verticalSorted": false,
158
+ "showSpecialClassesLast": false,
159
+ "dynamicDescription": false,
160
+ "type": "equalnumber",
161
+ "numberOfItems": 5,
162
+ "position": "top",
163
+ "title": "",
164
+ "style": "gradient",
165
+ "subStyle": "linear blocks",
166
+ "tickRotation": "",
167
+ "singleColumnLegend": false,
168
+ "hideBorder": true,
169
+ "groupBy": ""
170
+ },
171
+ "filters": [],
172
+ "table": {
173
+ "wrapColumns": false,
174
+ "label": "Data Table",
175
+ "expanded": false,
176
+ "limitHeight": false,
177
+ "height": "",
178
+ "caption": "",
179
+ "showDownloadUrl": false,
180
+ "showDataTableLink": true,
181
+ "showDownloadLinkBelow": true,
182
+ "showFullGeoNameInCSV": false,
183
+ "forceDisplay": true,
184
+ "download": true,
185
+ "indexLabel": "",
186
+ "cellMinWidth": "0",
187
+ "collapsible": true
188
+ },
189
+ "tooltips": {
190
+ "appearanceType": "hover",
191
+ "linkLabel": "Learn More",
192
+ "opacity": 90
193
+ },
194
+ "runtime": {
195
+ "editorErrorMessage": []
196
+ },
197
+ "visual": {
198
+ "border": false,
199
+ "borderColorTheme": false,
200
+ "accent": false,
201
+ "background": false,
202
+ "hideBackgroundColor": false,
203
+ "tp5Treatment": false,
204
+ "tp5Background": false,
205
+ "minBubbleSize": 1,
206
+ "maxBubbleSize": 20,
207
+ "extraBubbleBorder": false,
208
+ "cityStyle": "circle",
209
+ "cityStyleLabel": "",
210
+ "showBubbleZeros": false,
211
+ "additionalCityStyles": [],
212
+ "geoCodeCircleSize": 8
213
+ },
214
+ "mapPosition": {
215
+ "coordinates": [
216
+ 0,
217
+ 30
218
+ ],
219
+ "zoom": 1
220
+ },
221
+ "map": {
222
+ "layers": [],
223
+ "patterns": []
224
+ },
225
+ "hexMap": {
226
+ "type": "",
227
+ "shapeGroups": [
228
+ {
229
+ "legendTitle": "",
230
+ "legendDescription": "",
231
+ "items": [
232
+ {
233
+ "key": "",
234
+ "shape": "Arrow Up",
235
+ "column": "",
236
+ "operator": "=",
237
+ "value": ""
238
+ }
239
+ ]
240
+ }
241
+ ]
242
+ },
243
+ "filterBehavior": "Filter Change",
244
+ "filterIntro": "",
245
+ "smallMultiples": {
246
+ "mode": "",
247
+ "tileColumn": "",
248
+ "tilesPerRowDesktop": 2,
249
+ "tilesPerRowMobile": 1,
250
+ "tileOrderType": "asc",
251
+ "tileOrder": [],
252
+ "tileTitles": {},
253
+ "synchronizedTooltips": true
254
+ },
255
+ "markupVariables": [],
256
+ "enableMarkupVariables": false,
257
+ "errors": [],
258
+ "currentViewport": "lg",
259
+ "id": 19,
260
+ "category": "Maps",
261
+ "label": "United States (State- or County-Level)",
262
+ "subType": "us",
263
+ "icon": {
264
+ "type": {},
265
+ "key": null,
266
+ "ref": null,
267
+ "props": {},
268
+ "_owner": null
269
+ },
270
+ "content": "Present a U.S. choropleth map at state or county level.",
271
+ "position": "right",
272
+ "activeVizButtonID": 19,
273
+ "dataMetadata": {},
274
+ "dataFileName": "valid-data-map.csv",
275
+ "dataFileSourceType": "file",
276
+ "dataDescription": {
277
+ "horizontal": false,
278
+ "series": false
279
+ },
280
+ "version": "4.26.4",
281
+ "migrations": {
282
+ "addColorMigration": true
283
+ },
284
+ "locale": "en-US",
285
+ "data": [
286
+ {
287
+ "STATE": "Overall",
288
+ "Rate": "55",
289
+ "Location": "Vehicle",
290
+ "URL": "https://www.cdc.gov"
291
+ },
292
+ {
293
+ "STATE": "Alabama",
294
+ "Rate": 130,
295
+ "Location": "Vehicle",
296
+ "URL": "https://www.cdc.gov/"
297
+ },
298
+ {
299
+ "STATE": "Alaska",
300
+ "Rate": 40,
301
+ "Location": "Work",
302
+ "URL": "https://www.cdc.gov/"
303
+ },
304
+ {
305
+ "STATE": "American Samoa",
306
+ "Rate": 55,
307
+ "Location": "Home",
308
+ "URL": "https://www.cdc.gov/"
309
+ },
310
+ {
311
+ "STATE": "Arizona",
312
+ "Rate": 57,
313
+ "Location": "School",
314
+ "URL": "https://www.cdc.gov/"
315
+ },
316
+ {
317
+ "STATE": "Arkansas",
318
+ "Rate": 60,
319
+ "Location": "School",
320
+ "URL": "https://www.cdc.gov/"
321
+ },
322
+ {
323
+ "STATE": "California",
324
+ "Rate": 30,
325
+ "Location": "Home",
326
+ "URL": "https://www.cdc.gov/"
327
+ },
328
+ {
329
+ "STATE": "Colorado",
330
+ "Rate": 40,
331
+ "Location": "Vehicle",
332
+ "URL": "https://www.cdc.gov/"
333
+ },
334
+ {
335
+ "STATE": "Connecticut",
336
+ "Rate": 55,
337
+ "Location": "Home",
338
+ "URL": "https://www.cdc.gov/"
339
+ },
340
+ {
341
+ "STATE": "Delaware",
342
+ "Rate": 57,
343
+ "Location": "Home",
344
+ "URL": "https://www.cdc.gov/"
345
+ },
346
+ {
347
+ "STATE": "DC",
348
+ "Rate": 60,
349
+ "Location": "Home",
350
+ "URL": "https://www.cdc.gov/"
351
+ },
352
+ {
353
+ "STATE": "Florida",
354
+ "Rate": 30,
355
+ "Location": "Work",
356
+ "URL": "https://www.cdc.gov/"
357
+ },
358
+ {
359
+ "STATE": "Georgia",
360
+ "Rate": 40,
361
+ "Location": "Work",
362
+ "URL": "https://www.cdc.gov/"
363
+ },
364
+ {
365
+ "STATE": "Guam",
366
+ "Rate": 55,
367
+ "Location": "Home",
368
+ "URL": "https://www.cdc.gov/"
369
+ },
370
+ {
371
+ "STATE": "Hawaii",
372
+ "Rate": 57,
373
+ "Location": "School",
374
+ "URL": "https://www.cdc.gov/"
375
+ },
376
+ {
377
+ "STATE": "Idaho",
378
+ "Rate": 60,
379
+ "Location": "School",
380
+ "URL": "https://www.cdc.gov/"
381
+ },
382
+ {
383
+ "STATE": "Illinois",
384
+ "Rate": 30,
385
+ "Location": "Work",
386
+ "URL": "https://www.cdc.gov/"
387
+ },
388
+ {
389
+ "STATE": "Indiana",
390
+ "Rate": 40,
391
+ "Location": "Vehicle",
392
+ "URL": "https://www.cdc.gov/"
393
+ },
394
+ {
395
+ "STATE": "Iowa",
396
+ "Rate": 55,
397
+ "Location": "Home",
398
+ "URL": "https://www.cdc.gov/"
399
+ },
400
+ {
401
+ "STATE": "Kansas",
402
+ "Rate": 57,
403
+ "Location": "Home",
404
+ "URL": "https://www.cdc.gov/"
405
+ },
406
+ {
407
+ "STATE": "Kentucky",
408
+ "Rate": 60,
409
+ "Location": "NA",
410
+ "URL": "https://www.cdc.gov/"
411
+ },
412
+ {
413
+ "STATE": "Louisiana",
414
+ "Rate": 30,
415
+ "Location": "Vehicle",
416
+ "URL": "https://www.cdc.gov/"
417
+ },
418
+ {
419
+ "STATE": "Maine",
420
+ "Rate": 40,
421
+ "Location": "Work",
422
+ "URL": "https://www.cdc.gov/"
423
+ },
424
+ {
425
+ "STATE": "Marshall Islands",
426
+ "Rate": 55,
427
+ "Location": "Home",
428
+ "URL": "https://www.cdc.gov/"
429
+ },
430
+ {
431
+ "STATE": "Maryland",
432
+ "Rate": 57,
433
+ "Location": "School",
434
+ "URL": "https://www.cdc.gov/"
435
+ },
436
+ {
437
+ "STATE": "Massachusetts",
438
+ "Rate": 60,
439
+ "Location": "School",
440
+ "URL": "https://www.cdc.gov/"
441
+ },
442
+ {
443
+ "STATE": "Michigan",
444
+ "Rate": 12,
445
+ "Location": "Work",
446
+ "URL": "https://www.cdc.gov/"
447
+ },
448
+ {
449
+ "STATE": "Micronesia",
450
+ "Rate": 65,
451
+ "Location": "Vehicle",
452
+ "URL": "https://www.cdc.gov/"
453
+ },
454
+ {
455
+ "STATE": "Minnesota",
456
+ "Rate": 55,
457
+ "Location": "Home",
458
+ "URL": "https://www.cdc.gov/"
459
+ },
460
+ {
461
+ "STATE": "Mississippi",
462
+ "Rate": 57,
463
+ "Location": "Home",
464
+ "URL": "https://www.cdc.gov/"
465
+ },
466
+ {
467
+ "STATE": "Montana",
468
+ "Rate": 60,
469
+ "Location": "Home",
470
+ "URL": "https://www.cdc.gov/"
471
+ },
472
+ {
473
+ "STATE": "Montana",
474
+ "Rate": 30,
475
+ "Location": "Vehicle",
476
+ "URL": "https://www.cdc.gov/"
477
+ },
478
+ {
479
+ "STATE": "Nebraska",
480
+ "Rate": 40,
481
+ "Location": "Work",
482
+ "URL": "https://www.cdc.gov/"
483
+ },
484
+ {
485
+ "STATE": "Nevada",
486
+ "Rate": 55,
487
+ "Location": "Home",
488
+ "URL": "https://www.cdc.gov/"
489
+ },
490
+ {
491
+ "STATE": "New Hampshire",
492
+ "Rate": 57,
493
+ "Location": "School",
494
+ "URL": "https://www.cdc.gov/"
495
+ },
496
+ {
497
+ "STATE": "New Jersey",
498
+ "Rate": 60,
499
+ "Location": "School",
500
+ "URL": "https://www.cdc.gov/"
501
+ },
502
+ {
503
+ "STATE": "New Mexico",
504
+ "Rate": 12,
505
+ "Location": "Work",
506
+ "URL": "https://www.cdc.gov/"
507
+ },
508
+ {
509
+ "STATE": "New York",
510
+ "Rate": 40,
511
+ "Location": "Vehicle",
512
+ "URL": "https://www.cdc.gov/"
513
+ },
514
+ {
515
+ "STATE": "North Carolina",
516
+ "Rate": 55,
517
+ "Location": "Home",
518
+ "URL": "https://www.cdc.gov/"
519
+ },
520
+ {
521
+ "STATE": "North Dakota",
522
+ "Rate": 57,
523
+ "Location": "Home",
524
+ "URL": "https://www.cdc.gov/"
525
+ },
526
+ {
527
+ "STATE": "Northern Mariana Islands",
528
+ "Rate": 60,
529
+ "Location": "Home",
530
+ "URL": "https://www.cdc.gov/"
531
+ },
532
+ {
533
+ "STATE": "Ohio",
534
+ "Rate": 88,
535
+ "Location": "Vehicle",
536
+ "URL": "https://www.cdc.gov/"
537
+ },
538
+ {
539
+ "STATE": "Oklahoma",
540
+ "Rate": 40,
541
+ "Location": "Work",
542
+ "URL": "https://www.cdc.gov/"
543
+ },
544
+ {
545
+ "STATE": "Oregon",
546
+ "Rate": 55,
547
+ "Location": "Home",
548
+ "URL": "https://www.cdc.gov/"
549
+ },
550
+ {
551
+ "STATE": "Palau",
552
+ "Rate": 15,
553
+ "Location": "School",
554
+ "URL": "https://www.cdc.gov/"
555
+ },
556
+ {
557
+ "STATE": "Pennsylvania",
558
+ "Rate": 60,
559
+ "Location": "School",
560
+ "URL": "https://www.cdc.gov/"
561
+ },
562
+ {
563
+ "STATE": "Puerto Rico",
564
+ "Rate": 30,
565
+ "Location": "Work",
566
+ "URL": "https://www.cdc.gov/"
567
+ },
568
+ {
569
+ "STATE": "Rhode Island",
570
+ "Rate": 40,
571
+ "Location": "Vehicle",
572
+ "URL": "https://www.cdc.gov/"
573
+ },
574
+ {
575
+ "STATE": "South Carolina",
576
+ "Rate": 55,
577
+ "Location": "Home",
578
+ "URL": "https://www.cdc.gov/"
579
+ },
580
+ {
581
+ "STATE": "South Dakota",
582
+ "Rate": 86,
583
+ "Location": "Home",
584
+ "URL": "https://www.cdc.gov/"
585
+ },
586
+ {
587
+ "STATE": "Tennessee",
588
+ "Rate": 60,
589
+ "Location": "Home",
590
+ "URL": "https://www.cdc.gov/"
591
+ },
592
+ {
593
+ "STATE": "Texas",
594
+ "Rate": 30,
595
+ "Location": "Vehicle",
596
+ "URL": "https://www.cdc.gov/"
597
+ },
598
+ {
599
+ "STATE": "Utah",
600
+ "Rate": 54,
601
+ "Location": "Work",
602
+ "URL": "https://www.cdc.gov/"
603
+ },
604
+ {
605
+ "STATE": "Vermont",
606
+ "Rate": 40,
607
+ "Location": "Home",
608
+ "URL": "https://www.cdc.gov/"
609
+ },
610
+ {
611
+ "STATE": "Virgin Islands",
612
+ "Rate": 55,
613
+ "Location": "School",
614
+ "URL": "https://www.cdc.gov/"
615
+ },
616
+ {
617
+ "STATE": "Virginia",
618
+ "Rate": 57,
619
+ "Location": "School",
620
+ "URL": "https://www.cdc.gov/"
621
+ },
622
+ {
623
+ "STATE": "Washington",
624
+ "Rate": 62,
625
+ "Location": "Work",
626
+ "URL": "https://www.cdc.gov/"
627
+ },
628
+ {
629
+ "STATE": "West Virginia",
630
+ "Rate": 25,
631
+ "Location": "Vehicle",
632
+ "URL": "https://www.cdc.gov/"
633
+ },
634
+ {
635
+ "STATE": "Wyoming",
636
+ "Rate": 43,
637
+ "Location": "Vehicle",
638
+ "URL": "https://www.cdc.gov/"
639
+ }
640
+ ],
641
+ "datasets": {}
642
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@cdc/map",
3
- "version": "4.26.2",
3
+ "version": "4.26.3",
4
4
  "description": "React component for visualizing tabular data on a map of the United States or the world.",
5
5
  "license": "Apache-2.0",
6
6
  "bugs": "https://github.com/CDCgov/cdc-open-viz/issues",
7
7
  "dependencies": {
8
- "@cdc/core": "^4.26.2",
8
+ "@cdc/core": "^4.26.3",
9
9
  "@googlemaps/markerclusterer": "^2.5.3",
10
10
  "@hello-pangea/dnd": "^16.2.0",
11
11
  "@react-google-maps/api": "^2.20.8",
@@ -42,7 +42,7 @@
42
42
  "vite-plugin-svgr": "^4.2.0",
43
43
  "whatwg-fetch": "^3.6.20"
44
44
  },
45
- "gitHead": "be3413e8e1149abf94225108f86a7910f56e0616",
45
+ "gitHead": "d50e45a074fbefa56cac904917e707d57f237737",
46
46
  "main": "dist/cdcmap",
47
47
  "moduleName": "CdcMap",
48
48
  "peerDependencies": {
package/src/CdcMap.tsx CHANGED
@@ -58,7 +58,8 @@ const CdcMap: React.FC<CdcMapProps> = ({
58
58
  ...configToLoad
59
59
  }
60
60
  if (newState.dataUrl) {
61
- let newData = await fetchRemoteData(newState.dataUrl, 'map')
61
+ let { data: newData, dataMetadata } = await fetchRemoteData(newState.dataUrl)
62
+ newState.dataMetadata = dataMetadata
62
63
 
63
64
  if (newState.vegaConfig) {
64
65
  newData = extractCoveData(updateVegaData(newState.vegaConfig, newData))
@@ -79,18 +80,6 @@ const CdcMap: React.FC<CdcMapProps> = ({
79
80
  newState.data = transform.developerStandardize(newState.data, newState.dataDescription)
80
81
  }
81
82
 
82
- Object.keys(newState).forEach(key => {
83
- if ('object' === typeof newState[key] && false === Array.isArray(newState[key])) {
84
- if (initialState[key]) {
85
- Object.keys(initialState[key]).forEach(property => {
86
- if (undefined === newState[key][property]) {
87
- newState[key][property] = initialState[key][property]
88
- }
89
- })
90
- }
91
- }
92
- })
93
-
94
83
  if (newState.columns.geo.name || newState.columns.geo.fips) {
95
84
  addUIDs(newState, newState.columns.geo.name || newState.columns.geo.fips)
96
85
  }
@@ -113,7 +102,7 @@ const CdcMap: React.FC<CdcMapProps> = ({
113
102
  let _newConfig = cloneConfig(config ?? initialState)
114
103
 
115
104
  if (configUrl) {
116
- _newConfig = await fetchRemoteData(configUrl)
105
+ _newConfig = await fetch(configUrl).then(r => r.json())
117
106
  }
118
107
  if ('object' === typeof _newConfig) {
119
108
  loadConfig(_newConfig)