@cdc/dashboard 4.25.10 → 4.26.1

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 (86) hide show
  1. package/Dynamic_Data.md +66 -0
  2. package/dist/{cdcdashboard-fce76882.es.js → cdcdashboard-BnB1QM5d.es.js} +6 -13
  3. package/dist/{cdcdashboard-c55ac1ea.es.js → cdcdashboard-D6CG2-Hb.es.js} +5 -12
  4. package/dist/{cdcdashboard-31a33da1.es.js → cdcdashboard-MXgURbdZ.es.js} +6 -13
  5. package/dist/{cdcdashboard-1a1724a1.es.js → cdcdashboard-dgT_1dIT.es.js} +136 -151
  6. package/dist/cdcdashboard.js +84214 -79641
  7. package/examples/api-dashboard-data.json +272 -0
  8. package/examples/api-dashboard-years.json +11 -0
  9. package/examples/api-geographies-data.json +11 -0
  10. package/examples/api-test/categories.json +18 -0
  11. package/examples/api-test/chart-data.json +602 -0
  12. package/examples/api-test/topics.json +47 -0
  13. package/examples/api-test/years.json +22 -0
  14. package/examples/markup-axis-label.json +4167 -0
  15. package/examples/private/big-dashboard.json +39095 -39077
  16. package/examples/private/cat-y.json +1235 -0
  17. package/examples/private/chronic-dash.json +1584 -0
  18. package/examples/private/clade-2.json +430 -0
  19. package/examples/private/diabetes.json +546 -196
  20. package/examples/private/map-issue.json +2260 -0
  21. package/examples/private/markup-footer/mortality-deaths-footnotes-age.csv +3 -0
  22. package/examples/private/mpinc-state-reports.json +2260 -0
  23. package/examples/private/mpox.json +38128 -0
  24. package/examples/private/nwss/rsv.json +1240 -0
  25. package/examples/private/reset.json +32920 -0
  26. package/examples/private/simple-dash.json +490 -0
  27. package/examples/private/test-dash.json +0 -0
  28. package/examples/private/test123.json +491 -0
  29. package/examples/test-api-filter-reset.json +132 -0
  30. package/examples/test-dashboard-simple.json +503 -0
  31. package/index.html +25 -26
  32. package/package.json +11 -11
  33. package/src/CdcDashboardComponent.tsx +35 -10
  34. package/src/DashboardContext.tsx +3 -1
  35. package/src/_stories/Dashboard.DataSetup.stories.tsx +203 -0
  36. package/src/_stories/Dashboard.stories.tsx +402 -1
  37. package/src/_stories/_mock/custom-order-new-values.json +116 -0
  38. package/src/_stories/_mock/filter-cascade.json +3350 -0
  39. package/src/_stories/_mock/gallery-data-bite-dashboard.json +3500 -0
  40. package/src/_stories/_mock/nested-parent-child-filters.json +392 -0
  41. package/src/_stories/_mock/parent-child-filters.json +233 -0
  42. package/src/components/DashboardFilters/DashboardFilters.tsx +54 -31
  43. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +118 -50
  44. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +96 -108
  45. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +196 -59
  46. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +129 -29
  47. package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +62 -3
  48. package/src/components/DataDesignerModal.tsx +18 -6
  49. package/src/components/Header/Header.tsx +53 -21
  50. package/src/components/Toggle/Toggle.tsx +48 -48
  51. package/src/components/VisualizationRow.tsx +73 -6
  52. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +2 -3
  53. package/src/components/Widget/Widget.tsx +1 -1
  54. package/src/data/initial-state.js +1 -0
  55. package/src/helpers/addValuesToDashboardFilters.ts +24 -6
  56. package/src/helpers/apiFilterHelpers.ts +26 -2
  57. package/src/helpers/changeFilterActive.ts +67 -65
  58. package/src/helpers/filterData.ts +52 -7
  59. package/src/helpers/filterResetHelpers.ts +102 -0
  60. package/src/helpers/formatConfigBeforeSave.ts +6 -5
  61. package/src/helpers/getUpdateConfig.ts +91 -91
  62. package/src/helpers/getVizConfig.ts +2 -2
  63. package/src/helpers/loadAPIFilters.ts +109 -99
  64. package/src/helpers/tests/filterResetHelpers.test.ts +532 -0
  65. package/src/helpers/tests/updatesChildFilters.test.ts +53 -22
  66. package/src/helpers/updateChildFilters.ts +50 -27
  67. package/src/index.tsx +1 -0
  68. package/src/scss/editor-panel.scss +3 -431
  69. package/src/scss/main.scss +142 -25
  70. package/src/store/errorMessage/errorMessage.reducer.ts +1 -1
  71. package/src/test/CdcDashboard.test.jsx +9 -4
  72. package/src/types/Dashboard.ts +1 -0
  73. package/src/types/DashboardFilters.ts +9 -8
  74. package/src/types/FilterStyles.ts +8 -7
  75. package/src/types/SharedFilter.ts +13 -0
  76. package/LICENSE +0 -201
  77. package/examples/private/DEV-11072.json +0 -7591
  78. package/examples/private/burden_toolkit_mortality_diabetes_attributable_deaths_data.csv +0 -14041
  79. package/examples/private/burden_toolkit_mortality_diabetes_attributable_deaths_per_100000_data.csv +0 -14041
  80. package/examples/private/burden_toolkit_mortality_qaly_data.csv +0 -18721
  81. package/examples/private/burden_toolkit_mortality_yll_data.csv +0 -18721
  82. package/examples/private/pedro.json +0 -1
  83. package/src/helpers/getAutoLoadVisualization.ts +0 -11
  84. package/src/scss/mixins.scss +0 -47
  85. package/src/scss/variables.scss +0 -5
  86. /package/dist/{cdcdashboard-548642e6.es.js → cdcdashboard-Ct2SB0vL.es.js} +0 -0
