@cdc/dashboard 4.25.3 → 4.25.6-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 (63) hide show
  1. package/Dynamic_Data.md +79 -0
  2. package/Override_Data.md +39 -0
  3. package/dist/cdcdashboard.js +76052 -77984
  4. package/examples/legend-issue-data.json +1874 -0
  5. package/examples/legend-issue.json +749 -0
  6. package/examples/map.json +628 -0
  7. package/examples/special-classes.json +54340 -0
  8. package/index.html +1 -26
  9. package/package.json +10 -15
  10. package/src/CdcDashboardComponent.tsx +65 -216
  11. package/src/_stories/Dashboard.stories.tsx +2 -0
  12. package/src/_stories/_mock/api-filter-map.json +43 -1
  13. package/src/components/CollapsibleVisualizationRow.tsx +4 -6
  14. package/src/components/DashboardEditors.tsx +143 -0
  15. package/src/components/DashboardFilters/DashboardFilters.tsx +205 -205
  16. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +286 -287
  17. package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +129 -0
  18. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +680 -652
  19. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +198 -198
  20. package/src/components/DataDesignerModal.tsx +33 -14
  21. package/src/components/Header/Header.tsx +7 -9
  22. package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +3 -0
  23. package/src/components/Row.tsx +2 -24
  24. package/src/components/VisualizationRow.tsx +191 -214
  25. package/src/helpers/getVizConfig.ts +93 -80
  26. package/src/helpers/getVizRowColumnLocator.ts +0 -1
  27. package/src/helpers/reloadURLHelpers.ts +11 -6
  28. package/src/helpers/shouldLoadAllFilters.ts +30 -30
  29. package/src/index.tsx +2 -1
  30. package/src/scss/main.scss +0 -5
  31. package/src/store/dashboard.actions.ts +61 -62
  32. package/src/store/dashboard.reducer.ts +15 -11
  33. package/src/types/ConfigRow.ts +0 -1
  34. package/src/types/Dashboard.ts +1 -1
  35. package/src/types/DashboardConfig.ts +1 -1
  36. package/src/types/SharedFilter.ts +2 -0
  37. package/examples/private/DEV-10120.json +0 -1294
  38. package/examples/private/DEV-10527.json +0 -845
  39. package/examples/private/DEV-10586.json +0 -54319
  40. package/examples/private/DEV-10856.json +0 -54319
  41. package/examples/private/DEV-9199.json +0 -606
  42. package/examples/private/DEV-9644.json +0 -20092
  43. package/examples/private/DEV-9684.json +0 -2135
  44. package/examples/private/DEV-9932.json +0 -95
  45. package/examples/private/DEV-9989.json +0 -229
  46. package/examples/private/art-dashboard.json +0 -18174
  47. package/examples/private/art-scratch.json +0 -2406
  48. package/examples/private/bird-flu-2.json +0 -440
  49. package/examples/private/bird-flu.json +0 -413
  50. package/examples/private/dashboard-config-ehdi.json +0 -29915
  51. package/examples/private/dashboard-map-filter.json +0 -815
  52. package/examples/private/dashboard-margins.js +0 -15
  53. package/examples/private/dataset.json +0 -1452
  54. package/examples/private/dev-10856-2.json +0 -1348
  55. package/examples/private/ehdi-data.json +0 -29502
  56. package/examples/private/exposure-source-h5-data.csv +0 -26
  57. package/examples/private/fatal-data.csv +0 -3159
  58. package/examples/private/feelings.json +0 -1
  59. package/examples/private/gaza-issue.json +0 -1214
  60. package/examples/private/markup.json +0 -115
  61. package/examples/private/nhis.json +0 -1792
  62. package/examples/private/workforce.json +0 -2041
  63. package/src/types/DataSet.ts +0 -11
package/index.html CHANGED
@@ -21,33 +21,8 @@
21
21
  </head>
22
22
 
23
23
  <body>
