@cdc/dashboard 4.24.12-2 → 4.25.1

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 (30) hide show
  1. package/dist/cdcdashboard.js +67156 -65645
  2. package/examples/private/bird-flu-2.json +440 -0
  3. package/examples/private/bird-flu.json +413 -0
  4. package/examples/private/exposure-source-h5-data.csv +26 -0
  5. package/index.html +2 -6
  6. package/package.json +9 -9
  7. package/src/CdcDashboardComponent.tsx +12 -4
  8. package/src/_stories/Dashboard.stories.tsx +32 -0
  9. package/src/_stories/_mock/data-bite-dash-test.json +1 -0
  10. package/src/_stories/_mock/data-bite-dash-test_1.json +1 -0
  11. package/src/_stories/_mock/data-bite-dash-test_1_1.json +1 -0
  12. package/src/_stories/_mock/data-bite-dash-test_1_1_1.json +1 -0
  13. package/src/components/CollapsibleVisualizationRow.tsx +2 -2
  14. package/src/components/Column.tsx +12 -1
  15. package/src/components/DashboardFilters/DashboardFilters.tsx +4 -4
  16. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +1 -3
  17. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +1 -1
  18. package/src/components/DashboardFilters/dashboardfilter.styles.css +2 -0
  19. package/src/components/ExpandCollapseButtons.tsx +1 -1
  20. package/src/components/Header/Header.tsx +1 -2
  21. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +2 -2
  22. package/src/components/MultiConfigTabs/MultiTabs.tsx +1 -1
  23. package/src/components/VisualizationRow.tsx +2 -2
  24. package/src/components/Widget.tsx +9 -3
  25. package/src/helpers/apiFilterHelpers.ts +1 -1
  26. package/src/index.tsx +1 -0
  27. package/src/scss/main.scss +1 -12
  28. package/src/store/dashboard.actions.ts +2 -2
  29. package/src/store/dashboard.reducer.ts +17 -8
  30. package/src/types/DashboardConfig.ts +2 -0
