@cdc/map 4.24.1 → 4.24.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 (43) hide show
  1. package/dist/cdcmap.js +53648 -47918
  2. package/examples/508.json +548 -0
  3. package/examples/default-county.json +0 -28
  4. package/examples/default-hex.json +110 -13
  5. package/examples/default-usa.json +69 -28
  6. package/examples/test.json +0 -9614
  7. package/examples/usa-special-class-legend.json +501 -0
  8. package/examples/{private/zika-issue.json → zika.json} +47 -51
  9. package/index.html +11 -5
  10. package/package.json +3 -3
  11. package/src/CdcMap.tsx +84 -32
  12. package/src/components/BubbleList.jsx +9 -1
  13. package/src/components/CityList.jsx +94 -31
  14. package/src/components/DataTable.jsx +7 -7
  15. package/src/components/EditorPanel/components/EditorPanel.tsx +181 -46
  16. package/src/components/EditorPanel/components/HexShapeSettings.tsx +18 -3
  17. package/src/components/Geo.jsx +4 -2
  18. package/src/components/Legend/components/Legend.tsx +67 -13
  19. package/src/components/Legend/components/LegendItem.Hex.tsx +5 -9
  20. package/src/components/Legend/components/index.scss +31 -5
  21. package/src/components/UsaMap/components/HexIcon.tsx +41 -0
  22. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +38 -19
  23. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +10 -21
  24. package/src/components/UsaMap/components/UsaMap.Region.tsx +11 -37
  25. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +0 -1
  26. package/src/components/UsaMap/components/UsaMap.State.tsx +62 -61
  27. package/src/components/UsaMap/helpers/patternSizes.tsx +5 -0
  28. package/src/components/WorldMap/components/WorldMap.jsx +16 -8
  29. package/src/components/WorldMap/data/world-topo-guiana-update.json +1 -0
  30. package/src/components/WorldMap/data/world-topo-old.json +1 -0
  31. package/{examples/private/new-world.json → src/components/WorldMap/data/world-topo-recent.json} +23137 -22280
  32. package/src/components/WorldMap/data/world-topo.json +1 -1
  33. package/src/data/initial-state.js +5 -2
  34. package/src/data/supported-geos.js +21 -1
  35. package/src/hooks/useTooltip.ts +4 -4
  36. package/src/scss/editor-panel.scss +5 -3
  37. package/src/scss/main.scss +2 -1
  38. package/src/scss/map.scss +22 -12
  39. package/src/types/MapConfig.ts +7 -0
  40. package/examples/private/map-text-wrap.json +0 -574
  41. package/examples/private/map-world-data.json +0 -1046
  42. package/examples/world-geocode-data.json +0 -18
  43. package/examples/world-geocode.json +0 -108
@@ -14,9 +14,26 @@
14
14
  "territoriesLabel": "Territories",
15
15
  "language": "en",
16
16
  "hasRegions": false,
17
- "displayAsHex": true
17
+ "displayAsHex": true,
18
+ "showDownloadMediaButton": false,
19
+ "displayStateLabels": false,
20
+ "territoriesAlwaysShow": false,
21
+ "geoLabelOverride": "",
22
+ "fullBorder": false,
23
+ "convertFipsCodes": true,
24
+ "palette": {
25
+ "isReversed": false
26
+ },
27
+ "allowMapZoom": true,
28
+ "hideGeoColumnInTooltip": false,
29
+ "hidePrimaryColumnInTooltip": false,
30
+ "statePicked": {
31
+ "fipsCode": "01",
32
+ "stateName": "Alabama"
33
+ }
18
34
  },
19
- "filters": [{ "label": "", "values": [], "columnName": "Condition" }],
35
+ "type": "map",
36
+ "color": "yelloworangered",
20
37
  "columns": {
21
38
  "geo": {
22
39
  "dataTable": true,
@@ -48,6 +65,12 @@
48
65
  },
49
66
  "geosInRegion": {
50
67
  "name": ""
68
+ },
69
+ "latitude": {
70
+ "name": ""
71
+ },
72
+ "longitude": {
73
+ "name": ""
51
74
  }
52
75
  },
