@cdc/dashboard 4.24.5 → 4.24.9
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 +144406 -127510
- 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/examples/single-state-dashboard-filters.json +421 -0
- package/examples/state-level.json +90136 -0
- package/examples/state-points.json +10474 -0
- package/examples/test-file.json +147 -0
- package/examples/testing.json +94456 -0
- package/index.html +25 -4
- package/package.json +12 -11
- package/src/CdcDashboard.tsx +5 -1
- package/src/CdcDashboardComponent.tsx +250 -327
- package/src/DashboardContext.tsx +15 -1
- package/src/_stories/Dashboard.stories.tsx +158 -40
- package/src/_stories/_mock/api-filter-chart.json +11 -35
- package/src/_stories/_mock/api-filter-map.json +17 -31
- package/src/_stories/_mock/bump-chart.json +3554 -0
- package/src/_stories/_mock/methodology.json +412 -0
- package/src/_stories/_mock/methodologyAPI.ts +90 -0
- package/src/_stories/_mock/multi-viz.json +3 -4
- package/src/_stories/_mock/pivot-filter.json +14 -12
- package/src/_stories/_mock/single-state-dashboard-filters.json +390 -0
- package/src/components/CollapsibleVisualizationRow.tsx +44 -0
- package/src/components/Column.tsx +1 -1
- package/src/components/DashboardFilters/DashboardFilters.tsx +102 -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 +477 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/index.ts +1 -0
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +191 -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 -102
- package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +24 -12
- package/src/components/Row.tsx +52 -19
- package/src/components/Toggle/Toggle.tsx +2 -4
- package/src/components/VisualizationRow.tsx +169 -30
- 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 +27 -90
- package/src/helpers/FilterBehavior.ts +4 -0
- package/src/helpers/addValuesToDashboardFilters.ts +49 -0
- package/src/helpers/apiFilterHelpers.ts +102 -0
- package/src/helpers/changeFilterActive.ts +39 -0
- package/src/helpers/filterData.ts +10 -48
- package/src/helpers/generateValuesForFilter.ts +1 -1
- package/src/helpers/getAutoLoadVisualization.ts +11 -0
- package/src/helpers/getFilteredData.ts +7 -5
- 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 +5 -3
- package/src/helpers/loadAPIFilters.ts +74 -0
- package/src/helpers/mapDataToConfig.ts +29 -0
- package/src/helpers/processData.ts +2 -3
- package/src/helpers/reloadURLHelpers.ts +78 -0
- package/src/helpers/tests/addValuesToDashboardFilters.test.ts +44 -0
- package/src/helpers/tests/apiFilterHelpers.test.ts +156 -0
- package/src/helpers/tests/filterData.test.ts +1 -93
- package/src/helpers/tests/getFilteredData.test.ts +86 -0
- package/src/helpers/tests/loadAPIFiltersWrapper.test.ts +176 -0
- package/src/helpers/tests/reloadURLHelpers.test.ts +195 -0
- 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 +12 -4
- package/src/store/dashboard.reducer.ts +30 -4
- package/src/types/APIFilter.ts +1 -5
- 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 +4 -6
- package/src/types/Tab.ts +1 -1
- package/LICENSE +0 -201
- package/src/components/Filters.tsx +0 -88
- package/src/components/Header/FilterModal.tsx +0 -510
- package/src/components/VisualizationsPanel.tsx +0 -95
- package/src/helpers/getApiFilterKey.ts +0 -5
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dashboard": {
|
|
3
|
+
"theme": "theme-blue",
|
|
4
|
+
"sharedFilters": [
|
|
5
|
+
{
|
|
6
|
+
"key": "Topic",
|
|
7
|
+
"showDropdown": true,
|
|
8
|
+
"type": "urlfilter",
|
|
9
|
+
"apiFilter": {
|
|
10
|
+
"apiEndpoint": "https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation&$select=distinct%20Topic",
|
|
11
|
+
"valueSelector": "Topic",
|
|
12
|
+
"textSelector": ""
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"key": "Quarter",
|
|
17
|
+
"showDropdown": true,
|
|
18
|
+
"type": "urlfilter",
|
|
19
|
+
"apiFilter": {
|
|
20
|
+
"apiEndpoint": "https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation&$select=distinct%20Quarter",
|
|
21
|
+
"valueSelector": "Quarter",
|
|
22
|
+
"textSelector": ""
|
|
23
|
+
},
|
|
24
|
+
"parents": [
|
|
25
|
+
"Topic"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "YearQuarter",
|
|
30
|
+
"showDropdown": true,
|
|
31
|
+
"type": "urlfilter",
|
|
32
|
+
"apiFilter": {
|
|
33
|
+
"apiEndpoint": "https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation&$select=distinct YearQuarter,Year",
|
|
34
|
+
"valueSelector": "Year",
|
|
35
|
+
"textSelector": "YearQuarter"
|
|
36
|
+
},
|
|
37
|
+
"parents": [
|
|
38
|
+
"Topic",
|
|
39
|
+
"Quarter"
|
|
40
|
+
],
|
|
41
|
+
"multiSelect": true
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"rows": [
|
|
46
|
+
{
|
|
47
|
+
"columns": [
|
|
48
|
+
{
|
|
49
|
+
"width": 12,
|
|
50
|
+
"widget": "dashboardFilters1723058075362"
|
|
51
|
+
},
|
|
52
|
+
{},
|
|
53
|
+
{}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"columns": [
|
|
58
|
+
{
|
|
59
|
+
"width": 12,
|
|
60
|
+
"widget": "dashboardFilters1723058794676"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"columns": [
|
|
66
|
+
{
|
|
67
|
+
"width": 12,
|
|
68
|
+
"widget": "table1724779017139"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"visualizations": {
|
|
74
|
+
"dashboardFilters1723058075362": {
|
|
75
|
+
"filters": [],
|
|
76
|
+
"filterBehavior": "Apply Button",
|
|
77
|
+
"newViz": true,
|
|
78
|
+
"openModal": true,
|
|
79
|
+
"uid": "dashboardFilters1723058075362",
|
|
80
|
+
"type": "dashboardFilters",
|
|
81
|
+
"sharedFilterIndexes": [
|
|
82
|
+
0,
|
|
83
|
+
1
|
|
84
|
+
],
|
|
85
|
+
"visualizationType": "dashboardFilters",
|
|
86
|
+
"editing": false
|
|
87
|
+
},
|
|
88
|
+
"dashboardFilters1723058794676": {
|
|
89
|
+
"filters": [],
|
|
90
|
+
"filterBehavior": "Filter Change",
|
|
91
|
+
"newViz": true,
|
|
92
|
+
"openModal": true,
|
|
93
|
+
"uid": "dashboardFilters1723058794676",
|
|
94
|
+
"type": "dashboardFilters",
|
|
95
|
+
"sharedFilterIndexes": [
|
|
96
|
+
2
|
|
97
|
+
],
|
|
98
|
+
"visualizationType": "dashboardFilters",
|
|
99
|
+
"editing": false,
|
|
100
|
+
"autoLoad": true
|
|
101
|
+
},
|
|
102
|
+
"table1724779017139": {
|
|
103
|
+
"filters": [],
|
|
104
|
+
"filterBehavior": "Filter Change",
|
|
105
|
+
"newViz": false,
|
|
106
|
+
"openModal": true,
|
|
107
|
+
"uid": "table1724779017139",
|
|
108
|
+
"type": "table",
|
|
109
|
+
"table": {
|
|
110
|
+
"label": "Data Table",
|
|
111
|
+
"show": true,
|
|
112
|
+
"showDownloadUrl": false,
|
|
113
|
+
"showVertical": true,
|
|
114
|
+
"expanded": true,
|
|
115
|
+
"collapsible": true
|
|
116
|
+
},
|
|
117
|
+
"columns": {},
|
|
118
|
+
"dataFormat": {},
|
|
119
|
+
"visualizationType": "table",
|
|
120
|
+
"dataDescription": {
|
|
121
|
+
"horizontal": false,
|
|
122
|
+
"series": false
|
|
123
|
+
},
|
|
124
|
+
"dataKey": "https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"table": {
|
|
128
|
+
"label": "Data Table",
|
|
129
|
+
"show": true,
|
|
130
|
+
"showDownloadUrl": false,
|
|
131
|
+
"showVertical": true
|
|
132
|
+
},
|
|
133
|
+
"datasets": {
|
|
134
|
+
"https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation": {
|
|
135
|
+
"dataFileSize": 19076,
|
|
136
|
+
"dataFileName": "https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation",
|
|
137
|
+
"dataFileSourceType": "url",
|
|
138
|
+
"dataFileFormat": "JSON",
|
|
139
|
+
"preview": true,
|
|
140
|
+
"dataUrl": "https://nccd-cove-public-api.apps.ecpaas-dev.cdc.gov/od-public?$datakey=statesystem_cessation"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"type": "dashboard",
|
|
144
|
+
"version": "4.24.9",
|
|
145
|
+
"uuid": 1724778985218,
|
|
146
|
+
"runtime": {}
|
|
147
|
+
}
|