@@ -0,0 +1,413 @@
1
+ {
2
+ "dashboard": {
3
+ "theme": "theme-blue",
4
+ "sharedFilters": [
5
+ {
6
+ "key": "Confirmed or probable cases",
7
+ "showDropdown": true,
8
+ "values": [
9
+ "Confirmed",
10
+ "Probable"
11
+ ],
12
+ "type": "datafilter",
13
+ "columnName": "Confirmed or Probable",
14
+ "usedBy": [
15
+ "map1738173988574",
16
+ "markup-include1738174007337"
17
+ ],
18
+ "tier": 1,
19
+ "setByQueryParameter": "confirmed",
20
+ "parents": ""
21
+ },
22
+ {
23
+ "key": "State or Territory",
24
+ "showDropdown": true,
25
+ "values": [
26
+ "Arizona",
27
+ "California",
28
+ "Colorado",
29
+ "Delaware",
30
+ "Iowa",
31
+ "Louisiana",
32
+ "Michigan",
33
+ "Missouri",
34
+ "Oregon",
35
+ "Texas",
36
+ "Washington",
37
+ "Wisconsin"
38
+ ],
39
+ "type": "datafilter",
40
+ "columnName": "State",
41
+ "setBy": "map1738173988574",
42
+ "usedBy": [
43
+ "markup-include1738174007337"
44
+ ],
45
+ "tier": 1
46
+ }
47
+ ],
48
+ "title": ""
49
+ },
50
+ "rows": [
51
+ {
52
+ "columns": [
53
+ {
54
+ "width": 12,
55
+ "widget": "dashboardFilters1738174818296"
56
+ }
57
+ ],
58
+ "uuid": 1738261640288
59
+ },
60
+ {
61
+ "columns": [
62
+ {
63
+ "width": 4,
64
+ "widget": "markup-include1738174007337"
65
+ },
66
+ {
67
+ "width": 8,
68
+ "widget": "map1738173988574"
69
+ }
70
+ ],
71
+ "uuid": 1738261639358
72
+ }
73
+ ],
74
+ "visualizations": {
75
+ "map1738173988574": {
76
+ "annotations": [],
77
+ "general": {
78
+ "geoType": "us",
79
+ "noStateFoundMessage": "Map Unavailable",
80
+ "annotationDropdownText": "Annotations",
81
+ "geoBorderColor": "darkGray",
82
+ "headerColor": "theme-blue",
83
+ "title": "",
84
+ "showTitle": false,
85
+ "showSidebar": true,
86
+ "showDownloadButton": true,
87
+ "showDownloadMediaButton": false,
88
+ "displayAsHex": false,
89
+ "displayStateLabels": false,
90
+ "territoriesLabel": "Territories",
91
+ "territoriesAlwaysShow": false,
92
+ "language": "en",
93
+ "geoLabelOverride": "State/Territory",
94
+ "hasRegions": false,
95
+ "fullBorder": false,
96
+ "type": "data",
97
+ "convertFipsCodes": true,
98
+ "palette": {
99
+ "isReversed": false
100
+ },
101
+ "allowMapZoom": true,
102
+ "hideGeoColumnInTooltip": false,
103
+ "hidePrimaryColumnInTooltip": false,
104
+ "statePicked": {
105
+ "fipsCode": "01",
106
+ "stateName": "Alabama"
107
+ },
108
+ "expandDataTable": false
109
+ },
110
+ "type": "map",
111
+ "color": "sequential-blue-2(MPX)",
112
+ "columns": {
113
+ "geo": {
114
+ "name": "State",
115
+ "label": "Location",
116
+ "tooltip": false,
117
+ "dataTable": true
118
+ },
119
+ "primary": {
120
+ "dataTable": false,
121
+ "tooltip": false,
122
+ "prefix": "",
123
+ "suffix": "",
124
+ "name": "Category",
125
+ "label": "",
126
+ "roundToPlace": 0
127
+ },
128
+ "navigate": {
129
+ "name": ""
130
+ },
131
+ "latitude": {
132
+ "name": ""
133
+ },
134
+ "longitude": {
135
+ "name": ""
136
+ },
137
+ "additionalColumn1": {
138
+ "label": "Total Cases",
139
+ "dataTable": true,
140
+ "tooltips": false,
141
+ "prefix": "",
142
+ "suffix": "",
143
+ "name": "State Total",
144
+ "tooltip": true
145
+ },
146
+ "additionalColumn2": {
147
+ "label": "Dairy Herds (Cattle)*",
148
+ "dataTable": true,
149
+ "tooltips": false,
150
+ "prefix": "",
151
+ "suffix": "",
152
+ "name": "Dairy Herds",
153
+ "tooltip": true
154
+ },
155
+ "additionalColumn3": {
156
+ "label": "Poultry Farms and Culling Operations*",
157
+ "dataTable": true,
158
+ "tooltips": false,
159
+ "prefix": "",
160
+ "suffix": "",
161
+ "name": "Poultry Farms and Culling Operations",
162
+ "tooltip": true
163
+ },
164
+ "additionalColumn4": {
165
+ "label": "Other Animal Exposure†",
166
+ "dataTable": true,
167
+ "tooltips": false,
168
+ "prefix": "",
169
+ "suffix": "",
170
+ "name": "Other Animal Exposure",
171
+ "tooltip": true
172
+ },
173
+ "additionalColumn5": {
174
+ "label": "Exposure Source Unknown‡",
175
+ "dataTable": true,
176
+ "tooltips": false,
177
+ "prefix": "",
178
+ "suffix": "",
179
+ "name": "Exposure Source Unknown",
180
+ "tooltip": true
181
+ }
182
+ },
183
+ "legend": {
184
+ "descriptions": {},
185
+ "specialClasses": [],
186
+ "unified": false,
187
+ "singleColumn": false,
188
+ "singleRow": false,
189
+ "verticalSorted": false,
190
+ "showSpecialClassesLast": false,
191
+ "dynamicDescription": false,
192
+ "type": "category",
193
+ "numberOfItems": 3,
194
+ "position": "bottom",
195
+ "title": "Total Cases",
196
+ "style": "gradient",
197
+ "subStyle": "linear blocks",
198
+ "tickRotation": "",
199
+ "singleColumnLegend": false,
200
+ "hideBorder": false,
201
+ "additionalCategories": [
202
+ "0"
203
+ ],
204
+ "categoryValuesOrder": [
205
+ "0",
206
+ "1-5",
207
+ "6-10",
208
+ ">10"
209
+ ]
210
+ },
211
+ "filters": [],
212
+ "table": {
213
+ "wrapColumns": false,
214
+ "label": "Data Table",
215
+ "expanded": false,
216
+ "limitHeight": false,
217
+ "height": "",
218
+ "caption": "",
219
+ "showDownloadUrl": false,
220
+ "showDataTableLink": false,
221
+ "showDownloadLinkBelow": true,
222
+ "showFullGeoNameInCSV": false,
223
+ "forceDisplay": true,
224
+ "download": true,
225
+ "indexLabel": ""
226
+ },
227
+ "tooltips": {
228
+ "appearanceType": "hover",
229
+ "linkLabel": "Learn More",
230
+ "capitalizeLabels": true,
231
+ "opacity": 90
232
+ },
233
+ "visual": {
234
+ "minBubbleSize": 1,
235
+ "maxBubbleSize": 20,
236
+ "extraBubbleBorder": false,
237
+ "cityStyle": "circle",
238
+ "cityStyleLabel": "",
239
+ "showBubbleZeros": false,
240
+ "additionalCityStyles": [],
241
+ "geoCodeCircleSize": 8
242
+ },
243
+ "mapPosition": {
244
+ "coordinates": [
245
+ 0,
246
+ 30
247
+ ],
248
+ "zoom": 1
249
+ },
250
+ "map": {
251
+ "layers": [],
252
+ "patterns": []
253
+ },
254
+ "hexMap": {
255
+ "type": "",
256
+ "shapeGroups": [
257
+ {
258
+ "legendTitle": "",
259
+ "legendDescription": "",
260
+ "items": [
261
+ {
262
+ "key": "",
263
+ "shape": "Arrow Up",
264
+ "column": "",
265
+ "operator": "=",
266
+ "value": ""
267
+ }
268
+ ]
269
+ }
270
+ ]
271
+ },
272
+ "filterBehavior": "Filter Change",
273
+ "filterIntro": "",
274
+ "openModal": true,
275
+ "uid": "map1738173988574",
276
+ "dataDescription": {
277
+ "horizontal": false,
278
+ "series": false
279
+ },
280
+ "dataKey": "/examples/private/exposure-source-h5-data.csv",
281
+ "version": "4.24.10",
282
+ "customColors": [
283
+ "#DFE1E2",
284
+ "#DFE1E2",
285
+ "#C0F2FD",
286
+ "#C0F2FD",
287
+ "#5EBAD4",
288
+ "#5EBAD4",
289
+ "#083352",
290
+ "#083352"
291
+ ]
292
+ },
293
+ "markup-include1738174007337": {
294
+ "filters": [],
295
+ "filterBehavior": "Filter Change",
296
+ "openModal": false,
297
+ "uid": "markup-include1738174007337",
298
+ "type": "markup-include",
299
+ "contentEditor": {
300
+ "inlineHTML": "<p class=\"h4\">{{state}} Total Cases: {{total}} </p>\n<table class=\"table\">\n <tbody>\n <tr>\n <th>Cases</th>\n <th>Exposure Source</th>\n </tr>\n <tr>\n <td>{{dairy}}</td>\n <td>Dairy Herds (Cattle)*</td>\n </tr>\n <tr>\n <td>{{poultry}}</td>\n <td>Poultry Farms and Culling Operations*</td>\n </tr>\n <tr>\n <td>{{other}}</td>\n <td>Other Animal Exposure†</td>\n </tr> \n <tr>\n <td>{{unknown}}</td>\n <td>Exposure Source Unknown‡</td>\n </tr>\n </tbody>\n</table>\n\n<p class=\"mt-2\">NOTE: One additional case was previously detected in a poultry worker in Colorado in 2022. Louisiana reported the first H5 bird flu death in the U.S.</p>\n\n<p class=\"mt-2\">*Exposure Associated with Commercial Agriculture and Related Operations<br/>\n<sup>†</sup>Exposure was related to other animals such as backyard flocks, wild birds, or other mammals<br/>\n<sup>‡</sup>Exposure source was not able to be identified\n</p>",
301
+ "markupVariables": [
302
+ {
303
+ "columnName": "Dairy Herds",
304
+ "conditions": [],
305
+ "name": "dairy",
306
+ "tag": "{{dairy}}"
307
+ },
308
+ {
309
+ "columnName": "Poultry Farms and Culling Operations",
310
+ "conditions": [],
311
+ "name": "poultry",
312
+ "tag": "{{poultry}}"
313
+ },
314
+ {
315
+ "columnName": "Other Animal Exposure",
316
+ "conditions": [],
317
+ "name": "other",
318
+ "tag": "{{other}}"
319
+ },
320
+ {
321
+ "columnName": "Exposure Source Unknown",
322
+ "conditions": [],
323
+ "name": "unknown",
324
+ "tag": "{{unknown}}"
325
+ },
326
+ {
327
+ "columnName": "State Total",
328
+ "conditions": [],
329
+ "name": "total",
330
+ "tag": "{{total}}"
331
+ },
332
+ {
333
+ "columnName": "State",
334
+ "conditions": [],
335
+ "name": "state",
336
+ "tag": "{{state}}"
337
+ }
338
+ ],
339
+ "showHeader": true,
340
+ "srcUrl": "#example",
341
+ "title": "",
342
+ "useInlineHTML": true
343
+ },
344
+ "theme": "theme-blue",
345
+ "visual": {
346
+ "border": false,
347
+ "accent": false,
348
+ "background": false,
349
+ "hideBackgroundColor": false,
350
+ "borderColorTheme": false
351
+ },
352
+ "showEditorPanel": true,
353
+ "visualizationType": "markup-include",
354
+ "dataDescription": {
355
+ "horizontal": false,
356
+ "series": false
357
+ },
358
+ "dataKey": "/examples/private/exposure-source-h5-data.csv",
359
+ "version": "4.24.10"
360
+ },
361
+ "dashboardFilters1738174818296": {
362
+ "filters": [],
363
+ "filterBehavior": "Filter Change",
364
+ "newViz": true,
365
+ "openModal": true,
366
+ "uid": "dashboardFilters1738174818296",
367
+ "type": "dashboardFilters",
368
+ "sharedFilterIndexes": [
369
+ 0,
370
+ 1
371
+ ],
372
+ "visualizationType": "dashboardFilters",
373
+ "applyFiltersButtonText": "Apply",
374
+ "autoLoad": true
375
+ }
376
+ },
377
+ "table": {
378
+ "label": "Data Table",
379
+ "show": false,
380
+ "showDownloadUrl": false,
381
+ "showDownloadLinkBelow": true,
382
+ "showVertical": true
383
+ },
384
+ "errors": [],
385
+ "currentViewport": "lg",
386
+ "id": 15,
387
+ "category": "General",
388
+ "label": "Dashboard",
389
+ "type": "dashboard",
390
+ "subType": null,
391
+ "orientation": null,
392
+ "icon": {
393
+ "key": null,
394
+ "ref": null,
395
+ "props": {},
396
+ "_owner": null
397
+ },
398
+ "content": "Present multiple data visualizations with shared filter controls.",
399
+ "datasets": {
400
+ "/examples/private/exposure-source-h5-data.csv": {
401
+ "dataFileSize": 983,
402
+ "dataFileName": "/bird-flu/modules/situation-summary/exposure-source-h5-data.csv",
403
+ "dataFileSourceType": "url",
404
+ "dataFileFormat": "CSV",
405
+ "preview": true,
406
+ "dataUrl": "/examples/private/exposure-source-h5-data.csv"
407
+ }
408
+ },
409
+ "visualizationType": null,
410
+ "activeVizButtonID": 15,
411
+ "version": "4.24.10",
412
+ "uuid": 1738261637793
413
+ }
@@ -0,0 +1,26 @@
1
+ State,Confirmed or Probable,Dairy Herds,Poultry Farms and Culling Operations,Other Animal Exposure,Exposure Source Unknown,State Total,Category,Deaths
2
+ Arizona,Probable,0,2,0,0,2,1-5,0
3
+ California,Confirmed,36,0,0,2,38,>10,0
4
+ California,Probable,1,0,0,0,1,1-5,0
5
+ Colorado,Confirmed,1,9,0,0,10,6-10,0
6
+ Colorado,Probable,0,0,0,0,0,0,0
7
+ Delaware,Confirmed,0,0,0,0,0,0,0
8
+ Delaware,Probable,0,0,0,1,1,1-5,0
9
+ Iowa,Confirmed,0,1,0,0,1,1-5,0
10
+ Iowa,Probable,0,0,0,0,0,0,0
11
+ Louisiana,Confirmed,0,0,1,0,1,1-5,0
12
+ Louisiana,Probable,0,0,0,0,0,0,0
13
+ Michigan,Confirmed,2,0,0,0,2,1-5,0
14
+ Michigan,Probable,0,0,0,0,0,0,0
15
+ Missouri,Confirmed,0,0,0,1,1,1-5,0
16
+ Missouri,Probable,0,0,0,0,0,0,0
17
+ National,Confirmed,40,23,1,3,67,>10,1
18
+ National,Probable,1,5,0,1,7,6-10,0
19
+ Oregon,Confirmed,0,1,0,0,1,1-5,0
20
+ Oregon,Probable,0,0,0,0,0,0,0
21
+ Texas,Confirmed,1,0,0,0,1,1-5,0
22
+ Texas,Probable,0,0,0,0,0,0,0
23
+ Washington,Confirmed,0,11,0,0,11,>10,0
24
+ Washington,Probable,0,3,0,0,3,1-5,0
25
+ Wisconsin,Confirmed,0,1,0,0,1,1-5,0
26
+ Wisconsin,Probable,0,0,0,0,0,0,0
package/index.html CHANGED
@@ -17,11 +17,7 @@
17
17
  }
