@cdc/dashboard 4.24.10 → 4.24.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.
Files changed (32) hide show
  1. package/dist/cdcdashboard.js +46738 -44885
  2. package/examples/private/DEV-9644.json +20092 -0
  3. package/package.json +9 -9
  4. package/src/CdcDashboard.tsx +35 -14
  5. package/src/CdcDashboardComponent.tsx +38 -14
  6. package/src/_stories/Dashboard.stories.tsx +8 -0
  7. package/src/_stories/_mock/api-filter-error.json +55 -0
  8. package/src/_stories/_mock/group-pivot-filter.json +10 -5
  9. package/src/components/DashboardFilters/DashboardFilters.tsx +57 -42
  10. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +1 -1
  11. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +7 -5
  12. package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +21 -0
  13. package/src/components/DashboardFilters/dashboardfilter.styles.css +11 -0
  14. package/src/components/Grid.tsx +1 -1
  15. package/src/components/Header/Header.tsx +71 -10
  16. package/src/components/Header/index.scss +0 -5
  17. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +28 -6
  18. package/src/components/MultiConfigTabs/MultiTabs.tsx +2 -0
  19. package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +4 -11
  20. package/src/components/Row.tsx +59 -13
  21. package/src/components/VisualizationRow.tsx +0 -2
  22. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +0 -1
  23. package/src/components/Widget.tsx +23 -1
  24. package/src/helpers/getVizRowColumnLocator.ts +1 -0
  25. package/src/helpers/loadAPIFilters.ts +7 -2
  26. package/src/helpers/tests/loadAPIFiltersWrapper.test.ts +2 -1
  27. package/src/scss/editor-panel.scss +0 -3
  28. package/src/scss/grid.scss +22 -23
  29. package/src/scss/main.scss +0 -27
  30. package/src/store/dashboard.reducer.ts +7 -1
  31. package/src/store/errorMessage/errorMessage.actions.ts +7 -0
  32. package/src/store/errorMessage/errorMessage.reducer.ts +24 -0
@@ -0,0 +1,24 @@
1
+ import _ from 'lodash'
2
+ import errorMessagesActions from './errorMessage.actions'
3
+ import { devToolsWrapper } from '@cdc/core/helpers/withDevTools'
4
+
5
+ export type errorMessagesState = string[]
6
+
7
+ const reducer = (state: errorMessagesState, action: errorMessagesActions): errorMessagesState => {
8
+ switch (action.type) {
9
+ case 'ADD_ERROR_MESSAGE': {
10
+ const message = action.payload
11
+ return [...state, message]
12
+ }
13
+
14
+ case 'DISMISS_ERROR_MESSAGE': {
15
+ const messages = [...state]
16
+ _.remove(messages, (_, index) => {
17
+ return index === action.payload
18
+ })
19
+ return messages
20
+ }
21
+ }
22
+ }
23
+
24
+ export default devToolsWrapper<errorMessagesState, errorMessagesActions>(reducer)