@cdc/map 4.26.3 → 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.
Files changed (79) hide show
  1. package/CONFIG.md +235 -0
  2. package/README.md +70 -24
  3. package/dist/cdcmap-CY9IcPSi.es.js +6 -0
  4. package/dist/cdcmap-DlpiY3fQ.es.js +4 -0
  5. package/dist/cdcmap.js +27405 -26257
  6. package/examples/{testing-layer-2.json → __data__/testing-layer-2.json} +1 -1
  7. package/examples/{testing-layer.json → __data__/testing-layer.json} +1 -1
  8. package/examples/county-hsa-toggle.json +51993 -0
  9. package/examples/custom-map-layers.json +2 -2
  10. package/examples/default-county.json +3 -3
  11. package/examples/minimal-example.json +69 -0
  12. package/examples/private/annotation-bug.json +2 -2
  13. package/examples/private/css-issue.json +314 -0
  14. package/examples/private/region-breaking.json +1639 -0
  15. package/examples/private/test1.json +27247 -0
  16. package/package.json +4 -4
  17. package/src/CdcMapComponent.tsx +96 -13
  18. package/src/_stories/CdcMap.Editor.ColumnsSectionTests.stories.tsx +601 -0
  19. package/src/_stories/CdcMap.Editor.DataTableSectionTests.stories.tsx +404 -0
  20. package/src/_stories/CdcMap.Editor.FiltersSectionTests.stories.tsx +229 -0
  21. package/src/_stories/CdcMap.Editor.GeneralSectionTests.stories.tsx +262 -0
  22. package/src/_stories/CdcMap.Editor.LegendSectionTests.stories.tsx +541 -0
  23. package/src/_stories/CdcMap.Editor.MultiCountryWorldMapTests.stories.tsx +359 -0
  24. package/src/_stories/CdcMap.Editor.PatternSettingsSectionTests.stories.tsx +516 -0
  25. package/src/_stories/CdcMap.Editor.SmallMultiplesSectionTests.stories.tsx +165 -0
  26. package/src/_stories/CdcMap.Editor.TextAnnotationsSectionTests.stories.tsx +145 -0
  27. package/src/_stories/CdcMap.Editor.TypeSectionTests.stories.tsx +312 -0
  28. package/src/_stories/CdcMap.Editor.VisualSectionTests.stories.tsx +359 -0
  29. package/src/_stories/CdcMap.Editor.ZoomControlsTests.stories.tsx +88 -0
  30. package/src/_stories/{CdcMap.stories.tsx → CdcMap.smoke.stories.tsx} +12 -0
  31. package/src/_stories/_mock/legends/legend-tests.json +3 -3
  32. package/src/components/Annotation/AnnotationList.tsx +1 -1
  33. package/src/components/EditorPanel/components/EditorPanel.tsx +504 -383
  34. package/src/components/EditorPanel/components/HexShapeSettings.tsx +1 -1
  35. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +112 -117
  36. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +26 -13
  37. package/src/components/EditorPanel/components/editorPanel.styles.css +22 -2
  38. package/src/components/Legend/components/Legend.tsx +3 -3
  39. package/src/components/Legend/components/LegendItem.Hex.tsx +4 -2
  40. package/src/components/SmallMultiples/SynchronizedTooltip.tsx +1 -1
  41. package/src/components/UsaMap/components/UsaMap.County.tsx +271 -100
  42. package/src/components/UsaMap/components/UsaMap.State.tsx +1 -1
  43. package/src/components/UsaMap/data/cb_2019_us_county_20m.json +75817 -1
  44. package/src/components/UsaMap/data/hsa_fips_mapping.json +3144 -0
  45. package/src/components/WorldMap/data/world-topo.json +1 -1
  46. package/src/data/initial-state.js +1 -0
  47. package/src/data/supported-counties.json +1 -1
  48. package/src/helpers/countyTerritories.ts +38 -0
  49. package/src/helpers/dataTableHelpers.ts +35 -6
  50. package/src/helpers/tests/countyTerritories.test.ts +87 -0
  51. package/src/hooks/useApplyTooltipsToGeo.tsx +7 -4
  52. package/src/hooks/useMapLayers.tsx +1 -1
  53. package/src/hooks/useTooltip.ts +18 -7
  54. package/src/store/map.actions.ts +5 -2
  55. package/src/store/map.reducer.ts +12 -3
  56. package/src/test/CdcMap.test.jsx +24 -0
  57. package/src/types/MapConfig.ts +6 -0
  58. package/src/types/MapContext.ts +3 -1
  59. package/topojson-updater/README.txt +1 -1
  60. package/LICENSE +0 -201
  61. package/dist/cdcmap-vr9HZwRt.es.js +0 -6
  62. package/examples/__data__/city-state-data.json +0 -668
  63. package/examples/city-state.json +0 -434
  64. package/examples/default-world-data.json +0 -1450
  65. package/examples/new-cities.json +0 -656
  66. package/src/_stories/CdcMap.Editor.stories.tsx +0 -3648
  67. package/topojson-updater/package-lock.json +0 -223
  68. /package/src/_stories/{CdcMap.ColumnWrap.stories.tsx → CdcMap.ColumnWrap.smoke.stories.tsx} +0 -0
  69. /package/src/_stories/{CdcMap.Defaults.stories.tsx → CdcMap.Defaults.smoke.stories.tsx} +0 -0
  70. /package/src/_stories/{CdcMap.DistrictOfColumbia.stories.tsx → CdcMap.DistrictOfColumbia.smoke.stories.tsx} +0 -0
  71. /package/src/_stories/{CdcMap.Filters.stories.tsx → CdcMap.Filters.smoke.stories.tsx} +0 -0
  72. /package/src/_stories/{CdcMap.Legend.Gradient.stories.tsx → CdcMap.Legend.Gradient.smoke.stories.tsx} +0 -0
  73. /package/src/_stories/{CdcMap.Legend.stories.tsx → CdcMap.Legend.smoke.stories.tsx} +0 -0
  74. /package/src/_stories/{CdcMap.Patterns.stories.tsx → CdcMap.Patterns.smoke.stories.tsx} +0 -0
  75. /package/src/_stories/{CdcMap.SmallMultiples.stories.tsx → CdcMap.SmallMultiples.smoke.stories.tsx} +0 -0
  76. /package/src/_stories/{CdcMap.Table.stories.tsx → CdcMap.Table.smoke.stories.tsx} +0 -0
  77. /package/src/_stories/{CdcMap.ZeroColor.stories.tsx → CdcMap.ZeroColor.smoke.stories.tsx} +0 -0
  78. /package/src/_stories/{GoogleMap.stories.tsx → GoogleMap.smoke.stories.tsx} +0 -0
  79. /package/src/_stories/{UsaMap.NoData.stories.tsx → UsaMap.NoData.smoke.stories.tsx} +0 -0