18
18
  </style>
19
19
  <link rel="stylesheet prefetch" href="examples/custom/css/respiratory.css" />
20
- <link
21
- rel="stylesheet prefetch"
22
- href="https://www.cdc.gov/TemplatePackage/contrib/libs/bootstrap/latest/css/bootstrap.min.css?_=39423"
23
- />
24
- <link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/4.0/assets/css/app.min.css?_=39423" />
20
+ <link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/5.0/css/app.min.css?_=71669" />
25
21
  </head>
26
22
 
27
23
  <body>
@@ -34,7 +30,7 @@
34
30
  <!-- <div class="react-container" data-config="/examples/dev-8332.json"></div> -->
35
31
  <!-- <div class="react-container" data-config="/examples/dashboard-gallery.json"></div> -->
36
32
  <!-- <div class="react-container" data-config="/examples/filtered-dash.json"></div> -->
37
- <div class="react-container" data-config="/examples/all-components.json"></div>
33
+ <div class="react-container" data-config="/examples/private/art-dashboard.json"></div>
38
34
  <!-- <div class="react-container" data-config="/examples/sankey.json"></div> -->
39
35
  <!-- <div class="react-container" data-config="/examples/DEV-6574.json"></div> -->
40
36
  <!-- <div class="react-container" data-config="/examples/default-multi-dataset-2.json"></div> -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/dashboard",