24
- <div class="react-container" data-config="/examples/private/nhis.json"></div>
25
- <!-- <div class="react-container" data-config="/examples/private/bird-flu.json"></div> -->
26
- <!-- <div class="react-container" data-config="/examples/bump-chart.json"></div> -->
27
- <!-- <div class="react-container" data-config="/examples/full-dashboard.json"></div> -->
28
- <div class="react-container" data-config="/examples/dashboard-gallery.json"></div>
29
- <!-- <div class="react-container" data-config="/examples/dev-8332.json"></div> -->
30
- <!-- <div class="react-container" data-config="/examples/default-multi-dataset.json"></div> -->
31
- <!-- <div class="react-container" data-config="/examples/dev-8332.json"></div> -->
32
- <!-- <div class="react-container" data-config="/examples/dashboard-gallery.json"></div> -->
33
- <!-- <div class="react-container" data-config="/examples/filtered-dash.json"></div> -->
34
- <!-- <div class="react-container" data-config="/examples/private/art-dashboard.json"></div> -->
35
- <!-- <div class="react-container" data-config="/examples/sankey.json"></div> -->
36
- <!-- <div class="react-container" data-config="/examples/DEV-6574.json"></div> -->
37
- <!-- <div class="react-container" data-config="/examples/default-multi-dataset-2.json"></div> -->
38
- <div class="react-container" data-config="/examples/default-multi-dataset.json"></div>
39
- <!-- <div class="react-container" data-config="/examples/default-filter-control.json"></div> -->
40
-
41
- <!-- Respiratory custom example -->
42
- <div
43
- class="react-container wcms-viz-container"
44
- data-config-url="/respiratory-viruses/modules/ed-visits-county-file.json"
45
- data-config="/examples/ed-visits-county-file.json"
46
- ></div>
47
-
24
+ <div class="react-container" data-config="/examples/map.json"></div>
48
25
  <script src="https://www.cdc.gov/TemplatePackage/contrib/libs/jquery/latest/jquery.min.js?_=91329"></script>
49
- <!-- <script src="examples/custom/js/respiratory.js"></script> -->
50
-
51
26
  <script type="module" src="./src/index.tsx"></script>
52
27
  </body>
53
28
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/dashboard",
3
- "version": "4.25.3",
3
+ "version": "4.25.6-1",
4
4
  "description": "React component for combining multiple visualizations into a single dashboard",
5
5
  "moduleName": "CdcDashboard",
6
6
  "main": "dist/cdcdashboard",
@@ -27,27 +27,22 @@
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@cdc/chart": "^4.25.3",
31
- "@cdc/core": "^4.25.3",
32
- "@cdc/data-bite": "^4.25.3",
33
- "@cdc/filtered-text": "^4.25.3",
34
- "@cdc/map": "^4.25.3",
35
- "@cdc/markup-include": "^4.25.3",
36
- "@cdc/waffle-chart": "^4.25.3",
37
- "html-react-parser": "^3.0.8",
30
+ "@cdc/chart": "^4.25.6-1",
31
+ "@cdc/core": "^4.25.6-1",
32
+ "@cdc/data-bite": "^4.25.6-1",
33
+ "@cdc/filtered-text": "^4.25.6-1",
34
+ "@cdc/map": "^4.25.6-1",
35
+ "@cdc/markup-include": "^4.25.6-1",
36
+ "@cdc/waffle-chart": "^4.25.6-1",
38
37
  "js-base64": "^2.5.2",
39
- "papaparse": "^5.3.0",
40
38
  "react-accessible-accordion": "^3.3.4",
41
39
  "react-dnd": "^14.0.2",
42
40
  "react-dnd-html5-backend": "^14.0.0",
43
- "react-table": "^7.5.0",
44
- "react-tooltip": "5.8.2-beta.3",
45
- "use-debounce": "^6.0.1",
46
- "whatwg-fetch": "^3.6.2"
41
+ "use-debounce": "^6.0.1"
47
42
  },
