@cdc/dashboard 4.26.3 → 4.26.5

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 (151) hide show
  1. package/CONFIG.md +219 -0
  2. package/README.md +60 -20
  3. package/dist/cdcdashboard-CY9IcPSi.es.js +6 -0
  4. package/dist/cdcdashboard-DlpiY3fQ.es.js +4 -0
  5. package/dist/cdcdashboard.js +61559 -58048
  6. package/examples/__data__/data-2.json +6 -0
  7. package/examples/__data__/data.json +6 -0
  8. package/examples/dashboard-conditions-filters-incomplete.json +221 -0
  9. package/examples/dashboard-missing-datasets-multi.json +174 -0
  10. package/examples/dashboard-missing-datasets-single.json +121 -0
  11. package/examples/dashboard-multi-dashboard-version-regression.json +146 -0
  12. package/examples/dashboard-shared-filter-row-delete-cleanup.json +186 -0
  13. package/examples/dashboard-stale-dataset-keys.json +181 -0
  14. package/examples/dashboard-tiered-filter-regression.json +190 -0
  15. package/examples/legend-issue.json +1 -1
  16. package/examples/minimal-example.json +34 -0
  17. package/examples/private/cfa-dashboard.json +651 -0
  18. package/examples/private/data-bite-wrap.json +6936 -0
  19. package/examples/private/dengue.json +4640 -0
  20. package/examples/private/link_to_file.json +16662 -0
  21. package/examples/private/multi-dash-fix.json +16963 -0
  22. package/examples/private/versions.json +41612 -0
  23. package/examples/sankey.json +3 -3
  24. package/examples/test-api-filter-reset.json +4 -4
  25. package/examples/tp5-test.json +86 -4
  26. package/examples/us-map-filter-example.json +1074 -0
  27. package/package.json +9 -9
  28. package/src/CdcDashboard.tsx +6 -2
  29. package/src/CdcDashboardComponent.tsx +179 -88
  30. package/src/DashboardCopyPasteContext.test.tsx +33 -0
  31. package/src/DashboardCopyPasteContext.tsx +48 -0
  32. package/src/_stories/Dashboard.EditorRegression.stories.tsx +72 -0
  33. package/src/_stories/Dashboard.Regression.stories.tsx +196 -0
  34. package/src/_stories/Dashboard.Zoom.stories.tsx +88 -0
  35. package/src/_stories/Dashboard.smoke.stories.tsx +33 -0
  36. package/src/_stories/Dashboard.stories.tsx +337 -2
  37. package/src/_stories/FilteredTextMigrationComparison.stories.tsx +87 -0
  38. package/src/_stories/_mock/dashboard-data-driven-colors.json +171 -0
  39. package/src/_stories/_mock/tp5-test.json +86 -5
  40. package/src/components/Column.test.tsx +176 -0
  41. package/src/components/Column.tsx +214 -13
  42. package/src/components/DashboardConditionModal.test.tsx +420 -0
  43. package/src/components/DashboardConditionModal.tsx +367 -0
  44. package/src/components/DashboardConditionSummary.tsx +59 -0
  45. package/src/components/DashboardEditors.tsx +23 -0
  46. package/src/components/DashboardFilters/DashboardFilters.test.tsx +267 -0
  47. package/src/components/DashboardFilters/DashboardFilters.tsx +193 -172
  48. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.test.tsx +164 -0
  49. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +46 -6
  50. package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +5 -3
  51. package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +59 -58
  52. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.test.tsx +304 -0
  53. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +43 -36
  54. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +2 -2
  55. package/src/components/DashboardFilters/DashboardFiltersWrapper.test.tsx +142 -0
  56. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +32 -27
  57. package/src/components/DashboardFilters/dashboardfilter.styles.css +42 -27
  58. package/src/components/DataDesignerModal.tsx +2 -1
  59. package/src/components/ExpandCollapseButtons.tsx +6 -4
  60. package/src/components/Grid.tsx +12 -7
  61. package/src/components/Header/Header.tsx +36 -17
  62. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +141 -140
  63. package/src/components/Row.test.tsx +228 -0
  64. package/src/components/Row.tsx +104 -28
  65. package/src/components/VisualizationRow.test.tsx +396 -0
  66. package/src/components/VisualizationRow.tsx +177 -51
  67. package/src/components/VisualizationsPanel/VisualizationsPanel.test.tsx +49 -0
  68. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +14 -13
  69. package/src/components/Widget/Widget.test.tsx +218 -0
  70. package/src/components/Widget/Widget.tsx +123 -20
  71. package/src/components/Widget/widget.styles.css +58 -14
  72. package/src/components/dashboard-condition-modal.css +76 -0
  73. package/src/components/dashboard-condition-summary.css +87 -0
  74. package/src/data/initial-state.js +1 -0
  75. package/src/helpers/addValuesToDashboardFilters.ts +3 -5
  76. package/src/helpers/addVisualization.ts +17 -4
  77. package/src/helpers/cloneDashboardWidget.ts +127 -0
  78. package/src/helpers/dashboardColumnWidgets.ts +99 -0
  79. package/src/helpers/dashboardConditionUi.ts +47 -0
  80. package/src/helpers/dashboardConditions.ts +200 -0
  81. package/src/helpers/dashboardFilterTargets.ts +156 -0
  82. package/src/helpers/filterData.ts +4 -9
  83. package/src/helpers/filterVisibility.ts +20 -0
  84. package/src/helpers/formatConfigBeforeSave.ts +2 -2
  85. package/src/helpers/getFilteredData.ts +18 -5
  86. package/src/helpers/getUpdateConfig.ts +43 -12
  87. package/src/helpers/getVizRowColumnLocator.ts +11 -1
  88. package/src/helpers/iconHash.tsx +9 -3
  89. package/src/helpers/mapDataToConfig.ts +31 -29
  90. package/src/helpers/reloadURLHelpers.ts +25 -5
  91. package/src/helpers/removeDashboardFilter.ts +33 -33
  92. package/src/helpers/tests/addVisualization.test.ts +53 -9
  93. package/src/helpers/tests/cloneDashboardWidget.test.ts +136 -0
  94. package/src/helpers/tests/dashboardColumnWidgets.test.ts +99 -0
  95. package/src/helpers/tests/dashboardConditionUi.test.ts +41 -0
  96. package/src/helpers/tests/dashboardConditions.test.ts +428 -0
  97. package/src/helpers/tests/formatConfigBeforeSave.test.ts +51 -0
  98. package/src/helpers/tests/getFilteredData.test.ts +265 -86
  99. package/src/helpers/tests/getUpdateConfig.test.ts +338 -0
  100. package/src/helpers/tests/reloadURLHelpers.test.ts +394 -238
  101. package/src/index.tsx +6 -3
  102. package/src/scss/grid.scss +281 -22
  103. package/src/scss/main.scss +215 -64
  104. package/src/store/dashboard.actions.ts +17 -4
  105. package/src/store/dashboard.reducer.test.ts +538 -0
  106. package/src/store/dashboard.reducer.ts +136 -22
  107. package/src/test/CdcDashboard.test.jsx +24 -0
  108. package/src/test/CdcDashboard.test.tsx +148 -0
  109. package/src/test/CdcDashboardComponent.test.tsx +935 -2
  110. package/src/types/ConfigRow.ts +15 -0
  111. package/src/types/DashboardFilters.ts +4 -0
  112. package/src/types/SharedFilter.ts +2 -0
  113. package/tests/fixtures/dashboard-config-with-metadata.json +1 -1
  114. package/dist/cdcdashboard-vr9HZwRt.es.js +0 -6
  115. package/examples/DEV-6574.json +0 -2224
  116. package/examples/api-dashboard-data.json +0 -272
  117. package/examples/api-dashboard-years.json +0 -11
  118. package/examples/api-geographies-data.json +0 -11
  119. package/examples/chart-data.json +0 -5409
  120. package/examples/custom/css/respiratory.css +0 -236
  121. package/examples/custom/js/respiratory.js +0 -242
  122. package/examples/default-data.json +0 -368
  123. package/examples/default-filter-control.json +0 -209
  124. package/examples/default-multi-dataset-shared-filter.json +0 -1729
  125. package/examples/default-multi-dataset.json +0 -506
  126. package/examples/ed-visits-county-file.json +0 -402
  127. package/examples/filters/Alabama.json +0 -72
  128. package/examples/filters/Alaska.json +0 -1737
  129. package/examples/filters/Arkansas.json +0 -4713
  130. package/examples/filters/California.json +0 -212
  131. package/examples/filters/Colorado.json +0 -1500
  132. package/examples/filters/Connecticut.json +0 -559
  133. package/examples/filters/Delaware.json +0 -63
  134. package/examples/filters/DistrictofColumbia.json +0 -63
  135. package/examples/filters/Florida.json +0 -4217
  136. package/examples/filters/States.json +0 -146
  137. package/examples/state-level.json +0 -90136
  138. package/examples/state-points.json +0 -10474
  139. package/examples/temp-example-data.json +0 -130
  140. package/examples/test-dashboard-simple.json +0 -503
  141. package/examples/test-example.json +0 -752
  142. package/examples/test-file.json +0 -147
  143. package/examples/test.json +0 -752
  144. package/examples/testing.json +0 -94456
  145. /package/examples/{data → __data__}/data-with-metadata.json +0 -0
  146. /package/examples/{legend-issue-data.json → __data__/legend-issue-data.json} +0 -0
  147. /package/examples/api-test/{categories.json → __data__/categories.json} +0 -0
  148. /package/examples/api-test/{chart-data.json → __data__/chart-data.json} +0 -0
  149. /package/examples/api-test/{topics.json → __data__/topics.json} +0 -0
  150. /package/examples/api-test/{years.json → __data__/years.json} +0 -0
  151. /package/src/_stories/{Dashboard.Pages.stories.tsx → Dashboard.Pages.smoke.stories.tsx} +0 -0
@@ -1,272 +0,0 @@
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
- ]
@@ -1,11 +0,0 @@
1
- [
2
- {
3
- "year": "2021"
4
- },
5
- {
6
- "year": "2022"
7
- },
8
- {
9
- "year": "2023"
10
- }
11
- ]
@@ -1,11 +0,0 @@
1
- [
2
- {
3
- "geography": "California"
4
- },
5
- {
6
- "geography": "Texas"
7
- },
8
- {
9
- "geography": "United States"
10
- }
11
- ]