@cdc/dashboard 4.25.10 → 4.25.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 (56) hide show
  1. package/dist/{cdcdashboard-fce76882.es.js → cdcdashboard-BnB1QM5d.es.js} +6 -13
  2. package/dist/{cdcdashboard-c55ac1ea.es.js → cdcdashboard-D6CG2-Hb.es.js} +5 -12
  3. package/dist/{cdcdashboard-31a33da1.es.js → cdcdashboard-MXgURbdZ.es.js} +6 -13
  4. package/dist/{cdcdashboard-1a1724a1.es.js → cdcdashboard-dgT_1dIT.es.js} +136 -151
  5. package/dist/cdcdashboard.js +48574 -46414
  6. package/examples/api-test/categories.json +18 -0
  7. package/examples/api-test/chart-data.json +602 -0
  8. package/examples/api-test/topics.json +47 -0
  9. package/examples/api-test/years.json +22 -0
  10. package/examples/markup-axis-label.json +4167 -0
  11. package/examples/private/DEV-10538.json +407 -0
  12. package/examples/private/DEV-11405.json +39112 -0
  13. package/examples/private/big-dashboard.json +39095 -39077
  14. package/examples/private/clade-2.json +430 -0
  15. package/examples/private/delete.json +32919 -0
  16. package/examples/private/diabetes.json +546 -196
  17. package/examples/private/markup-footer/mortality-deaths-footnotes-age.csv +3 -0
  18. package/examples/private/mpox.json +38128 -0
  19. package/examples/private/reset.json +32920 -0
  20. package/examples/test-api-filter-reset.json +132 -0
  21. package/index.html +2 -2
  22. package/package.json +9 -10
  23. package/src/CdcDashboardComponent.tsx +17 -8
  24. package/src/DashboardContext.tsx +3 -1
  25. package/src/_stories/Dashboard.stories.tsx +17 -0
  26. package/src/_stories/_mock/custom-order-new-values.json +116 -0
  27. package/src/components/DashboardFilters/DashboardFilters.tsx +34 -20
  28. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +29 -12
  29. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +77 -111
  30. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +51 -51
  31. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +120 -24
  32. package/src/components/DashboardFilters/_stories/DashboardFilters.stories.tsx +62 -3
  33. package/src/components/DataDesignerModal.tsx +12 -5
  34. package/src/components/Header/Header.tsx +10 -9
  35. package/src/components/Toggle/Toggle.tsx +48 -48
  36. package/src/components/VisualizationRow.tsx +4 -3
  37. package/src/helpers/addValuesToDashboardFilters.ts +29 -4
  38. package/src/helpers/apiFilterHelpers.ts +26 -2
  39. package/src/helpers/filterData.ts +52 -7
  40. package/src/helpers/filterResetHelpers.ts +102 -0
  41. package/src/helpers/getVizConfig.ts +2 -2
  42. package/src/helpers/loadAPIFilters.ts +109 -99
  43. package/src/helpers/tests/filterResetHelpers.test.ts +532 -0
  44. package/src/index.tsx +1 -0
  45. package/src/scss/editor-panel.scss +3 -431
  46. package/src/scss/main.scss +1 -24
  47. package/src/store/errorMessage/errorMessage.reducer.ts +1 -1
  48. package/src/types/DashboardFilters.ts +9 -8
  49. package/examples/private/burden_toolkit_mortality_diabetes_attributable_deaths_data.csv +0 -14041
  50. package/examples/private/burden_toolkit_mortality_diabetes_attributable_deaths_per_100000_data.csv +0 -14041
  51. package/examples/private/burden_toolkit_mortality_qaly_data.csv +0 -18721
  52. package/examples/private/burden_toolkit_mortality_yll_data.csv +0 -18721
  53. package/src/helpers/getAutoLoadVisualization.ts +0 -11
  54. package/src/scss/mixins.scss +0 -47
  55. package/src/scss/variables.scss +0 -5
  56. /package/dist/{cdcdashboard-548642e6.es.js → cdcdashboard-Ct2SB0vL.es.js} +0 -0