48
43
  "peerDependencies": {
49
44
  "react": "^18.2.0",
50
45
  "react-dom": "^18.2.0"
51
46
  },
52
- "gitHead": "b09566f5a7d57c8d0109e5f407257729d6b36846"
47
+ "gitHead": "ac45ee0f1d6a4045648c4e083992fc091795e084"
53
48
  }
@@ -19,13 +19,6 @@ 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/CdcChartComponent'
23
- import CdcDataBite from '@cdc/data-bite/src/CdcDataBite'
24
- import CdcMap from '@cdc/map/src/CdcMap'
25
- import CdcWaffleChart from '@cdc/waffle-chart/src/CdcWaffleChart'
26
- import CdcMarkupInclude from '@cdc/markup-include/src/CdcMarkupInclude'
27
- import CdcFilteredText from '@cdc/filtered-text/src/CdcFilteredText'
28
-
29
22
  import Grid from './components/Grid'
30
23
  import Header from './components/Header/Header'
31
24
  import DataTable from '@cdc/core/components/DataTable'
@@ -56,16 +49,16 @@ import { getVizConfig } from './helpers/getVizConfig'
56
49
  import { getFilteredData } from './helpers/getFilteredData'
57
50
  import { getVizRowColumnLocator } from './helpers/getVizRowColumnLocator'
58
51
  import Layout from '@cdc/core/components/Layout'
59
- import FootnotesStandAlone from '@cdc/core/components/Footnotes/FootnotesStandAlone'
60
52
  import * as reloadURLHelpers from './helpers/reloadURLHelpers'
61
53
  import { addValuesToDashboardFilters } from './helpers/addValuesToDashboardFilters'
62
54
  import { DashboardFilters } from './types/DashboardFilters'
63
55
  import DashboardSharedFilters from './components/DashboardFilters'
64
- import ExpandCollapseButtons from './components/ExpandCollapseButtons'
65
56
  import { loadAPIFiltersFactory } from './helpers/loadAPIFilters'
66
57
  import Loader from '@cdc/core/components/Loader'
67
58
  import Alert from '@cdc/core/components/Alert'
68
59
  import { shouldLoadAllFilters } from './helpers/shouldLoadAllFilters'
60
+ import { subscribe, unsubscribe } from '@cdc/core/helpers/events'
61
+ import DashboardEditors from './components/DashboardEditors'
69
62
 
