@cdc/dashboard 4.26.1 → 4.26.2

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 (39) hide show
  1. package/dist/cdcdashboard-8NmHlKRI.es.js +15 -0
  2. package/dist/cdcdashboard-BPoPzKPz.es.js +6 -0
  3. package/dist/cdcdashboard-Cf9_fbQf.es.js +6 -0
  4. package/dist/{cdcdashboard-dgT_1dIT.es.js → cdcdashboard-DQ00cQCm.es.js} +1 -20
  5. package/dist/cdcdashboard-jiQQPkty.es.js +6 -0
  6. package/dist/cdcdashboard.js +59394 -65183
  7. package/examples/default.json +522 -133
  8. package/examples/nested-dropdown.json +6985 -0
  9. package/examples/private/abc.json +467 -0
  10. package/examples/private/dash.json +12696 -0
  11. package/examples/private/npcr.json +1 -0
  12. package/examples/private/test.json +125407 -0
  13. package/examples/private/timeline-data.json +4994 -0
  14. package/examples/private/timeline.json +1708 -0
  15. package/examples/test-api-filter-reset.json +8 -4
  16. package/examples/tp5-gauges.json +196 -0
  17. package/examples/tp5-test.json +266 -0
  18. package/index.html +1 -29
  19. package/package.json +38 -40
  20. package/src/CdcDashboardComponent.tsx +0 -3
  21. package/src/_stories/Dashboard.DataSetup.stories.tsx +2 -1
  22. package/src/_stories/Dashboard.stories.tsx +27 -5
  23. package/src/_stories/_mock/dashboard-line-chart-angles.json +1030 -0
  24. package/src/_stories/_mock/tp5-test.json +267 -0
  25. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +3 -0
  26. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +5 -1
  27. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +5 -1
  28. package/src/components/VisualizationRow.tsx +30 -25
  29. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +0 -17
  30. package/src/helpers/addValuesToDashboardFilters.ts +17 -11
  31. package/src/helpers/apiFilterHelpers.ts +28 -32
  32. package/src/helpers/tests/addValuesToDashboardFilters.test.ts +141 -44
  33. package/src/helpers/tests/apiFilterHelpers.test.ts +523 -420
  34. package/src/scss/main.scss +8 -5
  35. package/vite.config.js +7 -1
  36. package/dist/cdcdashboard-BnB1QM5d.es.js +0 -361528
  37. package/dist/cdcdashboard-Ct2SB0vL.es.js +0 -231049
  38. package/dist/cdcdashboard-D6CG2-Hb.es.js +0 -39377
  39. package/dist/cdcdashboard-MXgURbdZ.es.js +0 -39194
@@ -312,8 +312,9 @@
312
312
  }
313
313
  }
314
314
 
315
- // Ensure Bootstrap rows with TP5 waffle charts stretch columns to equal height
316
- .row:has(.waffle__style--tp5) {
315
+ // Ensure Bootstrap rows with TP5 waffle/gauge charts stretch columns to equal height
316
+ .row:has(.waffle__style--tp5),
317
+ .row:has(.gauge__style--tp5) {
317
318
  display: flex !important;
318
319
  align-items: stretch !important;
319
320
 
@@ -346,9 +347,11 @@
346
347
  }
347
348
  }
348
349
 
349
- // TP5 Waffle Chart adjustments when there are 2+ in a row
350
- .row:has(.waffle__style--tp5):has([class*='col-'] ~ [class*='col-']) {
351
- .waffle__style--tp5 {
350
+ // TP5 Waffle/Gauge adjustments when there are 2+ in a row
351
+ .row:has(.waffle__style--tp5):has([class*='col-'] ~ [class*='col-']),
352
+ .row:has(.gauge__style--tp5):has([class*='col-'] ~ [class*='col-']) {
353
+ .waffle__style--tp5,
354
+ .gauge__style--tp5 {
352
355
  // Enable flex stretching only in dashboard rows
353
356
  .cove-component__content {
354
357
  height: 100%;
package/vite.config.js CHANGED
@@ -1,4 +1,10 @@
1
1
  import GenerateViteConfig from '@cdc/core/generateViteConfig.js'
2
2
  import { moduleName } from './package.json'
3
3
 
4
- export default GenerateViteConfig(moduleName)
4
+ // Dashboard uses isDashboardEditor instead of isEditor for the padding selector
5
+ const dashboardCss = `
6
+ .cdc-open-viz-module.type-dashboard:not(.isDashboardEditor) {
7
+ padding: 1rem;
8
+ }`
9
+
10
+ export default GenerateViteConfig(moduleName, {}, {}, { css: dashboardCss })