@cdc/dashboard 4.26.3 → 4.26.5

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.
Files changed (151) hide show
  1. package/CONFIG.md +219 -0
  2. package/README.md +60 -20
  3. package/dist/cdcdashboard-CY9IcPSi.es.js +6 -0
  4. package/dist/cdcdashboard-DlpiY3fQ.es.js +4 -0
  5. package/dist/cdcdashboard.js +61559 -58048
  6. package/examples/__data__/data-2.json +6 -0
  7. package/examples/__data__/data.json +6 -0
  8. package/examples/dashboard-conditions-filters-incomplete.json +221 -0
  9. package/examples/dashboard-missing-datasets-multi.json +174 -0
  10. package/examples/dashboard-missing-datasets-single.json +121 -0
  11. package/examples/dashboard-multi-dashboard-version-regression.json +146 -0
  12. package/examples/dashboard-shared-filter-row-delete-cleanup.json +186 -0
  13. package/examples/dashboard-stale-dataset-keys.json +181 -0
  14. package/examples/dashboard-tiered-filter-regression.json +190 -0
  15. package/examples/legend-issue.json +1 -1
  16. package/examples/minimal-example.json +34 -0
  17. package/examples/private/cfa-dashboard.json +651 -0
  18. package/examples/private/data-bite-wrap.json +6936 -0
  19. package/examples/private/dengue.json +4640 -0
  20. package/examples/private/link_to_file.json +16662 -0
  21. package/examples/private/multi-dash-fix.json +16963 -0
  22. package/examples/private/versions.json +41612 -0
  23. package/examples/sankey.json +3 -3
  24. package/examples/test-api-filter-reset.json +4 -4
  25. package/examples/tp5-test.json +86 -4
  26. package/examples/us-map-filter-example.json +1074 -0
  27. package/package.json +9 -9
  28. package/src/CdcDashboard.tsx +6 -2
  29. package/src/CdcDashboardComponent.tsx +179 -88
  30. package/src/DashboardCopyPasteContext.test.tsx +33 -0
  31. package/src/DashboardCopyPasteContext.tsx +48 -0
  32. package/src/_stories/Dashboard.EditorRegression.stories.tsx +72 -0
  33. package/src/_stories/Dashboard.Regression.stories.tsx +196 -0
  34. package/src/_stories/Dashboard.Zoom.stories.tsx +88 -0
  35. package/src/_stories/Dashboard.smoke.stories.tsx +33 -0
  36. package/src/_stories/Dashboard.stories.tsx +337 -2
  37. package/src/_stories/FilteredTextMigrationComparison.stories.tsx +87 -0
  38. package/src/_stories/_mock/dashboard-data-driven-colors.json +171 -0
  39. package/src/_stories/_mock/tp5-test.json +86 -5
  40. package/src/components/Column.test.tsx +176 -0
  41. package/src/components/Column.tsx +214 -13
  42. package/src/components/DashboardConditionModal.test.tsx +420 -0
  43. package/src/components/DashboardConditionModal.tsx +367 -0
  44. package/src/components/DashboardConditionSummary.tsx +59 -0
  45. package/src/components/DashboardEditors.tsx +23 -0
  46. package/src/components/DashboardFilters/DashboardFilters.test.tsx +267 -0
  47. package/src/components/DashboardFilters/DashboardFilters.tsx +193 -172
  48. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.test.tsx +164 -0
  49. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +46 -6
  50. package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +5 -3
  51. package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +59 -58
  52. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.test.tsx +304 -0
  53. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +43 -36
  54. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +2 -2
  55. package/src/components/DashboardFilters/DashboardFiltersWrapper.test.tsx +142 -0
  56. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +32 -27
  57. package/src/components/DashboardFilters/dashboardfilter.styles.css +42 -27
  58. package/src/components/DataDesignerModal.tsx +2 -1
  59. package/src/components/ExpandCollapseButtons.tsx +6 -4
  60. package/src/components/Grid.tsx +12 -7
  61. package/src/components/Header/Header.tsx +36 -17
  62. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +141 -140
  63. package/src/components/Row.test.tsx +228 -0
  64. package/src/components/Row.tsx +104 -28
  65. package/src/components/VisualizationRow.test.tsx +396 -0
  66. package/src/components/VisualizationRow.tsx +177 -51
  67. package/src/components/VisualizationsPanel/VisualizationsPanel.test.tsx +49 -0
  68. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +14 -13
  69. package/src/components/Widget/Widget.test.tsx +218 -0
  70. package/src/components/Widget/Widget.tsx +123 -20
  71. package/src/components/Widget/widget.styles.css +58 -14
  72. package/src/components/dashboard-condition-modal.css +76 -0
  73. package/src/components/dashboard-condition-summary.css +87 -0
  74. package/src/data/initial-state.js +1 -0
  75. package/src/helpers/addValuesToDashboardFilters.ts +3 -5
  76. package/src/helpers/addVisualization.ts +17 -4
  77. package/src/helpers/cloneDashboardWidget.ts +127 -0
  78. package/src/helpers/dashboardColumnWidgets.ts +99 -0
  79. package/src/helpers/dashboardConditionUi.ts +47 -0
  80. package/src/helpers/dashboardConditions.ts +200 -0
  81. package/src/helpers/dashboardFilterTargets.ts +156 -0
  82. package/src/helpers/filterData.ts +4 -9
  83. package/src/helpers/filterVisibility.ts +20 -0
  84. package/src/helpers/formatConfigBeforeSave.ts +2 -2
  85. package/src/helpers/getFilteredData.ts +18 -5
  86. package/src/helpers/getUpdateConfig.ts +43 -12
  87. package/src/helpers/getVizRowColumnLocator.ts +11 -1
  88. package/src/helpers/iconHash.tsx +9 -3
  89. package/src/helpers/mapDataToConfig.ts +31 -29
  90. package/src/helpers/reloadURLHelpers.ts +25 -5
  91. package/src/helpers/removeDashboardFilter.ts +33 -33
  92. package/src/helpers/tests/addVisualization.test.ts +53 -9
  93. package/src/helpers/tests/cloneDashboardWidget.test.ts +136 -0
  94. package/src/helpers/tests/dashboardColumnWidgets.test.ts +99 -0
  95. package/src/helpers/tests/dashboardConditionUi.test.ts +41 -0
  96. package/src/helpers/tests/dashboardConditions.test.ts +428 -0
  97. package/src/helpers/tests/formatConfigBeforeSave.test.ts +51 -0
  98. package/src/helpers/tests/getFilteredData.test.ts +265 -86
  99. package/src/helpers/tests/getUpdateConfig.test.ts +338 -0
  100. package/src/helpers/tests/reloadURLHelpers.test.ts +394 -238
  101. package/src/index.tsx +6 -3
  102. package/src/scss/grid.scss +281 -22
  103. package/src/scss/main.scss +215 -64
  104. package/src/store/dashboard.actions.ts +17 -4
  105. package/src/store/dashboard.reducer.test.ts +538 -0
  106. package/src/store/dashboard.reducer.ts +136 -22
  107. package/src/test/CdcDashboard.test.jsx +24 -0
  108. package/src/test/CdcDashboard.test.tsx +148 -0
  109. package/src/test/CdcDashboardComponent.test.tsx +935 -2
  110. package/src/types/ConfigRow.ts +15 -0
  111. package/src/types/DashboardFilters.ts +4 -0
  112. package/src/types/SharedFilter.ts +2 -0
  113. package/tests/fixtures/dashboard-config-with-metadata.json +1 -1
  114. package/dist/cdcdashboard-vr9HZwRt.es.js +0 -6
  115. package/examples/DEV-6574.json +0 -2224
  116. package/examples/api-dashboard-data.json +0 -272
  117. package/examples/api-dashboard-years.json +0 -11
  118. package/examples/api-geographies-data.json +0 -11
  119. package/examples/chart-data.json +0 -5409
  120. package/examples/custom/css/respiratory.css +0 -236
  121. package/examples/custom/js/respiratory.js +0 -242
  122. package/examples/default-data.json +0 -368
  123. package/examples/default-filter-control.json +0 -209
  124. package/examples/default-multi-dataset-shared-filter.json +0 -1729
  125. package/examples/default-multi-dataset.json +0 -506
  126. package/examples/ed-visits-county-file.json +0 -402
  127. package/examples/filters/Alabama.json +0 -72
  128. package/examples/filters/Alaska.json +0 -1737
  129. package/examples/filters/Arkansas.json +0 -4713
  130. package/examples/filters/California.json +0 -212
  131. package/examples/filters/Colorado.json +0 -1500
  132. package/examples/filters/Connecticut.json +0 -559
  133. package/examples/filters/Delaware.json +0 -63
  134. package/examples/filters/DistrictofColumbia.json +0 -63
  135. package/examples/filters/Florida.json +0 -4217
  136. package/examples/filters/States.json +0 -146
  137. package/examples/state-level.json +0 -90136
  138. package/examples/state-points.json +0 -10474
  139. package/examples/temp-example-data.json +0 -130
  140. package/examples/test-dashboard-simple.json +0 -503
  141. package/examples/test-example.json +0 -752
  142. package/examples/test-file.json +0 -147
  143. package/examples/test.json +0 -752
  144. package/examples/testing.json +0 -94456
  145. /package/examples/{data → __data__}/data-with-metadata.json +0 -0
  146. /package/examples/{legend-issue-data.json → __data__/legend-issue-data.json} +0 -0
  147. /package/examples/api-test/{categories.json → __data__/categories.json} +0 -0
  148. /package/examples/api-test/{chart-data.json → __data__/chart-data.json} +0 -0
  149. /package/examples/api-test/{topics.json → __data__/topics.json} +0 -0
  150. /package/examples/api-test/{years.json → __data__/years.json} +0 -0
  151. /package/src/_stories/{Dashboard.Pages.stories.tsx → Dashboard.Pages.smoke.stories.tsx} +0 -0
