@cdc/dashboard 4.26.2 → 4.26.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 (52) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcdashboard-vr9HZwRt.es.js +6 -0
  3. package/dist/cdcdashboard.js +53345 -49681
  4. package/examples/custom/css/respiratory.css +1 -1
  5. package/examples/data/data-with-metadata.json +18 -0
  6. package/examples/default.json +7 -36
  7. package/examples/private/inline-markup.json +775 -0
  8. package/examples/private/recent-update.json +1456 -0
  9. package/examples/private/toggle.json +10137 -0
  10. package/package.json +9 -9
  11. package/src/CdcDashboard.tsx +2 -1
  12. package/src/CdcDashboardComponent.tsx +47 -27
  13. package/src/_stories/Dashboard.DataSetup.stories.tsx +6 -1
  14. package/src/_stories/Dashboard.Pages.stories.tsx +22 -0
  15. package/src/_stories/Dashboard.stories.tsx +4406 -7
  16. package/src/_stories/_mock/tab-simple-filter.json +153 -0
  17. package/src/components/DashboardFilters/DashboardFilters.tsx +19 -3
  18. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +7 -4
  19. package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +1 -1
  20. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +1 -2
  21. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +8 -7
  22. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +8 -8
  23. package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +1 -1
  24. package/src/components/DashboardFilters/dashboardfilter.styles.css +3 -3
  25. package/src/components/DataDesignerModal.tsx +2 -2
  26. package/src/components/Header/Header.tsx +27 -5
  27. package/src/components/Header/index.scss +1 -1
  28. package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +6 -6
  29. package/src/components/Row.tsx +21 -0
  30. package/src/components/Toggle/toggle-style.css +7 -7
  31. package/src/components/VisualizationRow.tsx +12 -4
  32. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +1 -54
  33. package/src/components/VisualizationsPanel/visualizations-panel-styles.css +2 -2
  34. package/src/components/Widget/Widget.tsx +2 -2
  35. package/src/components/Widget/widget.styles.css +12 -12
  36. package/src/data/initial-state.js +1 -1
  37. package/src/helpers/addVisualization.ts +71 -0
  38. package/src/helpers/formatConfigBeforeSave.ts +1 -1
  39. package/src/helpers/getVizConfig.ts +13 -3
  40. package/src/helpers/iconHash.tsx +45 -36
  41. package/src/helpers/processDataLegacy.ts +19 -14
  42. package/src/helpers/tests/addVisualization.test.ts +52 -0
  43. package/src/helpers/tests/formatConfigBeforeSave.test.ts +81 -1
  44. package/src/scss/editor-panel.scss +1 -1
  45. package/src/scss/main.scss +164 -39
  46. package/src/store/dashboard.reducer.ts +1 -1
  47. package/src/test/CdcDashboard.test.jsx +2 -2
  48. package/src/test/CdcDashboardComponent.test.tsx +74 -0
  49. package/src/types/FilterStyles.ts +2 -1
  50. package/tests/fixtures/dashboard-config-with-metadata.json +89 -0
  51. package/vite.config.js +2 -2
  52. package/dist/cdcdashboard-Cf9_fbQf.es.js +0 -6
@@ -61,7 +61,7 @@ div[data-config-url="/respiratory-viruses/modules/ed-visits-county-file.json"] .
61
61
  position: relative;
62
62
  }
63
63
 