3
- "version": "4.24.12-2",
3
+ "version": "4.25.1",
4
4
  "description": "React component for combining multiple visualizations into a single dashboard",
5
5
  "moduleName": "CdcDashboard",
6
6
  "main": "dist/cdcdashboard",
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@cdc/chart": "^4.24.12-2",
31
- "@cdc/core": "^4.24.12-2",
32
- "@cdc/data-bite": "^4.24.12-2",
33
- "@cdc/filtered-text": "^4.24.12-2",
34
- "@cdc/map": "^4.24.12-2",
35
- "@cdc/markup-include": "^4.24.12-2",
36
- "@cdc/waffle-chart": "^4.24.12-2",
30
+ "@cdc/chart": "^4.25.1",
31
+ "@cdc/core": "^4.25.1",
32
+ "@cdc/data-bite": "^4.25.1",
33
+ "@cdc/filtered-text": "^4.25.1",
34
+ "@cdc/map": "^4.25.1",
35
+ "@cdc/markup-include": "^4.25.1",
36
+ "@cdc/waffle-chart": "^4.25.1",
37
37
  "html-react-parser": "^3.0.8",
38
38
  "js-base64": "^2.5.2",
39
39
  "papaparse": "^5.3.0",
@@ -49,5 +49,5 @@
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0"
51
51
  },
