@cdc/dashboard 4.26.1 → 4.26.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.
Files changed (76) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcdashboard-8NmHlKRI.es.js +15 -0
  3. package/dist/cdcdashboard-BPoPzKPz.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-vr9HZwRt.es.js +6 -0
  7. package/dist/cdcdashboard.js +80971 -83096
  8. package/examples/custom/css/respiratory.css +1 -1
  9. package/examples/data/data-with-metadata.json +18 -0
  10. package/examples/default.json +492 -132
  11. package/examples/nested-dropdown.json +6985 -0
  12. package/examples/private/abc.json +467 -0
  13. package/examples/private/dash.json +12696 -0
  14. package/examples/private/inline-markup.json +775 -0
  15. package/examples/private/npcr.json +1 -0
  16. package/examples/private/recent-update.json +1456 -0
  17. package/examples/private/test.json +125407 -0
  18. package/examples/private/timeline-data.json +4994 -0
  19. package/examples/private/timeline.json +1708 -0
  20. package/examples/private/toggle.json +10137 -0
  21. package/examples/test-api-filter-reset.json +8 -4
  22. package/examples/tp5-gauges.json +196 -0
  23. package/examples/tp5-test.json +266 -0
  24. package/index.html +1 -29
  25. package/package.json +38 -40
  26. package/src/CdcDashboard.tsx +2 -1
  27. package/src/CdcDashboardComponent.tsx +47 -30
  28. package/src/_stories/Dashboard.DataSetup.stories.tsx +8 -2
  29. package/src/_stories/Dashboard.Pages.stories.tsx +22 -0
  30. package/src/_stories/Dashboard.stories.tsx +4501 -80
  31. package/src/_stories/_mock/dashboard-line-chart-angles.json +1030 -0
  32. package/src/_stories/_mock/tab-simple-filter.json +153 -0
  33. package/src/_stories/_mock/tp5-test.json +267 -0
  34. package/src/components/DashboardFilters/DashboardFilters.tsx +19 -3
  35. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +10 -4
  36. package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +1 -1
  37. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +6 -3
  38. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +13 -8
  39. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +8 -8
  40. package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +1 -1
  41. package/src/components/DashboardFilters/dashboardfilter.styles.css +3 -3
  42. package/src/components/DataDesignerModal.tsx +2 -2
  43. package/src/components/Header/Header.tsx +27 -5
  44. package/src/components/Header/index.scss +1 -1
  45. package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +6 -6
  46. package/src/components/Row.tsx +21 -0
  47. package/src/components/Toggle/toggle-style.css +7 -7
  48. package/src/components/VisualizationRow.tsx +42 -29
  49. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +1 -71
  50. package/src/components/VisualizationsPanel/visualizations-panel-styles.css +2 -2
  51. package/src/components/Widget/Widget.tsx +2 -2
  52. package/src/components/Widget/widget.styles.css +12 -12
  53. package/src/data/initial-state.js +1 -1
  54. package/src/helpers/addValuesToDashboardFilters.ts +17 -11
  55. package/src/helpers/addVisualization.ts +71 -0
  56. package/src/helpers/apiFilterHelpers.ts +28 -32
  57. package/src/helpers/formatConfigBeforeSave.ts +1 -1
  58. package/src/helpers/getVizConfig.ts +13 -3
  59. package/src/helpers/iconHash.tsx +45 -36
  60. package/src/helpers/processDataLegacy.ts +19 -14
  61. package/src/helpers/tests/addValuesToDashboardFilters.test.ts +141 -44
  62. package/src/helpers/tests/addVisualization.test.ts +52 -0
  63. package/src/helpers/tests/apiFilterHelpers.test.ts +523 -420
  64. package/src/helpers/tests/formatConfigBeforeSave.test.ts +81 -1
  65. package/src/scss/editor-panel.scss +1 -1
  66. package/src/scss/main.scss +169 -41
  67. package/src/store/dashboard.reducer.ts +1 -1
  68. package/src/test/CdcDashboard.test.jsx +2 -2
  69. package/src/test/CdcDashboardComponent.test.tsx +74 -0
  70. package/src/types/FilterStyles.ts +2 -1
  71. package/tests/fixtures/dashboard-config-with-metadata.json +89 -0
  72. package/vite.config.js +7 -1
  73. package/dist/cdcdashboard-BnB1QM5d.es.js +0 -361528
  74. package/dist/cdcdashboard-Ct2SB0vL.es.js +0 -231049
  75. package/dist/cdcdashboard-D6CG2-Hb.es.js +0 -39377
  76. package/dist/cdcdashboard-MXgURbdZ.es.js +0 -39194