@@ -0,0 +1,272 @@
1
+ [
2
+ {
3
+ "geography": "United States",
4
+ "year": "2021",
5
+ "category": "Category A",
6
+ "value": 100
7
+ },
8
+ {
9
+ "geography": "United States",
10
+ "year": "2021",
11
+ "category": "Category B",
12
+ "value": 200
13
+ },
14
+ {
15
+ "geography": "United States",
16
+ "year": "2021",
17
+ "category": "Category C",
18
+ "value": 300
19
+ },
20
+ {
21
+ "geography": "United States",
22
+ "year": "2022",
23
+ "category": "Category A",
24
+ "value": 400
25
+ },
26
+ {
27
+ "geography": "United States",
28
+ "year": "2022",
29
+ "category": "Category B",
30
+ "value": 500
31
+ },
32
+ {
33
+ "geography": "United States",
34
+ "year": "2022",
35
+ "category": "Category C",
36
+ "value": 600
37
+ },
38
+ {
39
+ "geography": "United States",
40
+ "year": "2023",
41
+ "category": "Category A",
42
+ "value": 700
43
+ },
44
+ {
45
+ "geography": "United States",
46
+ "year": "2023",
47
+ "category": "Category B",
48
+ "value": 800
49
+ },
50
+ {
51
+ "geography": "United States",
52
+ "year": "2023",
53
+ "category": "Category C",
54
+ "value": 900
55
+ },
56
+ {
57
+ "geography": "California",
58
+ "year": "2021",
59
+ "category": "Category A",
60
+ "value": 1000
61
+ },
62
+ {
63
+ "geography": "California",
64
+ "year": "2021",
65
+ "category": "Category B",
66
+ "value": 2000
67
+ },
68
+ {
69
+ "geography": "California",
70
+ "year": "2021",
71
+ "category": "Category C",
72
+ "value": 3000
73
+ },
74
+ {
75
+ "geography": "California",
76
+ "year": "2022",
77
+ "category": "Category A",
78
+ "value": 4000
79
+ },
80
+ {
81
+ "geography": "California",
82
+ "year": "2022",
83
+ "category": "Category B",
84
+ "value": 5000
85
+ },
86
+ {
87
+ "geography": "California",
88
+ "year": "2022",
89
+ "category": "Category C",
90
+ "value": 6000
91
+ },
92
+ {
93
+ "geography": "California",
94
+ "year": "2023",
95
+ "category": "Category A",
96
+ "value": 7000
97
+ },
98
+ {
99
+ "geography": "California",
100
+ "year": "2023",
101
+ "category": "Category B",
102
+ "value": 8000
103
+ },
104
+ {
105
+ "geography": "California",
106
+ "year": "2023",
107
+ "category": "Category C",
108
+ "value": 9000
109
+ },
110
+ {
111
+ "geography": "Texas",
112
+ "year": "2021",
113
+ "category": "Category A",
114
+ "value": 10000
115
+ },
116
+ {
117
+ "geography": "Texas",
118
+ "year": "2021",
119
+ "category": "Category B",
120
+ "value": 20000
121
+ },
122
+ {
123
+ "geography": "Texas",
124
+ "year": "2021",
125
+ "category": "Category C",
126
+ "value": 30000
127
+ },
128
+ {
129
+ "geography": "Texas",
130
+ "year": "2022",
131
+ "category": "Category A",
132
+ "value": 40000
133
+ },
134
+ {
135
+ "geography": "Texas",
136
+ "year": "2022",
137
+ "category": "Category B",
138
+ "value": 50000
139
+ },
140
+ {
141
+ "geography": "Texas",
142
+ "year": "2022",
143
+ "category": "Category C",
144
+ "value": 60000
145
+ },
146
+ {
147
+ "geography": "Texas",
148
+ "year": "2023",
149
+ "category": "Category A",
150
+ "value": 70000
151
+ },
152
+ {
153
+ "geography": "Texas",
154
+ "year": "2023",
155
+ "category": "Category B",
156
+ "value": 80000
157
+ },
158
+ {
159
+ "geography": "Texas",
160
+ "year": "2023",
161
+ "category": "Category C",
162
+ "value": 90000
163
+ },
164
+ {
165
+ "geography": "New York",
166
+ "year": "2021",
167
+ "category": "Category A",
168
+ "value": 15000
169
+ },
170
+ {
171
+ "geography": "New York",
172
+ "year": "2021",
173
+ "category": "Category B",
174
+ "value": 25000
175
+ },
176
+ {
177
+ "geography": "New York",
178
+ "year": "2021",
179
+ "category": "Category C",
180
+ "value": 35000
181
+ },
182
+ {
183
+ "geography": "New York",
184
+ "year": "2022",
185
+ "category": "Category A",
186
+ "value": 45000
187
+ },
188
+ {
189
+ "geography": "New York",
190
+ "year": "2022",
191
+ "category": "Category B",
192
+ "value": 55000
193
+ },
194
+ {
195
+ "geography": "New York",
196
+ "year": "2022",
197
+ "category": "Category C",
198
+ "value": 65000
199
+ },
200
+ {
201
+ "geography": "New York",
202
+ "year": "2023",
203
+ "category": "Category A",
204
+ "value": 75000
205
+ },
206
+ {
207
+ "geography": "New York",
208
+ "year": "2023",
209
+ "category": "Category B",
210
+ "value": 85000
211
+ },
212
+ {
213
+ "geography": "New York",
214
+ "year": "2023",
215
+ "category": "Category C",
216
+ "value": 95000
217
+ },
218
+ {
219
+ "geography": "Florida",
220
+ "year": "2021",
221
+ "category": "Category A",
222
+ "value": 12000
223
+ },
224
+ {
225
+ "geography": "Florida",
226
+ "year": "2021",
227
+ "category": "Category B",
228
+ "value": 22000
229
+ },
230
+ {
231
+ "geography": "Florida",
232
+ "year": "2021",
233
+ "category": "Category C",
234
+ "value": 32000
235
+ },
236
+ {
237
+ "geography": "Florida",
238
+ "year": "2022",
239
+ "category": "Category A",
240
+ "value": 42000
241
+ },
242
+ {
243
+ "geography": "Florida",
244
+ "year": "2022",
245
+ "category": "Category B",
246
+ "value": 52000
247
+ },
248
+ {
249
+ "geography": "Florida",
250
+ "year": "2022",
251
+ "category": "Category C",
252
+ "value": 62000
253
+ },
254
+ {
255
+ "geography": "Florida",
256
+ "year": "2023",
257
+ "category": "Category A",
258
+ "value": 72000
259
+ },
260
+ {
261
+ "geography": "Florida",
262
+ "year": "2023",
263
+ "category": "Category B",
264
+ "value": 82000
265
+ },
266
+ {
267
+ "geography": "Florida",
268
+ "year": "2023",
269
+ "category": "Category C",
270
+ "value": 92000
271
+ }
272
+ ]
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "year": "2021"
4
+ },
5
+ {
6
+ "year": "2022"
7
+ },
8
+ {
9
+ "year": "2023"
10
+ }
11
+ ]
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "geography": "California"
4
+ },
5
+ {
6
+ "geography": "Texas"
7
+ },
8
+ {
9
+ "geography": "United States"
10
+ }
11
+ ]
@@ -0,0 +1,18 @@
1
+ [
2
+ {
3
+ "category": "Health Risk Behaviors",
4
+ "category_id": "1"
5
+ },
6
+ {
7
+ "category": "Chronic Diseases",
8
+ "category_id": "2"
9
+ },
10
+ {
11
+ "category": "Preventive Services",
12
+ "category_id": "3"
13
+ },
14
+ {
15
+ "category": "Demographics",
16
+ "category_id": "4"
17
+ }
18
+ ]