52
- "gitHead": "a60edf1148396309eb473ac9f65426ee40797ddf"
52
+ "gitHead": "c32d727f516fe3525178e3a6480abbe70b2a20d6"
53
53
  }
@@ -19,7 +19,7 @@ import Loading from '@cdc/core/components/Loading'
19
19
  import { DataTransform } from '@cdc/core/helpers/DataTransform'
20
20
  import getViewport from '@cdc/core/helpers/getViewport'
21
21
 
22
- import CdcChart from '@cdc/chart/src/CdcChart'
22
+ import CdcChart from '@cdc/chart/src/CdcChartComponent'
23
23
  import CdcDataBite from '@cdc/data-bite/src/CdcDataBite'
24
24
  import CdcMap from '@cdc/map/src/CdcMap'
25
25
  import CdcWaffleChart from '@cdc/waffle-chart/src/CdcWaffleChart'
@@ -228,7 +228,15 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
228
228
  )
229
229
  dispatch({ type: 'SET_FILTERED_DATA', payload: filteredData })
230
230
  const visualizations = reloadURLHelpers.getVisualizationsWithFormattedData(config.visualizations, newData)
231
- dispatch({ type: 'SET_CONFIG', payload: { dashboard: dashboardConfig, datasets: newDatasets, visualizations } })
231
+ dispatch({
232
+ type: 'SET_CONFIG',
233
+ payload: {
234
+ dashboard: dashboardConfig,
235
+ datasets: newDatasets,
236
+ visualizations,
237
+ activeDashboard: config.activeDashboard
238
+ }
239
+ })
232
240
  setAPILoading(false)
