@cdc/dashboard 4.24.1 → 4.24.2
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 +117195 -108041
- package/examples/{private/DEV-6574.json → DEV-6574.json} +8 -8
- package/examples/filters/Alabama.json +72 -0
- package/examples/zika.json +2274 -0
- package/index.html +5 -3
- package/package.json +9 -9
- package/src/CdcDashboard.tsx +124 -991
- package/src/CdcDashboardComponent.tsx +903 -0
- package/src/_stories/Dashboard.stories.tsx +2 -2
- package/src/components/Column.tsx +15 -12
- package/src/components/Header/Header.tsx +18 -4
- package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +106 -0
- package/src/components/MultiConfigTabs/MultiTabs.tsx +30 -0
- package/src/components/MultiConfigTabs/index.tsx +8 -0
- package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +32 -0
- package/src/components/Widget.tsx +25 -9
- package/src/helpers/generateValuesForFilter.ts +1 -1
- package/src/helpers/getUpdateConfig.ts +6 -2
- package/src/helpers/processData.ts +13 -0
- package/src/helpers/processDataLegacy.ts +14 -0
- package/src/{index.jsx → index.tsx} +2 -2
- package/src/scss/editor-panel.scss +14 -11
- package/src/scss/grid.scss +4 -6
- package/src/scss/main.scss +2 -8
- package/src/store/dashboard.actions.ts +10 -4
- package/src/store/dashboard.reducer.ts +74 -3
- package/src/types/ConfigRow.ts +6 -0
- package/src/types/Dashboard.ts +11 -0
- package/src/types/{Config.ts → DashboardConfig.ts} +8 -14
- package/src/types/InitialState.ts +10 -0
- package/src/types/MultiDashboard.ts +11 -0
- package/examples/private/DEV-5189-2.json +0 -935
- package/examples/private/DEV-5189.json +0 -1266
- package/examples/private/dash-scaling.json +0 -45325
- package/examples/private/epi-chart.json +0 -813
- package/examples/private/epi-dash.json +0 -457
- package/examples/private/epi-new.json +0 -994
- package/examples/private/filters/Alabama.json +0 -4217
- package/examples/private/new-epi-csv.json +0 -358
- package/examples/private/new-epi.json +0 -358
- package/examples/private/no-lines.json +0 -8432
- package/examples/private/tick-bold-data.json +0 -82325
- package/examples/private/tick-bold.json +0 -164678
- package/examples/private/visits.json +0 -9985
- /package/examples/{private/filters → filters}/Alaska.json +0 -0
- /package/examples/{private/filters → filters}/Arkansas.json +0 -0
- /package/examples/{private/filters → filters}/California.json +0 -0
- /package/examples/{private/filters → filters}/Colorado.json +0 -0
- /package/examples/{private/filters → filters}/Connecticut.json +0 -0
- /package/examples/{private/filters → filters}/Delaware.json +0 -0
- /package/examples/{private/filters → filters}/DistrictofColumbia.json +0 -0
- /package/examples/{private/filters → filters}/Florida.json +0 -0
- /package/examples/{private/filters → filters}/States.json +0 -0
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
import { Series } from '@cdc/core/types/Series'
|
|
2
2
|
import { Runtime } from '@cdc/core/types/Runtime'
|
|
3
3
|
import { DataSet } from './DataSet'
|
|
4
|
-
import {
|
|
4
|
+
import { ConfigRow } from './ConfigRow'
|
|
5
5
|
import { Visualization } from '@cdc/core/types/Visualization'
|
|
6
6
|
import { Table } from '@cdc/core/types/Table'
|
|
7
7
|
import { FilterBehavior } from '@cdc/core/types/FilterBehavior'
|
|
8
|
+
import { Dashboard } from './Dashboard'
|
|
8
9
|
|
|
9
|
-
export type
|
|
10
|
-
dashboard:
|
|
11
|
-
sharedFilters: SharedFilter[]
|
|
12
|
-
datasets: Record<string, DataSet>
|
|
13
|
-
description: any
|
|
14
|
-
title: any
|
|
15
|
-
theme: any
|
|
16
|
-
filters: any
|
|
17
|
-
}
|
|
10
|
+
export type DashboardConfig = DataSet & {
|
|
11
|
+
dashboard: Dashboard
|
|
18
12
|
confidenceKeys: Record<string, any>
|
|
19
|
-
visualizations:
|
|
20
|
-
[vizKey: string]: Visualization
|
|
21
|
-
}
|
|
13
|
+
visualizations: Record<string, Visualization>
|
|
22
14
|
series: Series
|
|
23
15
|
datasets: Record<string, DataSet>
|
|
24
16
|
dataFileName: string
|
|
25
17
|
table: Table
|
|
26
|
-
rows:
|
|
18
|
+
rows: ConfigRow[]
|
|
27
19
|
filterBehavior: FilterBehavior
|
|
28
20
|
runtime: Runtime
|
|
21
|
+
downloadImageButton: boolean
|
|
22
|
+
downloadPdfButton: boolean
|
|
29
23
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Visualization } from '@cdc/core/types/Visualization'
|
|
2
|
+
import { Dashboard } from './Dashboard'
|
|
3
|
+
import { DashboardConfig } from './DashboardConfig'
|
|
4
|
+
import { ConfigRow } from './ConfigRow'
|
|
5
|
+
|
|
6
|
+
export type MultiDashboard = { dashboard: Dashboard; rows: ConfigRow[]; visualizations: Record<string, Visualization>; label: string }
|
|
7
|
+
|
|
8
|
+
export type MultiDashboardConfig = DashboardConfig & {
|
|
9
|
+
multiDashboards?: MultiDashboard[]
|
|
10
|
+
activeDashboard?: number // index of the active MultiDashboard
|
|
11
|
+
}
|