@cdc/dashboard 4.25.3 → 4.25.6

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 (63) hide show
  1. package/Dynamic_Data.md +79 -0
  2. package/Override_Data.md +39 -0
  3. package/dist/cdcdashboard.js +77308 -78377
  4. package/examples/legend-issue-data.json +1874 -0
  5. package/examples/legend-issue.json +749 -0
  6. package/examples/m2.json +32904 -0
  7. package/examples/map.json +628 -0
  8. package/examples/special-classes.json +54340 -0
  9. package/index.html +1 -26
  10. package/package.json +10 -15
  11. package/src/CdcDashboardComponent.tsx +65 -216
  12. package/src/_stories/Dashboard.stories.tsx +2 -0
  13. package/src/_stories/_mock/api-filter-map.json +43 -1
  14. package/src/components/CollapsibleVisualizationRow.tsx +4 -6
  15. package/src/components/DashboardEditors.tsx +143 -0
  16. package/src/components/DashboardFilters/DashboardFilters.tsx +205 -205
  17. package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +129 -0
  18. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +680 -652
  19. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +198 -198
  20. package/src/components/DataDesignerModal.tsx +33 -14
  21. package/src/components/Header/Header.tsx +7 -9
  22. package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +3 -0
  23. package/src/components/Row.tsx +2 -24
  24. package/src/components/VisualizationRow.tsx +191 -214
  25. package/src/helpers/getVizConfig.ts +108 -80
  26. package/src/helpers/getVizRowColumnLocator.ts +0 -1
  27. package/src/helpers/reloadURLHelpers.ts +11 -6
  28. package/src/helpers/shouldLoadAllFilters.ts +30 -30
  29. package/src/index.tsx +2 -1
  30. package/src/scss/main.scss +0 -5
  31. package/src/store/dashboard.actions.ts +2 -2
  32. package/src/store/dashboard.reducer.ts +15 -11
  33. package/src/types/ConfigRow.ts +0 -1
  34. package/src/types/Dashboard.ts +1 -1
  35. package/src/types/DashboardConfig.ts +1 -1
  36. package/src/types/SharedFilter.ts +2 -0
  37. package/examples/private/DEV-10120.json +0 -1294
  38. package/examples/private/DEV-10527.json +0 -845
  39. package/examples/private/DEV-10586.json +0 -54319
  40. package/examples/private/DEV-10856.json +0 -54319
  41. package/examples/private/DEV-9199.json +0 -606
  42. package/examples/private/DEV-9644.json +0 -20092
  43. package/examples/private/DEV-9684.json +0 -2135
  44. package/examples/private/DEV-9932.json +0 -95
  45. package/examples/private/DEV-9989.json +0 -229
  46. package/examples/private/art-dashboard.json +0 -18174
  47. package/examples/private/art-scratch.json +0 -2406
  48. package/examples/private/bird-flu-2.json +0 -440
  49. package/examples/private/bird-flu.json +0 -413
  50. package/examples/private/dashboard-config-ehdi.json +0 -29915
  51. package/examples/private/dashboard-map-filter.json +0 -815
  52. package/examples/private/dashboard-margins.js +0 -15
  53. package/examples/private/dataset.json +0 -1452
  54. package/examples/private/dev-10856-2.json +0 -1348
  55. package/examples/private/ehdi-data.json +0 -29502
  56. package/examples/private/exposure-source-h5-data.csv +0 -26
  57. package/examples/private/fatal-data.csv +0 -3159
  58. package/examples/private/feelings.json +0 -1
  59. package/examples/private/gaza-issue.json +0 -1214
  60. package/examples/private/markup.json +0 -115
  61. package/examples/private/nhis.json +0 -1792
  62. package/examples/private/workforce.json +0 -2041
  63. package/src/types/DataSet.ts +0 -11