@@ -7,12 +7,14 @@
7
7
  "type": "urlfilter",
8
8
  "columnName": "category",
9
9
  "apiFilter": {
10
- "apiEndpoint": "http://localhost:8080/examples/api-test/categories.json",
10
+ "apiEndpoint": "/examples/api-test/categories.json",
11
11
  "valueSelector": "category",
12
12
  "textSelector": "category"
13
13
  },
14
14
  "queryParameter": "category",
15
+ "setByQueryParameter": "category",
15
16
  "resetLabel": "- Select Category -",
17
+ "defaultValue": "Chronic Diseases",
16
18
  "showDropdown": true,
17
19
  "filterStyle": "dropdown",
18
20
  "usedBy": ["chart1"]
@@ -22,11 +24,12 @@
22
24
  "type": "urlfilter",
23
25
  "columnName": "topic",
24
26
  "apiFilter": {
25
- "apiEndpoint": "http://localhost:8080/examples/api-test/topics.json",
27
+ "apiEndpoint": "/examples/api-test/topics.json",
26
28
  "valueSelector": "topic",
27
29
  "textSelector": "topic"
28
30
  },
29
31
  "queryParameter": "topic",
32
+ "setByQueryParameter": "topic",
30
33
  "resetLabel": "- Select Topic -",
31
34
  "showDropdown": true,
