@cdc/map 4.24.10 → 4.24.12-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 (57) hide show
  1. package/dist/cdcmap.js +33447 -32769
  2. package/examples/default-geocode.json +13 -4
  3. package/examples/default-usa-regions.json +267 -117
  4. package/examples/example-city-state.json +6 -3
  5. package/examples/pattern.json +861 -0
  6. package/examples/private/DEV-9644.json +184 -0
  7. package/examples/private/DEV-9989.json +229 -0
  8. package/examples/private/ardi.json +180 -0
  9. package/examples/private/colors 2.json +416 -0
  10. package/examples/private/colors.json +416 -0
  11. package/examples/private/colors.json.zip +0 -0
  12. package/examples/private/customColors.json +45348 -0
  13. package/examples/private/default-patterns.json +867 -0
  14. package/examples/private/test.json +1632 -0
  15. package/index.html +4 -5
  16. package/package.json +3 -3
  17. package/src/CdcMap.tsx +93 -83
  18. package/src/_stories/CdcMap.Legend.Gradient.stories.tsx +67 -0
  19. package/src/_stories/CdcMap.Legend.stories.tsx +40 -0
  20. package/src/_stories/CdcMap.Patterns.stories.tsx +29 -0
  21. package/src/_stories/CdcMap.stories.tsx +59 -0
  22. package/src/_stories/UsaMap.NoData.stories.tsx +19 -0
  23. package/src/_stories/_mock/custom-layer-map.json +1117 -0
  24. package/src/_stories/_mock/default-patterns.json +865 -0
  25. package/src/_stories/_mock/example-city-state.json +858 -0
  26. package/src/_stories/_mock/usa-state-gradient.json +238 -0
  27. package/src/_stories/_mock/wastewater-map.json +208 -0
  28. package/src/components/CityList.tsx +5 -2
  29. package/src/components/EditorPanel/components/EditorPanel.tsx +68 -295
  30. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +27 -23
  31. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +75 -16
  32. package/src/components/Legend/components/Legend.tsx +42 -20
  33. package/src/components/Legend/components/index.scss +24 -24
  34. package/src/components/UsaMap/components/HexIcon.tsx +7 -1
  35. package/src/components/UsaMap/components/SingleState/SingleState.CountyOutput.tsx +40 -6
  36. package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +10 -2
  37. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +57 -12
  38. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +95 -21
  39. package/src/components/UsaMap/components/Territory/TerritoryShape.ts +13 -0
  40. package/src/components/UsaMap/components/UsaMap.County.tsx +11 -13
  41. package/src/components/UsaMap/components/UsaMap.Region.tsx +59 -16
  42. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +2 -1
  43. package/src/components/UsaMap/components/UsaMap.State.tsx +61 -63
  44. package/src/components/UsaMap/helpers/shapes.ts +5 -4
  45. package/src/components/WorldMap/WorldMap.tsx +77 -16
  46. package/src/data/initial-state.js +2 -1
  47. package/src/helpers/applyColorToLegend.ts +80 -0
  48. package/src/helpers/colors.ts +23 -0
  49. package/src/hooks/useTooltip.ts +9 -6
  50. package/src/scss/editor-panel.scss +0 -3
  51. package/src/scss/filters.scss +1 -9
  52. package/src/scss/main.scss +0 -5
  53. package/src/scss/map.scss +11 -63
  54. package/src/types/MapConfig.ts +8 -2
  55. package/src/types/MapContext.ts +1 -0
  56. package/examples/default-patterns.json +0 -579
  57. package/src/scss/datatable.scss +0 -6
