@cdc/dashboard 4.25.5-1 → 4.25.6-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 (55) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcdashboard.js +77621 -77591
  3. package/examples/private/DEV-10120.json +1294 -0
  4. package/examples/private/DEV-10527.json +845 -0
  5. package/examples/private/DEV-10586.json +54319 -0
  6. package/examples/private/DEV-10856.json +54319 -0
  7. package/examples/private/DEV-9199.json +606 -0
  8. package/examples/private/DEV-9644.json +20092 -0
  9. package/examples/private/DEV-9684.json +2135 -0
  10. package/examples/private/DEV-9932.json +95 -0
  11. package/examples/private/DEV-9989.json +229 -0
  12. package/examples/private/art-dashboard.json +18174 -0
  13. package/examples/private/art-scratch.json +2406 -0
  14. package/examples/private/bird-flu-2.json +440 -0
  15. package/examples/private/bird-flu.json +413 -0
  16. package/examples/private/crashing-sidebar.json +975 -0
  17. package/examples/private/d.json +1561 -0
  18. package/examples/private/dashboard-config-ehdi.json +29915 -0
  19. package/examples/private/dashboard-map-filter.json +815 -0
  20. package/examples/private/dashboard-margins.js +15 -0
  21. package/examples/private/dataset.json +1452 -0
  22. package/examples/private/dev-10856-2.json +1348 -0
  23. package/examples/private/ehdi-data.json +29502 -0
  24. package/examples/private/exposure-source-h5-data.csv +26 -0
  25. package/examples/private/fatal-data.csv +3159 -0
  26. package/examples/private/feelings.json +1 -0
  27. package/examples/private/gaza-issue.json +1214 -0
  28. package/examples/private/josh.json +6175 -0
  29. package/examples/private/map-issue.json +628 -0
  30. package/examples/private/markup.json +115 -0
  31. package/examples/private/mpox.json +429 -0
  32. package/examples/private/nhis.json +1792 -0
  33. package/examples/private/testing-pie.json +436 -0
  34. package/examples/private/workforce.json +2041 -0
  35. package/examples/special-classes.json +54340 -0
  36. package/package.json +9 -9
  37. package/src/CdcDashboardComponent.tsx +36 -214
  38. package/src/_stories/_mock/api-filter-map.json +1 -0
  39. package/src/components/CollapsibleVisualizationRow.tsx +2 -4
  40. package/src/components/DashboardEditors.tsx +143 -0
  41. package/src/components/DashboardFilters/DashboardFilters.tsx +205 -205
  42. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +286 -287
  43. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +198 -198
  44. package/src/components/Header/Header.tsx +7 -9
  45. package/src/components/Row.tsx +1 -24
  46. package/src/components/VisualizationRow.tsx +190 -213
  47. package/src/helpers/getVizConfig.ts +93 -80
  48. package/src/helpers/getVizRowColumnLocator.ts +0 -1
  49. package/src/helpers/reloadURLHelpers.ts +10 -13
  50. package/src/store/dashboard.actions.ts +61 -64
  51. package/src/store/dashboard.reducer.ts +0 -11
  52. package/src/types/ConfigRow.ts +0 -1
  53. package/src/types/Dashboard.ts +1 -1
  54. package/src/types/DashboardConfig.ts +1 -1
  55. package/src/types/DataSet.ts +0 -12