@@ -1,434 +0,0 @@
1
- [
2
- {
3
- "STATE": "AL",
4
- "Rate": 10,
5
- "Location": "Home",
6
- "URL": "https://www.cdc.gov/"
7
- },
8
- {
9
- "STATE": "AK",
10
- "Rate": 12,
11
- "Location": "Vehicle",
12
- "URL": "https://www.cdc.gov/"
13
- },
14
- {
15
- "STATE": "AS",
16
- "Rate": 14,
17
- "Location": "Work",
18
- "URL": "https://www.cdc.gov/"
19
- },
20
- {
21
- "STATE": "AZ",
22
- "Rate": 9,
23
- "Location": "School",
24
- "URL": "https://www.cdc.gov/"
25
- },
26
- {
27
- "STATE": "AR",
28
- "Rate": 17,
29
- "Location": "School",
30
- "URL": "https://www.cdc.gov/"
31
- },
32
- {
33
- "STATE": "CA",
34
- "Rate": "*",
35
- "Location": "Work",
36
- "URL": "https://www.cdc.gov/"
37
- },
38
- {
39
- "STATE": "CO",
40
- "Rate": 22,
41
- "Location": "Vehicle",
42
- "URL": "https://www.cdc.gov/"
43
- },
44
- {
45
- "STATE": "CT",
46
- "Rate": 10,
47
- "Location": "Home",
48
- "URL": "https://www.cdc.gov/"
49
- },
50
- {
51
- "STATE": "DE",
52
- "Rate": 12,
53
- "Location": "Home",
54
- "URL": "https://www.cdc.gov/"
55
- },
56
- {
57
- "STATE": "DC",
58
- "Rate": 14,
59
- "Location": "Home",
60
- "URL": "https://www.cdc.gov/"
61
- },
62
- {
63
- "STATE": "FL",
64
- "Rate": 9,
65
- "Location": "Vehicle",
66
- "URL": "https://www.cdc.gov/"
67
- },
68
- {
69
- "STATE": "GA",
70
- "Rate": 17,
71
- "Location": "Work",
72
- "URL": "https://www.cdc.gov/"
73
- },
74
- {
75
- "STATE": "GU",
76
- "Rate": 20,
77
- "Location": "School",
78
- "URL": "https://www.cdc.gov/"
79
- },
80
- {
81
- "STATE": "HI",
82
- "Rate": 22,
83
- "Location": "School",
84
- "URL": "https://www.cdc.gov/"
85
- },
86
- {
87
- "STATE": "GAINESVILLE",
88
- "Rate": 22,
89
- "Location": "School",
90
- "URL": "https://www.cdc.gov/"
91
- },
92
- {
93
- "STATE": "ID",
94
- "Rate": "*",
95
- "Location": "Work",
96
- "URL": "https://www.cdc.gov/"
97
- },
98
- {
99
- "STATE": "IL",
100
- "Rate": 12,
101
- "Location": "Vehicle",
102
- "URL": "https://www.cdc.gov/"
103
- },
104
- {
105
- "STATE": "IN",
106
- "Rate": 14,
107
- "Location": "Home",
108
- "URL": "https://www.cdc.gov/"
109
- },
110
- {
111
- "STATE": "IA",
112
- "Rate": 9,
113
- "Location": "Home",
114
- "URL": "https://www.cdc.gov/"
115
- },
116
- {
117
- "STATE": "KS",
118
- "Rate": "NA",
119
- "Location": "Home",
120
- "URL": "https://www.cdc.gov/"
121
- },
122
- {
123
- "STATE": "KY",
124
- "Rate": 20,
125
- "Location": "Vehicle",
126
- "URL": "https://www.cdc.gov/"
127
- },
128
- {
129
- "STATE": "LA",
130
- "Rate": 22,
131
- "Location": "Work",
132
- "URL": "https://www.cdc.gov/"
133
- },
134
- {
135
- "STATE": "ME",
136
- "Rate": 10,
137
- "Location": "School",
138
- "URL": "https://www.cdc.gov/"
139
- },
140
- {
141
- "STATE": "MH",
142
- "Rate": 12,
143
- "Location": "School",
144
- "URL": "https://www.cdc.gov/"
145
- },
146
- {
147
- "STATE": "MD",
148
- "Rate": "*",
149
- "Location": "Work",
150
- "URL": "https://www.cdc.gov/"
151
- },
152
- {
153
- "STATE": "MA",
154
- "Rate": 9,
155
- "Location": "Vehicle",
156
- "URL": "https://www.cdc.gov/"
157
- },
158
- {
159
- "STATE": "MI",
160
- "Rate": 17,
161
- "Location": "Home",
162
- "URL": "https://www.cdc.gov/"
163
- },
164
- {
165
- "STATE": "FM",
166
- "Rate": 20,
167
- "Location": "Home",
168
- "URL": "https://www.cdc.gov/"
169
- },
170
- {
171
- "STATE": "MN",
172
- "Rate": 22,
173
- "Location": "Home",
174
- "URL": "https://www.cdc.gov/"
175
- },
176
- {
177
- "STATE": "MS",
178
- "Rate": 10,
179
- "Location": "Vehicle",
180
- "URL": "https://www.cdc.gov/"
181
- },
182
- {
183
- "STATE": "MO",
184
- "Rate": 11,
185
- "Location": "Work",
186
- "URL": "https://www.cdc.gov/"
187
- },
188
- {
189
- "STATE": "MT",
190
- "Rate": 14,
191
- "Location": "School",
192
- "URL": "https://www.cdc.gov/"
193
- },
194
- {
195
- "STATE": "NE",
196
- "Rate": 9,
197
- "Location": "School",
198
- "URL": "https://www.cdc.gov/"
199
- },
200
- {
201
- "STATE": "NV",
202
- "Rate": 17,
203
- "Location": "Work",
204
- "URL": "https://www.cdc.gov/"
205
- },
206
- {
207
- "STATE": "NH",
208
- "Rate": 20,
209
- "Location": "Vehicle",
210
- "URL": "https://www.cdc.gov/"
211
- },
212
- {
213
- "STATE": "NJ",
214
- "Rate": 28,
215
- "Location": "Home",
216
- "URL": "https://www.cdc.gov/"
217
- },
218
- {
219
- "STATE": "NM",
220
- "Rate": 10,
221
- "Location": "Home",
222
- "URL": "https://www.cdc.gov/"
223
- },
224
- {
225
- "STATE": "NY",
226
- "Rate": 12,
227
- "Location": "Home",
228
- "URL": "https://www.cdc.gov/"
229
- },
230
- {
231
- "STATE": "NC",
232
- "Rate": 14,
233
- "Location": "Vehicle",
234
- "URL": "https://www.cdc.gov/"
235
- },
236
- {
237
- "STATE": "ND",
238
- "Rate": 9,
239
- "Location": "Work",
240
- "URL": "https://www.cdc.gov/"
241
- },
242
- {
243
- "STATE": "MP",
244
- "Rate": 17,
245
- "Location": "School",
246
- "URL": "https://www.cdc.gov/"
247
- },
248
- {
249
- "STATE": "OH",
250
- "Rate": "NA",
251
- "Location": "School",
252
- "URL": "https://www.cdc.gov/"
253
- },
254
- {
255
- "STATE": "OK",
256
- "Rate": 22,
257
- "Location": "Work",
258
- "URL": "https://www.cdc.gov/"
259
- },
260
- {
261
- "STATE": "OR",
262
- "Rate": 10,
263
- "Location": "Vehicle",
264
- "URL": "https://www.cdc.gov/"
265
- },
266
- {
267
- "STATE": "PW",
268
- "Rate": 12,
269
- "Location": "Home",
270
- "URL": "https://www.cdc.gov/"
271
- },
272
- {
273
- "STATE": "PA",
274
- "Rate": 14,
275
- "Location": "Home",
276
- "URL": "https://www.cdc.gov/"
277
- },
278
- {
279
- "STATE": "PR",
280
- "Rate": 6,
281
- "Location": "Home",
282
- "URL": "https://www.cdc.gov/"
283
- },
284
- {
285
- "STATE": "RI",
286
- "Rate": 17,
287
- "Location": "Vehicle",
288
- "URL": "https://www.cdc.gov/"
289
- },
290
- {
291
- "STATE": "SC",
292
- "Rate": 20,
293
- "Location": "Work",
294
- "URL": "https://www.cdc.gov/"
295
- },
296
- {
297
- "STATE": "SD",
298
- "Rate": 22,
299
- "Location": "School",
300
- "URL": "https://www.cdc.gov/"
301
- },
302
- {
303
- "STATE": "TN",
304
- "Rate": 10,
305
- "Location": "School",
306
- "URL": "https://www.cdc.gov/"
307
- },
308
- {
309
- "STATE": "TX",
310
- "Rate": 12,
311
- "Location": "Work",
312
- "URL": "https://www.cdc.gov/"
313
- },
314
- {
315
- "STATE": "VT",
316
- "Rate": 9,
317
- "Location": "Home",
318
- "URL": "https://www.cdc.gov/"
319
- },
320
- {
321
- "STATE": "VI",
322
- "Rate": 17,
323
- "Location": "Vehicle",
324
- "URL": "https://www.cdc.gov/"
325
- },
326
- {
327
- "STATE": "VA",
328
- "Rate": 20,
329
- "Location": "Work",
330
- "URL": "https://www.cdc.gov/"
331
- },
332
- {
333
- "STATE": "WA",
334
- "Rate": 22,
335
- "Location": "School",
336
- "URL": "https://www.cdc.gov/"
337
- },
338
- {
339
- "STATE": "WV",
340
- "Rate": 10,
341
- "Location": "School",
342
- "URL": "https://www.cdc.gov/"
343
- },
344
- {
345
- "STATE": "WI",
346
- "Rate": 12,
347
- "Location": "Work",
348
- "URL": "https://www.cdc.gov/"
349
- },
350
- {
351
- "STATE": "WY",
352
- "Rate": 14,
353
- "Location": "Home",
354
- "URL": "https://www.cdc.gov/"
355
- },
356
- {
357
- "STATE": "Los Angeles",
358
- "Rate": 14,
359
- "Location": "Vehicle",
360
- "URL": "https://www.cdc.gov/"
361
- },
362
- {
363
- "STATE": "Atlanta",
364
- "Rate": 12,
365
- "Location": "Work",
366
- "URL": "https://www.cdc.gov/"
367
- },
368
- {
369
- "STATE": "Boston",
370
- "Rate": 20,
371
- "Location": "School",
372
- "URL": "https://www.cdc.gov/"
373
- },
374
- {
375
- "STATE": "New York City New York City New York City",
376
- "Rate": 22,
377
- "Location": "School",
378
- "URL": "https://www.cdc.gov/"
379
- },
380
- {
381
- "STATE": "Dallas",
382
- "Rate": 18,
383
- "Location": "Work",
384
- "URL": "https://www.cdc.gov/"
385
- },
386
- {
387
- "STATE": "Seattle",
388
- "Rate": 17,
389
- "Location": "Home",
390
- "URL": "https://www.cdc.gov/"
391
- },
392
- {
393
- "STATE": "New Orleans",
394
- "Rate": 14,
395
- "Location": "Vehicle",
396
- "URL": "https://www.cdc.gov/"
397
- },
398
- {
399
- "STATE": "Birmingham",
400
- "Rate": 14,
401
- "Location": "Vehicle",
402
- "URL": "https://www.cdc.gov/"
403
- },
404
- {
405
- "STATE": "St Paul",
406
- "Rate": 14,
407
- "Location": "Vehicle",
408
- "URL": "https://www.cdc.gov/"
409
- },
410
- {
411
- "STATE": "Hershey",
412
- "Rate": 14,
413
- "Location": "Vehicle",
414
- "URL": "https://www.cdc.gov/"
415
- },
416
- {
417
- "STATE": "Salt Lake City",
418
- "Rate": 14,
419
- "Location": "Vehicle",
420
- "URL": "https://www.cdc.gov/"
421
- },
422
- {
423
- "STATE": "Syracuse",
424
- "Rate": 14,
425
- "Location": "Vehicle",
426
- "URL": "https://www.cdc.gov/"
427
- },
428
- {
429
- "STATE": "Philadelphia",
430
- "Rate": 14,
431
- "Location": "Vehicle",
432
- "URL": "https://www.cdc.gov/"
433
- }
434
- ]