32
35
  "parents": [
@@ -40,11 +43,12 @@
40
43
  "type": "urlfilter",
41
44
  "columnName": "year",
42
45
  "apiFilter": {
43
- "apiEndpoint": "http://localhost:8080/examples/api-test/years.json",
46
+ "apiEndpoint": "/examples/api-test/years.json",
44
47
  "valueSelector": "year",
45
48
  "textSelector": "year"
46
49
  },
47
50
  "queryParameter": "year",
51
+ "setByQueryParameter": "year",
48
52
  "resetLabel": "- Select -",
49
53
  "showDropdown": true,
50
54
  "parents": [
@@ -129,4 +133,4 @@
129
133
  },
130
134
  "filterBehavior": "Apply Button",
131
135
  "type": "dashboard"
132
- }
136
+ }
@@ -0,0 +1,196 @@
1
+ {
2
+ "type": "dashboard",
3
+ "title": "TP5 Gauge Dashboard Example",
4
+ "description": "Three TP5 Gauge charts displaying health metrics",
5
+ "data": [
6
+ {
7
+ "Category": "Adults",
8
+ "Vaccination Rate": "68.5",
9
+ "Insured Rate": "87.2",
10
+ "Screening Rate": "72.8"
11
+ },
12
+ {
13
+ "Category": "Seniors",
14
+ "Vaccination Rate": "82.3",
15
+ "Insured Rate": "95.1",
16
+ "Screening Rate": "84.6"
17
+ },
18
+ {
19
+ "Category": "Youth",
20
+ "Vaccination Rate": "54.2",
21
+ "Insured Rate": "92.4",
22
+ "Screening Rate": "65.3"
23
+ }
24
+ ],
25
+ "dashboard": {
26
+ "filters": []
27
+ },
28
+ "rows": [
29
+ [
30
+ { "width": 4, "widget": "gauge1" },
31
+ { "width": 4, "widget": "gauge2" },
32
+ { "width": 4, "widget": "gauge3" }
33
+ ]
34
+ ],
35
+ "visualizations": {
36
+ "gauge1": {
37
+ "uid": "gauge1",
38
+ "type": "waffle-chart",
39
+ "title": "Vaccination Coverage",
40
+ "visualizationType": "TP5 Gauge",
41
+ "visualizationSubType": "linear",
42
+ "showPercent": true,
43
+ "showDenominator": false,
44
+ "valueDescription": "",
45
+ "content": "of the population is vaccinated against seasonal flu",
46
+ "subtext": "Based on 2024 CDC surveillance data across all age groups",
47
+ "dataColumn": "Vaccination Rate",
48
+ "dataFunction": "Mean (Average)",
49
+ "dataConditionalColumn": "",
50
+ "dataConditionalOperator": "",
51
+ "dataConditionalComparate": "",
52
+ "invalidComparate": false,
53
+ "customDenom": false,
54
+ "dataDenom": "100",
55
+ "dataDenomColumn": "",
56
+ "dataDenomFunction": "",
57
+ "prefix": "",
58
+ "suffix": "%",
59
+ "roundToPlace": "1",
60
+ "theme": "theme-blue",
61
+ "gauge": {
62
+ "height": 35,
63
+ "width": "100%"
64
+ },
65
+ "visual": {
66
+ "border": true,
67
+ "accent": false,
68
+ "background": false,
69
+ "hideBackgroundColor": false,
70
+ "borderColorTheme": false,
71
+ "whiteBackground": false,
72
+ "colors": {
73
+ "theme-blue": "#005eaa",
74
+ "theme-purple": "#712177",
75
+ "theme-brown": "#705043",
76
+ "theme-teal": "#00695c",
77
+ "theme-pink": "#af4448",
78
+ "theme-orange": "#bb4d00",
79
+ "theme-slate": "#29434e",
80
+ "theme-indigo": "#26418f",
81
+ "theme-cyan": "#006778",
82
+ "theme-green": "#4b830d",
83
+ "theme-amber": "#fbab18"
84
+ }
85
+ },
86
+ "showTitle": true,
87
+ "overallFontSize": "medium"
88
+ },
89
+ "gauge2": {
90
+ "uid": "gauge2",
91
+ "type": "waffle-chart",
92
+ "title": "Health Insurance Coverage Rate",
93
+ "visualizationType": "TP5 Gauge",
94
+ "visualizationSubType": "linear",
95
+ "showPercent": true,
96
+ "showDenominator": false,
97
+ "valueDescription": "",
98
+ "content": "",
99
+ "subtext": "",
100
+ "dataColumn": "Insured Rate",
101
+ "dataFunction": "Mean (Average)",
102
+ "dataConditionalColumn": "",
103
+ "dataConditionalOperator": "",
104
+ "dataConditionalComparate": "",
105
+ "invalidComparate": false,
106
+ "customDenom": false,
107
+ "dataDenom": "100",
108
+ "dataDenomColumn": "",
109
+ "dataDenomFunction": "",
110
+ "prefix": "",
111
+ "suffix": "%",
112
+ "roundToPlace": "1",
113
+ "theme": "theme-teal",
114
+ "gauge": {
115
+ "height": 35,
116
+ "width": "100%"
117
+ },
118
+ "visual": {
119
+ "border": true,
120
+ "accent": false,
121
+ "background": false,
122
+ "hideBackgroundColor": false,
123
+ "borderColorTheme": false,
124
+ "whiteBackground": false,
125
+ "colors": {
126
+ "theme-blue": "#005eaa",
127
+ "theme-purple": "#712177",
128
+ "theme-brown": "#705043",
129
+ "theme-teal": "#00695c",
130
+ "theme-pink": "#af4448",
131
+ "theme-orange": "#bb4d00",
132
+ "theme-slate": "#29434e",
133
+ "theme-indigo": "#26418f",
134
+ "theme-cyan": "#006778",
135
+ "theme-green": "#4b830d",
136
+ "theme-amber": "#fbab18"
137
+ }
138
+ },
139
+ "showTitle": true,
140
+ "overallFontSize": "medium"
141
+ },
142
+ "gauge3": {
143
+ "uid": "gauge3",
144
+ "type": "waffle-chart",
145
+ "title": "Cancer Screening Completion",
146
+ "visualizationType": "TP5 Gauge",
147
+ "visualizationSubType": "linear",
148
+ "showPercent": true,
149
+ "showDenominator": false,
150
+ "valueDescription": "",
151
+ "content": "completed recommended cancer screenings including mammography, colonoscopy, and cervical cancer screening",
152
+ "subtext": "Data from National Health Interview Survey 2024",
153
+ "dataColumn": "Screening Rate",
154
+ "dataFunction": "Mean (Average)",
155
+ "dataConditionalColumn": "",
156
+ "dataConditionalOperator": "",
157
+ "dataConditionalComparate": "",
158
+ "invalidComparate": false,
159
+ "customDenom": false,
160
+ "dataDenom": "100",
161
+ "dataDenomColumn": "",
162
+ "dataDenomFunction": "",
163
+ "prefix": "",
164
+ "suffix": "%",
165
+ "roundToPlace": "1",
166
+ "theme": "theme-purple",
167
+ "gauge": {
168
+ "height": 35,
169
+ "width": "100%"
170
+ },
171
+ "visual": {
172
+ "border": true,
173
+ "accent": false,
174
+ "background": false,
175
+ "hideBackgroundColor": false,
176
+ "borderColorTheme": false,
177
+ "whiteBackground": false,
178
+ "colors": {
179
+ "theme-blue": "#005eaa",
180
+ "theme-purple": "#712177",
181
+ "theme-brown": "#705043",
182
+ "theme-teal": "#00695c",
183
+ "theme-pink": "#af4448",
184
+ "theme-orange": "#bb4d00",
185
+ "theme-slate": "#29434e",
186
+ "theme-indigo": "#26418f",
187
+ "theme-cyan": "#006778",
188
+ "theme-green": "#4b830d",
189
+ "theme-amber": "#fbab18"
190
+ }
191
+ },
192
+ "showTitle": true,
193
+ "overallFontSize": "medium"
194
+ }
195
+ }
196
+ }
@@ -0,0 +1,266 @@
1
+ {
2
+ "type": "dashboard",
3
+ "title": "TP5 Alignment Test Dashboard",
4
+ "description": "Testing alignment of TP5 Waffles, Data Bites, and Gauges",
5
+ "data": [
6
+ {
7
+ "Category": "Adults",
8
+ "Vaccination Rate": "68.5",
9
+ "Insured Rate": "87.2",
10
+ "Screening Rate": "72.8"
11
+ },
12
+ {
13
+ "Category": "Seniors",
14
+ "Vaccination Rate": "82.3",
15
+ "Insured Rate": "95.1",
16
+ "Screening Rate": "84.6"
17
+ },
18
+ {
19
+ "Category": "Youth",
20
+ "Vaccination Rate": "54.2",
21
+ "Insured Rate": "92.4",
22
+ "Screening Rate": "65.3"
23
+ }
24
+ ],
25
+ "dashboard": {
26
+ "filters": []
27
+ },
28
+ "rows": [
29
+ [
30
+ { "width": 4, "widget": "waffle1" },
31
+ { "width": 4, "widget": "waffle2" },
32
+ { "width": 4, "widget": "waffle3" }
33
+ ],
34
+ [
35
+ { "width": 4, "widget": "bite1" },
36
+ { "width": 4, "widget": "bite2" },
37
+ { "width": 4, "widget": "bite3" }
38
+ ],
39
+ [
40
+ { "width": 4, "widget": "gauge1" },
41
+ { "width": 4, "widget": "gauge2" },
42
+ { "width": 4, "widget": "gauge3" }
43
+ ]
44
+ ],
45
+ "visualizations": {
46
+ "waffle1": {
47
+ "uid": "waffle1",
48
+ "type": "waffle-chart",
49
+ "title": "Vaccination Coverage",
50
+ "visualizationType": "TP5 Waffle",
51
+ "visualizationSubType": "linear",
52
+ "showPercent": true,
53
+ "showDenominator": false,
54
+ "valueDescription": "",
55
+ "content": "of the population is vaccinated against seasonal flu",
56
+ "subtext": "Based on 2024 CDC surveillance data across all age groups",
57
+ "dataColumn": "Vaccination Rate",
58
+ "dataFunction": "Mean (Average)",
59
+ "customDenom": false,
60
+ "dataDenom": "100",
61
+ "suffix": "%",
62
+ "roundToPlace": "1",
63
+ "theme": "theme-blue",
64
+ "shape": "square",
65
+ "visual": {
66
+ "whiteBackground": false
67
+ },
68
+ "showTitle": true,
69
+ "overallFontSize": "medium"
70
+ },
71
+ "waffle2": {
72
+ "uid": "waffle2",
73
+ "type": "waffle-chart",
74
+ "title": "Health Insurance Coverage Rate",
75
+ "visualizationType": "TP5 Waffle",
76
+ "visualizationSubType": "linear",
77
+ "showPercent": true,
78
+ "showDenominator": false,
79
+ "valueDescription": "",
80
+ "content": "completed recommended cancer screenings including mammography, colonoscopy, and cervical cancer screening",
81
+ "subtext": "",
82
+ "dataColumn": "Insured Rate",
83
+ "dataFunction": "Mean (Average)",
84
+ "customDenom": false,
85
+ "dataDenom": "100",
86
+ "suffix": "%",
87
+ "roundToPlace": "1",
88
+ "theme": "theme-teal",
89
+ "shape": "person",
90
+ "visual": {
91
+ "whiteBackground": false
92
+ },
93
+ "showTitle": true,
94
+ "overallFontSize": "medium"
95
+ },
96
+ "waffle3": {
97
+ "uid": "waffle3",
98
+ "type": "waffle-chart",
99
+ "title": "Cancer Screening Completion",
100
+ "visualizationType": "TP5 Waffle",
101
+ "visualizationSubType": "linear",
102
+ "showPercent": true,
103
+ "showDenominator": false,
104
+ "valueDescription": "",
105
+ "content": "completed recommended cancer screenings including mammography, colonoscopy, and cervical cancer screening",
106
+ "subtext": "Data from National Health Interview Survey 2024",
107
+ "dataColumn": "Screening Rate",
108
+ "dataFunction": "Mean (Average)",
109
+ "customDenom": false,
110
+ "dataDenom": "100",
111
+ "suffix": "%",
112
+ "roundToPlace": "1",
113
+ "theme": "theme-purple",
114
+ "shape": "circle",
115
+ "visual": {
116
+ "whiteBackground": false
117
+ },
118
+ "showTitle": true,
119
+ "overallFontSize": "medium"
120
+ },
121
+ "gauge1": {
122
+ "uid": "gauge1",
123
+ "type": "waffle-chart",
124
+ "title": "Vaccination Coverage",
125
+ "visualizationType": "TP5 Gauge",
126
+ "visualizationSubType": "linear",
127
+ "showPercent": true,
128
+ "showDenominator": false,
129
+ "valueDescription": "",
130
+ "content": "of the population is vaccinated against seasonal flu",
131
+ "subtext": "Based on 2024 CDC surveillance data across all age groups",
132
+ "dataColumn": "Vaccination Rate",
133
+ "dataFunction": "Mean (Average)",
134
+ "customDenom": false,
135
+ "dataDenom": "100",
136
+ "suffix": "%",
137
+ "roundToPlace": "1",
138
+ "theme": "theme-blue",
139
+ "gauge": {
140
+ "height": 35,
141
+ "width": "100%"
142
+ },
143
+ "visual": {
144
+ "whiteBackground": false
145
+ },
146
+ "showTitle": true,
147
+ "overallFontSize": "medium"
148
+ },
149
+ "gauge2": {
150
+ "uid": "gauge2",
151
+ "type": "waffle-chart",
152
+ "title": "Health Insurance Coverage Rate",
153
+ "visualizationType": "TP5 Gauge",
154
+ "visualizationSubType": "linear",
155
+ "showPercent": true,
156
+ "showDenominator": false,
157
+ "valueDescription": "",
158
+ "content": "",
159
+ "subtext": "",
160
+ "dataColumn": "Insured Rate",
161
+ "dataFunction": "Mean (Average)",
162
+ "customDenom": false,
163
+ "dataDenom": "100",
164
+ "suffix": "%",
165
+ "roundToPlace": "1",
166
+ "theme": "theme-teal",
167
+ "gauge": {
168
+ "height": 35,
169
+ "width": "100%"
170
+ },
171
+ "visual": {
172
+ "whiteBackground": false
173
+ },
174
+ "showTitle": true,
175
+ "overallFontSize": "medium"
176
+ },
177
+ "gauge3": {
178
+ "uid": "gauge3",
179
+ "type": "waffle-chart",
180
+ "title": "Cancer Screening Completion",
181
+ "visualizationType": "TP5 Gauge",
182
+ "visualizationSubType": "linear",
183
+ "showPercent": true,
184
+ "showDenominator": false,
185
+ "valueDescription": "",
186
+ "content": "completed recommended cancer screenings including mammography, colonoscopy, and cervical cancer screening",
187
+ "subtext": "Data from National Health Interview Survey 2024",
188
+ "dataColumn": "Screening Rate",
189
+ "dataFunction": "Mean (Average)",
190
+ "customDenom": false,
191
+ "dataDenom": "100",
192
+ "suffix": "%",
193
+ "roundToPlace": "1",
194
+ "theme": "theme-purple",
195
+ "gauge": {
196
+ "height": 35,
197
+ "width": "100%"
198
+ },
199
+ "visual": {
200
+ "whiteBackground": false
201
+ },
202
+ "showTitle": true,
203
+ "overallFontSize": "medium"
204
+ },
205
+ "bite1": {
206
+ "uid": "bite1",
207
+ "type": "data-bite",
208
+ "title": "Vaccination Coverage",
209
+ "biteStyle": "tp5",
210
+ "dataColumn": "Vaccination Rate",
211
+ "dataFunction": "Mean (Average)",
212
+ "biteBody": "of the population is vaccinated against seasonal flu",
213
+ "subtext": "Based on 2024 CDC surveillance data across all age groups",
214
+ "dataFormat": {
215
+ "roundToPlace": 1,
216
+ "commas": true,
217
+ "prefix": "",
218
+ "suffix": "%"
219
+ },
220
+ "theme": "theme-blue",
221
+ "visual": {
222
+ "hideBackgroundColor": false
223
+ }
224
+ },
225
+ "bite2": {
226
+ "uid": "bite2",
227
+ "type": "data-bite",
228
+ "title": "Health Insurance Coverage Rate",
229
+ "biteStyle": "tp5",
230
+ "dataColumn": "Insured Rate",
231
+ "dataFunction": "Mean (Average)",
232
+ "biteBody": "",
233
+ "subtext": "",
234
+ "dataFormat": {
235
+ "roundToPlace": 1,
236
+ "commas": true,
237
+ "prefix": "",
238
+ "suffix": "%"
239
+ },
240
+ "theme": "theme-teal",
241
+ "visual": {
242
+ "hideBackgroundColor": false
243
+ }
244
+ },
245
+ "bite3": {
246
+ "uid": "bite3",
247
+ "type": "data-bite",
248
+ "title": "Cancer Screening Completion",
249
+ "biteStyle": "tp5",
250
+ "dataColumn": "Screening Rate",
251
+ "dataFunction": "Mean (Average)",
252
+ "biteBody": "completed recommended cancer screenings including mammography, colonoscopy, and cervical cancer screening",
253
+ "subtext": "Data from National Health Interview Survey 2024",
254
+ "dataFormat": {
255
+ "roundToPlace": 1,
256
+ "commas": true,
257
+ "prefix": "",
258
+ "suffix": "%"
259
+ },
260
+ "theme": "theme-purple",
261
+ "visual": {
262
+ "hideBackgroundColor": false
263
+ }
264
+ }
265
+ }
266
+ }
package/index.html CHANGED
@@ -1,29 +1 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
6
- <style>
7
- body {
8
- margin: 0 auto !important;
9
- display: flex;
10
- flex-direction: column;
11
- justify-content: center;
12
- min-height: unset !important;
13
- }
14
-
15
- /* Add 1rem padding to mimic DFE when editor is not visible */
16
- .cdc-open-viz-module.type-dashboard:not(.isDashboardEditor) {
17
- padding: 1rem;
18
- }
19
- </style>
20
- <link rel="stylesheet prefetch" href="examples/custom/css/respiratory.css" />
21
- <link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/5.0/css/app.min.css?_=71669" />
22
- </head>
23
-
24
- <body>
25
- <div class="react-container" data-config="/examples/dashboard-gallery.json"></div>
26
- <script src="https://www.cdc.gov/TemplatePackage/contrib/libs/jquery/latest/jquery.min.js?_=91329"></script>
27
- <script type="module" src="./src/index.tsx"></script>
28
- </body>
29
- </html>
1
+ <!-- index.html is generated by @cdc/core/generateViteConfig.js using the files in @cdc/core/devTemplate/ -->
package/package.json CHANGED
@@ -1,55 +1,53 @@
1
1
  {
2
2
  "name": "@cdc/dashboard",
3
- "version": "4.26.1",
3
+ "version": "4.26.3",
4
4
  "description": "React component for combining multiple visualizations into a single dashboard",
5
- "moduleName": "CdcDashboard",
6
- "main": "dist/cdcdashboard",
7
- "type": "module",
8
- "scripts": {
9
- "start": "vite --open",
10
- "build": "vite build",
11
- "preview": "vite preview",
12
- "graph": "nx graph",
13
- "prepublishOnly": "lerna run --scope @cdc/dashboard build",
14
- "test": "vitest run --reporter verbose",
15
- "test-watch": "vitest watch --reporter verbose",
16
- "test-watch:ui": "vitest --ui",
17
- "coverage": "vitest run --coverage"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/CDCgov/cdc-open-viz",
22
- "directory": "packages/dashboard"
23
- },
24
- "author": "Matthew Pallansch <mpallansch@adittech.com>",
25
- "bugs": {
26
- "url": "https://github.com/CDCgov/cdc-open-viz/issues"
27
- },
28
5
  "license": "Apache-2.0",
6
+ "author": "Matthew Pallansch <mpallansch@adittech.com>",
7
+ "bugs": "https://github.com/CDCgov/cdc-open-viz/issues",
29
8
  "dependencies": {
30
- "@cdc/chart": "^4.26.1",
31
- "@cdc/core": "^4.26.1",
32
- "@cdc/data-bite": "^4.26.1",
33
- "@cdc/filtered-text": "^4.26.1",
34
- "@cdc/map": "^4.26.1",
35
- "@cdc/markup-include": "^4.26.1",
36
- "@cdc/waffle-chart": "^4.26.1",
9
+ "@cdc/chart": "^4.26.3",
10
+ "@cdc/core": "^4.26.3",
11
+ "@cdc/data-bite": "^4.26.3",
12
+ "@cdc/filtered-text": "^4.26.3",
13
+ "@cdc/map": "^4.26.3",
14
+ "@cdc/markup-include": "^4.26.3",
15
+ "@cdc/waffle-chart": "^4.26.3",
37
16
  "js-base64": "^2.5.2",
38
17
  "react-accessible-accordion": "^5.0.1",
39
- "react-dnd": "^14.0.2",
40
- "react-dnd-html5-backend": "^14.0.0",
41
- "use-debounce": "^6.0.1"
42
- },
43
- "peerDependencies": {
44
- "react": "^18.2.0",
45
- "react-dom": "^18.2.0"
18
+ "react-dnd": "^16.0.1",
19
+ "react-dnd-html5-backend": "^16.0.1",
20
+ "use-debounce": "^10.1.0"
46
21
  },
47
22
  "devDependencies": {
48
23
  "@rollup/plugin-dsv": "^3.0.2",
49
- "@vitejs/plugin-react": "^4.3.4",
24
+ "@vitejs/plugin-react": "^5.1.2",
50
25
  "sass": "^1.89.2",
51
26
  "vite-plugin-css-injected-by-js": "^2.4.0",
52
27
  "vite-plugin-svgr": "^4.2.0"
53
28
  },
54
- "gitHead": "7e3b27098c4eb7a24bc9c3654ad53f88d6419f16"
29
+ "gitHead": "d50e45a074fbefa56cac904917e707d57f237737",
30
+ "main": "dist/cdcdashboard",
31
+ "moduleName": "CdcDashboard",
32
+ "peerDependencies": {
33
+ "react": "^18.2.0",
34
+ "react-dom": "^18.2.0"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/CDCgov/cdc-open-viz",
39
+ "directory": "packages/dashboard"
40
+ },
41
+ "scripts": {
42
+ "build": "vite build",
43
+ "coverage": "vitest run --coverage",
44
+ "graph": "nx graph",
45
+ "prepublishOnly": "lerna run --scope @cdc/dashboard build",
46
+ "preview": "vite preview",
47
+ "start": "vite --open",
48
+ "test": "vitest run --reporter verbose",
49
+ "test-watch": "vitest watch --reporter verbose",
50
+ "test-watch:ui": "vitest --ui"
51
+ },
52
+ "type": "module"
55
53
  }
@@ -91,11 +91,12 @@ const MultiDashboardWrapper: React.FC<MultiDashboardProps> = ({
91
91
  return prepareDatasets(newConfig)
92
92
  } else {
93
93
  const dataKey = newConfig.dataFileName || 'backwards-compatibility'
94
- const data = await processDataLegacy(config)
94
+ const { data, dataMetadata } = await processDataLegacy(config)
95
95
 
96
96
  const datasetsFull = {}
97
97
  datasetsFull[dataKey] = {
98
98
  data,
99
+ dataMetadata,
99
100
  dataDescription: newConfig.dataDescription
100
101
  }
101
102
  newConfig.datasets = datasetsFull