@cdc/core 4.25.3-6 → 4.25.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/components/AdvancedEditor/AdvancedEditor.tsx +11 -9
- package/components/DataTable/DataTable.tsx +34 -20
- package/components/DataTable/components/ChartHeader.tsx +1 -1
- package/components/DataTable/helpers/getChartCellValue.ts +11 -5
- package/components/DataTable/helpers/getDataSeriesColumns.ts +7 -3
- package/components/DataTable/helpers/mapCellMatrix.tsx +64 -33
- package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +80 -0
- package/components/EditorPanel/DataTableEditor.tsx +28 -18
- package/components/EditorPanel/Inputs.tsx +2 -1
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +23 -0
- package/components/Filters/Filters.tsx +20 -8
- package/components/Layout/components/Visualization/visualizations.scss +1 -1
- package/components/MediaControls.jsx +14 -7
- package/components/elements/Button.jsx +4 -2
- package/dist/cove-main.css +98 -151
- package/dist/cove-main.css.map +1 -1
- package/helpers/DataTransform.ts +2 -2
- package/helpers/addValuesToFilters.ts +1 -1
- package/helpers/coveUpdateWorker.ts +12 -7
- package/helpers/formatConfigBeforeSave.ts +30 -8
- package/helpers/isRightAlignedTableValue.js +5 -1
- package/helpers/isSolr.ts +13 -0
- package/helpers/labelHash.ts +21 -0
- package/helpers/pivotData.ts +14 -7
- package/helpers/tests/formatConfigBeforeSave.test.ts +68 -0
- package/helpers/tests/pivotData.test.ts +23 -19
- package/helpers/ver/4.25.3.ts +20 -0
- package/helpers/ver/tests/versionNeedsUpdate.test.ts +28 -0
- package/package.json +2 -2
- package/styles/_global-variables.scss +2 -1
- package/styles/_global.scss +18 -9
- package/styles/base.scss +42 -0
- package/styles/filters.scss +5 -11
- package/styles/v2/components/button.scss +48 -12
- package/styles/v2/themes/_color-definitions.scss +1 -4
- package/types/General.ts +0 -1
- package/types/Table.ts +2 -0
- package/helpers/isSolr.js +0 -13
package/styles/filters.scss
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
&__wrapper {
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
display: flex;
|
|
5
|
-
gap:
|
|
5
|
+
gap: 1rem 1.5rem;
|
|
6
|
+
margin-bottom: 2rem;
|
|
6
7
|
label {
|
|
7
8
|
display: inherit;
|
|
8
9
|
margin-bottom: 5px;
|
|
@@ -19,9 +20,6 @@
|
|
|
19
20
|
&__buttons {
|
|
20
21
|
width: 100%;
|
|
21
22
|
font-size: var(--filter-buttons-font-size);
|
|
22
|
-
.apply {
|
|
23
|
-
margin-right: 10px;
|
|
24
|
-
}
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -78,6 +76,7 @@ div.single-filters {
|
|
|
78
76
|
.tab.tab--simple {
|
|
79
77
|
background: none;
|
|
80
78
|
border: none;
|
|
79
|
+
border-bottom: 0.3rem solid transparent;
|
|
81
80
|
font-family: var(--app-font-secondary);
|
|
82
81
|
font-size: 1rem;
|
|
83
82
|
font-weight: 300;
|
|
@@ -86,11 +85,6 @@ div.single-filters {
|
|
|
86
85
|
cursor: pointer;
|
|
87
86
|
border-radius: 6px 6px 0 0;
|
|
88
87
|
|
|
89
|
-
@include breakpointClass(xs) {
|
|
90
|
-
font-size: 0.778em;
|
|
91
|
-
padding: 0.5rem 0.778em;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
88
|
&:hover {
|
|
95
89
|
color: var(--colors-blue-vivid-60, #005ea2);
|
|
96
90
|
background: var(--colors-cyan-cool-10, #eff9fa);
|
|
@@ -106,7 +100,7 @@ div.single-filters {
|
|
|
106
100
|
|
|
107
101
|
&.tab--active {
|
|
108
102
|
font-weight: 500;
|
|
109
|
-
border-bottom:
|
|
103
|
+
border-bottom-color: var(--colors-blue-vivid-60, #005ea2);
|
|
110
104
|
z-index: 1;
|
|
111
105
|
}
|
|
112
106
|
}
|
|
@@ -115,7 +109,7 @@ div.single-filters {
|
|
|
115
109
|
@include breakpointClass(xs) {
|
|
116
110
|
.single-filters--tab-simple .tab-simple-container .tab.tab--simple {
|
|
117
111
|
font-size: 0.778em;
|
|
118
|
-
padding: 0.5rem 0.
|
|
112
|
+
padding: 0.5rem 0.73em;
|
|
119
113
|
}
|
|
120
114
|
}
|
|
121
115
|
}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
@import '../utils/variables';
|
|
2
2
|
@import '../themes/index';
|
|
3
3
|
|
|
4
|
+
:root {
|
|
5
|
+
--cove-button-primary: var(--colors-blue-vivid-60);
|
|
6
|
+
--cove-button-primary-font-color: #fff;
|
|
7
|
+
--cove-button-primary-hover: #0b4778;
|
|
8
|
+
--cove-button-primary-disabled: var(--cool-gray-10);
|
|
9
|
+
--cove-button-primary-disabled-font-color: var(--cool-gray-90);
|
|
10
|
+
|
|
11
|
+
--cove-button-secondary: #fff;
|
|
12
|
+
--cove-button-secondary-font-color: var(--colors-blue-vivid-60);
|
|
13
|
+
--cove-button-secondary-border-color: var(--colors-blue-vivid-60);
|
|
14
|
+
--cove-button-secondary-hover: #0b4778;
|
|
15
|
+
--cove-button-secondary-hover-font-color: #fff;
|
|
16
|
+
--cove-button-secondary-disabled: #f5f6f7;
|
|
17
|
+
--cove-button-secondary-disabled-font-color: var(--cool-gray-90);
|
|
18
|
+
--cove-button-secondary-disabled-border-color: var(--cool-gray-10);
|
|
19
|
+
}
|
|
20
|
+
|
|
4
21
|
.sbdocs .cove-button {
|
|
5
22
|
margin-right: 1rem;
|
|
6
23
|
margin-bottom: 1rem;
|
|
@@ -11,7 +28,7 @@
|
|
|
11
28
|
}
|
|
12
29
|
}
|
|
13
30
|
|
|
14
|
-
.cove-button {
|
|
31
|
+
.cdc-open-viz-module button.cove-button {
|
|
15
32
|
display: inline-block;
|
|
16
33
|
position: relative;
|
|
17
34
|
min-height: 2.125rem;
|
|
@@ -19,12 +36,30 @@
|
|
|
19
36
|
text-align: center;
|
|
20
37
|
text-decoration: none;
|
|
21
38
|
vertical-align: middle;
|
|
22
|
-
color:
|
|
23
|
-
background-color:
|
|
24
|
-
border-radius:
|
|
39
|
+
color: var(--cove-button-primary-font-color);
|
|
40
|
+
background-color: var(--cove-button-primary);
|
|
41
|
+
border-radius: 6px;
|
|
25
42
|
border: 0;
|
|
26
43
|
outline: none;
|
|
27
|
-
transition:
|
|
44
|
+
transition: background-color 500ms $transition-expo-out, color 500ms $transition-expo-out,
|
|
45
|
+
border-color 500ms $transition-expo-out;
|
|
46
|
+
|
|
47
|
+
&.secondary {
|
|
48
|
+
background-color: var(--cove-button-secondary);
|
|
49
|
+
color: var(--cove-button-secondary-font-color);
|
|
50
|
+
border: 1px solid var(--cove-button-secondary-border-color);
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
background-color: var(--cove-button-secondary-hover);
|
|
54
|
+
color: var(--cove-button-secondary-hover-font-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:disabled {
|
|
58
|
+
background-color: var(--cove-button-secondary-disabled);
|
|
59
|
+
color: var(--cove-button-secondary-disabled-font-color);
|
|
60
|
+
border: 1px solid var(--cove-button-secondary-disabled-border-color);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
28
63
|
|
|
29
64
|
* {
|
|
30
65
|
pointer-events: none;
|
|
@@ -32,7 +67,8 @@
|
|
|
32
67
|
}
|
|
33
68
|
|
|
34
69
|
&:disabled {
|
|
35
|
-
background-color:
|
|
70
|
+
background-color: var(--cove-button-primary-disabled);
|
|
71
|
+
color: var(--cove-button-primary-disabled-font-color);
|
|
36
72
|
cursor: not-allowed;
|
|
37
73
|
}
|
|
38
74
|
|
|
@@ -40,11 +76,12 @@
|
|
|
40
76
|
cursor: pointer;
|
|
41
77
|
}
|
|
42
78
|
|
|
43
|
-
&:hover
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
79
|
+
&:hover:not(:disabled) {
|
|
80
|
+
background-color: var(--cove-button-primary-hover);
|
|
81
|
+
}
|
|
82
|
+
&:focus {
|
|
83
|
+
outline: 2px dashed var(--colors-blue-vivid-60) !important;
|
|
84
|
+
outline-offset: 5px;
|
|
48
85
|
}
|
|
49
86
|
|
|
50
87
|
&:not(.loading) {
|
|
@@ -54,7 +91,6 @@
|
|
|
54
91
|
content: '';
|
|
55
92
|
position: absolute;
|
|
56
93
|
inset: 0;
|
|
57
|
-
outline: 2px solid rgba(161, 161, 161, 0.6);
|
|
58
94
|
border-radius: 0.3125em;
|
|
59
95
|
margin: -2px;
|
|
60
96
|
pointer-events: none;
|
|
@@ -148,9 +148,6 @@ $theme: (
|
|
|
148
148
|
background-color: string.unquote(nth($theme-colors, 1));
|
|
149
149
|
color: #fff;
|
|
150
150
|
}
|
|
151
|
-
.filters-section button.cove-button:not([disabled]) {
|
|
152
|
-
background-color: string.unquote(nth($theme-colors, 1)) !important;
|
|
153
|
-
}
|
|
154
151
|
}
|
|
155
152
|
|
|
156
153
|
.theme-#{$theme-name} {
|
|
@@ -173,7 +170,7 @@ $theme: (
|
|
|
173
170
|
outline: 2px solid string.unquote(nth($theme-colors, 1));
|
|
174
171
|
}
|
|
175
172
|
.apply:not([disabled]) {
|
|
176
|
-
background-color: string.unquote(nth($theme-colors, 1))
|
|
173
|
+
background-color: string.unquote(nth($theme-colors, 1));
|
|
177
174
|
}
|
|
178
175
|
}
|
|
179
176
|
}
|
package/types/General.ts
CHANGED
package/types/Table.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type Table = {
|
|
|
9
9
|
collapsible?: boolean
|
|
10
10
|
dateDisplayFormat?: string
|
|
11
11
|
download?: boolean
|
|
12
|
+
downloadVisibleDataOnly?: boolean
|
|
12
13
|
downloadImageButton?: boolean
|
|
13
14
|
downloadPdfButton?: boolean
|
|
14
15
|
excludeColumns?: string[]
|
|
@@ -20,6 +21,7 @@ export type Table = {
|
|
|
20
21
|
limitHeight?: boolean
|
|
21
22
|
pivot?: Pivot
|
|
22
23
|
show?: boolean
|
|
24
|
+
sharedFilterColumns?: string[] // added at runtime by Dashboard
|
|
23
25
|
showDataTableLink?: boolean
|
|
24
26
|
showDownloadImgButton?: boolean
|
|
25
27
|
showDownloadLinkBelow?: boolean
|
package/helpers/isSolr.js
DELETED