@cdc/dashboard 4.25.11 → 4.26.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 (77) hide show
  1. package/Dynamic_Data.md +66 -0
  2. package/dist/cdcdashboard-8NmHlKRI.es.js +15 -0
  3. package/dist/cdcdashboard-BPoPzKPz.es.js +6 -0
  4. package/dist/cdcdashboard-Cf9_fbQf.es.js +6 -0
  5. package/dist/{cdcdashboard-dgT_1dIT.es.js → cdcdashboard-DQ00cQCm.es.js} +1 -20
  6. package/dist/cdcdashboard-jiQQPkty.es.js +6 -0
  7. package/dist/cdcdashboard.js +83537 -86913
  8. package/examples/api-dashboard-data.json +272 -0
  9. package/examples/api-dashboard-years.json +11 -0
  10. package/examples/api-geographies-data.json +11 -0
  11. package/examples/default.json +522 -133
  12. package/examples/nested-dropdown.json +6985 -0
  13. package/examples/private/abc.json +467 -0
  14. package/examples/private/cat-y.json +1235 -0
  15. package/examples/private/chronic-dash.json +1584 -0
  16. package/examples/private/dash.json +12696 -0
  17. package/examples/private/map-issue.json +2260 -0
  18. package/examples/private/mpinc-state-reports.json +2260 -0
  19. package/examples/private/npcr.json +1 -0
  20. package/examples/private/nwss/rsv.json +1240 -0
  21. package/examples/private/simple-dash.json +490 -0
  22. package/examples/private/test-dash.json +0 -0
  23. package/examples/private/test.json +125407 -0
  24. package/examples/private/test123.json +491 -0
  25. package/examples/private/timeline-data.json +4994 -0
  26. package/examples/private/timeline.json +1708 -0
  27. package/examples/test-api-filter-reset.json +8 -4
  28. package/examples/test-dashboard-simple.json +503 -0
  29. package/examples/tp5-gauges.json +196 -0
  30. package/examples/tp5-test.json +266 -0
  31. package/index.html +1 -30
  32. package/package.json +39 -40
  33. package/src/CdcDashboardComponent.tsx +18 -5
  34. package/src/_stories/Dashboard.DataSetup.stories.tsx +204 -0
  35. package/src/_stories/Dashboard.stories.tsx +407 -1
  36. package/src/_stories/_mock/dashboard-line-chart-angles.json +1030 -0
  37. package/src/_stories/_mock/filter-cascade.json +3350 -0
  38. package/src/_stories/_mock/gallery-data-bite-dashboard.json +3500 -0
  39. package/src/_stories/_mock/nested-parent-child-filters.json +392 -0
  40. package/src/_stories/_mock/parent-child-filters.json +233 -0
  41. package/src/_stories/_mock/tp5-test.json +267 -0
  42. package/src/components/DashboardFilters/DashboardFilters.tsx +20 -11
  43. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +92 -38
  44. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +56 -30
  45. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +151 -10
  46. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +11 -7
  47. package/src/components/DataDesignerModal.tsx +6 -1
  48. package/src/components/Header/Header.tsx +51 -20
  49. package/src/components/VisualizationRow.tsx +76 -5
  50. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +2 -20
  51. package/src/components/Widget/Widget.tsx +1 -1
  52. package/src/data/initial-state.js +1 -0
  53. package/src/helpers/addValuesToDashboardFilters.ts +30 -31
  54. package/src/helpers/apiFilterHelpers.ts +28 -32
  55. package/src/helpers/changeFilterActive.ts +67 -65
  56. package/src/helpers/formatConfigBeforeSave.ts +6 -5
  57. package/src/helpers/getUpdateConfig.ts +91 -91
  58. package/src/helpers/tests/addValuesToDashboardFilters.test.ts +141 -44
  59. package/src/helpers/tests/apiFilterHelpers.test.ts +523 -420
  60. package/src/helpers/tests/updatesChildFilters.test.ts +53 -22
  61. package/src/helpers/updateChildFilters.ts +50 -27
  62. package/src/scss/main.scss +144 -1
  63. package/src/test/CdcDashboard.test.jsx +9 -4
  64. package/src/types/Dashboard.ts +1 -0
  65. package/src/types/FilterStyles.ts +8 -7
  66. package/src/types/SharedFilter.ts +13 -0
  67. package/vite.config.js +7 -1
  68. package/LICENSE +0 -201
  69. package/dist/cdcdashboard-BnB1QM5d.es.js +0 -361528
  70. package/dist/cdcdashboard-Ct2SB0vL.es.js +0 -231049
  71. package/dist/cdcdashboard-D6CG2-Hb.es.js +0 -39377
  72. package/dist/cdcdashboard-MXgURbdZ.es.js +0 -39194
  73. package/examples/private/DEV-10538.json +0 -407
  74. package/examples/private/DEV-11072.json +0 -7591
  75. package/examples/private/DEV-11405.json +0 -39112
  76. package/examples/private/delete.json +0 -32919
  77. package/examples/private/pedro.json +0 -1