@@ -1,18 +1,23 @@
1
1
  @import '@cdc/core/styles/utils/breakpoints';
2
+ @import '@cdc/core/styles/layout/callout';
2
3
 
3
4
  button.row-menu__btn[title*='Equal Height Rows'] {
4
5
  margin-left: 15px;
5
6
  }
6
7
 
7
8
  .cove-visualization.type-dashboard {
9
+ --dashboard-condition-active-blue: var(--blue);
10
+ --dashboard-condition-active-blue-bg: #f2f7fb;
11
+ --dashboard-condition-active-blue-bg-hover: #e6eff7;
12
+
8
13
  @import 'editor-panel';
9
14
  @import 'grid';
10
15
 
11
- .loading>div.la-ball-beat {
16
+ .loading > div.la-ball-beat {
12
17
  margin-top: 20%;
13
18
  }
14
19
 
15
- >.cove-editor__content {
20
+ > .cove-editor__content {
16
21
  width: 100% !important;
17
22
  left: 0px;
18
23
  }
@@ -66,6 +71,26 @@ button.row-menu__btn[title*='Equal Height Rows'] {
66
71
  height: 25px;
67
72
  }
68
73
 
74
+ .download-image-controls {
75
+ display: flex;
76
+ flex-direction: column;
77
+ align-items: flex-start;
78
+ flex-basis: 100%;
79
+ }
80
+
81
+ .download-image-mode-select {
82
+ width: 14em;
83
+ max-width: 100%;
84
+ height: 25px;
85
+ }
86
+
87
+ .download-image-label-input {
88
+ width: 14em;
89
+ max-width: 14em;
90
+ margin-top: 5px;
91
+ height: 25px;
92
+ }
93
+
69
94
  label {
70
95
  display: block;
71
96
  width: 100%;
@@ -135,13 +160,15 @@ button.row-menu__btn[title*='Equal Height Rows'] {
135
160
  }
136
161
  }
137
162
 
138
- .btn {
163
+ .dashboard-filters__actions {
164
+ align-items: flex-end;
165
+ display: flex;
166
+ flex: 0 0 auto;
167
+ width: auto;
139
168
 
140
- // Expand and Collapse Buttons for Multiviz Dashboard
141
- &.expand-collapse-buttons {
142
- background-color: var(--lightestGray);
143
- border: 1px var(--lightGray) solid;
144
- color: black;
169
+ > .cove-button {
170
+ flex: 0 0 auto;
171
+ width: auto;
145
172
  }
146
173
  }
147
174
 
@@ -194,18 +221,26 @@ button.row-menu__btn[title*='Equal Height Rows'] {
194
221
 
195
222
  // Override Bootstrap's row negative margins to prevent horizontal scrollbar
196
223
  .row {
224
+ --dashboard-column-gap: 1.5rem;
197
225
  margin-right: 0;
198
226
  margin-left: 0;
227
+ column-gap: 0;
199
228
  // Row spacing for desktop
200
229
  margin-bottom: 1.5rem;
201
230
 
202
- // Remove padding from first and last columns to keep content flush to edges
203
- >[class*='col-']:first-child {
231
+ > [class*='col-'] {
232
+ // Remove side padding when columns stack to full width.
204
233
  padding-left: 0;
234
+ padding-right: 0;
235
+ flex: 0 0 100%;
236
+ max-width: 100%;
237
+ width: 100%;
238
+ margin-bottom: 1.5rem;
205
239
  }
206
240
 
207
- >[class*='col-']:last-child {
208
- padding-right: 0;
241
+ // Last column doesn't need margin (row margin handles gap to next row)
242
+ > [class*='col-']:last-child {
243
+ margin-bottom: 0;
209
244
  }
210
245
 
211
246
  // Last row doesn't need bottom margin
@@ -214,30 +249,6 @@ button.row-menu__btn[title*='Equal Height Rows'] {
214
249
  }
215
250
  }
216
251
 
217
- // Mobile layout adjustments
218
- @include breakpoint(xs) {
219
- .row {
220
- margin-bottom: 1.5rem;
221
-
222
- >[class*='col-'] {
223
- // Remove side padding when columns stack to full width
224
- padding-left: 0;
225
- padding-right: 0;
226
- margin-bottom: 1.5rem;
227
- }
228
-
229
- // Last column doesn't need margin (row margin handles gap to next row)
230
- >[class*='col-']:last-child {
231
- margin-bottom: 0;
232
- }
233
-
234
- // Last row doesn't need extra margin
235
- &:last-child {
236
- margin-bottom: 0;
237
- }
238
- }
239
- }
240
-
241
252
  .dashboard-row {
242
253
  display: flex;
243
254
  flex-direction: column;
@@ -252,7 +263,7 @@ button.row-menu__btn[title*='Equal Height Rows'] {
252
263
 
253
264
  // Disable the module individual margin
254
265
  .map-container,
255
- .cove-visualization.type-chart .cove-visualization__body>* {
266
+ .cove-visualization.type-chart .cove-visualization__body > * {
256
267
  margin-left: 0;
257
268
  margin-right: 0;
258
269
  }
@@ -272,7 +283,43 @@ button.row-menu__btn[title*='Equal Height Rows'] {
272
283
  width: 100%;
273
284
  }
274
285
 
275
- @include breakpointClass(md) {
286
+ @include breakpoint(md) {
287
+ .row {
288
+ column-gap: var(--dashboard-column-gap);
289
+
290
+ > [class*='col-'] {
291
+ min-width: 0;
292
+ flex-grow: 0;
293
+ flex-shrink: 0;
294
+ margin-bottom: 0;
295
+ }
296
+
297
+ > .col-md-12 {
298
+ flex-basis: 100%;
299
+ max-width: 100%;
300
+ width: 100%;
301
+ }
302
+ > .col-md-8 {
303
+ flex-basis: calc((100% * 8 / 12) - (var(--dashboard-column-gap) * 4 / 12));
304
+ max-width: calc((100% * 8 / 12) - (var(--dashboard-column-gap) * 4 / 12));
305
+ width: calc((100% * 8 / 12) - (var(--dashboard-column-gap) * 4 / 12));
306
+ }
307
+ > .col-md-6 {
308
+ flex-basis: calc((100% * 6 / 12) - (var(--dashboard-column-gap) * 6 / 12));
309
+ max-width: calc((100% * 6 / 12) - (var(--dashboard-column-gap) * 6 / 12));
310
+ width: calc((100% * 6 / 12) - (var(--dashboard-column-gap) * 6 / 12));
311
+ }
312
+ > .col-md-4 {
313
+ flex-basis: calc((100% * 4 / 12) - (var(--dashboard-column-gap) * 8 / 12));
314
+ max-width: calc((100% * 4 / 12) - (var(--dashboard-column-gap) * 8 / 12));
315
+ width: calc((100% * 4 / 12) - (var(--dashboard-column-gap) * 8 / 12));
316
+ }
317
+ > .col-md-3 {
318
+ flex-basis: calc((100% * 3 / 12) - (var(--dashboard-column-gap) * 9 / 12));
319
+ max-width: calc((100% * 3 / 12) - (var(--dashboard-column-gap) * 9 / 12));
320
+ width: calc((100% * 3 / 12) - (var(--dashboard-column-gap) * 9 / 12));
321
+ }
322
+ }
276
323
  .dashboard-row {
277
324
  flex-direction: row;
278
325
  margin: 1em 0;
@@ -291,6 +338,10 @@ button.row-menu__btn[title*='Equal Height Rows'] {
291
338
  .dashboard-col-4 {
292
339
  width: 33%;
293
340
  }
341
+
342
+ .dashboard-col-3 {
343
+ width: 25%;
344
+ }
294
345
  }
295
346
 
296
347
  @include breakpointClass(sm) {
@@ -323,11 +374,10 @@ button.row-menu__btn[title*='Equal Height Rows'] {
323
374
  [class*='col-'] {
324
375
  display: flex;
325
376
  flex-direction: column !important;
326
- flex: 1 1 auto !important;
327
377
  align-items: stretch !important;
328
378
  min-height: 0 !important;
329
379
 
330
- >* {
380
+ > * {
331
381
  display: flex !important;
332
382
  flex-direction: column !important;
333
383
  flex: 1 1 auto !important;
@@ -345,10 +395,10 @@ button.row-menu__btn[title*='Equal Height Rows'] {
345
395
  min-height: 0 !important;
346
396
  width: 100% !important;
347
397
 
348
- >.cove-visualization__content,
349
- >.cove-visualization__outer,
350
- >.cove-visualization__inner,
351
- >.cove-visualization__body {
398
+ > .cove-visualization__content,
399
+ > .cove-visualization__outer,
400
+ > .cove-visualization__inner,
401
+ > .cove-visualization__body {
352
402
  display: flex !important;
353
403
  flex-direction: column !important;
354
404
  flex: 1 1 auto !important;
@@ -356,9 +406,9 @@ button.row-menu__btn[title*='Equal Height Rows'] {
356
406
  min-height: 0 !important;
357
407
  width: 100% !important;
358
408
 
359
- >.cove-visualization__inner,
360
- >.cove-visualization__body,
361
- >.cove-visualization__body-wrap {
409
+ > .cove-visualization__inner,
410
+ > .cove-visualization__body,
411
+ > .cove-visualization__body-wrap {
362
412
  display: flex !important;
363
413
  flex-direction: column !important;
364
414
  flex: 1 1 auto !important;
@@ -371,7 +421,8 @@ button.row-menu__btn[title*='Equal Height Rows'] {
371
421
  .cove-visualization__outer,
372
422
  .cove-visualization__inner,
373
423
  .cove-visualization__body,
374
- .cove-visualization__body-wrap {
424
+ .cove-visualization__body-wrap,
425
+ .markup-include-tp5 {
375
426
  display: flex !important;
376
427
  flex-direction: column !important;
377
428
  flex: 1 1 auto !important;
@@ -398,14 +449,17 @@ button.row-menu__btn[title*='Equal Height Rows'] {
398
449
  min-height: 0 !important;
399
450
  }
400
451
 
401
- .cove-visualization .cove-visualization__body.bite__style--tp5>.cove-visualization__body-wrap {
452
+ .cove-visualization .cove-visualization__body.bite__style--tp5 > .cove-visualization__body-wrap {
402
453
  display: flex !important;
403
454
  flex-direction: column !important;
404
455
  flex: 1 1 auto !important;
405
456
  min-height: 0 !important;
406
457
  }
407
458
 
408
- .cove-visualization .cove-visualization__body.bite__style--tp5>.cove-visualization__body-wrap>.cove-visualization__content-section {
459
+ .cove-visualization
460
+ .cove-visualization__body.bite__style--tp5
461
+ > .cove-visualization__body-wrap
462
+ > .cove-visualization__content-section {
409
463
  display: flex !important;
410
464
  flex-direction: column !important;
411
465
  flex: 1 1 auto !important;
@@ -413,7 +467,11 @@ button.row-menu__btn[title*='Equal Height Rows'] {
413
467
  width: 100% !important;
414
468
  }
415
469
 
416
- .cove-visualization .cove-visualization__body.bite__style--tp5>.cove-visualization__body-wrap>.cove-visualization__content-section>.cdc-callout {
470
+ .cove-visualization
471
+ .cove-visualization__body.bite__style--tp5
472
+ > .cove-visualization__body-wrap
473
+ > .cove-visualization__content-section
474
+ > .cdc-callout {
417
475
  display: flex !important;
418
476
  flex-direction: column !important;
419
477
  flex: 1 1 auto !important;
@@ -421,16 +479,27 @@ button.row-menu__btn[title*='Equal Height Rows'] {
421
479
  width: 100% !important;
422
480
  }
423
481
 
424
- .cove-visualization.waffle__style--tp5 .cove-visualization__body>.cove-visualization__body-wrap,
425
- .cove-visualization.gauge__style--tp5 .cove-visualization__body>.cove-visualization__body-wrap {
482
+ .cove-visualization.waffle__style--tp5 .cove-visualization__body > .cove-visualization__body-wrap,
483
+ .cove-visualization.gauge__style--tp5 .cove-visualization__body > .cove-visualization__body-wrap,
484
+ .cove-visualization.markup-include__style--tp5 .cove-visualization__body > .cove-visualization__body-wrap {
426
485
  display: flex !important;
427
486
  flex-direction: column !important;
428
487
  flex: 1 1 auto !important;
429
488
  min-height: 0 !important;
430
489
  }
431
490
 
432
- .cove-visualization.waffle__style--tp5 .cove-visualization__body>.cove-visualization__body-wrap>.cove-visualization__content-section,
433
- .cove-visualization.gauge__style--tp5 .cove-visualization__body>.cove-visualization__body-wrap>.cove-visualization__content-section {
491
+ .cove-visualization.waffle__style--tp5
492
+ .cove-visualization__body
493
+ > .cove-visualization__body-wrap
494
+ > .cove-visualization__content-section,
495
+ .cove-visualization.gauge__style--tp5
496
+ .cove-visualization__body
497
+ > .cove-visualization__body-wrap
498
+ > .cove-visualization__content-section,
499
+ .cove-visualization.markup-include__style--tp5
500
+ .cove-visualization__body
501
+ > .cove-visualization__body-wrap
502
+ > .cove-visualization__content-section {
434
503
  display: flex !important;
435
504
  flex-direction: column !important;
436
505
  flex: 1 1 auto !important;
@@ -438,8 +507,16 @@ button.row-menu__btn[title*='Equal Height Rows'] {
438
507
  width: 100% !important;
439
508
  }
440
509
 
441
- .cove-visualization.waffle__style--tp5 .cove-visualization__body>.cove-visualization__body-wrap>.cove-visualization__content-section>.cdc-callout,
442
- .cove-visualization.gauge__style--tp5 .cove-visualization__body>.cove-visualization__body-wrap>.cove-visualization__content-section>.cdc-callout {
510
+ .cove-visualization.waffle__style--tp5
511
+ .cove-visualization__body
512
+ > .cove-visualization__body-wrap
513
+ > .cove-visualization__content-section
514
+ > .cdc-callout,
515
+ .cove-visualization.gauge__style--tp5
516
+ .cove-visualization__body
517
+ > .cove-visualization__body-wrap
518
+ > .cove-visualization__content-section
519
+ > .cdc-callout {
443
520
  display: flex !important;
444
521
  flex-direction: column !important;
445
522
  flex: 1 1 auto !important;
@@ -447,10 +524,47 @@ button.row-menu__btn[title*='Equal Height Rows'] {
447
524
  width: 100% !important;
448
525
  }
449
526
 
450
- .cove-visualization .cove-visualization__body.bite__style--tp5 .cdc-callout__body {
527
+ .cove-visualization.markup-include__style--tp5
528
+ .cove-visualization__body
529
+ > .cove-visualization__body-wrap
530
+ > .cove-visualization__content-section
531
+ > .markup-include-tp5 {
451
532
  display: flex !important;
533
+ flex-direction: column !important;
452
534
  flex: 1 1 auto !important;
453
- align-items: stretch !important;
535
+ min-height: 100% !important;
536
+ width: 100% !important;
537
+ }
538
+
539
+ .cove-visualization.markup-include__style--tp5
540
+ .cove-visualization__body
541
+ > .cove-visualization__body-wrap
542
+ > .cove-visualization__content-section
543
+ > .markup-include-tp5
544
+ > .cdc-callout__body,
545
+ .cove-visualization.markup-include__style--tp5
546
+ .cove-visualization__body
547
+ > .cove-visualization__body-wrap
548
+ > .cove-visualization__content-section
549
+ > .markup-include-tp5
550
+ > .cdc-callout__body
551
+ > .cdc-callout__content {
552
+ display: flex !important;
553
+ flex: 1 1 auto !important;
554
+ min-height: 0 !important;
555
+ }
556
+
557
+ .cove-visualization.markup-include__style--tp5 .markup-include-component--tp5 {
558
+ display: flex !important;
559
+ flex-direction: column !important;
560
+ flex: 1 1 auto !important;
561
+ min-height: 0 !important;
562
+ }
563
+
564
+ .cove-visualization .cove-visualization__body.bite__style--tp5 .cdc-callout__body {
565
+ display: grid !important;
566
+ flex: 1 1 auto !important;
567
+ align-items: start !important;
454
568
  min-height: 0 !important;
455
569
  }
456
570
 
@@ -459,6 +573,37 @@ button.row-menu__btn[title*='Equal Height Rows'] {
459
573
  min-height: 0 !important;
460
574
  }
461
575
  }
576
+ @include breakpoint(md) {
577
+ > .col-md-12 {
578
+ flex-basis: 100% !important;
579
+ max-width: 100% !important;
580
+ width: 100% !important;
581
+ }
582
+
583
+ > .col-md-8 {
584
+ flex-basis: calc((100% * 8 / 12) - (var(--dashboard-column-gap) * 4 / 12)) !important;
585
+ max-width: calc((100% * 8 / 12) - (var(--dashboard-column-gap) * 4 / 12)) !important;
586
+ width: calc((100% * 8 / 12) - (var(--dashboard-column-gap) * 4 / 12)) !important;
587
+ }
588
+
589
+ > .col-md-6 {
590
+ flex-basis: calc((100% * 6 / 12) - (var(--dashboard-column-gap) * 6 / 12)) !important;
591
+ max-width: calc((100% * 6 / 12) - (var(--dashboard-column-gap) * 6 / 12)) !important;
592
+ width: calc((100% * 6 / 12) - (var(--dashboard-column-gap) * 6 / 12)) !important;
593
+ }
594
+
595
+ > .col-md-4 {
596
+ flex-basis: calc((100% * 4 / 12) - (var(--dashboard-column-gap) * 8 / 12)) !important;
597
+ max-width: calc((100% * 4 / 12) - (var(--dashboard-column-gap) * 8 / 12)) !important;
598
+ width: calc((100% * 4 / 12) - (var(--dashboard-column-gap) * 8 / 12)) !important;
599
+ }
600
+
601
+ > .col-md-3 {
602
+ flex-basis: calc((100% * 3 / 12) - (var(--dashboard-column-gap) * 9 / 12)) !important;
603
+ max-width: calc((100% * 3 / 12) - (var(--dashboard-column-gap) * 9 / 12)) !important;
604
+ width: calc((100% * 3 / 12) - (var(--dashboard-column-gap) * 9 / 12)) !important;
605
+ }
606
+ }
462
607
  }
463
608
 
464
609
  // TP5 adjustments when there are 2+ data bites in a row
@@ -478,10 +623,8 @@ button.row-menu__btn[title*='Equal Height Rows'] {
478
623
  // TP5 Waffle/Gauge adjustments when there are 2+ in a row
479
624
  .row:has(.waffle__style--tp5):has([class*='col-'] ~ [class*='col-']),
480
625
  .row:has(.gauge__style--tp5):has([class*='col-'] ~ [class*='col-']) {
481
-
482
626
  .waffle__style--tp5,
483
627
  .gauge__style--tp5 {
484
-
485
628
  .cdc-callout {
486
629
  flex: 1;
487
630
  }
@@ -497,8 +640,6 @@ button.row-menu__btn[title*='Equal Height Rows'] {
497
640
  }
498
641
 
499
642
  .cdc-callout__heading {
500
- // Fixed minimum height to align titles - adjust based on design needs
501
- min-height: 3em;
502
643
  display: flex;
503
644
  align-items: flex-start;
504
645
  }
@@ -510,6 +651,16 @@ button.row-menu__btn[title*='Equal Height Rows'] {
510
651
  }
511
652
  }
512
653
 
654
+ // TP5 Markup Include adjustments when there are 2+ in a row
655
+ .row:has(.markup-include__style--tp5):has([class*='col-'] ~ [class*='col-']) {
656
+ .markup-include__style--tp5 {
657
+ .cdc-callout__heading {
658
+ display: flex;
659
+ align-items: flex-start;
660
+ }
661
+ }
662
+ }
663
+
513
664
  // Data bite alignment styles are now in packages/data-bite/src/scss/bite.scss
514
665
  // under .cdc-dashboard-inner-container to ensure proper specificity
515
666
  }
@@ -542,4 +693,4 @@ button.row-menu__btn[title*='Equal Height Rows'] {
542
693
  display: block;
543
694
  margin: 1em 0;
544
695
  }
545
- }
696
+ }
@@ -5,19 +5,31 @@ import { ConfigRow } from '../types/ConfigRow'
5
5
  import { AnyVisualization } from '@cdc/core/types/Visualization'
6
6
  import { SharedFilter } from '../types/SharedFilter'
7
7
 
8
- type ADD_VISUALIZATION = Action<'ADD_VISUALIZATION', { rowIdx: number; colIdx: number; newViz: AnyVisualization }>
8
+ type ADD_VISUALIZATION = Action<
9
+ 'ADD_VISUALIZATION',
10
+ { rowIdx: number; colIdx: number; entryIdx?: number; newViz: AnyVisualization }
11
+ >
9
12
  type APPLY_CONFIG = Action<'APPLY_CONFIG', [Config, Object?]>
10
13
  type DELETE_WIDGET = Action<'DELETE_WIDGET', { uid: string }>
14
+ type CLONE_VISUALIZATION = Action<
15
+ 'CLONE_VISUALIZATION',
16
+ { sourceWidgetKey: string; rowIdx: number; colIdx: number; entryIdx?: number }
17
+ >
11
18
  type MOVE_VISUALIZATION = Action<
12
19
  'MOVE_VISUALIZATION',
13
- { rowIdx: number; colIdx: number; widget: AnyVisualization & { rowIdx: number; colIdx: number } }
20
+ {
21
+ rowIdx: number
22
+ colIdx: number
23
+ entryIdx?: number
24
+ widget: AnyVisualization & { rowIdx: number; colIdx: number; entryIdx?: number }
25
+ }
14
26
  >
15
27
  type SET_CONFIG = Action<'SET_CONFIG', Partial<Config> & { activeDashboard?: number }>
16
28
  type UPDATE_CONFIG = Action<'UPDATE_CONFIG', [Config, Object?]>
17
- type SET_DATA = Action<'SET_DATA', Record<string, any[]>>
29
+ type SET_DATA = Action<'SET_DATA', { data: Record<string, any[]>; activeDashboard?: number }>
18
30
  type SET_LOADING = Action<'SET_LOADING', boolean>
19
31
  type SET_PREVIEW = Action<'SET_PREVIEW', boolean>
20
- type SET_FILTERED_DATA = Action<'SET_FILTERED_DATA', Object>
32
+ type SET_FILTERED_DATA = Action<'SET_FILTERED_DATA', { filteredData: Object; activeDashboard?: number }>
21
33
  type SET_SHARED_FILTERS = Action<'SET_SHARED_FILTERS', SharedFilter[]>
22
34
  type SET_TAB_SELECTED = Action<'SET_TAB_SELECTED', Tab>
23
35
  type RENAME_DASHBOARD_TAB = Action<'RENAME_DASHBOARD_TAB', { current: string; new: string }>
@@ -38,6 +50,7 @@ type DashboardActions =
38
50
  | ADD_VISUALIZATION
39
51
  | APPLY_CONFIG
40
52
  | ADD_NEW_DASHBOARD
53
+ | CLONE_VISUALIZATION
41
54
  | DELETE_WIDGET
42
55
  | MOVE_VISUALIZATION
43
56
  | SET_CONFIG