233
241
  }
234
242
  }
@@ -268,7 +276,7 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
268
276
  const loadAllFilters = shouldLoadAllFilters(config, isEditor && !isPreview)
269
277
  const sharedFiltersWithValues = addValuesToDashboardFilters(config.dashboard.sharedFilters, state.data)
270
278
 
271
- loadAPIFilters(sharedFiltersWithValues, apiFilterDropdowns, loadAllFilters).then(newFilters => {
279
+ loadAPIFilters(sharedFiltersWithValues, apiFilterDropdowns, loadAllFilters)?.then(newFilters => {
272
280
  const allValuesSelected = newFilters.every(filter => {
273
281
  return filter.type === 'datafilter' || filter.active
274
282
  })
@@ -534,7 +542,7 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
534
542
  classes={[`dashboard-title`, `${config.dashboard.theme ?? 'theme-blue'}`]}
535
543
  />
536
544
  {/* Description */}
537
- {description && <div className='subtext'>{parse(description)}</div>}
545
+ {description && <div className='subtext mb-3'>{parse(description)}</div>}
538
546
  {/* Visualizations */}
539
547
  {config.rows &&
540
548
  config.rows
@@ -24,6 +24,10 @@ import { ConfigRow } from '../types/ConfigRow'
24
24
  import BumpChartConfig from './_mock/bump-chart.json'
25
25
  import MethodologyConfig from './_mock/methodology.json'
26
26
  import methodologyAPI from './_mock/methodologyAPI'
27
+ import TopSpacing_1 from './_mock/data-bite-dash-test.json'
28
+ import TopSpacing_2 from './_mock/data-bite-dash-test_1.json'
29
+ import TopSpacing_3 from './_mock/data-bite-dash-test_1_1.json'
30
+ import TopSpacing_4 from './_mock/data-bite-dash-test_1_1_1.json'
27
31
 
28
32
  const meta: Meta<typeof Dashboard> = {
29
33
  title: 'Components/Pages/Dashboard',
@@ -403,4 +407,32 @@ export const RegressionMultiVisualization: Story = {
403
407
  }
404
408
  }
405
409
 
410
+ export const Top_Spacing_1: Story = {
411
+ args: {
412
+ config: TopSpacing_1,
413
+ isEditor: false
414
+ }
415
+ }
416
+
417
+ export const Top_Spacing_2: Story = {
418
+ args: {
419
+ config: TopSpacing_2,
420
+ isEditor: false
421
+ }
422
+ }
423
+
424
+ export const Top_Spacing_3: Story = {
425
+ args: {
426
+ config: TopSpacing_3,
427
+ isEditor: false
428
+ }
429
+ }
430
+
431
+ export const Top_Spacing_4: Story = {
432
+ args: {
433
+ config: TopSpacing_4,
434
+ isEditor: false
435
+ }
436
+ }
437
+
406
438
  export default meta
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"Dash Description","title":"Dashboard Name"},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"Dash Description","title":""},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"","title":"Title no description"},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"","title":""},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react'
2
2
  import Icon from '../../../core/components/ui/Icon'
3
+ import { appFontSize } from '@cdc/core/helpers/cove/fontSettings'
3
4
 
4
5
  type CollapsableVizRow = {
5
6
  allExpanded: boolean
@@ -16,8 +17,7 @@ const CollapsibleVisualizationRow: React.FC<CollapsableVizRow> = ({
16
17
  children
17
18
  }) => {
18
19
  const [isExpanded, setIsExpanded] = useState(allExpanded)
19
- const fontSizes = { small: 16, medium: 18, large: 20 }
20
- const titleFontSize = ['xs', 'xxs'].includes(currentViewport) ? '13px' : `${fontSizes[fontSize]}px`
20
+ const titleFontSize = ['xs', 'xxs'].includes(currentViewport) ? '13px' : `${appFontSize}px`
21
21
 
22
22
  useEffect(() => {
23
23
  setIsExpanded(allExpanded)