64
- div[data-config-url="/respiratory-viruses/modules/ed-visits-county-file.json"] .dashboard-row:nth-child(4) .cove-component__content {
64
+ div[data-config-url="/respiratory-viruses/modules/ed-visits-county-file.json"] .dashboard-row:nth-child(4) .cove-visualization__body {
65
65
  padding-top: 0;
66
66
  border: 1px solid gray !important;
67
67
  border-top: none !important;
@@ -0,0 +1,18 @@
1
+ {
2
+ "lastUpdated": "January 15, 2026",
3
+ "source": "CDC NREVSS",
4
+ "data": [
5
+ { "Location": "Alaska", "Year": "2019", "Type": "Federal", "Amount": "1377" },
6
+ { "Location": "Alaska", "Year": "2019", "Type": "Local", "Amount": "1613" },
7
+ { "Location": "Alaska", "Year": "2019", "Type": "State", "Amount": "1495" },
8
+ { "Location": "Alaska", "Year": "2020", "Type": "Federal", "Amount": "1377" },
9
+ { "Location": "Alaska", "Year": "2020", "Type": "Local", "Amount": "1613" },
10
+ { "Location": "Alaska", "Year": "2020", "Type": "State", "Amount": "1495" },
11
+ { "Location": "Alabama", "Year": "2019", "Type": "Federal", "Amount": "1375" },
12
+ { "Location": "Alabama", "Year": "2019", "Type": "Local", "Amount": "1611" },
13
+ { "Location": "Alabama", "Year": "2019", "Type": "State", "Amount": "1493" },
14
+ { "Location": "Alabama", "Year": "2020", "Type": "Federal", "Amount": "1375" },
15
+ { "Location": "Alabama", "Year": "2020", "Type": "Local", "Amount": "1611" },
16
+ { "Location": "Alabama", "Year": "2020", "Type": "State", "Amount": "1493" }
17
+ ]
18
+ }
@@ -4,46 +4,20 @@
4
4
  "title": "Amount Filtered by Location and Type ",
5
5
  "sharedFilters": [
6
6
  {
7
- "values": [
8
- "Alabama",
9
- "Alaska",
10
- "American Samoa",
11
- "Arizona",
12
- "Arkansas"
13
- ],
7
+ "values": ["Alabama", "Alaska", "American Samoa", "Arizona", "Arkansas"],
14
8
  "columnName": "Location",
15
9
  "showDropdown": true,
16
- "usedBy": [
17
- "data-bite1628875468150",
18
- "chart1628875631849",
19
- "data-bite1628876561387",
20
- "data-bite1628877031319"
21
- ],
10
+ "usedBy": ["data-bite1628875468150", "chart1628875631849", "data-bite1628876561387", "data-bite1628877031319"],
22
11
  "tier": 1,
23
12
  "type": "datafilter",
24
13
  "order": "cust",
25
- "orderedValues": [
26
- "Alabama",
27
- "Alaska",
28
- "American Samoa",
29
- "Arizona",
30
- "Arkansas"
31
- ]
14
+ "orderedValues": ["Alabama", "Alaska", "American Samoa", "Arizona", "Arkansas"]
32
15
  },
33
16
  {
34
- "values": [
35
- "Federal",
36
- "Local",
37
- "State"
38
- ],
17
+ "values": ["Federal", "Local", "State"],
39
18
  "columnName": "Type",
40
19
  "showDropdown": true,
41
- "usedBy": [
42
- "data-bite1628875468150",
43
- "chart1628875631849",
44
- "data-bite1628876561387",
45
- "data-bite1628877031319"
46
- ],
20
+ "usedBy": ["data-bite1628875468150", "chart1628875631849", "data-bite1628876561387", "data-bite1628877031319"],
47
21
  "tier": 1
48
22
  }
49
23
  ]
@@ -247,10 +221,7 @@
247
221
  "legacySharedFilters": {
248
222
  "type": "dashboardFilters",
249
223
  "visualizationType": "dashboardFilters",
250
- "sharedFilterIndexes": [
251
- 0,
252
- 1
253
- ],
224
+ "sharedFilterIndexes": [0, 1],
254
225
  "filterBehavior": "Filter Change",
255
226
  "uid": "legacySharedFilters"
256
227
  }
@@ -548,4 +519,4 @@
548
519
  "migrations": {
549
520
  "addColorMigration": true
550
521
  }
551
- }
522
+ }