@cdc/map 4.24.1 → 4.24.2

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 (28) hide show
  1. package/dist/cdcmap.js +50477 -45394
  2. package/examples/test.json +0 -9614
  3. package/examples/{private/zika-issue.json → zika.json} +47 -51
  4. package/index.html +8 -3
  5. package/package.json +3 -3
  6. package/src/CdcMap.tsx +29 -16
  7. package/src/components/CityList.jsx +34 -23
  8. package/src/components/EditorPanel/components/EditorPanel.tsx +3 -4
  9. package/src/components/EditorPanel/components/HexShapeSettings.tsx +2 -2
  10. package/src/components/Geo.jsx +4 -2
  11. package/src/components/Legend/components/LegendItem.Hex.tsx +5 -9
  12. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +2 -2
  13. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +0 -1
  14. package/src/components/UsaMap/components/UsaMap.State.tsx +3 -4
  15. package/src/components/WorldMap/components/WorldMap.jsx +14 -8
  16. package/src/components/WorldMap/data/world-topo-guiana-update.json +1 -0
  17. package/src/components/WorldMap/data/world-topo-old.json +1 -0
  18. package/{examples/private/new-world.json → src/components/WorldMap/data/world-topo-recent.json} +23137 -22280
  19. package/src/components/WorldMap/data/world-topo.json +1 -1
  20. package/src/data/initial-state.js +2 -2
  21. package/src/data/supported-geos.js +21 -1
  22. package/src/hooks/useTooltip.ts +4 -4
  23. package/src/scss/editor-panel.scss +2 -3
  24. package/src/scss/map.scss +22 -12
  25. package/examples/private/map-text-wrap.json +0 -574
  26. package/examples/private/map-world-data.json +0 -1046
  27. package/examples/world-geocode-data.json +0 -18
  28. package/examples/world-geocode.json +0 -108
@@ -52,7 +52,7 @@ const useTooltip = props => {
52
52
  const prefix = handleTooltipPrefix('')
53
53
 
54
54
  if (hideGeoColumnInTooltip) return `<strong>${displayGeoName(geoName)}</strong>`
55
- return `<p class="tooltip-heading">${prefix}${displayGeoName(geoName)}</p>`
55
+ return `<p class="tooltip-heading" style="text-transform: none;">${prefix}${displayGeoName(geoName)}</p>`
56
56
  }
57
57
 
