@cdc/dashboard 4.24.4 → 4.24.7
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/dist/cdcdashboard.js +179228 -141419
- package/examples/custom/css/respiratory.css +236 -0
- package/examples/custom/js/respiratory.js +242 -0
- package/examples/default-multi-dataset-shared-filter.json +1729 -0
- package/examples/ed-visits-county-file.json +618 -0
- package/examples/filtered-dash.json +6 -21
- package/index.html +12 -3
- package/package.json +12 -11
- package/src/CdcDashboard.tsx +5 -1
- package/src/CdcDashboardComponent.tsx +156 -334
- package/src/DashboardContext.tsx +9 -1
- package/src/_stories/Dashboard.stories.tsx +31 -3
- package/src/_stories/_mock/dashboard-gallery.json +534 -523
- package/src/_stories/_mock/markup-include.json +78 -0
- package/src/_stories/_mock/multi-dashboards.json +914 -0
- package/src/_stories/_mock/multi-viz.json +2 -3
- package/src/_stories/_mock/pivot-filter.json +15 -11
- package/src/_stories/_mock/standalone-table.json +2 -0
- package/src/components/CollapsibleVisualizationRow.tsx +44 -0
- package/src/components/Column.tsx +1 -1
- package/src/components/DashboardFilters/DashboardFilters.tsx +80 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +218 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +48 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +367 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/index.ts +1 -0
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +143 -0
- package/src/components/DashboardFilters/index.ts +3 -0
- package/src/components/DataDesignerModal.tsx +9 -9
- package/src/components/ExpandCollapseButtons.tsx +20 -0
- package/src/components/Header/Header.tsx +1 -97
- package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +4 -4
- package/src/components/MultiConfigTabs/MultiTabs.tsx +3 -2
- package/src/components/Row.tsx +52 -19
- package/src/components/Toggle/Toggle.tsx +2 -4
- package/src/components/VisualizationRow.tsx +96 -29
- package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +116 -0
- package/src/components/VisualizationsPanel/index.ts +1 -0
- package/src/components/VisualizationsPanel/visualizations-panel-styles.css +12 -0
- package/src/components/Widget.tsx +26 -90
- package/src/helpers/apiFilterHelpers.ts +51 -0
- package/src/helpers/changeFilterActive.ts +30 -0
- package/src/helpers/filterData.ts +16 -56
- package/src/helpers/generateValuesForFilter.ts +1 -1
- package/src/helpers/getAutoLoadVisualization.ts +11 -0
- package/src/helpers/getFilteredData.ts +4 -2
- package/src/helpers/getVizConfig.ts +23 -2
- package/src/helpers/getVizRowColumnLocator.ts +2 -1
- package/src/helpers/hasDashboardApplyBehavior.ts +5 -0
- package/src/helpers/iconHash.tsx +3 -3
- package/src/helpers/mapDataToConfig.ts +29 -0
- package/src/helpers/processData.ts +2 -3
- package/src/helpers/reloadURLHelpers.ts +68 -0
- package/src/helpers/tests/filterData.test.ts +1 -93
- package/src/scss/editor-panel.scss +1 -1
- package/src/scss/grid.scss +34 -27
- package/src/scss/main.scss +41 -3
- package/src/scss/variables.scss +4 -0
- package/src/store/dashboard.actions.ts +9 -10
- package/src/store/dashboard.reducer.ts +41 -13
- package/src/types/APIFilter.ts +1 -4
- package/src/types/ConfigRow.ts +2 -0
- package/src/types/Dashboard.ts +1 -1
- package/src/types/DashboardConfig.ts +2 -4
- package/src/types/DashboardFilters.ts +7 -0
- package/src/types/InitialState.ts +1 -1
- package/src/types/MultiDashboard.ts +2 -2
- package/src/types/SharedFilter.ts +2 -5
- package/src/types/Tab.ts +1 -1
- package/LICENSE +0 -201
- package/src/components/EditorWrapper/EditorWrapper.tsx +0 -52
- package/src/components/EditorWrapper/editor-wrapper.style.css +0 -13
- package/src/components/Filters.tsx +0 -88
- package/src/components/Header/FilterModal.tsx +0 -506
- package/src/components/VisualizationsPanel.tsx +0 -72
- package/src/helpers/getApiFilterKey.ts +0 -5
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dashboard": {
|
|
3
|
+
"theme": "theme-blue"
|
|
4
|
+
},
|
|
5
|
+
"rows": [
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
|
+
"width": 12,
|
|
9
|
+
"widget": "markup-include1709307330120"
|
|
10
|
+
},
|
|
11
|
+
{},
|
|
12
|
+
{}
|
|
13
|
+
]
|
|
14
|
+
],
|
|
15
|
+
"visualizations": {
|
|
16
|
+
"markup-include1709307330120": {
|
|
17
|
+
"inlineHTML": "",
|
|
18
|
+
"markupSource": "inline",
|
|
19
|
+
"showHeader": false,
|
|
20
|
+
"srcUrl": "#example",
|
|
21
|
+
"theme": "theme-blue",
|
|
22
|
+
"title": "Markup Include",
|
|
23
|
+
"type": "markup-include",
|
|
24
|
+
"visual": {
|
|
25
|
+
"border": false,
|
|
26
|
+
"accent": false,
|
|
27
|
+
"background": false,
|
|
28
|
+
"hideBackgroundColor": false,
|
|
29
|
+
"borderColorTheme": false
|
|
30
|
+
},
|
|
31
|
+
"openModal": false,
|
|
32
|
+
"uid": "markup-include1709307330120",
|
|
33
|
+
"visualizationType": "markup-include",
|
|
34
|
+
"editing": false,
|
|
35
|
+
"data": {},
|
|
36
|
+
"validated": 4.23
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"table": {
|
|
40
|
+
"label": "Data Table",
|
|
41
|
+
"show": false,
|
|
42
|
+
"showDownloadUrl": false,
|
|
43
|
+
"showVertical": true
|
|
44
|
+
},
|
|
45
|
+
"datasets": {
|
|
46
|
+
"valid-data-chart.csv": {
|
|
47
|
+
"data": [
|
|
48
|
+
{
|
|
49
|
+
"Race": "Hispanic or Latino",
|
|
50
|
+
"Age-adjusted rate": "644.2"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"Race": "Non-Hispanic American Indian",
|
|
54
|
+
"Age-adjusted rate": "636.1"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"Race": "Non-Hispanic Black",
|
|
58
|
+
"Age-adjusted rate": "563.7"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"Race": "Non-Hispanic Asian or Pacific Islander",
|
|
62
|
+
"Age-adjusted rate": "202.5"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"Race": "Non-Hispanic White",
|
|
66
|
+
"Age-adjusted rate": "183.6"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"dataFileSize": 184,
|
|
70
|
+
"dataFileName": "valid-data-chart.csv",
|
|
71
|
+
"dataFileSourceType": "file",
|
|
72
|
+
"dataFileFormat": "CSV",
|
|
73
|
+
"preview": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"type": "dashboard",
|
|
77
|
+
"runtime": {}
|
|
78
|
+
}
|