@@ -0,0 +1,467 @@
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-3}}</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-3}}</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-3}}</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-3}}</span></p>\n </div>\n </div>\n </div>\n </div>\n</div>",
37
+ "showHeader": true,
38
+ "srcUrl": "#example",
39
+ "title": "",
40
+ "useInlineHTML": true
41
+ },
42
+ "theme": "theme-blue",
43
+ "visual": {
44
+ "border": false,
45
+ "accent": false,
46
+ "background": false,
47
+ "hideBackgroundColor": false,
48
+ "borderColorTheme": false
49
+ },
50
+ "showEditorPanel": true,
51
+ "visualizationType": "markup-include",
52
+ "dataDescription": {
53
+ "horizontal": false,
54
+ "series": false
55
+ },
56
+ "dataKey": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json",
57
+ "version": "4.24.10",
58
+ "markupVariables": [
59
+ {
60
+ "columnName": "persistent-detection",
61
+ "conditions": [
62
+ {
63
+ "columnName": "testing_group",
64
+ "isOrIsNotEqualTo": "is",
65
+ "value": "Clade I"
66
+ }
67
+ ],
68
+ "name": "Persistent-3",
69
+ "tag": "{{Persistent-3}}"
70
+ },
71
+ {
72
+ "columnName": "detection",
73
+ "conditions": [
74
+ {
75
+ "columnName": "testing_group",
76
+ "isOrIsNotEqualTo": "is",
77
+ "value": "Clade I"
78
+ }
79
+ ],
80
+ "name": "Detection-3",
81
+ "tag": "{{Detection-3}}"
82
+ },
83
+ {
84
+ "columnName": "no-recent-detection",
85
+ "conditions": [
86
+ {
87
+ "columnName": "testing_group",
88
+ "isOrIsNotEqualTo": "is",
89
+ "value": "Clade I"
90
+ }
91
+ ],
92
+ "name": "No-Detection-3",
93
+ "tag": "{{No-Detection-3}}"
94
+ },
95
+ {
96
+ "columnName": "no-recent-data",
97
+ "conditions": [
98
+ {
99
+ "columnName": "testing_group",
100
+ "isOrIsNotEqualTo": "is",
101
+ "value": "Clade I"
102
+ }
103
+ ],
104
+ "name": "No-Recent-Data-3",
105
+ "tag": "{{No-Recent-Data-3}}"
106
+ }
107
+ ],
108
+ "enableMarkupVariables": true
109
+ },
110
+ "map1732897107116": {
111
+ "annotations": [
112
+ null
113
+ ],
114
+ "general": {
115
+ "navigationTarget": "_self",
116
+ "noDataMessage": "No State Selected",
117
+ "annotationDropdownText": "Annotations",
118
+ "geoBorderColor": "darkGray",
119
+ "headerColor": "theme-blue",
120
+ "title": "",
121
+ "showTitle": true,
122
+ "showSidebar": true,
123
+ "showDownloadMediaButton": false,
124
+ "displayAsHex": false,
125
+ "displayStateLabels": false,
126
+ "territoriesAlwaysShow": false,
127
+ "language": "en",
128
+ "geoType": "us-county",
129
+ "geoLabelOverride": "Sewershed Id",
130
+ "hasRegions": false,
131
+ "fullBorder": false,
132
+ "type": "us-geocode",
133
+ "convertFipsCodes": true,
134
+ "palette": {
135
+ "isReversed": false,
136
+ "name": "sequential_pink_purple",
137
+ "version": "1.0",
138
+ "customColors": [
139
+ "#d73027",
140
+ "#d73027",
141
+ "#ffcc00",
142
+ "#ffcc00",
143
+ "#0e4183",
144
+ "#0e4183",
145
+ "#Cccccc",
146
+ "#Cccccc"
147
+ ]
148
+ },
149
+ "allowMapZoom": true,
150
+ "hideGeoColumnInTooltip": false,
151
+ "hidePrimaryColumnInTooltip": false,
152
+ "statesPicked": [
153
+ {
154
+ "fipsCode": "01",
155
+ "stateName": "Alabama"
156
+ }
157
+ ],
158
+ "expandDataTable": false,
159
+ "footnotes": "",
160
+ "subtext": "<div class=\"float-right mb-3\">\n<a href=\"/wcms/vizdata/NCEZID_DIDRI/mpox/MpoxNewNWSSTableCSV.csv\">Download Data (CSV)</a>\n</div>"
161
+ },
162
+ "type": "map",
163
+ "columns": {
164
+ "geo": {
165
+ "name": "sewershed",
166
+ "label": "Location",
167
+ "tooltip": false,
168
+ "dataTable": true
169
+ },
170
+ "primary": {
171
+ "dataTable": true,
172
+ "tooltip": true,
173
+ "prefix": "",
174
+ "suffix": "",
175
+ "name": "detection_classification",
176
+ "label": "Detection Classification",
177
+ "roundToPlace": 0
178
+ },
179
+ "navigate": {
180
+ "name": ""
181
+ },
182
+ "latitude": {
183
+ "name": "latitude"
184
+ },
185
+ "longitude": {
186
+ "name": "longitude"
187
+ },
188
+ "additionalColumn1": {
189
+ "label": "New Column",
190
+ "dataTable": false,
191
+ "tooltips": false,
192
+ "prefix": "",
193
+ "suffix": "",
194
+ "name": "type_of_testing",
195
+ "tooltip": true
196
+ },
197
+ "additionalColumn2": {
198
+ "label": "Sampling Location",
199
+ "dataTable": true,
200
+ "tooltips": false,
201
+ "prefix": "",
202
+ "suffix": "",
203
+ "name": "sample_location",
204
+ "tooltip": true
205
+ },
206
+ "additionalColumn3": {
207
+ "label": "Sewershed Jurisdiction",
208
+ "dataTable": true,
209
+ "tooltips": false,
210
+ "prefix": "",
211
+ "suffix": "",
212
+ "name": "jurisdiction",
213
+ "tooltip": true
214
+ },
215
+ "additionalColumn4": {
216
+ "label": "Counties",
217
+ "dataTable": true,
218
+ "tooltips": false,
219
+ "prefix": "",
220
+ "suffix": "",
221
+ "name": "counties",
222
+ "tooltip": true
223
+ },
224
+ "additionalColumn5": {
225
+ "label": "Population",
226
+ "dataTable": true,
227
+ "tooltips": false,
228
+ "prefix": "",
229
+ "suffix": "",
230
+ "name": "population",
231
+ "tooltip": true
232
+ },
233
+ "additionalColumn6": {
234
+ "label": "Samples Collected",
235
+ "dataTable": true,
236
+ "tooltips": false,
237
+ "prefix": "",
238
+ "suffix": "",
239
+ "name": "samples_collected",
240
+ "tooltip": true
241
+ },
242
+ "additionalColumn8": {
243
+ "label": "Samples that were positive",
244
+ "dataTable": true,
245
+ "tooltips": false,
246
+ "prefix": "",
247
+ "suffix": "",
248
+ "name": "positive_samples",
249
+ "tooltip": true
250
+ },
251
+ "additionalColumn9": {
252
+ "label": "Date Collection Range",
253
+ "dataTable": true,
254
+ "tooltips": false,
255
+ "prefix": "",
256
+ "suffix": "",
257
+ "name": "date_collection_range"
258
+ }
259
+ },
260
+ "legend": {
261
+ "descriptions": {},
262
+ "specialClasses": [],
263
+ "unified": false,
264
+ "singleColumn": false,
265
+ "singleRow": true,
266
+ "verticalSorted": false,
267
+ "showSpecialClassesLast": false,
268
+ "dynamicDescription": false,
269
+ "type": "category",
270
+ "numberOfItems": 3,
271
+ "position": "bottom",
272
+ "title": "",
273
+ "style": "circles",
274
+ "subStyle": "linear blocks",
275
+ "tickRotation": "",
276
+ "singleColumnLegend": false,
277
+ "hideBorder": false,
278
+ "groupBy": "",
279
+ "additionalCategories": [
280
+ "No recent detection",
281
+ "Persistent Detection",
282
+ "No recent data",
283
+ "Detection"
284
+ ],
285
+ "categoryValuesOrder": [
286
+ "Persistent Detection",
287
+ "Detection",
288
+ "No recent detection",
289
+ "No recent data",
290
+ "No Detection"
291
+ ],
292
+ "description": "Select a category to add or remove from map"
293
+ },
294
+ "filters": [
295
+ {
296
+ "filterStyle": "dropdown",
297
+ "id": 1752597629569,
298
+ "showDropdown": false,
299
+ "columnName": "testing_group",
300
+ "orderedValues": [
301
+ "Clade I",
302
+ "Clade II",
303
+ "Non-clade Specific",
304
+ "Overall Mpox Testing"
305
+ ],
306
+ "defaultValue": "Clade I"
307
+ }
308
+ ],
309
+ "table": {
310
+ "wrapColumns": false,
311
+ "label": "Data Table",
312
+ "expanded": false,
313
+ "limitHeight": true,
314
+ "height": "500",
315
+ "caption": "",
316
+ "showDownloadUrl": false,
317
+ "showDataTableLink": false,
318
+ "showDownloadLinkBelow": false,
319
+ "showFullGeoNameInCSV": false,
320
+ "forceDisplay": true,
321
+ "download": true,
322
+ "indexLabel": "",
323
+ "cellMinWidth": "0",
324
+ "collapsible": true
325
+ },
326
+ "tooltips": {
327
+ "appearanceType": "hover",
328
+ "linkLabel": "Learn More",
329
+ "opacity": 90,
330
+ "capitalizeLabels": true
331
+ },
332
+ "visual": {
333
+ "minBubbleSize": 1,
334
+ "maxBubbleSize": 20,
335
+ "extraBubbleBorder": false,
336
+ "cityStyle": "circle",
337
+ "cityStyleLabel": "",
338
+ "showBubbleZeros": false,
339
+ "additionalCityStyles": [],
340
+ "geoCodeCircleSize": "5"
341
+ },
342
+ "mapPosition": {
343
+ "coordinates": [
344
+ 0,
345
+ 30
346
+ ],
347
+ "zoom": 1
348
+ },
349
+ "map": {
350
+ "layers": [],
351
+ "patterns": []
352
+ },
353
+ "hexMap": {
354
+ "type": "",
355
+ "shapeGroups": [
356
+ {
357
+ "legendTitle": "",
358
+ "legendDescription": "",
359
+ "items": [
360
+ {
361
+ "key": "",
362
+ "shape": "Arrow Up",
363
+ "column": "",
364
+ "operator": "=",
365
+ "value": ""
366
+ }
367
+ ]
368
+ }
369
+ ]
370
+ },
371
+ "filterBehavior": "Filter Change",
372
+ "filterIntro": "",
373
+ "smallMultiples": {
374
+ "mode": "",
375
+ "tileColumn": "",
376
+ "tilesPerRowDesktop": 2,
377
+ "tilesPerRowMobile": 1,
378
+ "tileOrderType": "asc",
379
+ "tileOrder": [],
380
+ "tileTitles": {},
381
+ "synchronizedTooltips": true
382
+ },
383
+ "markupVariables": [],
384
+ "enableMarkupVariables": false,
385
+ "openModal": true,
386
+ "uid": "map1732897107116",
387
+ "dataDescription": {
388
+ "horizontal": false,
389
+ "series": false
390
+ },
391
+ "dataKey": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json",
392
+ "version": "4.25.1",
393
+ "migrations": {
394
+ "addColorMigration": true
395
+ }
396
+ }
397
+ },
398
+ "table": {
399
+ "label": "Data Table",
400
+ "show": false,
401
+ "showDownloadUrl": false,
402
+ "showDownloadLinkBelow": true,
403
+ "showVertical": true
404
+ },
405
+ "errors": [],
406
+ "currentViewport": "lg",
407
+ "id": 15,
408
+ "category": "General",
409
+ "label": "Dashboard",
410
+ "type": "dashboard",
411
+ "subType": null,
412
+ "orientation": null,
413
+ "icon": {
414
+ "key": null,
415
+ "ref": null,
416
+ "props": {},
417
+ "_owner": null
418
+ },
419
+ "content": "Present multiple data visualizations with shared filter controls.",
420
+ "visualizationType": null,
421
+ "activeVizButtonID": 15,
422
+ "version": "4.25.11",
423
+ "uuid": 1732897568206,
424
+ "migrations": {
425
+ "addColorMigration": true
426
+ },
427
+ "general": {
428
+ "palette": {
429
+ "version": "1.0",
430
+ "backups": [
431
+ {
432
+ "version": "1.0"
433
+ },
434
+ {
435
+ "version": "1.0"
436
+ },
437
+ {
438
+ "version": "1.0"
439
+ },
440
+ {
441
+ "version": "1.0"
442
+ },
443
+ {
444
+ "version": "1.0"
445
+ }
446
+ ]
447
+ }
448
+ },
449
+ "datasets": {
450
+ "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json": {
451
+ "dataFileSize": 1312,
452
+ "dataFileName": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json",
453
+ "dataFileSourceType": "url",
454
+ "dataFileFormat": "JSON",
455
+ "preview": false,
456
+ "dataUrl": "https://www.cdc.gov/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json"
457
+ },
458
+ "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json": {
459
+ "dataFileSize": 1061160,
460
+ "dataFileName": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json",
461
+ "dataFileSourceType": "url",
462
+ "dataFileFormat": "JSON",
463
+ "preview": true,
464
+ "dataUrl": "https://www.cdc.gov/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json"
465
+ }
466
+ }
467
+ }