@@ -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
+ ]
@@ -0,0 +1,602 @@
1
+ [
2
+ {
3
+ "category": "Health Risk Behaviors",
4
+ "topic": "Tobacco Use",
5
+ "year": "2020",
6
+ "state": "Alabama",
7
+ "value": 23.2,
8
+ "population": 4903185
9
+ },
10
+ {
11
+ "category": "Health Risk Behaviors",
12
+ "topic": "Tobacco Use",
13
+ "year": "2020",
14
+ "state": "Alaska",
15
+ "value": 21.5,
16
+ "population": 731545
17
+ },
18
+ {
19
+ "category": "Health Risk Behaviors",
20
+ "topic": "Tobacco Use",
21
+ "year": "2020",
22
+ "state": "Arizona",
23
+ "value": 17.3,
24
+ "population": 7151502
25
+ },
26
+ {
27
+ "category": "Health Risk Behaviors",
28
+ "topic": "Tobacco Use",
29
+ "year": "2020",
30
+ "state": "California",
31
+ "value": 12.8,
32
+ "population": 39538223
33
+ },
34
+ {
35
+ "category": "Health Risk Behaviors",
36
+ "topic": "Tobacco Use",
37
+ "year": "2020",
38
+ "state": "Florida",
39
+ "value": 18.1,
40
+ "population": 21538187
41
+ },
42
+ {
43
+ "category": "Health Risk Behaviors",
44
+ "topic": "Tobacco Use",
45
+ "year": "2021",
46
+ "state": "Alabama",
47
+ "value": 22.8,
48
+ "population": 4963095
49
+ },
50
+ {
51
+ "category": "Health Risk Behaviors",
52
+ "topic": "Tobacco Use",
53
+ "year": "2021",
54
+ "state": "Alaska",
55
+ "value": 21.1,
56
+ "population": 732673
57
+ },
58
+ {
59
+ "category": "Health Risk Behaviors",
60
+ "topic": "Tobacco Use",
61
+ "year": "2021",
62
+ "state": "Arizona",
63
+ "value": 16.9,
64
+ "population": 7151502
65
+ },
66
+ {
67
+ "category": "Health Risk Behaviors",
68
+ "topic": "Tobacco Use",
69
+ "year": "2021",
70
+ "state": "California",
71
+ "value": 12.1,
72
+ "population": 39538223
73
+ },
74
+ {
75
+ "category": "Health Risk Behaviors",
76
+ "topic": "Tobacco Use",
77
+ "year": "2021",
78
+ "state": "Florida",
79
+ "value": 17.5,
80
+ "population": 21538187
81
+ },
82
+ {
83
+ "category": "Health Risk Behaviors",
84
+ "topic": "Tobacco Use",
85
+ "year": "2022",
86
+ "state": "Alabama",
87
+ "value": 22.1,
88
+ "population": 5024279
89
+ },
90
+ {
91
+ "category": "Health Risk Behaviors",
92
+ "topic": "Tobacco Use",
93
+ "year": "2022",
94
+ "state": "Alaska",
95
+ "value": 20.4,
96
+ "population": 733391
97
+ },
98
+ {
99
+ "category": "Health Risk Behaviors",
100
+ "topic": "Tobacco Use",
101
+ "year": "2022",
102
+ "state": "Arizona",
103
+ "value": 16.2,
104
+ "population": 7151502
105
+ },
106
+ {
107
+ "category": "Health Risk Behaviors",
108
+ "topic": "Tobacco Use",
109
+ "year": "2022",
110
+ "state": "California",
111
+ "value": 11.7,
112
+ "population": 39538223
113
+ },
114
+ {
115
+ "category": "Health Risk Behaviors",
116
+ "topic": "Tobacco Use",
117
+ "year": "2022",
118
+ "state": "Florida",
119
+ "value": 17.0,
120
+ "population": 21538187
121
+ },
122
+ {
123
+ "category": "Health Risk Behaviors",
124
+ "topic": "Tobacco Use",
125
+ "year": "2023",
126
+ "state": "Alabama",
127
+ "value": 21.5,
128
+ "population": 5024279
129
+ },
130
+ {
131
+ "category": "Health Risk Behaviors",
132
+ "topic": "Tobacco Use",
133
+ "year": "2023",
134
+ "state": "Alaska",
135
+ "value": 19.8,
136
+ "population": 733391
137
+ },
138
+ {
139
+ "category": "Health Risk Behaviors",
140
+ "topic": "Tobacco Use",
141
+ "year": "2023",
142
+ "state": "Arizona",
143
+ "value": 15.6,
144
+ "population": 7151502
145
+ },
146
+ {
147
+ "category": "Health Risk Behaviors",
148
+ "topic": "Tobacco Use",
149
+ "year": "2023",
150
+ "state": "California",
151
+ "value": 11.3,
152
+ "population": 39538223
153
+ },
154
+ {
155
+ "category": "Health Risk Behaviors",
156
+ "topic": "Tobacco Use",
157
+ "year": "2023",
158
+ "state": "Florida",
159
+ "value": 16.4,
160
+ "population": 21538187
161
+ },
162
+ {
163
+ "category": "Health Risk Behaviors",
164
+ "topic": "Tobacco Use",
165
+ "year": "2024",
166
+ "state": "Alabama",
167
+ "value": 20.9,
168
+ "population": 5024279
169
+ },
170
+ {
171
+ "category": "Health Risk Behaviors",
172
+ "topic": "Tobacco Use",
173
+ "year": "2024",
174
+ "state": "Alaska",
175
+ "value": 19.2,
176
+ "population": 733391
177
+ },
178
+ {
179
+ "category": "Health Risk Behaviors",
180
+ "topic": "Tobacco Use",
181
+ "year": "2024",
182
+ "state": "Arizona",
183
+ "value": 15.1,
184
+ "population": 7151502
185
+ },
186
+ {
187
+ "category": "Health Risk Behaviors",
188
+ "topic": "Tobacco Use",
189
+ "year": "2024",
190
+ "state": "California",
191
+ "value": 10.9,
192
+ "population": 39538223
193
+ },
194
+ {
195
+ "category": "Health Risk Behaviors",
196
+ "topic": "Tobacco Use",
197
+ "year": "2024",
198
+ "state": "Florida",
199
+ "value": 15.9,
200
+ "population": 21538187
201
+ },
202
+ {
203
+ "category": "Health Risk Behaviors",
204
+ "topic": "Physical Activity",
205
+ "year": "2020",
206
+ "state": "Alabama",
207
+ "value": 30.5,
208
+ "population": 4903185
209
+ },
210
+ {
211
+ "category": "Health Risk Behaviors",
212
+ "topic": "Physical Activity",
213
+ "year": "2020",
214
+ "state": "Alaska",
215
+ "value": 26.3,
216
+ "population": 731545
217
+ },
218
+ {
219
+ "category": "Health Risk Behaviors",
220
+ "topic": "Physical Activity",
221
+ "year": "2020",
222
+ "state": "Arizona",
223
+ "value": 27.9,
224
+ "population": 7151502
225
+ },
226
+ {
227
+ "category": "Health Risk Behaviors",
228
+ "topic": "Physical Activity",
229
+ "year": "2020",
230
+ "state": "California",
231
+ "value": 24.8,
232
+ "population": 39538223
233
+ },
234
+ {
235
+ "category": "Health Risk Behaviors",
236
+ "topic": "Physical Activity",
237
+ "year": "2020",
238
+ "state": "Florida",
239
+ "value": 28.7,
240
+ "population": 21538187
241
+ },
242
+ {
243
+ "category": "Health Risk Behaviors",
244
+ "topic": "Physical Activity",
245
+ "year": "2021",
246
+ "state": "Alabama",
247
+ "value": 29.8,
248
+ "population": 4963095
249
+ },
250
+ {
251
+ "category": "Health Risk Behaviors",
252
+ "topic": "Physical Activity",
253
+ "year": "2021",
254
+ "state": "Alaska",
255
+ "value": 25.7,
256
+ "population": 732673
257
+ },
258
+ {
259
+ "category": "Health Risk Behaviors",
260
+ "topic": "Physical Activity",
261
+ "year": "2021",
262
+ "state": "Arizona",
263
+ "value": 27.2,
264
+ "population": 7151502
265
+ },
266
+ {
267
+ "category": "Health Risk Behaviors",
268
+ "topic": "Physical Activity",
269
+ "year": "2021",
270
+ "state": "California",
271
+ "value": 24.1,
272
+ "population": 39538223
273
+ },
274
+ {
275
+ "category": "Health Risk Behaviors",
276
+ "topic": "Physical Activity",
277
+ "year": "2021",
278
+ "state": "Florida",
279
+ "value": 28.2,
280
+ "population": 21538187
281
+ },
282
+ {
283
+ "category": "Health Risk Behaviors",
284
+ "topic": "Physical Activity",
285
+ "year": "2022",
286
+ "state": "Alabama",
287
+ "value": 29.1,
288
+ "population": 5024279
289
+ },
290
+ {
291
+ "category": "Health Risk Behaviors",
292
+ "topic": "Physical Activity",
293
+ "year": "2022",
294
+ "state": "Alaska",
295
+ "value": 25.0,
296
+ "population": 733391
297
+ },
298
+ {
299
+ "category": "Health Risk Behaviors",
300
+ "topic": "Physical Activity",
301
+ "year": "2022",
302
+ "state": "Arizona",
303
+ "value": 26.5,
304
+ "population": 7151502
305
+ },
306
+ {
307
+ "category": "Health Risk Behaviors",
308
+ "topic": "Physical Activity",
309
+ "year": "2022",
310
+ "state": "California",
311
+ "value": 23.5,
312
+ "population": 39538223
313
+ },
314
+ {
315
+ "category": "Health Risk Behaviors",
316
+ "topic": "Physical Activity",
317
+ "year": "2022",
318
+ "state": "Florida",
319
+ "value": 27.6,
320
+ "population": 21538187
321
+ },
322
+ {
323
+ "category": "Health Risk Behaviors",
324
+ "topic": "Physical Activity",
325
+ "year": "2023",
326
+ "state": "Alabama",
327
+ "value": 28.3,
328
+ "population": 5024279
329
+ },
330
+ {
331
+ "category": "Health Risk Behaviors",
332
+ "topic": "Physical Activity",
333
+ "year": "2023",
334
+ "state": "Alaska",
335
+ "value": 24.1,
336
+ "population": 733391
337
+ },
338
+ {
339
+ "category": "Health Risk Behaviors",
340
+ "topic": "Physical Activity",
341
+ "year": "2023",
342
+ "state": "Arizona",
343
+ "value": 25.8,
344
+ "population": 7151502
345
+ },
346
+ {
347
+ "category": "Health Risk Behaviors",
348
+ "topic": "Physical Activity",
349
+ "year": "2023",
350
+ "state": "California",
351
+ "value": 22.7,
352
+ "population": 39538223
353
+ },
354
+ {
355
+ "category": "Health Risk Behaviors",
356
+ "topic": "Physical Activity",
357
+ "year": "2023",
358
+ "state": "Florida",
359
+ "value": 26.9,
360
+ "population": 21538187
361
+ },
362
+ {
363
+ "category": "Health Risk Behaviors",
364
+ "topic": "Physical Activity",
365
+ "year": "2024",
366
+ "state": "Alabama",
367
+ "value": 27.6,
368
+ "population": 5024279
369
+ },
370
+ {
371
+ "category": "Health Risk Behaviors",
372
+ "topic": "Physical Activity",
373
+ "year": "2024",
374
+ "state": "Alaska",
375
+ "value": 23.5,
376
+ "population": 733391
377
+ },
378
+ {
379
+ "category": "Health Risk Behaviors",
380
+ "topic": "Physical Activity",
381
+ "year": "2024",
382
+ "state": "Arizona",
383
+ "value": 25.2,
384
+ "population": 7151502
385
+ },
386
+ {
387
+ "category": "Health Risk Behaviors",
388
+ "topic": "Physical Activity",
389
+ "year": "2024",
390
+ "state": "California",
391
+ "value": 22.1,
392
+ "population": 39538223
393
+ },
394
+ {
395
+ "category": "Health Risk Behaviors",
396
+ "topic": "Physical Activity",
397
+ "year": "2024",
398
+ "state": "Florida",
399
+ "value": 26.3,
400
+ "population": 21538187
401
+ },
402
+ {
403
+ "category": "Chronic Diseases",
404
+ "topic": "Diabetes",
405
+ "year": "2020",
406
+ "state": "Alabama",
407
+ "value": 15.1,
408
+ "population": 4903185
409
+ },
410
+ {
411
+ "category": "Chronic Diseases",
412
+ "topic": "Diabetes",
413
+ "year": "2020",
414
+ "state": "Alaska",
415
+ "value": 9.5,
416
+ "population": 731545
417
+ },
418
+ {
419
+ "category": "Chronic Diseases",
420
+ "topic": "Diabetes",
421
+ "year": "2020",
422
+ "state": "Arizona",
423
+ "value": 12.1,
424
+ "population": 7151502
425
+ },
426
+ {
427
+ "category": "Chronic Diseases",
428
+ "topic": "Diabetes",
429
+ "year": "2020",
430
+ "state": "California",
431
+ "value": 11.5,
432
+ "population": 39538223
433
+ },
434
+ {
435
+ "category": "Chronic Diseases",
436
+ "topic": "Diabetes",
437
+ "year": "2020",
438
+ "state": "Florida",
439
+ "value": 13.4,
440
+ "population": 21538187
441
+ },
442
+ {
443
+ "category": "Chronic Diseases",
444
+ "topic": "Diabetes",
445
+ "year": "2021",
446
+ "state": "Alabama",
447
+ "value": 14.8,
448
+ "population": 4963095
449
+ },
450
+ {
451
+ "category": "Chronic Diseases",
452
+ "topic": "Diabetes",
453
+ "year": "2021",
454
+ "state": "Alaska",
455
+ "value": 9.3,
456
+ "population": 732673
457
+ },
458
+ {
459
+ "category": "Chronic Diseases",
460
+ "topic": "Diabetes",
461
+ "year": "2021",
462
+ "state": "Arizona",
463
+ "value": 11.9,
464
+ "population": 7151502
465
+ },
466
+ {
467
+ "category": "Chronic Diseases",
468
+ "topic": "Diabetes",
469
+ "year": "2021",
470
+ "state": "California",
471
+ "value": 11.3,
472
+ "population": 39538223
473
+ },
474
+ {
475
+ "category": "Chronic Diseases",
476
+ "topic": "Diabetes",
477
+ "year": "2021",
478
+ "state": "Florida",
479
+ "value": 13.2,
480
+ "population": 21538187
481
+ },
482
+ {
483
+ "category": "Chronic Diseases",
484
+ "topic": "Diabetes",
485
+ "year": "2022",
486
+ "state": "Alabama",
487
+ "value": 14.5,
488
+ "population": 5024279
489
+ },
490
+ {
491
+ "category": "Chronic Diseases",
492
+ "topic": "Diabetes",
493
+ "year": "2022",
494
+ "state": "Alaska",
495
+ "value": 9.1,
496
+ "population": 733391
497
+ },
498
+ {
499
+ "category": "Chronic Diseases",
500
+ "topic": "Diabetes",
501
+ "year": "2022",
502
+ "state": "Arizona",
503
+ "value": 11.7,
504
+ "population": 7151502
505
+ },
506
+ {
507
+ "category": "Chronic Diseases",
508
+ "topic": "Diabetes",
509
+ "year": "2022",
510
+ "state": "California",
511
+ "value": 11.1,
512
+ "population": 39538223
513
+ },
514
+ {
515
+ "category": "Chronic Diseases",
516
+ "topic": "Diabetes",
517
+ "year": "2022",
518
+ "state": "Florida",
519
+ "value": 12.9,
520
+ "population": 21538187
521
+ },
522
+ {
523
+ "category": "Chronic Diseases",
524
+ "topic": "Diabetes",
525
+ "year": "2023",
526
+ "state": "Alabama",
527
+ "value": 14.2,
528
+ "population": 5024279
529
+ },
530
+ {
531
+ "category": "Chronic Diseases",
532
+ "topic": "Diabetes",
533
+ "year": "2023",
534
+ "state": "Alaska",
535
+ "value": 8.9,
536
+ "population": 733391
537
+ },
538
+ {
539
+ "category": "Chronic Diseases",
540
+ "topic": "Diabetes",
541
+ "year": "2023",
542
+ "state": "Arizona",
543
+ "value": 11.4,
544
+ "population": 7151502
545
+ },
546
+ {
547
+ "category": "Chronic Diseases",
548
+ "topic": "Diabetes",
549
+ "year": "2023",
550
+ "state": "California",
551
+ "value": 10.8,
552
+ "population": 39538223
553
+ },
554
+ {
555
+ "category": "Chronic Diseases",
556
+ "topic": "Diabetes",
557
+ "year": "2023",
558
+ "state": "Florida",
559
+ "value": 12.6,
560
+ "population": 21538187
561
+ },
562
+ {
563
+ "category": "Chronic Diseases",
564
+ "topic": "Diabetes",
565
+ "year": "2024",
566
+ "state": "Alabama",
567
+ "value": 13.9,
568
+ "population": 5024279
569
+ },
570
+ {
571
+ "category": "Chronic Diseases",
572
+ "topic": "Diabetes",
573
+ "year": "2024",
574
+ "state": "Alaska",
575
+ "value": 8.7,
576
+ "population": 733391
577
+ },
578
+ {
579
+ "category": "Chronic Diseases",
580
+ "topic": "Diabetes",
581
+ "year": "2024",
582
+ "state": "Arizona",
583
+ "value": 11.2,
584
+ "population": 7151502
585
+ },
586
+ {
587
+ "category": "Chronic Diseases",
588
+ "topic": "Diabetes",
589
+ "year": "2024",
590
+ "state": "California",
591
+ "value": 10.6,
592
+ "population": 39538223
593
+ },
594
+ {
595
+ "category": "Chronic Diseases",
596
+ "topic": "Diabetes",
597
+ "year": "2024",
598
+ "state": "Florida",
599
+ "value": 12.4,
600
+ "population": 21538187
601
+ }
602
+ ]
@@ -0,0 +1,47 @@
1
+ [
2
+ {
3
+ "topic": "Tobacco Use",
4
+ "topic_id": "1",
5
+ "category": "Health Risk Behaviors"
6
+ },
7
+ {
8
+ "topic": "Physical Activity",
9
+ "topic_id": "2",
10
+ "category": "Health Risk Behaviors"
11
+ },
12
+ {
13
+ "topic": "Nutrition",
14
+ "topic_id": "3",
15
+ "category": "Health Risk Behaviors"
16
+ },
17
+ {
18
+ "topic": "Diabetes",
19
+ "topic_id": "4",
20
+ "category": "Chronic Diseases"
21
+ },
22
+ {
23
+ "topic": "Heart Disease",
24
+ "topic_id": "5",
25
+ "category": "Chronic Diseases"
26
+ },
27
+ {
28
+ "topic": "Cancer Screening",
29
+ "topic_id": "6",
30
+ "category": "Preventive Services"
31
+ },
32
+ {
33
+ "topic": "Immunization",
34
+ "topic_id": "7",
35
+ "category": "Preventive Services"
36
+ },
37
+ {
38
+ "topic": "Age Groups",
39
+ "topic_id": "8",
40
+ "category": "Demographics"
41
+ },
42
+ {
43
+ "topic": "Gender",
44
+ "topic_id": "9",
45
+ "category": "Demographics"
46
+ }
47
+ ]
@@ -0,0 +1,22 @@
1
+ [
2
+ {
3
+ "year": "2020",
4
+ "year_id": "2020"
5
+ },
6
+ {
7
+ "year": "2021",
8
+ "year_id": "2021"
9
+ },
10
+ {
11
+ "year": "2022",
12
+ "year_id": "2022"
13
+ },
14
+ {
15
+ "year": "2023",
16
+ "year_id": "2023"
17
+ },
18
+ {
19
+ "year": "2024",
20
+ "year_id": "2024"
21
+ }
22
+ ]