@cdc/dashboard 4.26.2 → 4.26.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.
- package/CONFIG.md +172 -0
- package/README.md +60 -20
- package/dist/cdcdashboard-CY9IcPSi.es.js +6 -0
- package/dist/cdcdashboard-DlpiY3fQ.es.js +4 -0
- package/dist/cdcdashboard.js +56686 -50281
- package/examples/__data__/data-2.json +6 -0
- package/examples/__data__/data-with-metadata.json +18 -0
- package/examples/__data__/data.json +6 -0
- package/examples/default.json +7 -36
- package/examples/legend-issue.json +1 -1
- package/examples/minimal-example.json +34 -0
- package/examples/private/dengue.json +4640 -0
- package/examples/private/inline-markup.json +775 -0
- package/examples/private/link_to_file.json +16662 -0
- package/examples/private/recent-update.json +1456 -0
- package/examples/private/toggle.json +10137 -0
- package/examples/sankey.json +3 -3
- package/examples/test-api-filter-reset.json +4 -4
- package/examples/tp5-test.json +86 -4
- package/package.json +9 -9
- package/src/CdcDashboard.tsx +2 -1
- package/src/CdcDashboardComponent.tsx +48 -28
- package/src/_stories/Dashboard.DataSetup.stories.tsx +6 -1
- package/src/_stories/Dashboard.Pages.smoke.stories.tsx +22 -0
- package/src/_stories/Dashboard.smoke.stories.tsx +33 -0
- package/src/_stories/Dashboard.stories.tsx +4523 -83
- package/src/_stories/_mock/dashboard-data-driven-colors.json +171 -0
- package/src/_stories/_mock/tab-simple-filter.json +153 -0
- package/src/_stories/_mock/tp5-test.json +86 -5
- package/src/components/DashboardEditors.tsx +15 -0
- package/src/components/DashboardFilters/DashboardFilters.test.tsx +129 -0
- package/src/components/DashboardFilters/DashboardFilters.tsx +29 -10
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +12 -8
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +6 -4
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +59 -58
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.test.tsx +127 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +29 -6
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +10 -9
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +8 -8
- package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +1 -1
- package/src/components/DashboardFilters/dashboardfilter.styles.css +3 -3
- package/src/components/DataDesignerModal.tsx +2 -2
- package/src/components/ExpandCollapseButtons.tsx +6 -4
- package/src/components/Grid.tsx +4 -3
- package/src/components/Header/Header.tsx +27 -5
- package/src/components/Header/index.scss +1 -1
- package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +141 -140
- package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +6 -6
- package/src/components/Row.tsx +30 -8
- package/src/components/Toggle/toggle-style.css +7 -7
- package/src/components/VisualizationRow.tsx +81 -22
- package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +2 -55
- package/src/components/VisualizationsPanel/visualizations-panel-styles.css +2 -2
- package/src/components/Widget/Widget.tsx +7 -6
- package/src/components/Widget/widget.styles.css +48 -17
- package/src/data/initial-state.js +2 -1
- package/src/helpers/addVisualization.ts +73 -0
- package/src/helpers/formatConfigBeforeSave.ts +1 -1
- package/src/helpers/getVizConfig.ts +13 -3
- package/src/helpers/iconHash.tsx +45 -36
- package/src/helpers/processDataLegacy.ts +19 -14
- package/src/helpers/tests/addVisualization.test.ts +52 -0
- package/src/helpers/tests/formatConfigBeforeSave.test.ts +81 -1
- package/src/scss/editor-panel.scss +1 -1
- package/src/scss/grid.scss +38 -8
- package/src/scss/main.scss +237 -40
- package/src/store/dashboard.reducer.ts +2 -1
- package/src/test/CdcDashboard.test.jsx +26 -2
- package/src/test/CdcDashboardComponent.test.tsx +74 -0
- package/src/types/FilterStyles.ts +2 -1
- package/src/types/SharedFilter.ts +1 -0
- package/tests/fixtures/dashboard-config-with-metadata.json +89 -0
- package/vite.config.js +2 -2
- package/dist/cdcdashboard-Cf9_fbQf.es.js +0 -6
- package/examples/DEV-6574.json +0 -2224
- package/examples/api-dashboard-data.json +0 -272
- package/examples/api-dashboard-years.json +0 -11
- package/examples/api-geographies-data.json +0 -11
- package/examples/chart-data.json +0 -5409
- package/examples/custom/css/respiratory.css +0 -236
- package/examples/custom/js/respiratory.js +0 -242
- package/examples/default-data.json +0 -368
- package/examples/default-filter-control.json +0 -209
- package/examples/default-multi-dataset-shared-filter.json +0 -1729
- package/examples/default-multi-dataset.json +0 -506
- package/examples/ed-visits-county-file.json +0 -402
- package/examples/filters/Alabama.json +0 -72
- package/examples/filters/Alaska.json +0 -1737
- package/examples/filters/Arkansas.json +0 -4713
- package/examples/filters/California.json +0 -212
- package/examples/filters/Colorado.json +0 -1500
- package/examples/filters/Connecticut.json +0 -559
- package/examples/filters/Delaware.json +0 -63
- package/examples/filters/DistrictofColumbia.json +0 -63
- package/examples/filters/Florida.json +0 -4217
- package/examples/filters/States.json +0 -146
- package/examples/state-level.json +0 -90136
- package/examples/state-points.json +0 -10474
- package/examples/temp-example-data.json +0 -130
- package/examples/test-dashboard-simple.json +0 -503
- package/examples/test-example.json +0 -752
- package/examples/test-file.json +0 -147
- package/examples/test.json +0 -752
- package/examples/testing.json +0 -94456
- /package/examples/{legend-issue-data.json → __data__/legend-issue-data.json} +0 -0
- /package/examples/api-test/{categories.json → __data__/categories.json} +0 -0
- /package/examples/api-test/{chart-data.json → __data__/chart-data.json} +0 -0
- /package/examples/api-test/{topics.json → __data__/topics.json} +0 -0
- /package/examples/api-test/{years.json → __data__/years.json} +0 -0
|
@@ -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
|
+
}
|
package/examples/default.json
CHANGED
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dashboard",
|
|
3
|
+
"version": "4.26.4",
|
|
4
|
+
"dashboard": {
|
|
5
|
+
"theme": "theme-blue",
|
|
6
|
+
"title": "Dashboard Example",
|
|
7
|
+
"titleStyle": "small",
|
|
8
|
+
"sharedFilters": []
|
|
9
|
+
},
|
|
10
|
+
"data": [],
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"columns": [
|
|
14
|
+
{
|
|
15
|
+
"width": 12,
|
|
16
|
+
"widget": "markup-1"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"visualizations": {
|
|
22
|
+
"markup-1": {
|
|
23
|
+
"type": "markup-include",
|
|
24
|
+
"theme": "theme-blue",
|
|
25
|
+
"contentEditor": {
|
|
26
|
+
"inlineHTML": "<p>Minimal dashboard example</p>",
|
|
27
|
+
"showHeader": true,
|
|
28
|
+
"srcUrl": "",
|
|
29
|
+
"title": "Dashboard Example",
|
|
30
|
+
"useInlineHTML": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|