@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,430 @@
1
+ {
2
+ "dashboard": {
3
+ "theme": "theme-blue",
4
+ "sharedFilters": []
5
+ },
6
+ "rows": [
7
+ {
8
+ "columns": [
9
+ {
10
+ "width": 12,
11
+ "widget": "markup-include1732895422713"
12
+ },
13
+ {},
14
+ {}
15
+ ],
16
+ "uuid": 1732897571400
17
+ },
18
+ {
19
+ "columns": [
20
+ {
21
+ "width": 12,
22
+ "widget": "map1732897107116"
23
+ }
24
+ ],
25
+ "uuid": 1732897569495
26
+ }
27
+ ],
28
+ "visualizations": {
29
+ "markup-include1732895422713": {
30
+ "filters": [],
31
+ "filterBehavior": "Filter Change",
32
+ "openModal": false,
33
+ "uid": "markup-include1732895422713",
34
+ "type": "markup-include",
35
+ "contentEditor": {
36
+ "inlineHTML": "<div class=\"row\">\n <div class=\"col-md-3\">\n <div class=\"red-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l3\">\n <p><strong>Persistent detection</strong></p>\n <p><span class=\"consistent\">{{Persistent-2}}</span></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"gold-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l3\">\n <p><strong>Detection</strong></p>\n <p><span class=\"intermittent\">{{Detection-2}}</span></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"blue-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l3\">\n <p><strong>No recent detection</strong></p>\n <p><span class=\"no-detection\">{{No-Detection-2}}</span></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"gray-custom-border-color\">\n <div class=\"card mb-3\">\n <div class=\"card-body bg-gray-l2\">\n <p><strong>No recent data</strong></p>\n <p><span class=\"no-recent-detection\">{{No-Recent-Data-2}}</span></p>\n </div>\n </div>\n </div>\n </div>\n</div>",
37
+ "markupVariables": [
38
+ {
39
+ "columnName": "persistent-detection",
40
+ "conditions": [
41
+ {
42
+ "columnName": "testing_group",
43
+ "isOrIsNotEqualTo": "is",
44
+ "value": "Clade II"
45
+ }
46
+ ],
47
+ "name": "Persistent-2",
48
+ "tag": "{{Persistent-2}}"
49
+ },
50
+ {
51
+ "columnName": "detection",
52
+ "conditions": [
53
+ {
54
+ "columnName": "testing_group",
55
+ "isOrIsNotEqualTo": "is",
56
+ "value": "Clade II"
57
+ }
58
+ ],
59
+ "name": "Detection-2",
60
+ "tag": "{{Detection-2}}"
61
+ },
62
+ {
63
+ "columnName": "no-recent-detection",
64
+ "conditions": [
65
+ {
66
+ "columnName": "testing_group",
67
+ "isOrIsNotEqualTo": "is",
68
+ "value": "Clade II"
69
+ }
70
+ ],
71
+ "name": "No-Detection-2",
72
+ "tag": "{{No-Detection-2}}"
73
+ },
74
+ {
75
+ "columnName": "no-recent-data",
76
+ "conditions": [
77
+ {
78
+ "columnName": "testing_group",
79
+ "isOrIsNotEqualTo": "is",
80
+ "value": "Clade II"
81
+ }
82
+ ],
83
+ "name": "No-Recent-Data-2",
84
+ "tag": "{{No-Recent-Data-2}}"
85
+ }
86
+ ],
87
+ "showHeader": true,
88
+ "srcUrl": "#example",
89
+ "title": "",
90
+ "useInlineHTML": true
91
+ },
92
+ "theme": "theme-blue",
93
+ "visual": {
94
+ "border": false,
95
+ "accent": false,
96
+ "background": false,
97
+ "hideBackgroundColor": false,
98
+ "borderColorTheme": false
99
+ },
100
+ "showEditorPanel": true,
101
+ "visualizationType": "markup-include",
102
+ "dataDescription": {
103
+ "horizontal": false,
104
+ "series": false
105
+ },
106
+ "dataKey": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json",
107
+ "version": "4.25.7",
108
+ "migrations": {
109
+ "addColorMigration": true
110
+ }
111
+ },
112
+ "map1732897107116": {
113
+ "annotations": [],
114
+ "general": {
115
+ "navigationTarget": "_self",
116
+ "noStateFoundMessage": "Map Unavailable",
117
+ "annotationDropdownText": "Annotations",
118
+ "geoBorderColor": "darkGray",
119
+ "headerColor": "theme-blue",
120
+ "title": "",
121
+ "showTitle": true,
122
+ "showSidebar": true,
123
+ "showDownloadMediaButton": false,
124
+ "displayAsHex": false,
125
+ "displayStateLabels": false,
126
+ "territoriesAlwaysShow": false,
127
+ "language": "en",
128
+ "geoType": "us-county",
129
+ "geoLabelOverride": "Sewershed Id",
130
+ "hasRegions": false,
131
+ "fullBorder": false,
132
+ "type": "us-geocode",
133
+ "convertFipsCodes": true,
134
+ "palette": {
135
+ "isReversed": false
136
+ },
137
+ "allowMapZoom": true,
138
+ "hideGeoColumnInTooltip": false,
139
+ "hidePrimaryColumnInTooltip": false,
140
+ "statePicked": {
141
+ "fipsCode": "01",
142
+ "stateName": "Alabama"
143
+ },
144
+ "expandDataTable": false,
145
+ "subtext": "<div>\n<br/> <br/> Data Last <span class=\"date\">FromDB</span></div>\n<div class=\"csv-link\"><a href=\"/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitetable.csv\">Download CSV</a>\n</div>"
146
+ },
147
+ "type": "map",
148
+ "color": "pinkpurple",
149
+ "columns": {
150
+ "geo": {
151
+ "name": "sewershed",
152
+ "label": "Location",
153
+ "tooltip": false,
154
+ "dataTable": true
155
+ },
156
+ "primary": {
157
+ "dataTable": true,
158
+ "tooltip": true,
159
+ "prefix": "",
160
+ "suffix": "",
161
+ "name": "detection_classification",
162
+ "label": "Detection Classification",
163
+ "roundToPlace": 0
164
+ },
165
+ "navigate": {
166
+ "name": ""
167
+ },
168
+ "latitude": {
169
+ "name": "latitude"
170
+ },
171
+ "longitude": {
172
+ "name": "longitude"
173
+ },
174
+ "additionalColumn1": {
175
+ "label": "Sampling Location",
176
+ "dataTable": true,
177
+ "tooltips": false,
178
+ "prefix": "",
179
+ "suffix": "",
180
+ "name": "sample_location",
181
+ "tooltip": true
182
+ },
183
+ "additionalColumn2": {
184
+ "label": "Sewershed Jurisdiction",
185
+ "dataTable": true,
186
+ "tooltips": false,
187
+ "prefix": "",
188
+ "suffix": "",
189
+ "name": "jurisdiction",
190
+ "tooltip": true
191
+ },
192
+ "additionalColumn3": {
193
+ "label": "Counties",
194
+ "dataTable": true,
195
+ "tooltips": false,
196
+ "prefix": "",
197
+ "suffix": "",
198
+ "name": "counties",
199
+ "tooltip": true
200
+ },
201
+ "additionalColumn4": {
202
+ "label": "Population",
203
+ "dataTable": true,
204
+ "tooltips": false,
205
+ "prefix": "",
206
+ "suffix": "",
207
+ "name": "population",
208
+ "tooltip": true,
209
+ "useCommas": true
210
+ },
211
+ "additionalColumn5": {
212
+ "label": "Samples Collected",
213
+ "dataTable": true,
214
+ "tooltips": false,
215
+ "prefix": "",
216
+ "suffix": "",
217
+ "name": "samples_collected",
218
+ "tooltip": true,
219
+ "useCommas": true
220
+ },
221
+ "additionalColumn6": {
222
+ "label": "Type of Testing",
223
+ "dataTable": true,
224
+ "tooltips": false,
225
+ "prefix": "",
226
+ "suffix": "",
227
+ "name": "type_of_testing",
228
+ "tooltip": true
229
+ },
230
+ "additionalColumn7": {
231
+ "label": "Samples that were positive",
232
+ "dataTable": true,
233
+ "tooltips": false,
234
+ "prefix": "",
235
+ "suffix": "",
236
+ "name": "positive_samples",
237
+ "tooltip": true
238
+ },
239
+ "additionalColumn8": {
240
+ "label": "Date Collection Range",
241
+ "dataTable": true,
242
+ "tooltips": false,
243
+ "prefix": "",
244
+ "suffix": "",
245
+ "name": "date_collection_range"
246
+ }
247
+ },
248
+ "legend": {
249
+ "descriptions": {},
250
+ "specialClasses": [],
251
+ "unified": false,
252
+ "singleColumn": false,
253
+ "singleRow": true,
254
+ "verticalSorted": false,
255
+ "showSpecialClassesLast": false,
256
+ "dynamicDescription": false,
257
+ "type": "category",
258
+ "numberOfItems": 3,
259
+ "position": "bottom",
260
+ "title": "",
261
+ "style": "circles",
262
+ "subStyle": "linear blocks",
263
+ "tickRotation": "",
264
+ "singleColumnLegend": false,
265
+ "hideBorder": false,
266
+ "groupBy": "",
267
+ "additionalCategories": [
268
+ "No recent detection",
269
+ "Persistent Detection",
270
+ "No recent data",
271
+ "Detection"
272
+ ],
273
+ "categoryValuesOrder": [
274
+ "Persistent Detection",
275
+ "Detection",
276
+ "No recent detection",
277
+ "No recent data",
278
+ "No Detection"
279
+ ],
280
+ "description": "Select a category to add or remove from map"
281
+ },
282
+ "filters": [
283
+ {
284
+ "filterStyle": "dropdown",
285
+ "id": 1752597682776,
286
+ "showDropdown": false,
287
+ "columnName": "testing_group",
288
+ "orderedValues": [
289
+ "Clade I",
290
+ "Clade II",
291
+ "Non-clade Specific",
292
+ "Overall Mpox Testing"
293
+ ],
294
+ "defaultValue": "Clade II"
295
+ }
296
+ ],
297
+ "table": {
298
+ "wrapColumns": false,
299
+ "label": "Data Table",
300
+ "expanded": false,
301
+ "limitHeight": false,
302
+ "height": "",
303
+ "caption": "",
304
+ "showDownloadUrl": false,
305
+ "showDataTableLink": false,
306
+ "showDownloadLinkBelow": false,
307
+ "showFullGeoNameInCSV": false,
308
+ "forceDisplay": true,
309
+ "download": true,
310
+ "indexLabel": "",
311
+ "cellMinWidth": "0"
312
+ },
313
+ "tooltips": {
314
+ "appearanceType": "hover",
315
+ "linkLabel": "Learn More",
316
+ "capitalizeLabels": true,
317
+ "opacity": 90
318
+ },
319
+ "visual": {
320
+ "minBubbleSize": 1,
321
+ "maxBubbleSize": 20,
322
+ "extraBubbleBorder": false,
323
+ "cityStyle": "circle",
324
+ "cityStyleLabel": "",
325
+ "showBubbleZeros": false,
326
+ "additionalCityStyles": [],
327
+ "geoCodeCircleSize": "5"
328
+ },
329
+ "mapPosition": {
330
+ "coordinates": [
331
+ 0,
332
+ 30
333
+ ],
334
+ "zoom": 3
335
+ },
336
+ "map": {
337
+ "layers": [],
338
+ "patterns": []
339
+ },
340
+ "hexMap": {
341
+ "type": "",
342
+ "shapeGroups": [
343
+ {
344
+ "legendTitle": "",
345
+ "legendDescription": "",
346
+ "items": [
347
+ {
348
+ "key": "",
349
+ "shape": "Arrow Up",
350
+ "column": "",
351
+ "operator": "=",
352
+ "value": ""
353
+ }
354
+ ]
355
+ }
356
+ ]
357
+ },
358
+ "filterBehavior": "Filter Change",
359
+ "filterIntro": "",
360
+ "openModal": true,
361
+ "uid": "map1732897107116",
362
+ "dataDescription": {
363
+ "series": false,
364
+ "horizontal": false
365
+ },
366
+ "dataKey": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json",
367
+ "version": "4.25.1",
368
+ "customColors": [
369
+ "#d73027",
370
+ "#d73027",
371
+ "#ffcc00",
372
+ "#ffcc00",
373
+ "#0e4183",
374
+ "#0e4183",
375
+ "#Cccccc",
376
+ "#Cccccc"
377
+ ],
378
+ "migrations": {
379
+ "addColorMigration": true
380
+ }
381
+ }
382
+ },
383
+ "table": {
384
+ "label": "Data Table",
385
+ "show": false,
386
+ "showDownloadUrl": false,
387
+ "showDownloadLinkBelow": true,
388
+ "showVertical": true
389
+ },
390
+ "errors": [],
391
+ "currentViewport": "lg",
392
+ "id": 15,
393
+ "category": "General",
394
+ "label": "Dashboard",
395
+ "type": "dashboard",
396
+ "subType": null,
397
+ "orientation": null,
398
+ "icon": {
399
+ "key": null,
400
+ "ref": null,
401
+ "props": {},
402
+ "_owner": null
403
+ },
404
+ "content": "Present multiple data visualizations with shared filter controls.",
405
+ "datasets": {
406
+ "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json": {
407
+ "dataFileSize": 1118,
408
+ "dataFileName": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json",
409
+ "dataFileSourceType": "url",
410
+ "dataFileFormat": "JSON",
411
+ "preview": false,
412
+ "dataUrl": "https://www.cdc.gov/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxnationaldatabites.json"
413
+ },
414
+ "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json": {
415
+ "dataFileSize": 1061160,
416
+ "dataFileName": "/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json",
417
+ "dataFileSourceType": "url",
418
+ "dataFileFormat": "JSON",
419
+ "preview": true,
420
+ "dataUrl": "https://www.cdc.gov/wcms/vizdata/NCEZID_DIDRI/mpox/nwssmpoxsitemap.json"
421
+ }
422
+ },
423
+ "visualizationType": null,
424
+ "activeVizButtonID": 15,
425
+ "version": "4.25.7",
426
+ "uuid": 1732897568206,
427
+ "migrations": {
428
+ "addColorMigration": true
429
+ }
430
+ }