70
63
  type DashboardProps = Omit<WCMSProps, 'configUrl'> & {
71
64
  initialState: InitialState
@@ -120,12 +113,16 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
120
113
  for (let i = 0; i < datasetKeys.length; i++) {
121
114
  const datasetKey = datasetKeys[i]
122
115
  const dataset = config.datasets[datasetKey]
123
-
124
- if (dataset.dataUrl && filters) {
116
+ const windowQueryParams = Object.fromEntries(new URLSearchParams(window.location.search))
117
+ const loadQueryParam = windowQueryParams[dataset.loadQueryParam || '']
118
+ if (dataset.dataUrl && (filters || loadQueryParam)) {
125
119
  const dataUrl = new URL(dataset.runtimeDataUrl || dataset.dataUrl, window.location.origin)
126
120
  const currentQSParams = Object.fromEntries(new URLSearchParams(dataUrl.search))
127
121
  const updatedQSParams = {}
128
- filters.forEach(filter => {
122
+ if (loadQueryParam) {
123
+ updatedQSParams[dataset.loadQueryParam] = loadQueryParam
124
+ }
125
+ filters?.forEach(filter => {
129
126
  if (
130
127
  filter.type === 'urlfilter' &&
131
128
  reloadURLHelpers.filterUsedByDataUrl(filter, datasetKey, config.visualizations, config.rows)
@@ -143,7 +140,6 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
143
140
  }
144
141
 
145
142
  if (!!filter.setByQueryParameter) {
146
- const windowQueryParams = Object.fromEntries(new URLSearchParams(window.location.search))
147
143
  const filterValue = windowQueryParams[filter.setByQueryParameter]
148
144
  const queryParam = filter.apiFilter?.valueSelector || filter.setByQueryParameter
149
145
  if (filterValue) {
@@ -271,6 +267,30 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
271
267
  dispatch({ type: 'SET_SHARED_FILTERS', payload: newConfig.dashboard.sharedFilters })
272
268
  }
273
269
 
270
+ const setEventData = ({ detail }) => {
271
+ try {
272
+ const newDatasets = Object.keys(detail).reduce((acc, key) => {
273
+ if (state.data[key] !== undefined) {
274
+ acc[key] = detail[key]
275
+ }
276
+ return acc
277
+ }, {})
278
+ const newConfig = { ...state, data: { ...state.data, ...newDatasets } }
279
+ const newFilteredData = getFilteredData(newConfig, _.cloneDeep(state.filteredData))
280
+ dispatch({ type: 'SET_FILTERED_DATA', payload: newFilteredData })
281
+ dispatch({ type: 'SET_DATA', payload: { ...state.data, ...newDatasets } })
282
+ } catch (e) {
283
+ console.error('Error setting event data: ', e)
284
+ }
285
+ }
286
+
287
+ useEffect(() => {
288
+ subscribe('cove_set_data', setEventData)
289
+ return () => {
290
+ unsubscribe('cove_set_data', setEventData)
291
+ }
292
+ }, [])
293
+
274
294
  useEffect(() => {
275
295
  const { config } = state
276
296
  const loadAllFilters = shouldLoadAllFilters(config, isEditor && !isPreview)
@@ -342,7 +362,6 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
342
362
  state.filteredData
343
363
  )
344
364
  visualizationConfig.uid = visualizationKey
345
- if (visualizationConfig.type === 'footnotes') visualizationConfig.formattedData = undefined
346
365
  const setsSharedFilter =
347
366
  state.config.dashboard.sharedFilters &&
348
367
  state.config.dashboard.sharedFilters.filter(sharedFilter => sharedFilter.setBy === visualizationKey).length > 0
@@ -360,151 +379,21 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
360
379
  updateChildConfig(visualizationKey, dataCorrectedConfig)
361
380
  }
362
381
 
363
- switch (visualizationConfig.type) {
364
- case 'chart':
365
- body = (
366
- <>
367
- <Header visualizationKey={visualizationKey} subEditor='Chart' />
368
- <CdcChart
369
- key={visualizationKey}
370
- config={visualizationConfig}
371
- isEditor={true}
372
- isDebug={isDebug}
373
- setConfig={_updateConfig}
374
- setSharedFilter={setsSharedFilter ? setSharedFilter : undefined}
375
- setSharedFilterValue={setSharedFilterValue}
376
- dashboardConfig={state.config}
377
- isDashboard={true}
378
- configUrl={undefined}
379
- setEditing={undefined}
380
- hostname={undefined}
381
- link={undefined}
382
- />
383
- </>
384
- )
385
- break
386
- case 'map':
387
- body = (
388
- <>
389
- <Header visualizationKey={visualizationKey} subEditor='Map' />
390
- <CdcMap
391
- key={visualizationKey}
392
- config={visualizationConfig}
393
- isEditor={true}
394
- isDebug={isDebug}
395
- setConfig={_updateConfig}
396
- setSharedFilter={setsSharedFilter ? setSharedFilter : undefined}
397
- setSharedFilterValue={setSharedFilterValue}
398
- isDashboard={true}
399
- showLoader={false}
400
- dashboardConfig={state.config}
401
- />
402
- </>
403
- )
404
- break
405
- case 'data-bite':
406
- body = (
407
- <>
408
- <Header visualizationKey={visualizationKey} subEditor='Data Bite' />
409
- <CdcDataBite
410
- key={visualizationKey}
411
- config={{ ...visualizationConfig, newViz: true }}
412
- isEditor={true}
413
- setConfig={_updateConfig}
414
- isDashboard={true}
415
- />
416
- </>
417
- )
418
- break
419
- case 'waffle-chart':
420
- body = (
421
- <>
422
- <Header visualizationKey={visualizationKey} subEditor='Waffle Chart' />
423
- <CdcWaffleChart
424
- key={visualizationKey}
425
- config={visualizationConfig}
426
- isEditor={true}
427
- setConfig={_updateConfig}
428
- isDashboard={true}
429
- configUrl={undefined}
430
- />
431
- </>
432
- )
433
- break
434
- case 'markup-include':
435
- body = (
436
- <>
437
- <Header visualizationKey={visualizationKey} subEditor='Markup Include' />
438
- <CdcMarkupInclude
439
- key={visualizationKey}
440
- config={visualizationConfig}
441
- isEditor={true}
442
- setConfig={_updateConfig}
443
- isDashboard={true}
444
- configUrl={undefined}
445
- />
446
- </>
447
- )
448
- break
449
- case 'filtered-text':
450
- body = (
451
- <>
452
- <Header visualizationKey={visualizationKey} subEditor='Filtered Text' />
453
- <CdcFilteredText
454
- key={visualizationKey}
455
- config={visualizationConfig}
456
- isEditor={true}
457
- setConfig={_updateConfig}
458
- isDashboard={true}
459
- configUrl={undefined}
460
- />
461
- </>
462
- )
463
- break
464
- case 'dashboardFilters':
465
- body = (
466
- <>
467
- <Header visualizationKey={visualizationKey} subEditor='Filter Dropdowns' />
468
- <DashboardSharedFilters
469
- isEditor={true}
470
- visualizationConfig={visualizationConfig}
471
- apiFilterDropdowns={apiFilterDropdowns}
472
- setConfig={_updateConfig}
473
- />
474
- </>
475
- )
476
- break
477
- case 'table':
478
- body = (
479
- <>
480
- <Header visualizationKey={visualizationKey} subEditor='Table' />
481
- <DataTableStandAlone
482
- visualizationKey={visualizationKey}
483
- config={visualizationConfig}
484
- isEditor={true}
485
- updateConfig={_updateConfig}
486
- />
487
- </>
488
- )
489
- break
490
- case 'footnotes':
491
- body = (
492
- <>
493
- <Header visualizationKey={visualizationKey} subEditor='Footnotes' />
494
- {/* Datasets are passed in just for reference and need to be removed */}
495
- <FootnotesStandAlone
496
- visualizationKey={visualizationKey}
497
- config={{ ...visualizationConfig, datasets: state.config.datasets }}
498
- isEditor={true}
499
- updateConfig={conf => _updateConfig(_.omit(conf, 'datasets'))}
500
- />
501
- </>
502
- )
503
- break
504
- default:
505
- body = <></>
506
- break
507
- }
382
+ body = (
383
+ <>
384
+ <Header visualizationKey={visualizationKey} subEditor={true} />
385
+ <DashboardEditors
386
+ key={visualizationKey}
387
+ visualizationKey={visualizationKey}
388
+ visualizationConfig={visualizationConfig}
389
+ _updateConfig={_updateConfig}
390
+ isDebug={isDebug}
391
+ setSharedFilter={setSharedFilter}
392
+ apiFilterDropdowns={apiFilterDropdowns}
393
+ state={state}
394
+ />
395
+ </>
396
+ )
508
397
  }
509
398
  })
510
399
 
@@ -527,7 +416,7 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
527
416
  const { config } = state
528
417
  const { title, description } = config.dashboard || {}
529
418
 
530
- const filteredRows = config.rows && config.rows.filter(row => row.columns.filter(col => col.widget).length !== 0)
419
+ const filteredRows = config.rows?.filter(row => row.columns.filter(col => col.widget).length !== 0)
531
420
 
532
421
  body = (
533
422
  <>
@@ -553,62 +442,22 @@ export default function CdcDashboard({ initialState, isEditor = false, isDebug =
553
442
  {/* Description */}
554
443
  {description && <div className='subtext mb-3'>{parse(description)}</div>}
555
444
  {/* Visualizations */}
556
- {filteredRows &&
557
- filteredRows.map((row, index) => {
558
- if (row.multiVizColumn && (isPreview || !isEditor)) {
559
- const filteredData = getFilteredData(state, _.cloneDeep(state.data))
560
- const data = filteredData[index] ?? row.formattedData
561
- const dataGroups = {}
562
- data.forEach(d => {
563
- const groupKey = d[row.multiVizColumn]
564
- if (!dataGroups[groupKey]) dataGroups[groupKey] = []
565
- dataGroups[groupKey].push(d)
566
- })
567
- return (
568
- <React.Fragment key={`row__${index}`}>
569
- {/* Expand/Collapse All */}
570
- {!inNoDataState && row.expandCollapseAllButtons === true && (
571
- <ExpandCollapseButtons setAllExpanded={setAllExpanded} />
572
- )}
573
- {Object.keys(dataGroups).map(groupName => {
574
- const dataValue = dataGroups[groupName]
575
- return (
576
- <VisualizationRow
577
- key={`row__${index}__${groupName}`}
578
- allExpanded={allExpanded}
579
- filteredDataOverride={dataValue}
580
- groupName={groupName}
581
- row={row}
582
- rowIndex={index}
583
- setSharedFilter={setSharedFilter}
584
- updateChildConfig={updateChildConfig}
585
- apiFilterDropdowns={apiFilterDropdowns}
586
- currentViewport={currentViewport}
587
- inNoDataState={inNoDataState}
588
- isLastRow={index === filteredRows.length - 1}
589
- />
590
- )
591
- })}
592
- </React.Fragment>
593
- )
594
- } else {
595
- return (
596
- <VisualizationRow
597
- key={`row__${index}`}
598
- allExpanded={false}
599
- groupName={''}
600
- row={row}
601
- rowIndex={index}
602
- setSharedFilter={setSharedFilter}
603
- updateChildConfig={updateChildConfig}
604
- apiFilterDropdowns={apiFilterDropdowns}
605
- currentViewport={currentViewport}
606
- inNoDataState={inNoDataState}
607
- isLastRow={index === filteredRows.length - 1}
608
- />
609
- )
610
- }
611
- })}
445
+ {filteredRows?.map((row, index) => (
446
+ <VisualizationRow
447
+ key={`row__${index}`}
448
+ allExpanded={allExpanded}
449
+ groupName={''}
450
+ row={row}
451
+ rowIndex={index}
452
+ setSharedFilter={setSharedFilter}
453
+ setAllExpanded={setAllExpanded}
454
+ updateChildConfig={updateChildConfig}
455
+ apiFilterDropdowns={apiFilterDropdowns}
456
+ currentViewport={currentViewport}
457
+ inNoDataState={inNoDataState}
458
+ isLastRow={index === filteredRows.length - 1}
459
+ />
460
+ ))}
612
461
 
613
462
  {inNoDataState ? <div className='mt-5'>Please complete your selection to continue.</div> : <></>}
614
463
 
@@ -341,6 +341,8 @@ export const RegressionAPIFiltersMap: Story = {
341
341
  await sleep(1000)
342
342
  const topicsFilter = canvas.getByLabelText('Category', { selector: 'select' })
343
343
  await user.selectOptions(topicsFilter, ['topicId'])
344
+ await sleep(1000)
345
+
344
346
  const indicatorsFilter = canvas.getByLabelText('Indicator', { selector: 'select' })
345
347
  await user.selectOptions(indicatorsFilter, ['indicatorID'])
346
348
  const yearsFilter = canvas.getByLabelText('Year', { selector: 'select' })
@@ -82,6 +82,7 @@
82
82
  ],
83
83
  "visualizations": {
84
84
  "map1": {
85
+ "table": {},
85
86
  "uid": "map1",
86
87
  "type": "map",
87
88
  "defaultData": false,
@@ -113,6 +114,45 @@
113
114
  "hideGeoColumnInTooltip": false,
114
115
  "hidePrimaryColumnInTooltip": false
115
116
  },
117
+ "tooltips": {
118
+ "appearanceType": "hover",
119
+ "linkLabel": "Learn More",
120
+ "capitalizeLabels": true,
121
+ "opacity": 90
122
+ },
123
+ "map": {
124
+ "layers": [],
125
+ "patterns": []
126
+ },
127
+ "visual": {
128
+ "minBubbleSize": 1,
129
+ "maxBubbleSize": 20,
130
+ "extraBubbleBorder": false,
131
+ "cityStyle": "circle",
132
+ "cityStyleLabel": "",
133
+ "showBubbleZeros": false,
134
+ "additionalCityStyles": [],
135
+ "geoCodeCircleSize": 8
136
+ },
137
+ "hexMap": {
138
+ "type": "",
139
+ "shapeGroups": [
140
+ {
141
+ "legendTitle": "",
142
+ "legendDescription": "",
143
+ "items": [
144
+ {
145
+ "key": "",
146
+ "shape": "Arrow Up",
147
+ "column": "",
148
+ "operator": "=",
149
+ "value": ""
150
+ }
151
+ ]
152
+ }
153
+ ]
154
+ },
155
+ "annotations": [],
116
156
  "color": "greenBlue",
117
157
  "columns": {
118
158
  "geo": {
@@ -170,7 +210,8 @@
170
210
  "position": "side",
171
211
  "title": "Crude Prevalence",
172
212
  "separateZero": true
173
- }
213
+ },
214
+ "table": {}
174
215
  }
175
216
  },
176
217
  "type": "dashboard",
@@ -179,6 +220,7 @@
179
220
  "dataUrl": "http://test.gov/api/POC/TableData?DataValueTypeId=CRDMEDN"
180
221
  }
181
222
  },
223
+ "table": {},
182
224
  "filterBehavior": "Apply Button",
183
225
  "runtime": {},
184
226
  "uuid": 1684783370106
@@ -1,30 +1,28 @@
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
+ import { APP_FONT_SIZE } from '@cdc/core/helpers/constants'
4
4
 
5
5
  type CollapsableVizRow = {
6
6
  allExpanded: boolean
7
7
  children: React.ReactNode
8
- fontSize: string
9
8
  groupName: string
10
9
  currentViewport: string
11
10
  }
12
11
  const CollapsibleVisualizationRow: React.FC<CollapsableVizRow> = ({
13
12
  allExpanded,
14
- fontSize,
15
13
  groupName,
16
14
  currentViewport,
17
15
  children
18
16
  }) => {
19
17
  const [isExpanded, setIsExpanded] = useState(allExpanded)
20
- const titleFontSize = ['xs', 'xxs'].includes(currentViewport) ? '13px' : `${appFontSize}px`
18
+ const titleFontSize = ['xs', 'xxs'].includes(currentViewport) ? '13px' : `${APP_FONT_SIZE}px`
21
19
 
22
20
  useEffect(() => {
23
21
  setIsExpanded(allExpanded)
24
22
  }, [allExpanded])
25
23
 
26
24
  return (
27
- <>
25
+ <div className='collapsable-multiviz-container'>
28
26
  <div
29
27
  style={{ fontSize: titleFontSize }}
30
28
  role='button'
@@ -43,7 +41,7 @@ const CollapsibleVisualizationRow: React.FC<CollapsableVizRow> = ({
43
41
  {groupName}
44
42
  </div>
45
43
  {isExpanded && children}
46
- </>
44
+ </div>
47
45
  )
48
46
  }
49
47