@cdc/dashboard 4.25.10 → 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 +48574 -46414
- 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 +39095 -39077
- package/examples/private/clade-2.json +430 -0
- package/examples/private/delete.json +32919 -0
- package/examples/private/diabetes.json +546 -196
- package/examples/private/markup-footer/mortality-deaths-footnotes-age.csv +3 -0
- package/examples/private/mpox.json +38128 -0
- package/examples/private/reset.json +32920 -0
- package/examples/test-api-filter-reset.json +132 -0
- package/index.html +2 -2
- package/package.json +9 -10
- package/src/CdcDashboardComponent.tsx +17 -8
- package/src/DashboardContext.tsx +3 -1
- package/src/_stories/Dashboard.stories.tsx +17 -0
- package/src/_stories/_mock/custom-order-new-values.json +116 -0
- package/src/components/DashboardFilters/DashboardFilters.tsx +34 -20
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +29 -12
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +77 -111
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +51 -51
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +120 -24
- package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +62 -3
- package/src/components/DataDesignerModal.tsx +12 -5
- package/src/components/Header/Header.tsx +10 -9
- package/src/components/Toggle/Toggle.tsx +48 -48
- package/src/components/VisualizationRow.tsx +4 -3
- package/src/helpers/addValuesToDashboardFilters.ts +29 -4
- package/src/helpers/apiFilterHelpers.ts +26 -2
- package/src/helpers/filterData.ts +52 -7
- package/src/helpers/filterResetHelpers.ts +102 -0
- package/src/helpers/getVizConfig.ts +2 -2
- package/src/helpers/loadAPIFilters.ts +109 -99
- package/src/helpers/tests/filterResetHelpers.test.ts +532 -0
- package/src/index.tsx +1 -0
- package/src/scss/editor-panel.scss +3 -431
- package/src/scss/main.scss +1 -24
- package/src/store/errorMessage/errorMessage.reducer.ts +1 -1
- package/src/types/DashboardFilters.ts +9 -8
- package/examples/private/burden_toolkit_mortality_diabetes_attributable_deaths_data.csv +0 -14041
- package/examples/private/burden_toolkit_mortality_diabetes_attributable_deaths_per_100000_data.csv +0 -14041
- package/examples/private/burden_toolkit_mortality_qaly_data.csv +0 -18721
- package/examples/private/burden_toolkit_mortality_yll_data.csv +0 -18721
- 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
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AnyVisualization } from '@cdc/core/types/Visualization'
|
|
2
|
-
import { DashboardFilters } from '../types/DashboardFilters'
|
|
3
|
-
|
|
4
|
-
export const getAutoLoadVisualization = (visualizations: Record<string, AnyVisualization>): DashboardFilters | undefined => {
|
|
5
|
-
const autoLoadViz = Object.values(visualizations).filter(vis => {
|
|
6
|
-
return vis.type === 'dashboardFilters' && vis.autoLoad
|
|
7
|
-
}) as DashboardFilters[]
|
|
8
|
-
if (autoLoadViz.length === 0) return
|
|
9
|
-
if (autoLoadViz.length > 1) throw new Error('Only one filter row can be autoloaded')
|
|
10
|
-
return autoLoadViz[0]
|
|
11
|
-
}
|
package/src/scss/mixins.scss
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@mixin breakpoint($class) {
|
|
2
|
-
@if $class == xs {
|
|
3
|
-
@media (max-width: 767px) {
|
|
4
|
-
@content;
|
|
5
|
-
}
|
|
6
|
-
} @else if $class == sm {
|
|
7
|
-
@media (min-width: 768px) {
|
|
8
|
-
@content;
|
|
9
|
-
}
|
|
10
|
-
} @else if $class == md {
|
|
11
|
-
@media (min-width: 960px) {
|
|
12
|
-
@content;
|
|
13
|
-
}
|
|
14
|
-
} @else if $class == lg {
|
|
15
|
-
@media (min-width: 1300px) {
|
|
16
|
-
@content;
|
|
17
|
-
}
|
|
18
|
-
} @else {
|
|
19
|
-
@warn "Breakpoint mixin supports: xs, sm, md, lg";
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@mixin breakpointClass($class) {
|
|
24
|
-
@if $class == xs {
|
|
25
|
-
&.xs,
|
|
26
|
-
&.xxs {
|
|
27
|
-
@content;
|
|
28
|
-
}
|
|
29
|
-
} @else if $class == sm {
|
|
30
|
-
&.sm,
|
|
31
|
-
&.md,
|
|
32
|
-
&.lg {
|
|
33
|
-
@content;
|
|
34
|
-
}
|
|
35
|
-
} @else if $class == md {
|
|
36
|
-
&.md,
|
|
37
|
-
&.lg {
|
|
38
|
-
@content;
|
|
39
|
-
}
|
|
40
|
-
} @else if $class == lg {
|
|
41
|
-
&.lg {
|
|
42
|
-
@content;
|
|
43
|
-
}
|
|
44
|
-
} @else {
|
|
45
|
-
@warn "Breakpoint Class mixin supports: xs, sm, md, lg";
|
|
46
|
-
}
|
|
47
|
-
}
|
package/src/scss/variables.scss
DELETED
|
File without changes
|