@@ -0,0 +1,416 @@
1
+ {
2
+ "general": {
3
+ "geoType": "us",
4
+ "geoBorderColor": "darkGray",
5
+ "showTitle": false,
6
+ "showSidebar": true,
7
+ "showDownloadButton": false,
8
+ "showDownloadMediaButton": false,
9
+ "displayAsHex": true,
10
+ "displayStateLabels": false,
11
+ "territoriesLabel": "Territories",
12
+ "language": "en",
13
+ "hasRegions": false,
14
+ "expandDataTable": false,
15
+ "fullBorder": false,
16
+ "type": "data",
17
+ "palette": {
18
+ "isReversed": true
19
+ },
20
+ "statePicked": {
21
+ "fipsCode": "01",
22
+ "stateName": "Alabama"
23
+ },
24
+ "territoriesAlwaysShow": false,
25
+ "geoLabelOverride": "",
26
+ "convertFipsCodes": true,
27
+ "allowMapZoom": true,
28
+ "hideGeoColumnInTooltip": false,
29
+ "hidePrimaryColumnInTooltip": false,
30
+ "superTitle": "",
31
+ "noStateFoundMessage": "Map Unavailable",
32
+ "annotationDropdownText": "Annotations",
33
+ "headerColor": "theme-blue",
34
+ "title": ""
35
+ },
36
+ "type": "map",
37
+ "customColors": [
38
+ "#edf8fb",
39
+ "#b3cde3",
40
+ "#8c96c6",
41
+ "#8856a7",
42
+ "#810f7c"
43
+ ],
44
+ "columns": {
45
+ "geo": {
46
+ "name": "state",
47
+ "label": "Location",
48
+ "tooltip": false,
49
+ "dataTable": true
50
+ },
51
+ "primary": {
52
+ "dataTable": true,
53
+ "tooltip": true,
54
+ "prefix": "",
55
+ "suffix": "%",
56
+ "name": "value",
57
+ "label": ""
58
+ },
59
+ "navigate": {
60
+ "name": ""
61
+ },
62
+ "latitude": {
63
+ "name": ""
64
+ },
65
+ "longitude": {
66
+ "name": ""
67
+ }
68
+ },
69
+ "legend": {
70
+ "descriptions": {},
71
+ "specialClasses": [],
72
+ "unified": false,
73
+ "singleColumn": false,
74
+ "dynamicDescription": false,
75
+ "type": "equalnumber",
76
+ "numberOfItems": 5,
77
+ "position": "side",
78
+ "title": "Legend",
79
+ "singleRow": false,
80
+ "verticalSorted": false,
81
+ "showSpecialClassesLast": false,
82
+ "style": "circles",
83
+ "subStyle": "linear blocks",
84
+ "tickRotation": "",
85
+ "singleColumnLegend": false,
86
+ "hideBorder": false
87
+ },
88
+ "filters": [],
89
+ "table": {
90
+ "wrapColumns": false,
91
+ "label": "Data Table",
92
+ "expanded": false,
93
+ "limitHeight": false,
94
+ "height": "",
95
+ "caption": "",
96
+ "showDownloadUrl": false,
97
+ "showDataTableLink": false,
98
+ "showFullGeoNameInCSV": false,
99
+ "forceDisplay": false,
100
+ "download": true,
101
+ "indexLabel": "",
102
+ "showDownloadLinkBelow": true
103
+ },
104
+ "tooltips": {
105
+ "appearanceType": "hover",
106
+ "linkLabel": "Learn More",
107
+ "capitalizeLabels": true,
108
+ "opacity": 90
109
+ },
110
+ "visual": {
111
+ "minBubbleSize": 1,
112
+ "maxBubbleSize": 20,
113
+ "extraBubbleBorder": false,
114
+ "cityStyle": "circle",
115
+ "cityStyleLabel": "",
116
+ "showBubbleZeros": false,
117
+ "additionalCityStyles": [],
118
+ "geoCodeCircleSize": 8
119
+ },
120
+ "mapPosition": {
121
+ "coordinates": [
122
+ 0,
123
+ 30
124
+ ],
125
+ "zoom": 1
126
+ },
127
+ "map": {
128
+ "layers": [],
129
+ "patterns": []
130
+ },
131
+ "filterBehavior": "Filter Change",
132
+ "dataTable": {
133
+ "title": "Data Table",
134
+ "forceDisplay": true,
135
+ "caption": "Lorem Ipsum - Text added to Data Table Caption",
136
+ "limitHeight": true,
137
+ "height": "100"
138
+ },
139
+ "orientation": null,
140
+ "visualizationSubType": null,
141
+ "validated": "4.24.3",
142
+ "data": [
143
+ {
144
+ "state": "Alabama",
145
+ "stratification": "Total",
146
+ "value": "33.7"
147
+ },
148
+ {
149
+ "state": "Connecticut",
150
+ "stratification": "Total",
151
+ "value": "35.6"
152
+ },
153
+ {
154
+ "state": "Alaska",
155
+ "stratification": "Total",
156
+ "value": "36.4"
157
+ },
158
+ {
159
+ "state": "Arkansas",
160
+ "stratification": "Total",
161
+ "value": "33.6"
162
+ },
163
+ {
164
+ "state": "Arizona",
165
+ "stratification": "Total",
166
+ "value": "33.5"
167
+ },
168
+ {
169
+ "state": "California",
170
+ "stratification": "Total",
171
+ "value": "34.7"
172
+ },
173
+ {
174
+ "state": "Colorado",
175
+ "stratification": "Total",
176
+ "value": "35.6"
177
+ },
178
+ {
179
+ "state": "District of Columbia",
180
+ "stratification": "Total",
181
+ "value": "30.9"
182
+ },
183
+ {
184
+ "state": "Delaware",
185
+ "stratification": "Total",
186
+ "value": "33.9"
187
+ },
188
+ {
189
+ "state": "Florida",
190
+ "stratification": "Total",
191
+ "value": "34.5"
192
+ },
193
+ {
194
+ "state": "Texas",
195
+ "stratification": "Total",
196
+ "value": "34.7"
197
+ },
198
+ {
199
+ "state": "Georgia",
200
+ "stratification": "Total",
201
+ "value": "31.9"
202
+ },
203
+ {
204
+ "state": "Guam",
205
+ "stratification": "Total",
206
+ "value": "34.5"
207
+ },
208
+ {
209
+ "state": "Hawaii",
210
+ "stratification": "Total",
211
+ "value": "33.8"
212
+ },
213
+ {
214
+ "state": "Iowa",
215
+ "stratification": "Total",
216
+ "value": "33.8"
217
+ },
218
+ {
219
+ "state": "Idaho",
220
+ "stratification": "Total",
221
+ "value": "35.4"
222
+ },
223
+ {
224
+ "state": "Illinois",
225
+ "stratification": "Total",
226
+ "value": "33.9"
227
+ },
228
+ {
229
+ "state": "Indiana",
230
+ "stratification": "Total",
231
+ "value": "33.3"
232
+ },
233
+ {
234
+ "state": "Kansas",
235
+ "stratification": "Total",
236
+ "value": "33.4"
237
+ },
238
+ {
239
+ "state": "Kentucky",
240
+ "stratification": "Total",
241
+ "value": "34.1"
242
+ },
243
+ {
244
+ "state": "Louisiana",
245
+ "stratification": "Total",
246
+ "value": "31.7"
247
+ },
248
+ {
249
+ "state": "Massachusetts",
250
+ "stratification": "Total",
251
+ "value": "34.7"
252
+ },
253
+ {
254
+ "state": "Maryland",
255
+ "stratification": "Total",
256
+ "value": "34.4"
257
+ },
258
+ {
259
+ "state": "Maine",
260
+ "stratification": "Total",
261
+ "value": "33.0"
262
+ },
263
+ {
264
+ "state": "Michigan",
265
+ "stratification": "Total",
266
+ "value": "32.8"
267
+ },
268
+ {
269
+ "state": "Minnesota",
270
+ "stratification": "Total",
271
+ "value": "34.9"
272
+ },
273
+ {
274
+ "state": "Missouri",
275
+ "stratification": "Total",
276
+ "value": "33.9"
277
+ },
278
+ {
279
+ "state": "Mississippi",
280
+ "stratification": "Total",
281
+ "value": "32.7"
282
+ },
283
+ {
284
+ "state": "Montana",
285
+ "stratification": "Total",
286
+ "value": "35.4"
287
+ },
288
+ {
289
+ "state": "North Carolina",
290
+ "stratification": "Total",
291
+ "value": "35.2"
292
+ },
293
+ {
294
+ "state": "North Dakota",
295
+ "stratification": "Total",
296
+ "value": "35.6"
297
+ },
298
+ {
299
+ "state": "Nebraska",
300
+ "stratification": "Total",
301
+ "value": "35.1"
302
+ },
303
+ {
304
+ "state": "New Hampshire",
305
+ "stratification": "Total",
306
+ "value": "36.7"
307
+ },
308
+ {
309
+ "state": "New Jersey",
310
+ "stratification": "Total",
311
+ "value": "36.7"
312
+ },
313
+ {
314
+ "state": "New Mexico",
315
+ "stratification": "Total",
316
+ "value": "36.9"
317
+ },
318
+ {
319
+ "state": "Nevada",
320
+ "stratification": "Total",
321
+ "value": "33.8"
322
+ },
323
+ {
324
+ "state": "New York",
325
+ "stratification": "Total",
326
+ "value": "33.9"
327
+ },
328
+ {
329
+ "state": "Ohio",
330
+ "stratification": "Total",
331
+ "value": "32.8"
332
+ },
333
+ {
334
+ "state": "Oklahoma",
335
+ "stratification": "Total",
336
+ "value": "32.3"
337
+ },
338
+ {
339
+ "state": "Oregon",
340
+ "stratification": "Total",
341
+ "value": "36.0"
342
+ },
343
+ {
344
+ "state": "Pennsylvania",
345
+ "stratification": "Total",
346
+ "value": "34.3"
347
+ },
348
+ {
349
+ "state": "Puerto Rico",
350
+ "stratification": "Total",
351
+ "value": "36.6"
352
+ },
353
+ {
354
+ "state": "Rhode Island",
355
+ "stratification": "Total",
356
+ "value": "36.5"
357
+ },
358
+ {
359
+ "state": "South Carolina",
360
+ "stratification": "Total",
361
+ "value": "34.8"
362
+ },
363
+ {
364
+ "state": "South Dakota",
365
+ "stratification": "Total",
366
+ "value": "35.4"
367
+ },
368
+ {
369
+ "state": "Tennessee",
370
+ "stratification": "Total",
371
+ "value": "32.0"
372
+ },
373
+ {
374
+ "state": "Utah",
375
+ "stratification": "Total",
376
+ "value": "34.2"
377
+ },
378
+ {
379
+ "state": "Virginia",
380
+ "stratification": "Total",
381
+ "value": "32.1"
382
+ },
383
+ {
384
+ "state": "Virgin Islands",
385
+ "stratification": "Total",
386
+ "value": "37.0"
387
+ },
388
+ {
389
+ "state": "Vermont",
390
+ "stratification": "Total",
391
+ "value": "34.1"
392
+ },
393
+ {
394
+ "state": "Washington",
395
+ "stratification": "Total",
396
+ "value": "34.6"
397
+ },
398
+ {
399
+ "state": "Wisconsin",
400
+ "stratification": "Total",
401
+ "value": "33.0"
402
+ },
403
+ {
404
+ "state": "West Virginia",
405
+ "stratification": "Total",
406
+ "value": "33.4"
407
+ },
408
+ {
409
+ "state": "Wyoming",
410
+ "stratification": "Total",
411
+ "value": "35.6"
412
+ }
413
+ ],
414
+ "color": "",
415
+ "version": "4.24.12"
416
+ }
Binary file