58
58
  /**
@@ -92,7 +92,7 @@ const useTooltip = props => {
92
92
  } = config
93
93
 
94
94
  if (tooltipEnabledMaps.includes(currentMapType) && undefined !== row) {
95
- toolTipText += `<ul className="capitalize">`
95
+ toolTipText += `<ul>`
96
96
 
97
97
  // if tooltips are allowed, loop through each column
98
98
  Object.keys(columns).forEach(columnKey => {
@@ -120,10 +120,10 @@ const useTooltip = props => {
120
120
  // Handle County Location Columns
121
121
  toolTipText += handleTooltipStateNameColumn(toolTipText, row)
122
122
 
123
- // Handle Data > Geo Column In tooltips
123
+ // Handle Columns > Data Column In tooltips
124
124
  toolTipText += handleTooltipGeoColumn(geoName)
125
125
 
126
- // Handle Data > Primary Column in tooltips
126
+ // Handle Columns > Geography Column In tooltips
127
127
  toolTipText = handleTooltipColumns(toolTipText, row)
128
128
 
129
129
  return toolTipText
@@ -82,14 +82,13 @@
82
82
  color: #000;
83
83
  font-size: 1em;
84
84
  border: 0;
85
- position: fixed;
85
+ position: absolute;
86
86
  z-index: 100;
87
87
  transition: 0.1s background;
88
88
  cursor: pointer;
89
89
  width: 25px;
90
90
  height: 25px;
91
91
  left: 307px;
92
- top: 10px;
93
92
  box-shadow: rgba(0, 0, 0, 0.5) 0 1px 2px;
94
93
  &:before {
95
94
  top: 43%;
@@ -114,7 +113,7 @@
114
113
  background: #fff;
115
114
  width: $editorWidth;
116
115
  overflow-y: overlay;
117
- position: fixed;
116
+ position: absolute;
118
117
  z-index: 7;
119
118
  display: flex;
120
119
  flex-direction: column;
package/src/scss/map.scss CHANGED
@@ -49,6 +49,11 @@ header + .map-container.full-border {
49
49
  flex-direction: row;
50
50
  }
51
51
  }
52
+ .map-container.map {
53
+ &.side {
54
+ flex-direction: row;
55
+ }
56
+ }
52
57
  // Bubble Specific
53
58
  .map-container.bubble {
54
59
  &.side {
@@ -83,13 +88,13 @@ $medium: 768px;
83
88
  }
84
89
  // make logo smaller on mobile
85
90
  @media screen and (max-width: $small) {
86
- .map-logo {
87
- position: absolute;
88
- bottom: 4em; // needed to align to top of Territories
89
- right: 1em;
90
- z-index: 3;
91
- width: 50px; // make it smaller
92
- }
91
+ .map-logo {
92
+ position: absolute;
93
+ bottom: 4em; // needed to align to top of Territories
94
+ right: 1em;
95
+ z-index: 3;
96
+ width: 50px; // make it smaller
97
+ }
93
98
  }
94
99
  // everything else but mobile
95
100
  @media screen and (min-width: $small) {
@@ -101,10 +106,8 @@ $medium: 768px;
101
106
  width: 75px;
102
107
  }
103
108
  }
104
-
105
109
  }
106
110
 
107
-
108
111
  .single-geo {
109
112
  transition: 0.2s fill;
110
113
  cursor: pointer;
@@ -117,16 +120,18 @@ $medium: 768px;
117
120
  .two-col {
118
121
  display: flex;
119
122
  margin-top: 0;
123
+
120
124
  justify-content: flex-start;
121
125
  > label {
122
126
  margin-top: 0;
123
127
  display: inline-block;
124
128
  }
125
129
  }
130
+
126
131
  .territories-label {
127
132
  margin: 2em 5px 2em 1em;
128
133
  font-size: 1.1em;
129
- display:block;
134
+ display: block;
130
135
  }
131
136
 
132
137
  // Cities and Territories
@@ -150,9 +155,14 @@ $medium: 768px;
150
155
  }
151
156
  }
152
157
 
153
- &--mobile {
158
+ &--mobile {
154
159
  @extend .territories;
155
- width: 70%;
160
+ width: 60%;
161
+ }
162
+ }
163
+
164
+ @media screen and (max-width: $small) {
165
+ .territories {
156
166
  }
157
167
  }
158
168
 
@@ -1,574 +0,0 @@
1
- {
2
- "general": {
3
- "geoType": "us",
4
- "type": "data",
5
- "geoBorderColor": "darkGray",
6
- "headerColor": "theme-blue",
7
- "title": "States Awarded CDC-RFA-DP21-2105",
8
- "showTitle": false,
9
- "showSidebar": false,
10
- "showDownloadButton": false,
11
- "showDownloadMediaButton": false,
12
- "displayAsHex": false,
13
- "displayStateLabels": false,
14
- "territoriesLabel": "Territories",
15
- "territoriesAlwaysShow": false,
16
- "language": "en",
17
- "geoLabelOverride": "",
18
- "hasRegions": false,
19
- "fullBorder": false,
20
- "convertFipsCodes": true,
21
- "palette": {
22
- "isReversed": true
23
- },
24
- "allowMapZoom": true,
25
- "hideGeoColumnInTooltip": true,
26
- "hidePrimaryColumnInTooltip": true,
27
- "statePicked": {
28
- "fipsCode": "01",
29
- "stateName": "Alabama"
30
- }
31
- },
32
- "type": "map",
33
- "color": "greenbluereverse",
34
- "columns": {
35
- "geo": {
36
- "name": "State",
37
- "label": "Location",
38
- "tooltip": false,
39
- "dataTable": true
40
- },
41
- "primary": {
42
- "dataTable": false,
43
- "tooltip": false,
44
- "prefix": "",
45
- "suffix": "",
46
- "name": "status",
47
- "label": ""
48
- },
49
- "navigate": {
50
- "name": ""
51
- },
52
- "latitude": {
53
- "name": ""
54
- },
55
- "longitude": {
56
- "name": ""
57
- },
58
- "additionalColumn1": {
59
- "label": "",
60
- "dataTable": true,
61
- "tooltips": false,
62
- "prefix": "",
63
- "suffix": "",
64
- "name": "component",
65
- "tooltip": true
66
- }
67
- },
68
- "legend": {
69
- "descriptions": {},
70
- "specialClasses": [
71
- {
72
- "key": "status",
73
- "value": "N/A"
74
- }
75
- ],
76
- "unified": false,
77
- "singleColumn": false,
78
- "singleRow": false,
79
- "verticalSorted": false,
80
- "showSpecialClassesLast": false,
81
- "dynamicDescription": false,
82
- "type": "category",
83
- "numberOfItems": 3,
84
- "position": "side",
85
- "title": "Legend",
86
- "categoryValuesOrder": [
87
- "N/A",
88
- "Has component"
89
- ]
90
- },
91
- "filters": [],
92
- "table": {
93
- "label": "Data Table",
94
- "expanded": true,
95
- "limitHeight": false,
96
- "height": "",
97
- "caption": "",
98
- "showDownloadUrl": false,
99
- "showDataTableLink": true,
100
- "showFullGeoNameInCSV": false,
101
- "forceDisplay": true,
102
- "download": false,
103
- "indexLabel": ""
104
- },
105
- "tooltips": {
106
- "appearanceType": "hover",
107
- "linkLabel": "Learn More",
108
- "capitalizeLabels": true,
109
- "opacity": 90
110
- },
111
- "runtime": {
112
- "editorErrorMessage": []
113
- },
114
- "visual": {
115
- "minBubbleSize": 1,
116
- "maxBubbleSize": 20,
117
- "extraBubbleBorder": false,
118
- "cityStyle": "circle",
119
- "geoCodeCircleSize": 2,
120
- "showBubbleZeros": false
121
- },
122
- "mapPosition": {
123
- "coordinates": [
124
- 0,
125
- 30
126
- ],
127
- "zoom": 1
128
- },
129
- "map": {
130
- "layers": []
131
- },
132
- "hexMap": {
133
- "type": "",
134
- "shapeGroups": [
135
- {
136
- "legendTitle": "",
137
- "legendDescription": "",
138
- "items": [
139
- {
140
- "key": "",
141
- "shape": "Arrow up",
142
- "column": "",
143
- "operator": "=",
144
- "value": ""
145
- }
146
- ]
147
- }
148
- ]
149
- },
150
- "filterBehavior": "Filter Change",
151
- "datasets": {},
152
- "data": [
153
- {
154
- "State": "Alabama",
155
- "statename": "",
156
- "stateabbreviation": "AL",
157
- "component": "",
158
- "status": "N/A"
159
- },
160
- {
161
- "State": "Alaska",
162
- "statename": "Alaska",
163
- "stateabbreviation": "AS",
164
- "component": "Recover Alaska / The Foraker Group",
165
- "status": "Has component"
166
- },
167
- {
168
- "State": "American Samoa",
169
- "statename": "",
170
- "stateabbreviation": "AZ",
171
- "component": "",
172
- "status": "N/A"
173
- },
174
- {
175
- "State": "Arizona",
176
- "statename": "",
177
- "stateabbreviation": "AR",
178
- "component": "",
179
- "status": "N/A"
180
- },
181
- {
182
- "State": "Arkansas",
183
- "statename": "",
184
- "stateabbreviation": "CT",
185
- "component": "",
186
- "status": "N/A"
187
- },
188
- {
189
- "State": "California",
190
- "statename": "California",
191
- "stateabbreviation": "DE",
192
- "component": "California Department of Public Health",
193
- "status": "Has component"
194
- },
195
- {
196
- "State": "Colorado",
197
- "statename": "Colorado",
198
- "stateabbreviation": "DC",
199
- "component": "Colorado Department of Health and Environment",
200
- "status": "Has component"
201
- },
202
- {
203
- "State": "Connecticut",
204
- "statename": "",
205
- "stateabbreviation": "FL",
206
- "component": "",
207
- "status": "N/A"
208
- },
209
- {
210
- "State": "Delaware",
211
- "statename": "",
212
- "stateabbreviation": "GA",
213
- "component": "",
214
- "status": "N/A"
215
- },
216
- {
217
- "State": "District of Columbia",
218
- "statename": "",
219
- "stateabbreviation": "GU",
220
- "component": "",
221
- "status": "N/A"
222
- },
223
- {
224
- "State": "Florida",
225
- "statename": "",
226
- "stateabbreviation": "HI",
227
- "component": "",
228
- "status": "N/A"
229
- },
230
- {
231
- "State": "Georgia",
232
- "statename": "",
233
- "stateabbreviation": "IL",
234
- "component": "",
235
- "status": "N/A"
236
- },
237
- {
238
- "State": "Guam",
239
- "statename": "",
240
- "stateabbreviation": "IN",
241
- "component": "",
242
- "status": "N/A"
243
- },
244
- {
245
- "State": "Hawaii",
246
- "statename": "",
247
- "stateabbreviation": "IA",
248
- "component": "",
249
- "status": "N/A"
250
- },
251
- {
252
- "State": "Idaho",
253
- "statename": "Idaho",
254
- "stateabbreviation": "KS",
255
- "component": "Idaho Department of Health and Welfare",
256
- "status": "Has component"
257
- },
258
- {
259
- "State": "Illinois",
260
- "statename": "",
261
- "stateabbreviation": "KY",
262
- "component": "",
263
- "status": "N/A"
264
- },
265
- {
266
- "State": "Indiana",
267
- "statename": "",
268
- "stateabbreviation": "LA",
269
- "component": "",
270
- "status": "N/A"
271
- },
272
- {
273
- "State": "Iowa",
274
- "statename": "",
275
- "stateabbreviation": "ME",
276
- "component": "",
277
- "status": "N/A"
278
- },
279
- {
280
- "State": "Kansas",
281
- "statename": "",
282
- "stateabbreviation": "MH",
283
- "component": "",
284
- "status": "N/A"
285
- },
286
- {
287
- "State": "Kentucky",
288
- "statename": "",
289
- "stateabbreviation": "MA",
290
- "component": "",
291
- "status": "N/A"
292
- },
293
- {
294
- "State": "Louisiana",
295
- "statename": "",
296
- "stateabbreviation": "MI",
297
- "component": "",
298
- "status": "N/A"
299
- },
300
- {
301
- "State": "Maine",
302
- "statename": "",
303
- "stateabbreviation": "FM",
304
- "component": "",
305
- "status": "N/A"
306
- },
307
- {
308
- "State": "Marshall Islands",
309
- "statename": "",
310
- "stateabbreviation": "MS",
311
- "component": "",
312
- "status": "N/A"
313
- },
314
- {
315
- "State": "Maryland",
316
- "statename": "Maryland",
317
- "stateabbreviation": "MO",
318
- "component": "Maryland Department of Health",
319
- "status": "Has component"
320
- },
321
- {
322
- "State": "Massachusetts",
323
- "statename": "",
324
- "stateabbreviation": "MT",
325
- "component": "",
326
- "status": "N/A"
327
- },
328
- {
329
- "State": "Michigan",
330
- "statename": "",
331
- "stateabbreviation": "NE",
332
- "component": "",
333
- "status": "N/A"
334
- },
335
- {
336
- "State": "Micronesia",
337
- "statename": "",
338
- "stateabbreviation": "NV",
339
- "component": "",
340
- "status": "N/A"
341
- },
342
- {
343
- "State": "Minnesota",
344
- "statename": "Minnesota",
345
- "stateabbreviation": "NH",
346
- "component": "Minnesota Department of Health",
347
- "status": "Has component"
348
- },
349
- {
350
- "State": "Mississippi",
351
- "statename": "",
352
- "stateabbreviation": "NJ",
353
- "component": "",
354
- "status": "N/A"
355
- },
356
- {
357
- "State": "Missouri",
358
- "statename": "",
359
- "stateabbreviation": "ND",
360
- "component": "",
361
- "status": "N/A"
362
- },
363
- {
364
- "State": "Montana",
365
- "statename": "",
366
- "stateabbreviation": "MP",
367
- "component": "",
368
- "status": "N/A"
369
- },
370
- {
371
- "State": "Nebraska",
372
- "statename": "",
373
- "stateabbreviation": "OH",
374
- "component": "",
375
- "status": "N/A"
376
- },
377
- {
378
- "State": "Nevada",
379
- "statename": "",
380
- "stateabbreviation": "OK",
381
- "component": "",
382
- "status": "N/A"
383
- },
384
- {
385
- "State": "New Hampshire",
386
- "statename": "",
387
- "stateabbreviation": "PW",
388
- "component": "",
389
- "status": "N/A"
390
- },
391
- {
392
- "State": "New Jersey",
393
- "statename": "",
394
- "stateabbreviation": "PA",
395
- "component": "",
396
- "status": "N/A"
397
- },
398
- {
399
- "State": "New Mexico",
400
- "statename": "New Mexico",
401
- "stateabbreviation": "PR",
402
- "component": "New Mexico Department of Health",
403
- "status": "Has component"
404
- },
405
- {
406
- "State": "New York",
407
- "statename": "New York",
408
- "stateabbreviation": "SC",
409
- "component": "New York State Department of Health / Health Research, Inc.",
410
- "status": "Has component"
411
- },
412
- {
413
- "State": "North Carolina",
414
- "statename": "North Carolina",
415
- "stateabbreviation": "SD",
416
- "component": "North Carolina Department of Health and Human Services",
417
- "status": "Has component"
418
- },
419
- {
420
- "State": "North Dakota",
421
- "statename": "",
422
- "stateabbreviation": "TN",
423
- "component": "",
424
- "status": "N/A"
425
- },
426
- {
427
- "State": "Northern Mariana Islands",
428
- "statename": "",
429
- "stateabbreviation": "UT",
430
- "component": "",
431
- "status": "N/A"
432
- },
433
- {
434
- "State": "Ohio",
435
- "statename": "",
436
- "stateabbreviation": "VT",
437
- "component": "",
438
- "status": "N/A"
439
- },
440
- {
441
- "State": "Oklahoma",
442
- "statename": "",
443
- "stateabbreviation": "VI",
444
- "component": "",
445
- "status": "N/A"
446
- },
447
- {
448
- "State": "Oregon",
449
- "statename": "Oregon",
450
- "stateabbreviation": "VA",
451
- "component": "Oregon Health Authority",
452
- "status": "Has component"
453
- },
454
- {
455
- "State": "Palau",
456
- "statename": "",
457
- "stateabbreviation": "WA",
458
- "component": "",
459
- "status": "N/A"
460
- },
461
- {
462
- "State": "Pennsylvania",
463
- "statename": "",
464
- "stateabbreviation": "WV",
465
- "component": "",
466
- "status": "N/A"
467
- },
468
- {
469
- "State": "Puerto Rico",
470
- "statename": "",
471
- "stateabbreviation": "WI",
472
- "component": "",
473
- "status": "N/A"
474
- },
475
- {
476
- "State": "Rhode Island",
477
- "statename": "Rhode Island",
478
- "stateabbreviation": "WY",
479
- "component": "Rhode Island Department of Health",
480
- "status": "Has component"
481
- },
482
- {
483
- "State": "South Carolina",
484
- "statename": "",
485
- "stateabbreviation": "sc",
486
- "component": "",
487
- "status": "N/A"
488
- },
489
- {
490
- "State": "South Dakota",
491
- "statename": "",
492
- "stateabbreviation": "sd",
493
- "component": "",
494
- "status": "N/A"
495
- },
496
- {
497
- "State": "Tennessee",
498
- "statename": "",
499
- "stateabbreviation": "tn",
500
- "component": "",
501
- "status": "N/A"
502
- },
503
- {
504
- "State": "Texas",
505
- "statename": "Texas",
506
- "stateabbreviation": "tx",
507
- "component": "Texas Department of Health and Human Services / Research Triangle Institute ",
508
- "status": "Has component"
509
- },
510
- {
511
- "State": "Utah",
512
- "statename": "",
513
- "stateabbreviation": "ut",
514
- "component": "",
515
- "status": "N/A"
516
- },
517
- {
518
- "State": "Vermont",
519
- "statename": "",
520
- "stateabbreviation": "vt",
521
- "component": "",
522
- "status": "N/A"
523
- },
524
- {
525
- "State": "Virgin Islands",
526
- "statename": "",
527
- "stateabbreviation": "vi",
528
- "component": "",
529
- "status": "N/A"
530
- },
531
- {
532
- "State": "Virginia",
533
- "statename": "",
534
- "stateabbreviation": "va",
535
- "component": "",
536
- "status": "N/A"
537
- },
538
- {
539
- "State": "Washington",
540
- "statename": "",
541
- "stateabbreviation": "wa",
542
- "component": "",
543
- "status": "N/A"
544
- },
545
- {
546
- "State": "West Virginia",
547
- "statename": "",
548
- "stateabbreviation": "wv",
549
- "component": "",
550
- "status": "N/A"
551
- },
552
- {
553
- "State": "Wisconsin",
554
- "statename": "",
555
- "stateabbreviation": "wi",
556
- "component": "",
557
- "status": "N/A"
558
- },
559
- {
560
- "State": "Wyoming",
561
- "statename": "",
562
- "stateabbreviation": "wy",
563
- "component": "",
564
- "status": "N/A"
565
- }
566
- ],
567
- "dataFileName": "States Awarded CDC-RFA-DP21-2105.csv",
568
- "dataFileSourceType": "file",
569
- "dataDescription": {
570
- "horizontal": false,
571
- "series": false
572
- },
573
- "validated": 4.23
574
- }