@cdc/core 4.26.2 → 4.26.3
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/LICENSE +201 -0
- package/_stories/Gallery.Charts.stories.tsx +1 -1
- package/_stories/Gallery.DataBite.stories.tsx +1 -1
- package/_stories/Gallery.Maps.stories.tsx +1 -1
- package/_stories/PageART.stories.tsx +1 -1
- package/_stories/PageBRFSS.stories.tsx +1 -1
- package/_stories/PageCancerRegistries.stories.tsx +1 -1
- package/_stories/PageEasternEquineEncephalitis.stories.tsx +3 -3
- package/_stories/PageExcessiveAlcoholUse.stories.tsx +1 -1
- package/_stories/PageMaternalMortality.stories.tsx +1 -1
- package/_stories/PageOralHealth.stories.tsx +1 -1
- package/_stories/PageRespiratory.stories.tsx +4 -4
- package/_stories/PageSmokingTobacco.stories.tsx +1 -1
- package/_stories/PageStateDiabetesProfiles.stories.tsx +1 -1
- package/_stories/PageWastewater.stories.tsx +4 -4
- package/_stories/VegaImport.stories.tsx +3 -3
- package/assets/callout-flag.svg +7 -0
- package/components/AdvancedEditor/EmbedEditor.tsx +1 -1
- package/components/Alert/components/Alert.styles.css +2 -2
- package/components/ComboBox/combobox.styles.css +48 -48
- package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
- package/components/DataTable/DataTable.tsx +46 -18
- package/components/DataTable/DataTableStandAlone.tsx +1 -0
- package/components/DataTable/components/ChartHeader.tsx +21 -12
- package/components/DataTable/components/MapHeader.tsx +34 -28
- package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
- package/components/DataTable/data-table.css +50 -52
- package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
- package/components/DataTable/helpers/getChartCellValue.ts +10 -7
- package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
- package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
- package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
- package/components/DownloadButton.tsx +14 -6
- package/components/EditorPanel/ColumnsEditor.tsx +38 -31
- package/components/EditorPanel/CustomSortOrder.tsx +94 -0
- package/components/EditorPanel/DataTableEditor.tsx +139 -23
- package/components/EditorPanel/EditorPanel.styles.css +71 -71
- package/components/EditorPanel/EditorPanel.tsx +3 -8
- package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
- package/components/EditorPanel/FootnotesEditor.tsx +2 -2
- package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +7 -6
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +12 -10
- package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
- package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
- package/{styles/v2/components → components/EditorPanel}/editor.scss +67 -13
- package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
- package/components/EditorPanel/sections/VisualSection.tsx +11 -0
- package/components/EditorWrapper/editor-wrapper.style.css +1 -1
- package/components/Filters/Filters.tsx +3 -5
- package/components/Filters/components/Tabs.tsx +19 -7
- package/{styles → components/Filters}/filters.scss +3 -3
- package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
- package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
- package/components/Layout/components/Responsive.tsx +14 -6
- package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
- package/components/Layout/components/Sidebar/components/sidebar.styles.scss +12 -18
- package/components/Layout/components/Visualization/index.tsx +39 -38
- package/components/Layout/components/Visualization/visualizations.scss +232 -15
- package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
- package/components/Layout/components/VisualizationContainer.tsx +37 -0
- package/components/Layout/components/VisualizationContent.test.tsx +182 -0
- package/components/Layout/components/VisualizationContent.tsx +75 -0
- package/components/Layout/index.tsx +5 -5
- package/components/Layout/styles/editor-utils.scss +3 -3
- package/components/Layout/styles/editor.scss +4 -4
- package/components/Legend/Legend.Gradient.tsx +7 -1
- package/components/Loader/loader.styles.css +2 -2
- package/components/Loading.jsx +1 -1
- package/components/MediaControls.tsx +10 -2
- package/components/MultiSelect/multiselect.styles.css +19 -19
- package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
- package/components/PaletteSelector/PaletteSelector.css +15 -15
- package/components/RichTooltip/richTooltip.css +6 -6
- package/components/Table/table.styles.css +2 -2
- package/components/Waiting.tsx +1 -1
- package/components/_stories/Filters.stories.tsx +1 -1
- package/components/_stories/styles.scss +0 -1
- package/components/elements/Button.jsx +1 -1
- package/components/elements/Card.jsx +1 -1
- package/{styles/v2/components → components/elements}/button.scss +9 -8
- package/components/inputs/InputCheckbox.jsx +1 -1
- package/components/inputs/InputSelect.tsx +1 -1
- package/components/inputs/InputText.jsx +1 -1
- package/components/inputs/InputToggle.tsx +1 -1
- package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
- package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
- package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
- package/{styles → components}/loading.scss +1 -1
- package/components/managers/DataDesigner.tsx +1 -1
- package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
- package/components/ui/Accordion.jsx +1 -1
- package/components/ui/Icon.tsx +1 -1
- package/components/ui/LoadSpin.jsx +1 -1
- package/components/ui/Modal.jsx +1 -1
- package/components/ui/Overlay.jsx +1 -1
- package/components/ui/Title/index.test.tsx +34 -0
- package/components/ui/Title/index.tsx +24 -7
- package/components/ui/Title/title.styles.css +119 -25
- package/components/ui/Tooltip.tsx +1 -1
- package/components/ui/_stories/Title.stories.tsx +1 -1
- package/{styles/v2/components → components/ui}/accordion.scss +3 -3
- package/components/ui/accordion.styles.css +11 -11
- package/{styles/v2/components → components/ui}/modal.scss +2 -2
- package/{styles/v2/components → components/ui}/overlay.scss +6 -6
- package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
- package/{styles → components}/waiting.scss +9 -3
- package/devTemplate/dev.js +50 -0
- package/dist/cove-main.css +528 -231
- package/dist/cove-main.css.map +1 -1
- package/generateViteConfig.js +2 -2
- package/helpers/backfillDefaults.ts +35 -0
- package/helpers/constants.ts +12 -0
- package/helpers/cove/date.ts +32 -3
- package/helpers/cove/number.ts +29 -15
- package/helpers/coveUpdateWorker.ts +12 -8
- package/helpers/displayDataAsText.ts +1 -1
- package/helpers/embed/embedHelper.js +13 -2
- package/helpers/embed/index.ts +0 -4
- package/helpers/extractDataAndMetadata.ts +20 -0
- package/helpers/fetchRemoteData.ts +14 -8
- package/helpers/labelHash.ts +9 -0
- package/helpers/markupProcessor.ts +56 -38
- package/helpers/prepareScreenshot.ts +6 -3
- package/helpers/testing.ts +1 -1
- package/helpers/tests/abbreviateNumber.test.ts +59 -0
- package/helpers/tests/backfillDefaults.test.ts +253 -0
- package/helpers/tests/date.test.ts +46 -0
- package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
- package/helpers/tests/markupProcessor.test.ts +315 -124
- package/helpers/tests/number.test.ts +42 -0
- package/helpers/tests/prepareScreenshot.test.ts +28 -28
- package/helpers/tests/testStandaloneBuild.ts +36 -26
- package/helpers/tests/useDataVizClasses.test.ts +66 -0
- package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
- package/helpers/useDataVizClasses.ts +13 -7
- package/helpers/ver/4.24.4.ts +24 -0
- package/helpers/ver/4.26.3.ts +44 -0
- package/helpers/ver/4.26.4.ts +31 -0
- package/helpers/ver/tests/4.26.3.test.ts +168 -0
- package/helpers/ver/tests/4.26.4.test.ts +88 -0
- package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
- package/package.json +2 -2
- package/styles/_global.scss +7 -7
- package/styles/_reset.scss +2 -2
- package/styles/{v2/base → base}/_file-selector.scss +4 -4
- package/styles/{v2/base → base}/_general.scss +2 -4
- package/styles/{v2/base → base}/index.scss +1 -1
- package/styles/base.scss +107 -165
- package/styles/cove-main.scss +3 -6
- package/styles/layout/_component.scss +110 -0
- package/styles/{v2/layout → layout}/_data-table.scss +7 -7
- package/styles/layout/_wrapper-padding.scss +27 -0
- package/styles/{v2/main.scss → main.scss} +3 -1
- package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
- package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
- package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
- package/styles/{v2/utils → utils}/index.scss +2 -1
- package/types/Axis.ts +2 -0
- package/types/ComponentStyles.ts +1 -0
- package/types/ConfigureData.ts +1 -0
- package/types/MarkupInclude.ts +1 -0
- package/types/MarkupVariable.ts +2 -1
- package/types/Palette.ts +1 -0
- package/types/Table.ts +9 -0
- package/types/Visualization.ts +1 -0
- package/styles/_common-components.css +0 -73
- package/styles/_variables.scss +0 -63
- package/styles/v2/layout/_component.scss +0 -21
- package/styles/v2/utils/_variables.scss +0 -9
- package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
- /package/{styles/v2/components → components/ui}/icon.scss +0 -0
- /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
- /package/styles/{v2/base → base}/_heading.scss +0 -0
- /package/styles/{v2/base → base}/_reset.scss +0 -0
- /package/styles/{v2/layout → layout}/_alert.scss +0 -0
- /package/styles/{v2/layout → layout}/_progression.scss +0 -0
- /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
- /package/styles/{v2/layout → layout}/index.scss +0 -0
- /package/styles/{v2/themes → themes}/index.scss +0 -0
- /package/styles/{v2/utils → utils}/_align.scss +0 -0
- /package/styles/{v2/utils → utils}/_animations.scss +0 -0
- /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
- /package/styles/{v2/utils → utils}/_grid.scss +0 -0
- /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import update_4_26_3 from '../4.26.3'
|
|
2
|
+
import { expect, describe, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
describe('update_4_26_3', () => {
|
|
5
|
+
it('should add locale "en-US" to a config without locale', () => {
|
|
6
|
+
const config: any = {
|
|
7
|
+
type: 'chart',
|
|
8
|
+
version: '4.26.2',
|
|
9
|
+
title: 'Test Chart'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const result = update_4_26_3(config)
|
|
13
|
+
|
|
14
|
+
expect(result.locale).toBe('en-US')
|
|
15
|
+
expect(result.version).toBe('4.26.3')
|
|
16
|
+
expect(result.title).toBe('Test Chart')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it('should not overwrite an existing locale', () => {
|
|
20
|
+
const config: any = {
|
|
21
|
+
type: 'chart',
|
|
22
|
+
version: '4.26.2',
|
|
23
|
+
locale: 'es-MX'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const result = update_4_26_3(config)
|
|
27
|
+
|
|
28
|
+
expect(result.locale).toBe('es-MX')
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('should add locale to dashboard child visualizations', () => {
|
|
32
|
+
const config: any = {
|
|
33
|
+
type: 'dashboard',
|
|
34
|
+
version: '4.26.2',
|
|
35
|
+
visualizations: {
|
|
36
|
+
chart1: {
|
|
37
|
+
type: 'chart',
|
|
38
|
+
title: 'Chart 1'
|
|
39
|
+
},
|
|
40
|
+
map1: {
|
|
41
|
+
type: 'map',
|
|
42
|
+
title: 'Map 1'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const result = update_4_26_3(config)
|
|
48
|
+
|
|
49
|
+
expect(result.locale).toBe('en-US')
|
|
50
|
+
expect(result.visualizations.chart1.locale).toBe('en-US')
|
|
51
|
+
expect(result.visualizations.map1.locale).toBe('en-US')
|
|
52
|
+
expect(result.version).toBe('4.26.3')
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it('should not overwrite existing locale on dashboard child visualizations', () => {
|
|
56
|
+
const config: any = {
|
|
57
|
+
type: 'dashboard',
|
|
58
|
+
version: '4.26.2',
|
|
59
|
+
locale: 'es-MX',
|
|
60
|
+
visualizations: {
|
|
61
|
+
chart1: {
|
|
62
|
+
type: 'chart',
|
|
63
|
+
locale: 'es-MX'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const result = update_4_26_3(config)
|
|
69
|
+
|
|
70
|
+
expect(result.locale).toBe('es-MX')
|
|
71
|
+
expect(result.visualizations.chart1.locale).toBe('es-MX')
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it('should not mutate the original config', () => {
|
|
75
|
+
const config: any = {
|
|
76
|
+
type: 'chart',
|
|
77
|
+
version: '4.26.2'
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const result = update_4_26_3(config)
|
|
81
|
+
|
|
82
|
+
expect(config.locale).toBeUndefined()
|
|
83
|
+
expect(result.locale).toBe('en-US')
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
it('turns off extra visual settings for a standalone chart config', () => {
|
|
87
|
+
const config: any = {
|
|
88
|
+
type: 'chart',
|
|
89
|
+
version: '4.26.2',
|
|
90
|
+
visual: {
|
|
91
|
+
border: true,
|
|
92
|
+
borderColorTheme: true,
|
|
93
|
+
accent: true,
|
|
94
|
+
background: true,
|
|
95
|
+
hideBackgroundColor: true
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const result = update_4_26_3(config)
|
|
100
|
+
|
|
101
|
+
expect(result.visual).toEqual({
|
|
102
|
+
border: false,
|
|
103
|
+
borderColorTheme: false,
|
|
104
|
+
accent: false,
|
|
105
|
+
background: false,
|
|
106
|
+
hideBackgroundColor: false
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it('turns off extra visual settings for chart visualizations inside dashboards only', () => {
|
|
111
|
+
const config: any = {
|
|
112
|
+
type: 'dashboard',
|
|
113
|
+
version: '4.26.2',
|
|
114
|
+
visualizations: {
|
|
115
|
+
chart1: {
|
|
116
|
+
type: 'chart',
|
|
117
|
+
visual: {
|
|
118
|
+
border: true,
|
|
119
|
+
borderColorTheme: true,
|
|
120
|
+
accent: true,
|
|
121
|
+
background: true,
|
|
122
|
+
hideBackgroundColor: true
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
dataBite1: {
|
|
126
|
+
type: 'data-bite',
|
|
127
|
+
visual: {
|
|
128
|
+
borderColorTheme: true,
|
|
129
|
+
accent: true,
|
|
130
|
+
background: true,
|
|
131
|
+
hideBackgroundColor: true
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const result = update_4_26_3(config)
|
|
138
|
+
|
|
139
|
+
expect(result.visualizations.chart1.visual).toEqual({
|
|
140
|
+
border: false,
|
|
141
|
+
borderColorTheme: false,
|
|
142
|
+
accent: false,
|
|
143
|
+
background: false,
|
|
144
|
+
hideBackgroundColor: false
|
|
145
|
+
})
|
|
146
|
+
expect(result.visualizations.dataBite1.visual).toEqual({
|
|
147
|
+
borderColorTheme: true,
|
|
148
|
+
accent: true,
|
|
149
|
+
background: true,
|
|
150
|
+
hideBackgroundColor: true
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
it('does not mutate the original config visual settings', () => {
|
|
155
|
+
const config: any = {
|
|
156
|
+
type: 'chart',
|
|
157
|
+
version: '4.26.2',
|
|
158
|
+
visual: {
|
|
159
|
+
accent: true
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const result = update_4_26_3(config)
|
|
164
|
+
|
|
165
|
+
expect(config.visual.accent).toBe(true)
|
|
166
|
+
expect(result.visual.accent).toBe(false)
|
|
167
|
+
})
|
|
168
|
+
})
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import update_4_26_4 from '../4.26.4'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
describe('update_4_26_4', () => {
|
|
5
|
+
it('turns off extra visual settings for a standalone chart config', () => {
|
|
6
|
+
const config: any = {
|
|
7
|
+
type: 'chart',
|
|
8
|
+
version: '4.26.3',
|
|
9
|
+
visual: {
|
|
10
|
+
border: true,
|
|
11
|
+
borderColorTheme: true,
|
|
12
|
+
accent: true,
|
|
13
|
+
background: true,
|
|
14
|
+
hideBackgroundColor: true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const result = update_4_26_4(config)
|
|
19
|
+
|
|
20
|
+
expect(result.visual).toEqual({
|
|
21
|
+
border: false,
|
|
22
|
+
borderColorTheme: false,
|
|
23
|
+
accent: false,
|
|
24
|
+
background: false,
|
|
25
|
+
hideBackgroundColor: false
|
|
26
|
+
})
|
|
27
|
+
expect(result.version).toBe('4.26.4')
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('turns off extra visual settings for chart visualizations inside dashboards only', () => {
|
|
31
|
+
const config: any = {
|
|
32
|
+
type: 'dashboard',
|
|
33
|
+
version: '4.26.3',
|
|
34
|
+
visualizations: {
|
|
35
|
+
chart1: {
|
|
36
|
+
type: 'chart',
|
|
37
|
+
visual: {
|
|
38
|
+
border: true,
|
|
39
|
+
borderColorTheme: true,
|
|
40
|
+
accent: true,
|
|
41
|
+
background: true,
|
|
42
|
+
hideBackgroundColor: true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
dataBite1: {
|
|
46
|
+
type: 'data-bite',
|
|
47
|
+
visual: {
|
|
48
|
+
borderColorTheme: true,
|
|
49
|
+
accent: true,
|
|
50
|
+
background: true,
|
|
51
|
+
hideBackgroundColor: true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const result = update_4_26_4(config)
|
|
58
|
+
|
|
59
|
+
expect(result.visualizations.chart1.visual).toEqual({
|
|
60
|
+
border: false,
|
|
61
|
+
borderColorTheme: false,
|
|
62
|
+
accent: false,
|
|
63
|
+
background: false,
|
|
64
|
+
hideBackgroundColor: false
|
|
65
|
+
})
|
|
66
|
+
expect(result.visualizations.dataBite1.visual).toEqual({
|
|
67
|
+
borderColorTheme: true,
|
|
68
|
+
accent: true,
|
|
69
|
+
background: true,
|
|
70
|
+
hideBackgroundColor: true
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it('does not mutate the original config', () => {
|
|
75
|
+
const config: any = {
|
|
76
|
+
type: 'chart',
|
|
77
|
+
version: '4.26.3',
|
|
78
|
+
visual: {
|
|
79
|
+
accent: true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const result = update_4_26_4(config)
|
|
84
|
+
|
|
85
|
+
expect(config.visual.accent).toBe(true)
|
|
86
|
+
expect(result.visual.accent).toBe(false)
|
|
87
|
+
})
|
|
88
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { coveUpdateWorker } from '../../coveUpdateWorker'
|
|
2
|
+
import { expect, describe, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
const makeMultiDashConfig = (version: string) => ({
|
|
5
|
+
type: 'dashboard',
|
|
6
|
+
version,
|
|
7
|
+
dashboard: { title: 'Parent Dashboard' },
|
|
8
|
+
rows: [],
|
|
9
|
+
visualizations: {},
|
|
10
|
+
multiDashboards: [
|
|
11
|
+
{
|
|
12
|
+
type: 'dashboard',
|
|
13
|
+
dashboard: { title: 'Sub Dashboard' },
|
|
14
|
+
rows: [],
|
|
15
|
+
visualizations: {
|
|
16
|
+
chart1: {
|
|
17
|
+
type: 'chart',
|
|
18
|
+
title: 'My Chart',
|
|
19
|
+
brush: { enabled: true }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
describe('coveUpdateWorker', () => {
|
|
27
|
+
describe('multi-dashboard recursion', () => {
|
|
28
|
+
it('should NOT run 4.26.1 migration on sub-dashboards when parent is at 4.26.2', () => {
|
|
29
|
+
const config: any = makeMultiDashConfig('4.26.2')
|
|
30
|
+
const result = coveUpdateWorker(config)
|
|
31
|
+
const subDash = result.multiDashboards[0]
|
|
32
|
+
|
|
33
|
+
// 4.26.1 removeOldBrushKeys should NOT have run
|
|
34
|
+
expect(subDash.visualizations.chart1.brush).toEqual({ enabled: true })
|
|
35
|
+
// 4.26.1 migrateTitleStyle should NOT have run
|
|
36
|
+
expect(subDash.visualizations.chart1.titleStyle).toBeUndefined()
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it('should run 4.26.1 migration on sub-dashboards when parent is at 4.26.0', () => {
|
|
40
|
+
const config: any = makeMultiDashConfig('4.26.0')
|
|
41
|
+
const result = coveUpdateWorker(config)
|
|
42
|
+
const subDash = result.multiDashboards[0]
|
|
43
|
+
|
|
44
|
+
// 4.26.1 removeOldBrushKeys SHOULD have run
|
|
45
|
+
expect(subDash.visualizations.chart1.brush).toBeUndefined()
|
|
46
|
+
// 4.26.1 migrateTitleStyle SHOULD have run
|
|
47
|
+
expect(subDash.visualizations.chart1.titleStyle).toBe('legacy')
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('should strip version from sub-dashboards after processing', () => {
|
|
51
|
+
const config: any = makeMultiDashConfig('4.25.0')
|
|
52
|
+
const result = coveUpdateWorker(config)
|
|
53
|
+
|
|
54
|
+
expect(result.multiDashboards[0].version).toBeUndefined()
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/core",
|
|
3
|
-
"version": "4.26.
|
|
3
|
+
"version": "4.26.3",
|
|
4
4
|
"description": "Core components, styles, hooks, and helpers, for the CDC Open Visualization project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Rob Shelnutt <rob@blackairplane.com>",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vite-plugin-css-injected-by-js": "^2.4.0",
|
|
31
31
|
"vite-plugin-svgr": "^4.2.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "d50e45a074fbefa56cac904917e707d57f237737",
|
|
34
34
|
"homepage": "https://github.com/CDCgov/cdc-open-viz#readme",
|
|
35
35
|
"main": "dist/cdccore",
|
|
36
36
|
"moduleName": "CdcCore",
|
package/styles/_global.scss
CHANGED
|
@@ -83,7 +83,7 @@ strong {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
&.danger {
|
|
86
|
-
background-color:
|
|
86
|
+
background-color: var(--red);
|
|
87
87
|
padding: 0em 0.6em 0em;
|
|
88
88
|
height: 1.6em;
|
|
89
89
|
font-size: 0.8 em;
|
|
@@ -131,7 +131,7 @@ textarea {
|
|
|
131
131
|
display: flex;
|
|
132
132
|
text-decoration: none;
|
|
133
133
|
color: #444;
|
|
134
|
-
border:
|
|
134
|
+
border: var(--lightGray) 1px solid;
|
|
135
135
|
position: relative;
|
|
136
136
|
transition: 0.2s all;
|
|
137
137
|
font-size: 1em;
|
|
@@ -139,7 +139,7 @@ textarea {
|
|
|
139
139
|
&:before {
|
|
140
140
|
content: ' ';
|
|
141
141
|
width: 5px;
|
|
142
|
-
background:
|
|
142
|
+
background: var(--blue);
|
|
143
143
|
left: -1px;
|
|
144
144
|
top: -1px;
|
|
145
145
|
bottom: -1px;
|
|
@@ -147,7 +147,7 @@ textarea {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
&:hover {
|
|
150
|
-
background:
|
|
150
|
+
background: var(--lightestGray);
|
|
151
151
|
transition: 0.2s all;
|
|
152
152
|
color: #444;
|
|
153
153
|
}
|
|
@@ -158,7 +158,7 @@ textarea {
|
|
|
158
158
|
|
|
159
159
|
svg {
|
|
160
160
|
width: 60px;
|
|
161
|
-
color:
|
|
161
|
+
color: var(--blue);
|
|
162
162
|
margin-right: 1rem;
|
|
163
163
|
|
|
164
164
|
path {
|
|
@@ -186,8 +186,8 @@ section.footnotes {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.btn.btn-primary:not([disabled]) {
|
|
189
|
-
background-color:
|
|
190
|
-
border-color:
|
|
189
|
+
background-color: var(--blue);
|
|
190
|
+
border-color: var(--blue);
|
|
191
191
|
|
|
192
192
|
&:hover:not([disabled]) {
|
|
193
193
|
background-color: color.adjust($blue, $lightness: -5%);
|
package/styles/_reset.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.cove-visualization {
|
|
2
2
|
margin: 0;
|
|
3
3
|
font-family: var(--app-font-main);
|
|
4
4
|
font-size: 1em;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
outline: none !important;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.cove-visualization {
|
|
15
15
|
applet,
|
|
16
16
|
object,
|
|
17
17
|
iframe,
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
padding: 1rem 3rem;
|
|
3
3
|
text-align: center;
|
|
4
4
|
font-size: 0.875rem;
|
|
5
|
-
color:
|
|
6
|
-
border:
|
|
5
|
+
color: var(--mediumGray);
|
|
6
|
+
border: var(--lightGray) 2px dashed;
|
|
7
7
|
border-radius: 0.2rem;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
transition: 0.1s all;
|
|
10
10
|
|
|
11
11
|
&.drag-active {
|
|
12
|
-
background-color:
|
|
12
|
+
background-color: var(--lightestGray);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
span {
|
|
16
16
|
white-space: pre;
|
|
17
|
-
color:
|
|
17
|
+
color: var(--blue);
|
|
18
18
|
text-decoration: underline;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import '../themes/color-definitions';
|
|
2
|
-
|
|
3
1
|
.cove {
|
|
4
2
|
margin: 0;
|
|
5
3
|
font-family: var(--app-font-main);
|
|
@@ -8,14 +6,14 @@
|
|
|
8
6
|
font-weight: 400;
|
|
9
7
|
font-style: normal;
|
|
10
8
|
line-height: 1.4;
|
|
11
|
-
color:
|
|
9
|
+
color: var(--baseColor);
|
|
12
10
|
text-rendering: optimizeLegibility;
|
|
13
11
|
|
|
14
12
|
small {
|
|
15
13
|
display: block;
|
|
16
14
|
font-size: 0.8rem;
|
|
17
15
|
font-style: italic;
|
|
18
|
-
color:
|
|
16
|
+
color: var(--mediumGray);
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
.sr-only,
|