@@ -0,0 +1,115 @@
1
+ {
2
+ "dashboard": {
3
+ "theme": "theme-blue",
4
+ "sharedFilters": []
5
+ },
6
+ "rows": [
7
+ {
8
+ "columns": [
9
+ {
10
+ "width": 12,
11
+ "widget": "markup-include1741277548423"
12
+ },
13
+ {},
14
+ {}
15
+ ]
16
+ }
17
+ ],
18
+ "visualizations": {
19
+ "markup-include1741277548423": {
20
+ "filters": [],
21
+ "filterBehavior": "Filter Change",
22
+ "openModal": false,
23
+ "uid": "markup-include1741277548423",
24
+ "type": "markup-include",
25
+ "contentEditor": {
26
+ "inlineHTML": "<h2>Inline HTML</h2>",
27
+ "markupVariables": [],
28
+ "showHeader": true,
29
+ "srcUrl": "#example",
30
+ "title": "Markup Include",
31
+ "useInlineHTML": true
32
+ },
33
+ "theme": "theme-purple",
34
+ "visual": {
35
+ "border": false,
36
+ "accent": false,
37
+ "background": false,
38
+ "hideBackgroundColor": false,
39
+ "borderColorTheme": false
40
+ },
41
+ "showEditorPanel": true,
42
+ "visualizationType": "markup-include",
43
+ "dataDescription": {
44
+ "horizontal": false,
45
+ "series": false
46
+ },
47
+ "dataKey": "valid-data-chart.csv",
48
+ "version": "4.25.1",
49
+ "migrations": {
50
+ "addColorMigration": true
51
+ }
52
+ }
53
+ },
54
+ "table": {
55
+ "label": "Data Table",
56
+ "show": true,
57
+ "showDownloadUrl": false,
58
+ "showDownloadLinkBelow": true,
59
+ "showVertical": true
60
+ },
61
+ "errors": [],
62
+ "currentViewport": "lg",
63
+ "id": 15,
64
+ "category": "General",
65
+ "label": "Dashboard",
66
+ "type": "dashboard",
67
+ "subType": null,
68
+ "orientation": null,
69
+ "icon": {
70
+ "key": null,
71
+ "ref": null,
72
+ "props": {},
73
+ "_owner": null,
74
+ "_store": {}
75
+ },
76
+ "content": "Present multiple data visualizations with shared filter controls.",
77
+ "datasets": {
78
+ "valid-data-chart.csv": {
79
+ "data": [
80
+ {
81
+ "Race": "Hispanic or Latino",
82
+ "Age-adjusted rate": "644.2"
83
+ },
84
+ {
85
+ "Race": "Non-Hispanic American Indian",
86
+ "Age-adjusted rate": "636.1"
87
+ },
88
+ {
89
+ "Race": "Non-Hispanic Black",
90
+ "Age-adjusted rate": "563.7"
91
+ },
92
+ {
93
+ "Race": "Non-Hispanic Asian or Pacific Islander",
94
+ "Age-adjusted rate": "202.5"
95
+ },
96
+ {
97
+ "Race": "Non-Hispanic White",
98
+ "Age-adjusted rate": "183.6"
99
+ }
100
+ ],
101
+ "dataFileSize": 178,
102
+ "dataFileName": "valid-data-chart.csv",
103
+ "dataFileSourceType": "file",
104
+ "dataFileFormat": "CSV",
105
+ "preview": true
106
+ }
107
+ },
108
+ "visualizationType": null,
109
+ "activeVizButtonID": 15,
110
+ "version": "4.25.1",
111
+ "migrations": {
112
+ "addColorMigration": true
113
+ },
114
+ "runtime": {}
115
+ }
@@ -0,0 +1,429 @@
1
+ {
2
+ "dashboard": {
3
+ "theme": "theme-blue",
4
+ "sharedFilters": []
5
+ },
6
+ "rows": [
7
+ {
8
+ "columns": [
9
+ {
10
+ "width": 12,
11
+ "widget": "markup-include1732895422713"
12
+ },
13
+ {},
14
+ {}
15
+ ],
16
+ "uuid": 1732897571400
17
+ },
18
+ {
19
+ "columns": [
20
+ {
21
+ "width": 12,
22
+ "widget": "map1732897107116"
23
+ }
24
+ ],
25
+ "uuid": 1732897569495
26
+ }
27
+ ],
28
+ "visualizations": {
29
+ "markup-include1732895422713": {
30
+ "filters": [],
31
+ "filterBehavior": "Filter Change",
32
+ "openModal": false,
33
+ "uid": "markup-include1732895422713",
34
+ "type": "markup-include",
35
+ "contentEditor": {
36
+ "inlineHTML": "<div class=\"row\">\n <div class=\"col-md-3\">\n <div class=\"red-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l3\">\n <p><strong>Persistent detection</strong></p>\n <p><span class=\"consistent\">{{Persistent}}</span></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"gold-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l3\">\n <p><strong>Detection</strong></p>\n <p><span class=\"intermittent\">{{Detection}}</span></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"blue-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l3\">\n <p><strong>No recent detection</strong></p>\n <p><span class=\"no-detection\">{{No-Detection}}</span></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"gray-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l2\">\n <p><strong>No recent data</strong></p>\n <p><span class=\"no-recent-detection\">{{No-Recent-Data}}</span></p>\n </div>\n </div>\n </div>\n </div>\n</div>",
37
+ "markupVariables": [
38
+ {
39
+ "columnName": "persistent-detection",
40
+ "conditions": [
41
+ {
42
+ "columnName": "testing_group",
43
+ "isOrIsNotEqualTo": "is",
44
+ "value": "Non-clade Specific"
45
+ }
46
+ ],
47
+ "name": "Persistent",
48
+ "tag": "{{Persistent}}"
49
+ },
50
+ {
51
+ "columnName": "detection",
52
+ "conditions": [
53
+ {
54
+ "columnName": "testing_group",
55
+ "isOrIsNotEqualTo": "is",
56
+ "value": "Non-clade Specific"
57
+ }
58
+ ],
59
+ "name": "Detection",
60
+ "tag": "{{Detection}}"
61
+ },
62
+ {
63
+ "columnName": "no-recent-detection",
64
+ "conditions": [
65
+ {
66
+ "columnName": "testing_group",
67
+ "isOrIsNotEqualTo": "is",
68
+ "value": "Non-clade Specific"
69
+ }
70
+ ],
71
+ "name": "No-Detection",
72
+ "tag": "{{No-Detection}}"
73
+ },
74
+ {
75
+ "columnName": "no-recent-data",
76
+ "conditions": [
77
+ {
78
+ "columnName": "testing_group",
79
+ "isOrIsNotEqualTo": "is",
80
+ "value": "Non-clade Specific"
81
+ }
82
+ ],
83
+ "name": "No-Recent-Data",
84
+ "tag": "{{No-Recent-Data}}"
85
+ }
86
+ ],
87
+ "showHeader": true,
88
+ "srcUrl": "#example",
89
+ "title": "",
90
+ "useInlineHTML": true
91
+ },
92
+ "theme": "theme-blue",
93
+ "visual": {
94
+ "border": false,
95
+ "accent": false,
96
+ "background": false,
97
+ "hideBackgroundColor": false,
98
+ "borderColorTheme": false
99
+ },
100
+ "showEditorPanel": true,
101
+ "visualizationType": "markup-include",
102
+ "dataDescription": {
103
+ "horizontal": false,
104
+ "series": false
105
+ },
106
+ "dataKey": "/examples/private/d.json",
107
+ "version": "4.24.10"
108
+ },
109
+ "map1732897107116": {
110
+ "annotations": [],
111
+ "general": {
112
+ "geoType": "us-county",
113
+ "noStateFoundMessage": "Map Unavailable",
114
+ "annotationDropdownText": "Annotations",
115
+ "geoBorderColor": "darkGray",
116
+ "headerColor": "theme-blue",
117
+ "title": "",
118
+ "showTitle": true,
119
+ "showSidebar": true,
120
+ "showDownloadButton": true,
121
+ "showDownloadMediaButton": false,
122
+ "displayAsHex": false,
123
+ "displayStateLabels": false,
124
+ "territoriesAlwaysShow": false,
125
+ "language": "en",
126
+ "geoLabelOverride": "Sewershed Id",
127
+ "hasRegions": false,
128
+ "fullBorder": false,
129
+ "type": "us-geocode",
130
+ "convertFipsCodes": true,
131
+ "palette": {
132
+ "isReversed": false
133
+ },
134
+ "allowMapZoom": true,
135
+ "hideGeoColumnInTooltip": false,
136
+ "hidePrimaryColumnInTooltip": false,
137
+ "statePicked": {
138
+ "fipsCode": "01",
139
+ "stateName": "Alabama"
140
+ },
141
+ "expandDataTable": false,
142
+ "footnotes": "",
143
+ "showDownloadImgButton": false,
144
+ "subtext": "Sites may appear more than once on the map and in the detection category site counts if they are testing using more than one non-clade specific test type.\n<div>\n<br/> <br/> Data Last <span class=\"date\">FromDB</span></div>\n\n<div class=\"csv-link\"><a href=\"/wcms/vizdata/NCEZID_DIDRI/mpox/MpoxNewNWSSTableCSV.csv\">Download CSV</a>\n</div>",
145
+ "navigationTarget": "_self"
146
+ },
147
+ "type": "map",
148
+ "color": "pinkpurple",
149
+ "columns": {
150
+ "geo": {
151
+ "name": "sewershed",
152
+ "label": "Location",
153
+ "tooltip": false,
154
+ "dataTable": true
155
+ },
156
+ "primary": {
157
+ "dataTable": true,
158
+ "tooltip": true,
159
+ "prefix": "",
160
+ "suffix": "",
161
+ "name": "detection_classification",
162
+ "label": "Detection Classification",
163
+ "roundToPlace": 0
164
+ },
165
+ "navigate": {
166
+ "name": ""
167
+ },
168
+ "latitude": {
169
+ "name": "latitude"
170
+ },
171
+ "longitude": {
172
+ "name": "longitude"
173
+ },
174
+ "additionalColumn1": {
175
+ "label": "Sampling Location",
176
+ "dataTable": false,
177
+ "tooltips": false,
178
+ "prefix": "",
179
+ "suffix": "",
180
+ "name": "sample_location",
181
+ "tooltip": true
182
+ },
183
+ "additionalColumn2": {
184
+ "label": "Sewershed Jurisdiction",
185
+ "dataTable": true,
186
+ "tooltips": false,
187
+ "prefix": "",
188
+ "suffix": "",
189
+ "name": "jurisdiction",
190
+ "tooltip": true
191
+ },
192
+ "additionalColumn3": {
193
+ "label": "Counties",
194
+ "dataTable": true,
195
+ "tooltips": false,
196
+ "prefix": "",
197
+ "suffix": "",
198
+ "name": "counties",
199
+ "tooltip": true
200
+ },
201
+ "additionalColumn4": {
202
+ "label": "Population",
203
+ "dataTable": false,
204
+ "tooltips": false,
205
+ "prefix": "",
206
+ "suffix": "",
207
+ "name": "population",
208
+ "tooltip": true
209
+ },
210
+ "additionalColumn5": {
211
+ "label": "Samples Collected",
212
+ "dataTable": false,
213
+ "tooltips": false,
214
+ "prefix": "",
215
+ "suffix": "",
216
+ "name": "samples_collected",
217
+ "tooltip": true
218
+ },
219
+ "additionalColumn6": {
220
+ "label": "Type of Testing",
221
+ "dataTable": true,
222
+ "tooltips": false,
223
+ "prefix": "",
224
+ "suffix": "",
225
+ "name": "type_of_testing",
226
+ "tooltip": true
227
+ },
228
+ "additionalColumn7": {
229
+ "label": "Samples that were positive",
230
+ "dataTable": true,
231
+ "tooltips": false,
232
+ "prefix": "",
233
+ "suffix": "",
234
+ "name": "positive_samples",
235
+ "tooltip": true
236
+ },
237
+ "additionalColumn8": {
238
+ "label": "Date Collection Range",
239
+ "dataTable": true,
240
+ "tooltips": false,
241
+ "prefix": "",
242
+ "suffix": "",
243
+ "name": "date_collection_range"
244
+ }
245
+ },
246
+ "legend": {
247
+ "descriptions": {},
248
+ "specialClasses": [],
249
+ "unified": false,
250
+ "singleColumn": false,
251
+ "singleRow": true,
252
+ "verticalSorted": false,
253
+ "showSpecialClassesLast": false,
254
+ "dynamicDescription": false,
255
+ "type": "category",
256
+ "numberOfItems": 3,
257
+ "position": "bottom",
258
+ "title": "",
259
+ "style": "circles",
260
+ "subStyle": "linear blocks",
261
+ "tickRotation": "",
262
+ "singleColumnLegend": false,
263
+ "hideBorder": false,
264
+ "additionalCategories": [
265
+ "No recent detection",
266
+ "Persistent Detection",
267
+ "No recent data",
268
+ "Detection"
269
+ ],
270
+ "categoryValuesOrder": [
271
+ "Persistent Detection",
272
+ "Detection",
273
+ "No recent detection",
274
+ "No recent data",
275
+ "No Detection"
276
+ ],
277
+ "description": "Select a category to add or remove from map"
278
+ },
279
+ "filters": [
280
+ {
281
+ "order": "asc",
282
+ "label": "",
283
+ "columnName": "testing_group",
284
+ "filterStyle": "dropdown",
285
+ "active": "Non-clade Specific",
286
+ "showDropdown": false
287
+ }
288
+ ],
289
+ "table": {
290
+ "wrapColumns": false,
291
+ "label": "Data Table",
292
+ "expanded": false,
293
+ "limitHeight": false,
294
+ "height": "",
295
+ "caption": "",
296
+ "showDownloadUrl": false,
297
+ "showDataTableLink": false,
298
+ "showDownloadLinkBelow": false,
299
+ "showFullGeoNameInCSV": false,
300
+ "forceDisplay": true,
301
+ "download": true,
302
+ "indexLabel": ""
303
+ },
304
+ "tooltips": {
305
+ "appearanceType": "hover",
306
+ "linkLabel": "Learn More",
307
+ "capitalizeLabels": true,
308
+ "opacity": 90
309
+ },
310
+ "visual": {
311
+ "minBubbleSize": 1,
312
+ "maxBubbleSize": 20,
313
+ "extraBubbleBorder": false,
314
+ "cityStyle": "circle",
315
+ "cityStyleLabel": "",
316
+ "showBubbleZeros": false,
317
+ "additionalCityStyles": [],
318
+ "geoCodeCircleSize": "5"
319
+ },
320
+ "mapPosition": {
321
+ "coordinates": [
322
+ 0,
323
+ 30
324
+ ],
325
+ "zoom": 1
326
+ },
327
+ "map": {
328
+ "layers": [],
329
+ "patterns": []
330
+ },
331
+ "hexMap": {
332
+ "type": "",
333
+ "shapeGroups": [
334
+ {
335
+ "legendTitle": "",
336
+ "legendDescription": "",
337
+ "items": [
338
+ {
339
+ "key": "",
340
+ "shape": "Arrow Up",
341
+ "column": "",
342
+ "operator": "=",
343
+ "value": ""
344
+ }
345
+ ]
346
+ }
347
+ ]
348
+ },
349
+ "filterBehavior": "Filter Change",
350
+ "filterIntro": "",
351
+ "openModal": true,
352
+ "uid": "map1732897107116",
353
+ "dataDescription": {
354
+ "horizontal": false,
355
+ "series": false
356
+ },
357
+ "dataKey": "/examples/private/d.json",
358
+ "version": "4.25.1",
359
+ "customColors": [
360
+ "#d73027",
361
+ "#d73027",
362
+ "#ffcc00",
363
+ "#ffcc00",
364
+ "#0e4183",
365
+ "#0e4183",
366
+ "#Cccccc",
367
+ "#Cccccc"
368
+ ],
369
+ "migrations": {
370
+ "addColorMigration": true
371
+ }
372
+ }
373
+ },
374
+ "table": {
375
+ "label": "Data Table",
376
+ "show": false,
377
+ "showDownloadUrl": false,
378
+ "showDownloadLinkBelow": true,
379
+ "showVertical": true
380
+ },
381
+ "errors": [],
382
+ "currentViewport": "lg",
383
+ "id": 15,
384
+ "category": "General",
385
+ "label": "Dashboard",
386
+ "type": "dashboard",
387
+ "subType": null,
388
+ "orientation": null,
389
+ "icon": {
390
+ "key": null,
391
+ "ref": null,
392
+ "props": {},
393
+ "_owner": null
394
+ },
395
+ "content": "Present multiple data visualizations with shared filter controls.",
396
+ "datasets": {
397
+ "/examples/private/d.json": {
398
+ "dataFileSize": 350102,
399
+ "dataFileName": "/wcms/vizdata/NCEZID_DIDRI/mpox/MpoxNewNWSSMap.json",
400
+ "dataFileSourceType": "url",
401
+ "dataFileFormat": "JSON",
402
+ "preview": false,
403
+ "dataUrl": "/examples/private/d.json"
404
+ },
405
+ "/examples/private/d.json": {
406
+ "dataFileSize": 1118,
407
+ "dataFileName": "/wcms/vizdata/NCEZID_DIDRI/mpox/MpoxNewNWSSSummary.json",
408
+ "dataFileSourceType": "url",
409
+ "dataFileFormat": "JSON",
410
+ "preview": false,
411
+ "dataUrl": "/examples/private/d.json"
412
+ },
413
+ "": {
414
+ "data": [],
415
+ "dataFileSize": 631564,
416
+ "dataFileName": "",
417
+ "dataFileSourceType": "url",
418
+ "dataFileFormat": "HTML",
419
+ "preview": true
420
+ }
421
+ },
422
+ "visualizationType": null,
423
+ "activeVizButtonID": 15,
424
+ "version": "4.25.1",
425
+ "uuid": 1732897568206,
426
+ "migrations": {
427
+ "addColorMigration": true
428
+ }
429
+ }