@cdc/dashboard 4.25.8 → 4.25.11
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-fce76882.es.js → cdcdashboard-BnB1QM5d.es.js} +6 -13
- package/dist/{cdcdashboard-c55ac1ea.es.js → cdcdashboard-D6CG2-Hb.es.js} +5 -12
- package/dist/{cdcdashboard-31a33da1.es.js → cdcdashboard-MXgURbdZ.es.js} +6 -13
- package/dist/{cdcdashboard-1a1724a1.es.js → cdcdashboard-dgT_1dIT.es.js} +136 -151
- package/dist/cdcdashboard.js +80040 -75976
- package/examples/api-test/categories.json +18 -0
- package/examples/api-test/chart-data.json +602 -0
- package/examples/api-test/topics.json +47 -0
- package/examples/api-test/years.json +22 -0
- package/examples/markup-axis-label.json +4167 -0
- package/examples/private/DEV-10538.json +407 -0
- package/examples/private/DEV-11405.json +39112 -0
- package/examples/private/big-dashboard.json +39112 -0
- package/examples/private/brfs-2.json +1532 -0
- package/examples/private/brfs.json +2128 -2138
- package/examples/private/clade-2.json +430 -0
- package/examples/private/delete.json +32919 -0
- package/examples/private/diabetes.json +5582 -0
- package/examples/private/example-2.json +49796 -0
- package/examples/private/group-legend-test.json +328 -0
- package/examples/private/map.json +1211 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_diabetes_attributable_deaths_data.csv +14041 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_diabetes_attributable_deaths_per_100000_data.csv +14041 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_qaly_data.csv +18721 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_yll_data.csv +18721 -0
- package/examples/private/markup-footer/mortality-deaths-footnotes-age.csv +3 -0
- package/examples/private/markup-variables.json +1451 -0
- package/examples/private/markup.json +5471 -0
- package/examples/private/mpox.json +38128 -0
- package/examples/private/north-dakota.json +1132 -0
- package/examples/private/ophdst.json +38754 -0
- package/examples/private/pedro.json +1 -0
- package/examples/private/pivot.json +683 -0
- package/examples/private/reset.json +32920 -0
- package/examples/private/sewershed.json +435 -0
- package/examples/private/tobacco.json +1938 -0
- package/examples/test-api-filter-reset.json +132 -0
- package/index.html +2 -2
- package/package.json +16 -10
- package/src/CdcDashboard.tsx +1 -3
- package/src/CdcDashboardComponent.tsx +34 -16
- package/src/DashboardContext.tsx +5 -1
- package/src/_stories/Dashboard.API.stories.tsx +62 -0
- package/src/_stories/Dashboard.stories.tsx +492 -472
- package/src/_stories/_mock/api/cessation.json +1 -0
- package/src/_stories/_mock/api/data-explorer.json +1 -0
- package/src/_stories/_mock/api/explore-by-location.json +1 -0
- package/src/_stories/_mock/api/explore-by-topic.json +1 -0
- package/src/_stories/_mock/api/legislation.json +1 -0
- package/src/_stories/_mock/api/oral-health-data.json +1 -0
- package/src/_stories/_mock/custom-order-new-values.json +116 -0
- package/src/components/CollapsibleVisualizationRow.tsx +1 -1
- package/src/components/DashboardFilters/DashboardFilters.tsx +34 -23
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +29 -12
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +81 -112
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +82 -52
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +130 -31
- package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +80 -21
- package/src/components/DataDesignerModal.tsx +227 -210
- package/src/components/Header/Header.tsx +13 -12
- package/src/components/Toggle/Toggle.tsx +48 -47
- package/src/components/VisualizationRow.tsx +13 -6
- package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +2 -0
- package/src/components/Widget/Widget.tsx +47 -18
- package/src/helpers/addValuesToDashboardFilters.ts +111 -60
- package/src/helpers/apiFilterHelpers.ts +190 -166
- package/src/helpers/filterData.ts +52 -7
- package/src/helpers/filterResetHelpers.ts +102 -0
- package/src/helpers/formatConfigBeforeSave.ts +137 -0
- package/src/helpers/getVizConfig.ts +36 -18
- package/src/helpers/loadAPIFilters.ts +109 -99
- package/src/helpers/reloadURLHelpers.ts +1 -1
- package/src/helpers/tests/filterResetHelpers.test.ts +532 -0
- package/src/helpers/tests/formatConfigBeforeSave.test.ts +69 -0
- package/src/index.tsx +1 -1
- package/src/scss/editor-panel.scss +3 -431
- package/src/scss/grid.scss +7 -5
- package/src/scss/main.scss +1 -24
- package/src/store/errorMessage/errorMessage.reducer.ts +1 -1
- package/src/types/DashboardFilters.ts +9 -8
- package/src/types/InitialState.ts +12 -12
- package/vite.config.js +1 -1
- package/vitest.config.ts +16 -0
- package/src/coreStyles_dashboard.scss +0 -3
- package/src/helpers/getAutoLoadVisualization.ts +0 -11
- package/src/scss/mixins.scss +0 -47
- package/src/scss/variables.scss +0 -5
- /package/dist/{cdcdashboard-548642e6.es.js → cdcdashboard-Ct2SB0vL.es.js} +0 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dashboard": {
|
|
3
|
+
"theme": "theme-blue",
|
|
4
|
+
"sharedFilters": [
|
|
5
|
+
{
|
|
6
|
+
"key": "New Dashboard Filter 1",
|
|
7
|
+
"showDropdown": true,
|
|
8
|
+
"type": "datafilter",
|
|
9
|
+
"orderedValues": [],
|
|
10
|
+
"datasetKey": "test2.csv",
|
|
11
|
+
"columnName": "state",
|
|
12
|
+
"usedBy": [
|
|
13
|
+
"map1749061009678"
|
|
14
|
+
],
|
|
15
|
+
"tier": 1
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"rows": [
|
|
20
|
+
{
|
|
21
|
+
"columns": [
|
|
22
|
+
{
|
|
23
|
+
"width": 12,
|
|
24
|
+
"widget": "dashboardFilters1758563094998"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"uuid": 1758563248622
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"uuid": 1758563248622,
|
|
31
|
+
"toggle": true,
|
|
32
|
+
"equalHeight": "__undefined__",
|
|
33
|
+
"columns": [
|
|
34
|
+
{
|
|
35
|
+
"toggleName": "County",
|
|
36
|
+
"width": 12,
|
|
37
|
+
"widget": "map1749061009678"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"toggleName": "__undefined__",
|
|
41
|
+
"width": 12
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"visualizations": {
|
|
47
|
+
"map1749061009678": {
|
|
48
|
+
"annotations": [],
|
|
49
|
+
"customColors": [
|
|
50
|
+
"#6d085a",
|
|
51
|
+
"#b83d93",
|
|
52
|
+
"#e3e3e3",
|
|
53
|
+
"#3bbbb0",
|
|
54
|
+
"#006166",
|
|
55
|
+
"#ffffff"
|
|
56
|
+
],
|
|
57
|
+
"general": {
|
|
58
|
+
"navigationTarget": "_self",
|
|
59
|
+
"noDataMessage": "No State Selected",
|
|
60
|
+
"annotationDropdownText": "Annotations",
|
|
61
|
+
"geoBorderColor": "darkGray",
|
|
62
|
+
"headerColor": "theme-blue",
|
|
63
|
+
"title": "",
|
|
64
|
+
"showTitle": true,
|
|
65
|
+
"showSidebar": true,
|
|
66
|
+
"showDownloadMediaButton": false,
|
|
67
|
+
"displayAsHex": false,
|
|
68
|
+
"displayStateLabels": true,
|
|
69
|
+
"territoriesAlwaysShow": false,
|
|
70
|
+
"language": "en",
|
|
71
|
+
"geoType": "single-state",
|
|
72
|
+
"geoLabelOverride": "",
|
|
73
|
+
"hasRegions": false,
|
|
74
|
+
"fullBorder": false,
|
|
75
|
+
"type": "data",
|
|
76
|
+
"convertFipsCodes": true,
|
|
77
|
+
"palette": {
|
|
78
|
+
"isReversed": false,
|
|
79
|
+
"name": "sequential_pink_purple",
|
|
80
|
+
"version": "1.0",
|
|
81
|
+
"customColors": [
|
|
82
|
+
"#6d085a",
|
|
83
|
+
"#b83d93",
|
|
84
|
+
"#e3e3e3",
|
|
85
|
+
"#3bbbb0",
|
|
86
|
+
"#006166",
|
|
87
|
+
"#ffffff"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"allowMapZoom": false,
|
|
91
|
+
"hideGeoColumnInTooltip": false,
|
|
92
|
+
"hidePrimaryColumnInTooltip": false,
|
|
93
|
+
"statesPicked": [
|
|
94
|
+
{
|
|
95
|
+
"fipsCode": "01",
|
|
96
|
+
"stateName": "Alabama"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"filterControlsStatesPicked": "state"
|
|
100
|
+
},
|
|
101
|
+
"type": "map",
|
|
102
|
+
"columns": {
|
|
103
|
+
"geo": {
|
|
104
|
+
"name": "fips",
|
|
105
|
+
"label": "Location",
|
|
106
|
+
"tooltip": false,
|
|
107
|
+
"dataTable": true
|
|
108
|
+
},
|
|
109
|
+
"primary": {
|
|
110
|
+
"dataTable": true,
|
|
111
|
+
"tooltip": true,
|
|
112
|
+
"prefix": "",
|
|
113
|
+
"suffix": "",
|
|
114
|
+
"name": "category",
|
|
115
|
+
"label": "category",
|
|
116
|
+
"roundToPlace": 0
|
|
117
|
+
},
|
|
118
|
+
"navigate": {
|
|
119
|
+
"name": ""
|
|
120
|
+
},
|
|
121
|
+
"latitude": {
|
|
122
|
+
"name": ""
|
|
123
|
+
},
|
|
124
|
+
"longitude": {
|
|
125
|
+
"name": ""
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"legend": {
|
|
129
|
+
"descriptions": {},
|
|
130
|
+
"specialClasses": [],
|
|
131
|
+
"unified": false,
|
|
132
|
+
"singleColumn": true,
|
|
133
|
+
"singleRow": false,
|
|
134
|
+
"verticalSorted": false,
|
|
135
|
+
"showSpecialClassesLast": false,
|
|
136
|
+
"dynamicDescription": false,
|
|
137
|
+
"type": "category",
|
|
138
|
+
"numberOfItems": 6,
|
|
139
|
+
"position": "side",
|
|
140
|
+
"title": "Epidemic Trends",
|
|
141
|
+
"style": "circles",
|
|
142
|
+
"subStyle": "linear blocks",
|
|
143
|
+
"tickRotation": "",
|
|
144
|
+
"singleColumnLegend": false,
|
|
145
|
+
"hideBorder": false,
|
|
146
|
+
"groupBy": "",
|
|
147
|
+
"categoryValuesOrder": [
|
|
148
|
+
"Growing",
|
|
149
|
+
"Likely Growing",
|
|
150
|
+
"Not Changing",
|
|
151
|
+
"Likely Declining",
|
|
152
|
+
"Declining",
|
|
153
|
+
"Not Estimated"
|
|
154
|
+
],
|
|
155
|
+
"additionalCategories": [
|
|
156
|
+
"Growing",
|
|
157
|
+
"Likely Growing",
|
|
158
|
+
"Not Changing",
|
|
159
|
+
"Likely Declining",
|
|
160
|
+
"Declining",
|
|
161
|
+
"Not Estimated"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"filters": [],
|
|
165
|
+
"table": {
|
|
166
|
+
"wrapColumns": false,
|
|
167
|
+
"label": "Data Table",
|
|
168
|
+
"expanded": false,
|
|
169
|
+
"limitHeight": false,
|
|
170
|
+
"height": "",
|
|
171
|
+
"caption": "",
|
|
172
|
+
"showDownloadUrl": false,
|
|
173
|
+
"showDataTableLink": false,
|
|
174
|
+
"showDownloadLinkBelow": true,
|
|
175
|
+
"showFullGeoNameInCSV": false,
|
|
176
|
+
"forceDisplay": true,
|
|
177
|
+
"download": false,
|
|
178
|
+
"indexLabel": "",
|
|
179
|
+
"cellMinWidth": "0",
|
|
180
|
+
"collapsible": true,
|
|
181
|
+
"sharedFilterColumns": [
|
|
182
|
+
"State"
|
|
183
|
+
],
|
|
184
|
+
"showNonGeoData": true
|
|
185
|
+
},
|
|
186
|
+
"tooltips": {
|
|
187
|
+
"appearanceType": "hover",
|
|
188
|
+
"linkLabel": "Learn More",
|
|
189
|
+
"opacity": 90,
|
|
190
|
+
"capitalizeLabels": true
|
|
191
|
+
},
|
|
192
|
+
"visual": {
|
|
193
|
+
"minBubbleSize": 1,
|
|
194
|
+
"maxBubbleSize": 20,
|
|
195
|
+
"extraBubbleBorder": false,
|
|
196
|
+
"cityStyle": "circle",
|
|
197
|
+
"cityStyleLabel": "",
|
|
198
|
+
"showBubbleZeros": false,
|
|
199
|
+
"additionalCityStyles": [],
|
|
200
|
+
"geoCodeCircleSize": 8
|
|
201
|
+
},
|
|
202
|
+
"mapPosition": {
|
|
203
|
+
"coordinates": [
|
|
204
|
+
0,
|
|
205
|
+
30
|
|
206
|
+
],
|
|
207
|
+
"zoom": 1
|
|
208
|
+
},
|
|
209
|
+
"map": {
|
|
210
|
+
"layers": [],
|
|
211
|
+
"patterns": []
|
|
212
|
+
},
|
|
213
|
+
"hexMap": {
|
|
214
|
+
"type": "",
|
|
215
|
+
"shapeGroups": [
|
|
216
|
+
{
|
|
217
|
+
"legendTitle": "",
|
|
218
|
+
"legendDescription": "",
|
|
219
|
+
"items": [
|
|
220
|
+
{
|
|
221
|
+
"key": "",
|
|
222
|
+
"shape": "Arrow Up",
|
|
223
|
+
"column": "",
|
|
224
|
+
"operator": "=",
|
|
225
|
+
"value": ""
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"filterBehavior": "Filter Change",
|
|
232
|
+
"filterIntro": "",
|
|
233
|
+
"openModal": true,
|
|
234
|
+
"uid": "map1749061009678",
|
|
235
|
+
"dataDescription": {
|
|
236
|
+
"horizontal": false,
|
|
237
|
+
"series": false
|
|
238
|
+
},
|
|
239
|
+
"dataKey": "test2.csv"
|
|
240
|
+
},
|
|
241
|
+
"dashboardFilters1758563094998": {
|
|
242
|
+
"filters": [],
|
|
243
|
+
"filterBehavior": "Filter Change",
|
|
244
|
+
"newViz": true,
|
|
245
|
+
"openModal": true,
|
|
246
|
+
"uid": "dashboardFilters1758563094998",
|
|
247
|
+
"type": "dashboardFilters",
|
|
248
|
+
"sharedFilterIndexes": [
|
|
249
|
+
0
|
|
250
|
+
],
|
|
251
|
+
"visualizationType": "dashboardFilters"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"table": {
|
|
255
|
+
"label": "Data Table",
|
|
256
|
+
"show": false,
|
|
257
|
+
"showDownloadUrl": false,
|
|
258
|
+
"showVertical": true
|
|
259
|
+
},
|
|
260
|
+
"id": 15,
|
|
261
|
+
"category": "General",
|
|
262
|
+
"type": "dashboard",
|
|
263
|
+
"subType": null,
|
|
264
|
+
"orientation": null,
|
|
265
|
+
"content": "Present multiple data visualizations with shared filter controls.",
|
|
266
|
+
"visualizationType": null,
|
|
267
|
+
"activeVizButtonID": 15,
|
|
268
|
+
"version": "4.25.9",
|
|
269
|
+
"migrations": {
|
|
270
|
+
"addColorMigration": true
|
|
271
|
+
},
|
|
272
|
+
"uuid": 1758563086392,
|
|
273
|
+
"label": "COVID-19",
|
|
274
|
+
"runtime": {},
|
|
275
|
+
"general": {
|
|
276
|
+
"palette": {
|
|
277
|
+
"version": "1.0",
|
|
278
|
+
"backups": [
|
|
279
|
+
{
|
|
280
|
+
"name": "__undefined__",
|
|
281
|
+
"version": "1.0",
|
|
282
|
+
"isReversed": "__undefined__"
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"datasets": {
|
|
288
|
+
"test2.csv": {
|
|
289
|
+
"data": [
|
|
290
|
+
{
|
|
291
|
+
"fips": "47025",
|
|
292
|
+
"location_name": "Claiborne",
|
|
293
|
+
"location_type": "county",
|
|
294
|
+
"category": "Growing",
|
|
295
|
+
"median": 1.0037363,
|
|
296
|
+
"state": "Tennessee"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"fips": "47151",
|
|
300
|
+
"location_name": "Scott",
|
|
301
|
+
"location_type": "county",
|
|
302
|
+
"category": "Likely Growing",
|
|
303
|
+
"median": 0.9458983,
|
|
304
|
+
"state": "Tennessee"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"category": "Likely Declining",
|
|
308
|
+
"fips": "13001",
|
|
309
|
+
"location_name": "Appling",
|
|
310
|
+
"location_type": "county",
|
|
311
|
+
"report_date": "Tue, 09 Sep 2025 00:00:00 GMT",
|
|
312
|
+
"state": "Georgia"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"category": "Declining",
|
|
316
|
+
"fips": "13003",
|
|
317
|
+
"location_name": "Atkinson",
|
|
318
|
+
"location_type": "county",
|
|
319
|
+
"state": "Georgia"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"dataFileSize": 123,
|
|
323
|
+
"dataFileName": "test2.csv",
|
|
324
|
+
"dataFileSourceType": "file",
|
|
325
|
+
"dataFileFormat": "CSV"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|