@cdc/dashboard 4.25.8 → 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 +80040 -75976
- 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 +39112 -0
- package/examples/private/brfs-2.json +1532 -0
- package/examples/private/brfs.json +2128 -2138
- package/examples/private/clade-2.json +430 -0
- package/examples/private/delete.json +32919 -0
- package/examples/private/diabetes.json +5582 -0
- package/examples/private/example-2.json +49796 -0
- package/examples/private/group-legend-test.json +328 -0
- package/examples/private/map.json +1211 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_diabetes_attributable_deaths_data.csv +14041 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_diabetes_attributable_deaths_per_100000_data.csv +14041 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_qaly_data.csv +18721 -0
- package/examples/private/markup-footer/burden_toolkit_mortality_yll_data.csv +18721 -0
- package/examples/private/markup-footer/mortality-deaths-footnotes-age.csv +3 -0
- package/examples/private/markup-variables.json +1451 -0
- package/examples/private/markup.json +5471 -0
- package/examples/private/mpox.json +38128 -0
- package/examples/private/north-dakota.json +1132 -0
- package/examples/private/ophdst.json +38754 -0
- package/examples/private/pedro.json +1 -0
- package/examples/private/pivot.json +683 -0
- package/examples/private/reset.json +32920 -0
- package/examples/private/sewershed.json +435 -0
- package/examples/private/tobacco.json +1938 -0
- package/examples/test-api-filter-reset.json +132 -0
- package/index.html +2 -2
- package/package.json +16 -10
- package/src/CdcDashboard.tsx +1 -3
- package/src/CdcDashboardComponent.tsx +34 -16
- package/src/DashboardContext.tsx +5 -1
- package/src/_stories/Dashboard.API.stories.tsx +62 -0
- package/src/_stories/Dashboard.stories.tsx +492 -472
- package/src/_stories/_mock/api/cessation.json +1 -0
- package/src/_stories/_mock/api/data-explorer.json +1 -0
- package/src/_stories/_mock/api/explore-by-location.json +1 -0
- package/src/_stories/_mock/api/explore-by-topic.json +1 -0
- package/src/_stories/_mock/api/legislation.json +1 -0
- package/src/_stories/_mock/api/oral-health-data.json +1 -0
- package/src/_stories/_mock/custom-order-new-values.json +116 -0
- package/src/components/CollapsibleVisualizationRow.tsx +1 -1
- package/src/components/DashboardFilters/DashboardFilters.tsx +34 -23
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +29 -12
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +81 -112
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +82 -52
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +130 -31
- package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +80 -21
- package/src/components/DataDesignerModal.tsx +227 -210
- package/src/components/Header/Header.tsx +13 -12
- package/src/components/Toggle/Toggle.tsx +48 -47
- package/src/components/VisualizationRow.tsx +13 -6
- package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +2 -0
- package/src/components/Widget/Widget.tsx +47 -18
- package/src/helpers/addValuesToDashboardFilters.ts +111 -60
- package/src/helpers/apiFilterHelpers.ts +190 -166
- package/src/helpers/filterData.ts +52 -7
- package/src/helpers/filterResetHelpers.ts +102 -0
- package/src/helpers/formatConfigBeforeSave.ts +137 -0
- package/src/helpers/getVizConfig.ts +36 -18
- package/src/helpers/loadAPIFilters.ts +109 -99
- package/src/helpers/reloadURLHelpers.ts +1 -1
- package/src/helpers/tests/filterResetHelpers.test.ts +532 -0
- package/src/helpers/tests/formatConfigBeforeSave.test.ts +69 -0
- package/src/index.tsx +1 -1
- package/src/scss/editor-panel.scss +3 -431
- package/src/scss/grid.scss +7 -5
- package/src/scss/main.scss +1 -24
- package/src/store/errorMessage/errorMessage.reducer.ts +1 -1
- package/src/types/DashboardFilters.ts +9 -8
- package/src/types/InitialState.ts +12 -12
- package/vite.config.js +1 -1
- package/vitest.config.ts +16 -0
- package/src/coreStyles_dashboard.scss +0 -3
- 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,3 +1,6 @@
|
|
|
1
|
+
// Dashboard-specific Editor Panel Styles
|
|
2
|
+
// Common editor panel styles are imported from @cdc/core/styles/editor-panel-base via cove-main.scss
|
|
3
|
+
|
|
1
4
|
// Shift down for top level Dashboard bar when in edit mode
|
|
2
5
|
.layout-container,
|
|
3
6
|
.editor-panel + .cdc-dashboard-inner-container,
|
|
@@ -101,437 +104,6 @@
|
|
|
101
104
|
width: 75px;
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
|
-
.form-container {
|
|
105
|
-
border-right: var(--lightGray) 1px solid;
|
|
106
|
-
flex-grow: 1;
|
|
107
|
-
}
|
|
108
|
-
.guidance-link {
|
|
109
|
-
margin: 2em 1em 0;
|
|
110
|
-
padding: 0.75em 1em;
|
|
111
|
-
svg {
|
|
112
|
-
width: 60px;
|
|
113
|
-
color: var(--blue);
|
|
114
|
-
margin-right: 1rem;
|
|
115
|
-
height: 60px; // IE11
|
|
116
|
-
path {
|
|
117
|
-
fill: currentColor;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
.warning {
|
|
122
|
-
color: #d8000c;
|
|
123
|
-
background-color: #ffd2d2;
|
|
124
|
-
padding: 0.75em 1em;
|
|
125
|
-
margin: 1em 0;
|
|
126
|
-
font-size: 0.8em;
|
|
127
|
-
border: #d8000c 1px solid;
|
|
128
|
-
border-radius: 0.4em;
|
|
129
|
-
strong {
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
display: block;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
.accordion__button {
|
|
135
|
-
cursor: pointer;
|
|
136
|
-
font-size: 1em;
|
|
137
|
-
padding: 0.3em 1em;
|
|
138
|
-
width: 100%;
|
|
139
|
-
text-align: left;
|
|
140
|
-
position: relative;
|
|
141
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
142
|
-
}
|
|
143
|
-
.accordion__panel:first-child {
|
|
144
|
-
margin-top: 0;
|
|
145
|
-
}
|
|
146
|
-
.accordion__button:before {
|
|
147
|
-
display: inline-block;
|
|
148
|
-
content: '';
|
|
149
|
-
height: 7px;
|
|
150
|
-
width: 7px;
|
|
151
|
-
margin-right: 1em;
|
|
152
|
-
border-bottom: 2px solid currentColor;
|
|
153
|
-
border-right: 2px solid currentColor;
|
|
154
|
-
transform: rotate(-45deg);
|
|
155
|
-
right: 0;
|
|
156
|
-
position: absolute;
|
|
157
|
-
top: 50%;
|
|
158
|
-
transform: rotate(-45deg) translateY(-50%);
|
|
159
|
-
transition: 0.1s all;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.accordion__button[aria-expanded='true']::before,
|
|
163
|
-
.accordion__button[aria-selected='true']::before {
|
|
164
|
-
transform: rotate(45deg) translateY(-50%);
|
|
165
|
-
margin-right: 1.3em;
|
|
166
|
-
transition: 0.1s all;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.accordion__panel {
|
|
170
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
171
|
-
padding: 1em 1.25em 2em;
|
|
172
|
-
animation: fadein 0.2s ease-in;
|
|
173
|
-
h5 {
|
|
174
|
-
font-size: 0.8em;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.advanced {
|
|
179
|
-
padding: 0 1em 1em;
|
|
180
|
-
text-align: left;
|
|
181
|
-
p {
|
|
182
|
-
font-size: 0.8rem;
|
|
183
|
-
}
|
|
184
|
-
.advanced-toggle-link {
|
|
185
|
-
padding-top: 1em;
|
|
186
|
-
display: block;
|
|
187
|
-
text-align: left;
|
|
188
|
-
cursor: pointer;
|
|
189
|
-
text-decoration: underline;
|
|
190
|
-
span {
|
|
191
|
-
text-decoration: none;
|
|
192
|
-
display: inline-block;
|
|
193
|
-
font-family: monospace;
|
|
194
|
-
padding-right: 5px;
|
|
195
|
-
}
|
|
196
|
-
&:hover {
|
|
197
|
-
color: rgba(0, 0, 0, 0.7);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
textarea {
|
|
201
|
-
height: 400px;
|
|
202
|
-
width: 100%;
|
|
203
|
-
font-size: 0.9em;
|
|
204
|
-
padding: 0.5em;
|
|
205
|
-
font-family: monospace;
|
|
206
|
-
box-sizing: border-box;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
@keyframes fadein {
|
|
211
|
-
0% {
|
|
212
|
-
opacity: 0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
100% {
|
|
216
|
-
opacity: 1;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.heading-2 {
|
|
221
|
-
background: #565656;
|
|
222
|
-
color: #fff;
|
|
223
|
-
font-size: 1.1em;
|
|
224
|
-
padding: 0.6em 1em;
|
|
225
|
-
position: relative;
|
|
226
|
-
border-bottom: #565656 3px solid;
|
|
227
|
-
z-index: 3;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
label {
|
|
231
|
-
text-transform: uppercase;
|
|
232
|
-
display: block;
|
|
233
|
-
font-size: 0.8em;
|
|
234
|
-
font-weight: 600;
|
|
235
|
-
&:not(:first-child) {
|
|
236
|
-
margin-top: 1em;
|
|
237
|
-
}
|
|
238
|
-
span.edit-label {
|
|
239
|
-
margin-bottom: 0.3em;
|
|
240
|
-
display: block;
|
|
241
|
-
}
|
|
242
|
-
span.column-heading {
|
|
243
|
-
font-size: 1em;
|
|
244
|
-
}
|
|
245
|
-
&.checkbox {
|
|
246
|
-
display: flex;
|
|
247
|
-
span:not(.cove-icon) {
|
|
248
|
-
display: inline;
|
|
249
|
-
}
|
|
250
|
-
input {
|
|
251
|
-
margin-left: 0;
|
|
252
|
-
width: inherit;
|
|
253
|
-
display: inline;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
input[type='text'],
|
|
258
|
-
input[role='combobox'],
|
|
259
|
-
input[type='number'],
|
|
260
|
-
textarea {
|
|
261
|
-
min-width: 100%;
|
|
262
|
-
max-width: 100%; // Doing this prevents width of textarea from being changed
|
|
263
|
-
}
|
|
264
|
-
.header .color-palette li {
|
|
265
|
-
width: 21px;
|
|
266
|
-
height: 21px;
|
|
267
|
-
border-radius: 40px;
|
|
268
|
-
margin-right: 2.8px;
|
|
269
|
-
}
|
|
270
|
-
.color-palette {
|
|
271
|
-
display: flex;
|
|
272
|
-
max-width: 100%;
|
|
273
|
-
padding: 0;
|
|
274
|
-
margin: 0.5em 0 0 0;
|
|
275
|
-
list-style: none;
|
|
276
|
-
flex-wrap: wrap;
|
|
277
|
-
li {
|
|
278
|
-
width: 45px;
|
|
279
|
-
height: 23px;
|
|
280
|
-
margin-right: 4px;
|
|
281
|
-
margin-bottom: 10px;
|
|
282
|
-
display: flex;
|
|
283
|
-
border-radius: 5px;
|
|
284
|
-
overflow: hidden;
|
|
285
|
-
cursor: pointer;
|
|
286
|
-
position: relative;
|
|
287
|
-
.click-target {
|
|
288
|
-
position: absolute;
|
|
289
|
-
top: 0;
|
|
290
|
-
left: 0;
|
|
291
|
-
right: 0;
|
|
292
|
-
bottom: 0;
|
|
293
|
-
}
|
|
294
|
-
&.selected {
|
|
295
|
-
border: rgba(0, 0, 0, 0.8) 2px solid;
|
|
296
|
-
}
|
|
297
|
-
span {
|
|
298
|
-
width: 33.3%;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
fieldset {
|
|
304
|
-
display: block;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.primary-fieldset {
|
|
308
|
-
padding: 0;
|
|
309
|
-
margin: 0;
|
|
310
|
-
border: 0;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
ul.column-edit {
|
|
314
|
-
list-style: none;
|
|
315
|
-
li {
|
|
316
|
-
margin-top: 1em;
|
|
317
|
-
}
|
|
318
|
-
.three-col {
|
|
319
|
-
display: flex;
|
|
320
|
-
justify-content: space-between;
|
|
321
|
-
> label {
|
|
322
|
-
margin-top: 0;
|
|
323
|
-
width: 30%;
|
|
324
|
-
display: inline-block;
|
|
325
|
-
input[type='text'],
|
|
326
|
-
input[type='number'] {
|
|
327
|
-
width: 50px;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
&.hidden {
|
|
334
|
-
display: none;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.emove-column {
|
|
338
|
-
float: right;
|
|
339
|
-
text-transform: uppercase;
|
|
340
|
-
color: #c32b2b;
|
|
341
|
-
font-size: 0.7em;
|
|
342
|
-
line-height: 1.6em;
|
|
343
|
-
border-radius: 5px;
|
|
344
|
-
margin: 0 auto;
|
|
345
|
-
transition: 0.1s all;
|
|
346
|
-
border: 0;
|
|
347
|
-
text-decoration: underline;
|
|
348
|
-
outline: 0;
|
|
349
|
-
cursor: pointer;
|
|
350
|
-
font-weight: bold;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.edit-block {
|
|
354
|
-
padding-left: 1em;
|
|
355
|
-
border-left: rgba(0, 0, 0, 0.2) 4px solid;
|
|
356
|
-
transition: 0.2s all;
|
|
357
|
-
&:not(:first-child) {
|
|
358
|
-
margin-top: 2em;
|
|
359
|
-
}
|
|
360
|
-
input[type='text'],
|
|
361
|
-
input[type='number'] {
|
|
362
|
-
font-size: 1em;
|
|
363
|
-
}
|
|
364
|
-
label {
|
|
365
|
-
margin-top: 0;
|
|
366
|
-
}
|
|
367
|
-
label + label {
|
|
368
|
-
margin-top: 1em;
|
|
369
|
-
}
|
|
370
|
-
&:hover {
|
|
371
|
-
border-left: rgba(0, 0, 0, 0.7) 4px solid;
|
|
372
|
-
transition: 0.2s all;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
span.subtext {
|
|
377
|
-
display: block;
|
|
378
|
-
color: rgba(0, 0, 0, 0.5);
|
|
379
|
-
text-transform: none;
|
|
380
|
-
font-weight: normal;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.sort-list {
|
|
384
|
-
list-style: none;
|
|
385
|
-
> li {
|
|
386
|
-
margin-right: 0.3em;
|
|
387
|
-
margin-bottom: 0.3em;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
.sort-list li > div {
|
|
391
|
-
display: block;
|
|
392
|
-
box-sizing: border-box;
|
|
393
|
-
border: 1px solid #d1d1d1;
|
|
394
|
-
border-radius: 2px;
|
|
395
|
-
background: #f1f1f1;
|
|
396
|
-
padding: 0.4em 0.6em;
|
|
397
|
-
font-size: 0.8em;
|
|
398
|
-
margin-bottom: 0.3em;
|
|
399
|
-
cursor: move;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.info {
|
|
403
|
-
font-size: 0.8em;
|
|
404
|
-
line-height: 1.4em;
|
|
405
|
-
font-style: italic;
|
|
406
|
-
padding-top: 10px;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.react-tags__search {
|
|
410
|
-
width: 100%;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.react-tags {
|
|
414
|
-
position: relative;
|
|
415
|
-
input.react-tags__search-input {
|
|
416
|
-
font-size: 0.8rem;
|
|
417
|
-
}
|
|
418
|
-
/* clicking anywhere will focus the input */
|
|
419
|
-
cursor: text;
|
|
420
|
-
span {
|
|
421
|
-
display: inline;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.react-tags.is-focused {
|
|
426
|
-
border-color: rgba(0, 0, 0, 0.7);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.react-tags__selected {
|
|
430
|
-
display: inline;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.react-tags__selected-tag {
|
|
434
|
-
display: inline-block;
|
|
435
|
-
box-sizing: border-box;
|
|
436
|
-
border: 1px solid #d1d1d1;
|
|
437
|
-
border-radius: 2px;
|
|
438
|
-
background: #f1f1f1;
|
|
439
|
-
padding: 0.4em 0.6em;
|
|
440
|
-
font-size: 0.8em;
|
|
441
|
-
margin-right: 0.3em;
|
|
442
|
-
margin-bottom: 0.3em;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.react-tags__selected-tag:after {
|
|
446
|
-
content: '\2715';
|
|
447
|
-
color: #aaa;
|
|
448
|
-
margin-left: 8px;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.react-tags__selected-tag:hover,
|
|
452
|
-
.react-tags__selected-tag:focus {
|
|
453
|
-
border-color: #b1b1b1;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.react-tags__search {
|
|
457
|
-
display: inline-block;
|
|
458
|
-
|
|
459
|
-
/* prevent autoresize overflowing the container */
|
|
460
|
-
max-width: 100%;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
@media screen and (min-width: 30em) {
|
|
464
|
-
.react-tags__search {
|
|
465
|
-
/* this will become the offsetParent for suggestions */
|
|
466
|
-
position: relative;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.react-tags__search input {
|
|
471
|
-
/* prevent autoresize overflowing the container */
|
|
472
|
-
max-width: 100%;
|
|
473
|
-
|
|
474
|
-
/* emove styles and layout from this element */
|
|
475
|
-
margin: 0;
|
|
476
|
-
outline: none;
|
|
477
|
-
padding: 0.5em 0.3em;
|
|
478
|
-
|
|
479
|
-
/* match the font styles */
|
|
480
|
-
font-size: inherit;
|
|
481
|
-
line-height: inherit;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.react-tags__search input::-ms-clear {
|
|
485
|
-
display: none;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.react-tags__suggestions {
|
|
489
|
-
position: absolute;
|
|
490
|
-
top: 100%;
|
|
491
|
-
left: 0;
|
|
492
|
-
width: 100%;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
@media screen and (min-width: 30em) {
|
|
496
|
-
.react-tags__suggestions {
|
|
497
|
-
width: 240px;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.react-tags__suggestions ul {
|
|
502
|
-
margin: 4px -1px;
|
|
503
|
-
padding: 0;
|
|
504
|
-
list-style: none;
|
|
505
|
-
background: white;
|
|
506
|
-
border: 1px solid #d1d1d1;
|
|
507
|
-
border-radius: 2px;
|
|
508
|
-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.react-tags__suggestions li {
|
|
512
|
-
border-bottom: 1px solid #ddd;
|
|
513
|
-
padding: 6px 8px;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.react-tags__suggestions li mark {
|
|
517
|
-
text-decoration: underline;
|
|
518
|
-
background: none;
|
|
519
|
-
font-weight: 600;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.react-tags__suggestions li:hover {
|
|
523
|
-
cursor: pointer;
|
|
524
|
-
background: #eee;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.react-tags__suggestions li.is-active {
|
|
528
|
-
background: #b7cfe0;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.react-tags__suggestions li.is-disabled {
|
|
532
|
-
opacity: 0.5;
|
|
533
|
-
cursor: auto;
|
|
534
|
-
}
|
|
535
107
|
|
|
536
108
|
.current-viz-list {
|
|
537
109
|
margin: 0.5em 0;
|
package/src/scss/grid.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
|
|
1
3
|
$blue-light: #8bc6f7;
|
|
2
4
|
$red: #f74242;
|
|
3
5
|
|
|
@@ -88,7 +90,7 @@ $red: #f74242;
|
|
|
88
90
|
&:hover {
|
|
89
91
|
transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
90
92
|
width: 180px;
|
|
91
|
-
background-color:
|
|
93
|
+
background-color: color.adjust($blue, $lightness: 8%);
|
|
92
94
|
li {
|
|
93
95
|
display: flex;
|
|
94
96
|
}
|
|
@@ -136,7 +138,7 @@ $red: #f74242;
|
|
|
136
138
|
flex: 1 1 auto;
|
|
137
139
|
|
|
138
140
|
&:hover {
|
|
139
|
-
border-color:
|
|
141
|
+
border-color: color.adjust(#c2c2c2, $lightness: -20%);
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
&.column--populated {
|
|
@@ -194,15 +196,15 @@ $red: #f74242;
|
|
|
194
196
|
&:hover {
|
|
195
197
|
$lightGray: #c7c7c7;
|
|
196
198
|
$mediumGray: #565656;
|
|
197
|
-
border-color:
|
|
199
|
+
border-color: color.adjust($lightGray, $lightness: -20%);
|
|
198
200
|
|
|
199
201
|
.widget-menu-item svg {
|
|
200
|
-
fill:
|
|
202
|
+
fill: color.adjust($mediumGray, $lightness: -20%);
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
.drag-icon,
|
|
204
206
|
.drag-icon svg {
|
|
205
|
-
fill:
|
|
207
|
+
fill: color.adjust($lightGray, $lightness: -20%);
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
|
package/src/scss/main.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '@cdc/core/styles/v2/utils/breakpoints';
|
|
2
2
|
|
|
3
3
|
.cdc-open-viz-module.type-dashboard {
|
|
4
4
|
@import 'editor-panel';
|
|
@@ -121,17 +121,6 @@
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.loader {
|
|
125
|
-
width: 100%;
|
|
126
|
-
text-align: center;
|
|
127
|
-
display: inline-block;
|
|
128
|
-
animation: spin 1s linear infinite;
|
|
129
|
-
|
|
130
|
-
&::before {
|
|
131
|
-
content: '\21BB';
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
124
|
.btn {
|
|
136
125
|
// Expand and Collapse Buttons for Multiviz Dashboard
|
|
137
126
|
&.expand-collapse-buttons {
|
|
@@ -141,18 +130,6 @@
|
|
|
141
130
|
}
|
|
142
131
|
}
|
|
143
132
|
|
|
144
|
-
.warning-icon {
|
|
145
|
-
position: relative;
|
|
146
|
-
top: 2px;
|
|
147
|
-
width: 15px;
|
|
148
|
-
height: 15px;
|
|
149
|
-
margin-left: 5px;
|
|
150
|
-
|
|
151
|
-
path {
|
|
152
|
-
fill: #d8000c;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
133
|
.multi-table-container {
|
|
157
134
|
margin: 15px 0 0;
|
|
158
135
|
}
|
|
@@ -2,7 +2,7 @@ import _ from 'lodash'
|
|
|
2
2
|
import errorMessagesActions from './errorMessage.actions'
|
|
3
3
|
import { devToolsWrapper } from '@cdc/core/helpers/withDevTools'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type errorMessagesState = string[]
|
|
6
6
|
|
|
7
7
|
const reducer = (state: errorMessagesState, action: errorMessagesActions): errorMessagesState => {
|
|
8
8
|
switch (action.type) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CommonVisualizationProperties } from '@cdc/core/types/Visualization'
|
|
2
|
-
|
|
3
|
-
export type DashboardFilters = {
|
|
4
|
-
sharedFilterIndexes: number[]
|
|
5
|
-
applyFiltersButtonText: string
|
|
6
|
-
autoLoad?: boolean
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { CommonVisualizationProperties } from '@cdc/core/types/Visualization'
|
|
2
|
+
|
|
3
|
+
export type DashboardFilters = {
|
|
4
|
+
sharedFilterIndexes: number[]
|
|
5
|
+
applyFiltersButtonText: string
|
|
6
|
+
autoLoad?: boolean
|
|
7
|
+
showClearButton?: boolean
|
|
8
|
+
type: 'dashboardFilters'
|
|
9
|
+
} & CommonVisualizationProperties
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DashboardConfig } from './DashboardConfig'
|
|
2
|
-
import { Tab } from './Tab'
|
|
3
|
-
|
|
4
|
-
export type InitialState = {
|
|
5
|
-
config: DashboardConfig
|
|
6
|
-
data: Record<string, any[]>
|
|
7
|
-
loading: boolean
|
|
8
|
-
filteredData: Object
|
|
9
|
-
preview: boolean
|
|
10
|
-
tabSelected: Tab
|
|
11
|
-
filtersApplied: boolean
|
|
12
|
-
}
|
|
1
|
+
import { DashboardConfig } from './DashboardConfig'
|
|
2
|
+
import { Tab } from './Tab'
|
|
3
|
+
|
|
4
|
+
export type InitialState = {
|
|
5
|
+
config: DashboardConfig
|
|
6
|
+
data: Record<string, any[]>
|
|
7
|
+
loading: boolean
|
|
8
|
+
filteredData: Object
|
|
9
|
+
preview: boolean
|
|
10
|
+
tabSelected: Tab
|
|
11
|
+
filtersApplied: boolean
|
|
12
|
+
}
|
package/vite.config.js
CHANGED
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
environment: 'jsdom',
|
|
6
|
+
globals: true,
|
|
7
|
+
setupFiles: ['../../vitest.setup.ts'],
|
|
8
|
+
exclude: [
|
|
9
|
+
'**/node_modules/**',
|
|
10
|
+
'**/dist/**',
|
|
11
|
+
'**/.storybook/**',
|
|
12
|
+
'**/*.stories.*',
|
|
13
|
+
'**/storybook-static/**'
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
})
|
|
@@ -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
|