53
76
  "legend": {
@@ -57,13 +80,93 @@
57
80
  "description": "Legend Text",
58
81
  "type": "equalnumber",
59
82
  "specialClasses": [
60
- { "key": "Rate", "value": "*", "label": "*" },
61
- { "key": "Rate", "value": "NA", "label": "N/A" }
83
+ {
84
+ "key": "Rate",
85
+ "value": "*",
86
+ "label": "*"
87
+ },
88
+ {
89
+ "key": "Rate",
90
+ "value": "NA",
91
+ "label": "N/A"
92
+ }
62
93
  ],
63
94
  "unified": false,
64
95
  "singleColumn": false,
65
- "dynamicDescription": false
96
+ "dynamicDescription": false,
97
+ "descriptions": {},
98
+ "singleRow": false,
99
+ "verticalSorted": false,
100
+ "showSpecialClassesLast": false
101
+ },
102
+ "filters": [
103
+ {
104
+ "label": "",
105
+ "values": [],
106
+ "columnName": "Condition"
107
+ }
108
+ ],
109
+ "table": {
110
+ "wrapColumns": false,
111
+ "label": "Data Table",
112
+ "expanded": false,
113
+ "limitHeight": false,
114
+ "height": "",
115
+ "caption": "",
116
+ "showDownloadUrl": false,
117
+ "showDataTableLink": true,
118
+ "showFullGeoNameInCSV": false,
119
+ "forceDisplay": true,
120
+ "download": false,
121
+ "indexLabel": ""
122
+ },
123
+ "tooltips": {
124
+ "appearanceType": "hover",
125
+ "linkLabel": "Learn More",
126
+ "capitalizeLabels": true,
127
+ "opacity": 90
128
+ },
129
+ "runtime": {
130
+ "editorErrorMessage": []
131
+ },
132
+ "visual": {
133
+ "minBubbleSize": 1,
134
+ "maxBubbleSize": 20,
135
+ "extraBubbleBorder": false,
136
+ "cityStyle": "circle",
137
+ "geoCodeCircleSize": 8,
138
+ "showBubbleZeros": false
139
+ },
140
+ "mapPosition": {
141
+ "coordinates": [
142
+ 0,
143
+ 30
144
+ ],
145
+ "zoom": 1
146
+ },
147
+ "map": {
148
+ "layers": [],
149
+ "patterns": []
66
150
  },