@@ -1,413 +0,0 @@
1
- {
2
- "dashboard": {
3
- "theme": "theme-blue",
4
- "sharedFilters": [
5
- {
6
- "key": "Confirmed or probable cases",
7
- "showDropdown": true,
8
- "values": [
9
- "Confirmed",
10
- "Probable"
11
- ],
12
- "type": "datafilter",
13
- "columnName": "Confirmed or Probable",
14
- "usedBy": [
15
- "map1738173988574",
16
- "markup-include1738174007337"
17
- ],
18
- "tier": 1,
19
- "setByQueryParameter": "confirmed",
20
- "parents": ""
21
- },
22
- {
23
- "key": "State or Territory",
24
- "showDropdown": true,
25
- "values": [
26
- "Arizona",
27
- "California",
28
- "Colorado",
29
- "Delaware",
30
- "Iowa",
31
- "Louisiana",
32
- "Michigan",
33
- "Missouri",
34
- "Oregon",
35
- "Texas",
36
- "Washington",
37
- "Wisconsin"
38
- ],
39
- "type": "datafilter",
40
- "columnName": "State",
41
- "setBy": "map1738173988574",
42
- "usedBy": [
43
- "markup-include1738174007337"
44
- ],
45
- "tier": 1
46
- }
47
- ],
48
- "title": ""
49
- },
50
- "rows": [
51
- {
52
- "columns": [
53
- {
54
- "width": 12,
55
- "widget": "dashboardFilters1738174818296"
56
- }
57
- ],
58
- "uuid": 1738261640288
59
- },
60
- {
61
- "columns": [
62
- {
63
- "width": 4,
64
- "widget": "markup-include1738174007337"
65
- },
66
- {
67
- "width": 8,
68
- "widget": "map1738173988574"
69
- }
70
- ],
71
- "uuid": 1738261639358
72
- }
73
- ],
74
- "visualizations": {
75
- "map1738173988574": {
76
- "annotations": [],
77
- "general": {
78
- "geoType": "us",
79
- "noStateFoundMessage": "Map Unavailable",
80
- "annotationDropdownText": "Annotations",
81
- "geoBorderColor": "darkGray",
82
- "headerColor": "theme-blue",
83
- "title": "",
84
- "showTitle": false,
85
- "showSidebar": true,
86
- "showDownloadButton": true,
87
- "showDownloadMediaButton": false,
88
- "displayAsHex": false,
89
- "displayStateLabels": false,
90
- "territoriesLabel": "Territories",
91
- "territoriesAlwaysShow": false,
92
- "language": "en",
93
- "geoLabelOverride": "State/Territory",
94
- "hasRegions": false,
95
- "fullBorder": false,
96
- "type": "data",
97
- "convertFipsCodes": true,
98
- "palette": {
99
- "isReversed": false
100
- },
101
- "allowMapZoom": true,
102
- "hideGeoColumnInTooltip": false,
103
- "hidePrimaryColumnInTooltip": false,
104
- "statePicked": {
105
- "fipsCode": "01",
106
- "stateName": "Alabama"
107
- },
108
- "expandDataTable": false
109
- },
110
- "type": "map",
111
- "color": "sequential-blue-2(MPX)",
112
- "columns": {
113
- "geo": {
114
- "name": "State",
115
- "label": "Location",
116
- "tooltip": false,
117
- "dataTable": true
118
- },
119
- "primary": {
120
- "dataTable": false,
121
- "tooltip": false,
122
- "prefix": "",
123
- "suffix": "",
124
- "name": "Category",
125
- "label": "",
126
- "roundToPlace": 0
127
- },
128
- "navigate": {
129
- "name": ""
130
- },
131
- "latitude": {
132
- "name": ""
133
- },
134
- "longitude": {
135
- "name": ""
136
- },
137
- "additionalColumn1": {
138
- "label": "Total Cases",
139
- "dataTable": true,
140
- "tooltips": false,
141
- "prefix": "",
142
- "suffix": "",
143
- "name": "State Total",
144
- "tooltip": true
145
- },
146
- "additionalColumn2": {
147
- "label": "Dairy Herds (Cattle)*",
148
- "dataTable": true,
149
- "tooltips": false,
150
- "prefix": "",
151
- "suffix": "",
152
- "name": "Dairy Herds",
153
- "tooltip": true
154
- },
155
- "additionalColumn3": {
156
- "label": "Poultry Farms and Culling Operations*",
157
- "dataTable": true,
158
- "tooltips": false,
159
- "prefix": "",
160
- "suffix": "",
161
- "name": "Poultry Farms and Culling Operations",
162
- "tooltip": true
163
- },
164
- "additionalColumn4": {
165
- "label": "Other Animal Exposure†",
166
- "dataTable": true,
167
- "tooltips": false,
168
- "prefix": "",
169
- "suffix": "",
170
- "name": "Other Animal Exposure",
171
- "tooltip": true
172
- },
173
- "additionalColumn5": {
174
- "label": "Exposure Source Unknown‡",
175
- "dataTable": true,
176
- "tooltips": false,
177
- "prefix": "",
178
- "suffix": "",
179
- "name": "Exposure Source Unknown",
180
- "tooltip": true
181
- }
182
- },
183
- "legend": {
184
- "descriptions": {},
185
- "specialClasses": [],
186
- "unified": false,
187
- "singleColumn": false,
188
- "singleRow": false,
189
- "verticalSorted": false,
190
- "showSpecialClassesLast": false,
191
- "dynamicDescription": false,
192
- "type": "category",
193
- "numberOfItems": 3,
194
- "position": "bottom",
195
- "title": "Total Cases",
196
- "style": "gradient",
197
- "subStyle": "linear blocks",
198
- "tickRotation": "",
199
- "singleColumnLegend": false,
200
- "hideBorder": false,
201
- "additionalCategories": [
202
- "0"
203
- ],
204
- "categoryValuesOrder": [
205
- "0",
206
- "1-5",
207
- "6-10",
208
- ">10"
209
- ]
210
- },
211
- "filters": [],
212
- "table": {
213
- "wrapColumns": false,
214
- "label": "Data Table",
215
- "expanded": false,
216
- "limitHeight": false,
217
- "height": "",
218
- "caption": "",
219
- "showDownloadUrl": false,
220
- "showDataTableLink": false,
221
- "showDownloadLinkBelow": true,
222
- "showFullGeoNameInCSV": false,
223
- "forceDisplay": true,
224
- "download": true,
225
- "indexLabel": ""
226
- },
227
- "tooltips": {
228
- "appearanceType": "hover",
229
- "linkLabel": "Learn More",
230
- "capitalizeLabels": true,
231
- "opacity": 90
232
- },
233
- "visual": {
234
- "minBubbleSize": 1,
235
- "maxBubbleSize": 20,
236
- "extraBubbleBorder": false,
237
- "cityStyle": "circle",
238
- "cityStyleLabel": "",
239
- "showBubbleZeros": false,
240
- "additionalCityStyles": [],
241
- "geoCodeCircleSize": 8
242
- },
243
- "mapPosition": {
244
- "coordinates": [
245
- 0,
246
- 30
247
- ],
248
- "zoom": 1
249
- },
250
- "map": {
251
- "layers": [],
252
- "patterns": []
253
- },
254
- "hexMap": {
255
- "type": "",
256
- "shapeGroups": [
257
- {
258
- "legendTitle": "",
259
- "legendDescription": "",
260
- "items": [
261
- {
262
- "key": "",
263
- "shape": "Arrow Up",
264
- "column": "",
265
- "operator": "=",
266
- "value": ""
267
- }
268
- ]
269
- }
270
- ]
271
- },
272
- "filterBehavior": "Filter Change",
273
- "filterIntro": "",
274
- "openModal": true,
275
- "uid": "map1738173988574",
276
- "dataDescription": {
277
- "horizontal": false,
278
- "series": false
279
- },
280
- "dataKey": "/examples/private/exposure-source-h5-data.csv",
281
- "version": "4.24.10",
282
- "customColors": [
283
- "#DFE1E2",
284
- "#DFE1E2",
285
- "#C0F2FD",
286
- "#C0F2FD",
287
- "#5EBAD4",
288
- "#5EBAD4",
289
- "#083352",
290
- "#083352"
291
- ]
292
- },
293
- "markup-include1738174007337": {
294
- "filters": [],
295
- "filterBehavior": "Filter Change",
296
- "openModal": false,
297
- "uid": "markup-include1738174007337",
298
- "type": "markup-include",
299
- "contentEditor": {
300
- "inlineHTML": "<p class=\"h4\">{{state}} Total Cases: {{total}} </p>\n<table class=\"table\">\n <tbody>\n <tr>\n <th>Cases</th>\n <th>Exposure Source</th>\n </tr>\n <tr>\n <td>{{dairy}}</td>\n <td>Dairy Herds (Cattle)*</td>\n </tr>\n <tr>\n <td>{{poultry}}</td>\n <td>Poultry Farms and Culling Operations*</td>\n </tr>\n <tr>\n <td>{{other}}</td>\n <td>Other Animal Exposure†</td>\n </tr> \n <tr>\n <td>{{unknown}}</td>\n <td>Exposure Source Unknown‡</td>\n </tr>\n </tbody>\n</table>\n\n<p class=\"mt-2\">NOTE: One additional case was previously detected in a poultry worker in Colorado in 2022. Louisiana reported the first H5 bird flu death in the U.S.</p>\n\n<p class=\"mt-2\">*Exposure Associated with Commercial Agriculture and Related Operations<br/>\n<sup>†</sup>Exposure was related to other animals such as backyard flocks, wild birds, or other mammals<br/>\n<sup>‡</sup>Exposure source was not able to be identified\n</p>",
301
- "markupVariables": [
302
- {
303
- "columnName": "Dairy Herds",
304
- "conditions": [],
305
- "name": "dairy",
306
- "tag": "{{dairy}}"
307
- },
308
- {
309
- "columnName": "Poultry Farms and Culling Operations",
310
- "conditions": [],
311
- "name": "poultry",
312
- "tag": "{{poultry}}"
313
- },
314
- {
315
- "columnName": "Other Animal Exposure",
316
- "conditions": [],
317
- "name": "other",
318
- "tag": "{{other}}"
319
- },
320
- {
321
- "columnName": "Exposure Source Unknown",
322
- "conditions": [],
323
- "name": "unknown",
324
- "tag": "{{unknown}}"
325
- },
326
- {
327
- "columnName": "State Total",
328
- "conditions": [],
329
- "name": "total",
330
- "tag": "{{total}}"
331
- },
332
- {
333
- "columnName": "State",
334
- "conditions": [],
335
- "name": "state",
336
- "tag": "{{state}}"
337
- }
338
- ],
339
- "showHeader": true,
340
- "srcUrl": "#example",
341
- "title": "",
342
- "useInlineHTML": true
343
- },
344
- "theme": "theme-blue",
345
- "visual": {
346
- "border": false,
347
- "accent": false,
348
- "background": false,
349
- "hideBackgroundColor": false,
350
- "borderColorTheme": false
351
- },
352
- "showEditorPanel": true,
353
- "visualizationType": "markup-include",
354
- "dataDescription": {
355
- "horizontal": false,
356
- "series": false
357
- },
358
- "dataKey": "/examples/private/exposure-source-h5-data.csv",
359
- "version": "4.24.10"
360
- },
361
- "dashboardFilters1738174818296": {
362
- "filters": [],
363
- "filterBehavior": "Filter Change",
364
- "newViz": true,
365
- "openModal": true,
366
- "uid": "dashboardFilters1738174818296",
367
- "type": "dashboardFilters",
368
- "sharedFilterIndexes": [
369
- 0,
370
- 1
371
- ],
372
- "visualizationType": "dashboardFilters",
373
- "applyFiltersButtonText": "Apply",
374
- "autoLoad": true
375
- }
376
- },
377
- "table": {
378
- "label": "Data Table",
379
- "show": false,
380
- "showDownloadUrl": false,
381
- "showDownloadLinkBelow": true,
382
- "showVertical": true
383
- },
384
- "errors": [],
385
- "currentViewport": "lg",
386
- "id": 15,
387
- "category": "General",
388
- "label": "Dashboard",
389
- "type": "dashboard",
390
- "subType": null,
391
- "orientation": null,
392
- "icon": {
393
- "key": null,
394
- "ref": null,
395
- "props": {},
396
- "_owner": null
397
- },
398
- "content": "Present multiple data visualizations with shared filter controls.",
399
- "datasets": {
400
- "/examples/private/exposure-source-h5-data.csv": {
401
- "dataFileSize": 983,
402
- "dataFileName": "/bird-flu/modules/situation-summary/exposure-source-h5-data.csv",
403
- "dataFileSourceType": "url",
404
- "dataFileFormat": "CSV",
405
- "preview": true,
406
- "dataUrl": "/examples/private/exposure-source-h5-data.csv"
407
- }
408
- },
409
- "visualizationType": null,
410
- "activeVizButtonID": 15,
411
- "version": "4.24.10",
412
- "uuid": 1738261637793
413
- }