@cdc/map 4.24.2 → 4.24.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 (38) hide show
  1. package/dist/cdcmap.js +33089 -32197
  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/example-city-state.json +51 -17
  7. package/examples/hex-colors.json +507 -0
  8. package/examples/usa-special-class-legend.json +501 -0
  9. package/index.html +10 -9
  10. package/package.json +3 -3
  11. package/src/CdcMap.tsx +200 -125
  12. package/src/components/BubbleList.jsx +16 -6
  13. package/src/components/CityList.jsx +64 -12
  14. package/src/components/DataTable.jsx +7 -7
  15. package/src/components/EditorPanel/components/EditorPanel.tsx +1457 -1367
  16. package/src/components/EditorPanel/components/Error.tsx +12 -0
  17. package/src/components/EditorPanel/components/HexShapeSettings.tsx +16 -1
  18. package/src/components/EditorPanel/components/Panel.PatternSettings-style.css +5 -0
  19. package/src/components/EditorPanel/components/Panel.PatternSettings.tsx +18 -1
  20. package/src/components/Legend/components/Legend.tsx +80 -15
  21. package/src/components/Legend/components/LegendItem.Hex.tsx +1 -1
  22. package/src/components/Legend/components/index.scss +31 -5
  23. package/src/components/UsaMap/components/HexIcon.tsx +41 -0
  24. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +38 -19
  25. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +11 -22
  26. package/src/components/UsaMap/components/UsaMap.County.tsx +7 -4
  27. package/src/components/UsaMap/components/UsaMap.Region.tsx +13 -38
  28. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +5 -3
  29. package/src/components/UsaMap/components/UsaMap.State.tsx +77 -60
  30. package/src/components/UsaMap/helpers/patternSizes.tsx +5 -0
  31. package/src/components/WorldMap/components/WorldMap.jsx +20 -3
  32. package/src/data/initial-state.js +3 -0
  33. package/src/data/supported-geos.js +2 -1
  34. package/src/hooks/useMapLayers.tsx +2 -2
  35. package/src/scss/editor-panel.scss +4 -12
  36. package/src/scss/main.scss +3 -1
  37. package/src/scss/map.scss +1 -1
  38. package/src/types/MapConfig.ts +7 -0
@@ -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
+ }
@@ -8,7 +8,7 @@
8
8
  "showSidebar": true,
9
9
  "showTitle": true,
10
10
  "showDownloadButton": true,
11
- "expandDataTable": true,
11
+ "expandDataTable": false,
12
12
  "backgroundColor": "#f5f5f5",
13
13
  "geoBorderColor": "darkGray",
14
14
  "territoriesLabel": "Territories",
@@ -31,7 +31,8 @@
31
31
  "showDownloadImgButton": false,
32
32
  "showDownloadPdfButton": false,
33
33
  "territoriesAlwaysShow": false,
34
- "geoLabelOverride": ""
34
+ "geoLabelOverride": "",
35
+ "convertFipsCodes": true
35
36
  },
36
37
  "type": "map",
37
38
  "color": "yelloworangered",
@@ -97,20 +98,29 @@
97
98
  "dynamicDescription": false,
98
99
  "descriptions": {},
99
100
  "singleRow": false,
100
- "showSpecialClassesLast": false
101
- },
102
- "dataTable": {
103
- "title": "Data Table",
104
- "forceDisplay": true
101
+ "showSpecialClassesLast": false,
102
+ "verticalSorted": false
105
103
  },
104
+ "filters": [],
106
105
  "table": {
107
106
  "showDownloadUrl": false,
108
- "showDataTableLink": true
107
+ "showDataTableLink": true,
108
+ "wrapColumns": false,
109
+ "label": "Data Table",
110
+ "expanded": true,
111
+ "limitHeight": false,
112
+ "height": "",
113
+ "caption": "",
114
+ "showFullGeoNameInCSV": false,
115
+ "forceDisplay": true,
116
+ "download": true,
117
+ "indexLabel": ""
109
118
  },
110
119
  "tooltips": {
111
120
  "appearanceType": "hover",
112
121
  "linkLabel": "Learn More",
113
- "capitalizeLabels": true
122
+ "capitalizeLabels": true,
123
+ "opacity": 90
114
124
  },
115
125
  "runtime": {
116
126
  "editorErrorMessage": []
@@ -121,17 +131,40 @@
121
131
  "maxBubbleSize": 20,
122
132
  "extraBubbleBorder": false,
123
133
  "showBubbleZeros": false,
124
- "geoCodeCircleSize": 2
134
+ "geoCodeCircleSize": 2,
135
+ "cityStyleLabel": "",
136
+ "additionalCityStyles": []
125
137
  },
126
138
  "mapPosition": {
127
- "coordinates": [
128
- 0,
129
- 30
130
- ],
139
+ "coordinates": [0, 30],
131
140
  "zoom": 1
132
141
  },
133
142
  "map": {
134
- "layers": []
143
+ "layers": [],
144
+ "patterns": []
145
+ },
146
+ "hexMap": {
147
+ "type": "",
148
+ "shapeGroups": [
149
+ {
150
+ "legendTitle": "",
151
+ "legendDescription": "",
152
+ "items": [
153
+ {
154
+ "key": "",
155
+ "shape": "Arrow Up",
156
+ "column": "",
157
+ "operator": "=",
158
+ "value": ""
159
+ }
160
+ ]
161
+ }
162
+ ]
163
+ },
164
+ "filterBehavior": "Filter Change",
165
+ "dataTable": {
166
+ "title": "Data Table",
167
+ "forceDisplay": true
135
168
  },
136
169
  "sharing": {
137
170
  "enabled": false,
@@ -807,5 +840,6 @@
807
840
  "URL": "https://www.cdc.gov/"
808
841
  }
809
842
  ],
810
- "filterStyle": "Filter Changes"
811
- }
843
+ "filterStyle": "Filter Changes",
844
+ "version": "4.24.3"
845
+ }