151
+ "hexMap": {
152
+ "type": "shapes",
153
+ "shapeGroups": [
154
+ {
155
+ "legendTitle": "Test",
156
+ "legendDescription": "test",
157
+ "items": [
158
+ {
159
+ "key": "STATE",
160
+ "shape": "Arrow Up",
161
+ "column": "",
162
+ "operator": "=",
163
+ "value": "NV"
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ },
169
+ "filterBehavior": "Filter Change",
67
170
  "data": [
68
171
  {
69
172
  "STATE": "AL",
@@ -464,12 +567,6 @@
464
567
  "dataTable": {
465
568
  "title": "Data Table"
466
569
  },
467
- "tooltips": {
468
- "appearanceType": "hover",
469
- "linkLabel": "Learn More",
470
- "capitalizeLabels": true
471
- },
472
- "color": "yelloworangered",
473
570
  "usingWidgetLoader": true,
474
- "type": "map"
475
- }
571
+ "validated": 4.23
572
+ }
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  "type": "map",
34
- "color": "pinkpurple",
34
+ "color": "qualitative4",
35
35
  "columns": {
36
36
  "geo": {
37
37
  "name": "State",
@@ -70,24 +70,7 @@
70
70
  "singleRow": false,
71
71
  "verticalSorted": false,
72
72
  "showSpecialClassesLast": false,
73
- "categoryValuesOrder": [
74
- "Arboviral 2",
75
- "Arboviral 3",
76
- "Arboviral 4",
77
- "Arboviral 5",
78
- "Arboviral 6",
79
- "Arboviral 7",
80
- "Arboviral 8",
81
- "Arboviral 9",
82
- "Arboviral 10",
83
- "Arboviral 11",
84
- "Arboviral 12",
85
- "Arboviral",
86
- "Babesiosis",
87
- "Congenital Syphilis",
88
- "FDD",
89
- "Generic v2.0"
90
- ]
73
+ "categoryValuesOrder": ["Arboviral 2", "Arboviral 3", "Arboviral 4", "Arboviral 5", "Arboviral 6", "Arboviral 7", "Arboviral 8", "Arboviral 9", "Arboviral 10", "Arboviral 11", "Arboviral 12", "Arboviral", "Babesiosis", "Congenital Syphilis", "FDD", "Generic v2.0"]
91
74
  },
92
75
  "filters": [],
93
76
  "table": {
@@ -117,15 +100,33 @@
117
100
  "minBubbleSize": 1,
118
101
  "maxBubbleSize": 20,
119
102
  "extraBubbleBorder": false,
120
- "cityStyle": "circle",
121
- "geoCodeCircleSize": 2,
122
- "showBubbleZeros": false
103
+ "cityStyle": "pin",
104
+ "geoCodeCircleSize": "4",
105
+ "showBubbleZeros": false,
106
+ "additionalCityStyles": [
107
+ {
108
+ "label": "Tampa Diamond",
109
+ "column": "State",
110
+ "value": "Tampa",
111
+ "shape": "Diamond"
112
+ },
113
+ {
114
+ "label": " Production Label",
115
+ "column": "Status",
116
+ "value": "Production",
117
+ "shape": "Star"
118
+ },
119
+ {
120
+ "label": "Onboarding label",
121
+ "column": "Status",
122
+ "value": "Onboarding",
123
+ "shape": "Triangle"
124
+ }
125
+ ],
126
+ "cityStyleLabel": "Default city shape"
123
127
  },
124
128
  "mapPosition": {
125
- "coordinates": [
126
- 0,
127
- 30
128
- ],
129
+ "coordinates": [0, 30],
129
130
  "zoom": 1
130
131
  },
131
132
  "map": {
@@ -158,6 +159,46 @@
158
159
  },
159
160
  "filterBehavior": "Filter Change",
160
161
  "data": [
162
+ {
163
+ "Condition": "Arboviral 2",
164
+ "State": "Chicago",
165
+ "Status": "Onboarding"
166
+ },
167
+ {
168
+ "Condition": "Arboviral 7",
169
+ "State": "Tampa",
170
+ "Status": "Onboarding"
171
+ },
172
+ {
173
+ "Condition": "Arboviral 9",
174
+ "State": "Seatle",
175
+ "Status": "Onboarding"
176
+ },
177
+ {
178
+ "Condition": "Arboviral 9",
179
+ "State": "Denver",
180
+ "Status": "Onboarding"
181
+ },
182
+ {
183
+ "Condition": "Arboviral 4",
184
+ "State": "Dallas",
185
+ "Status": "Production"
186
+ },
187
+ {
188
+ "Condition": "Arboviral 4",
189
+ "State": "Sacramento",
190
+ "Status": "Production"
191
+ },
192
+ {
193
+ "Condition": "Arboviral 3",
194
+ "State": "Atlanta",
195
+ "Status": "Production"
196
+ },
197
+ {
198
+ "Condition": "Arboviral 9",
199
+ "State": "Orlando",
200
+ "Status": "Production"
201
+ },
161
202
  {
162
203
  "Condition": "Arboviral 2",
163
204
  "State": "AL",
@@ -319,7 +360,7 @@
319
360
  "Status": "Production"
320
361
  },
321
362
  {
322
- "Condition": "Arboviral",
363
+ "Condition": "Arboviral 5",
323
364
  "State": "New York City",
324
365
  "Status": "Production"
325
366
  },
@@ -1083,4 +1124,4 @@
1083
1124
  "forceDisplay": true
1084
1125
  },
1085
1126
  "validated": 4.23
1086
- }
1127
+ }