@cdc/core 4.26.2 → 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 (186) hide show
  1. package/LICENSE +201 -0
  2. package/_stories/Gallery.Charts.stories.tsx +1 -1
  3. package/_stories/Gallery.DataBite.stories.tsx +1 -1
  4. package/_stories/Gallery.Maps.stories.tsx +1 -1
  5. package/_stories/PageART.stories.tsx +1 -1
  6. package/_stories/PageBRFSS.stories.tsx +1 -1
  7. package/_stories/PageCancerRegistries.stories.tsx +1 -1
  8. package/_stories/PageEasternEquineEncephalitis.stories.tsx +3 -3
  9. package/_stories/PageExcessiveAlcoholUse.stories.tsx +1 -1
  10. package/_stories/PageMaternalMortality.stories.tsx +1 -1
  11. package/_stories/PageOralHealth.stories.tsx +1 -1
  12. package/_stories/PageRespiratory.stories.tsx +4 -4
  13. package/_stories/PageSmokingTobacco.stories.tsx +1 -1
  14. package/_stories/PageStateDiabetesProfiles.stories.tsx +1 -1
  15. package/_stories/PageWastewater.stories.tsx +4 -4
  16. package/_stories/VegaImport.stories.tsx +3 -3
  17. package/assets/callout-flag.svg +7 -0
  18. package/components/AdvancedEditor/EmbedEditor.tsx +1 -1
  19. package/components/Alert/components/Alert.styles.css +2 -2
  20. package/components/ComboBox/combobox.styles.css +48 -48
  21. package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
  22. package/components/DataTable/DataTable.tsx +46 -18
  23. package/components/DataTable/DataTableStandAlone.tsx +1 -0
  24. package/components/DataTable/components/ChartHeader.tsx +21 -12
  25. package/components/DataTable/components/MapHeader.tsx +34 -28
  26. package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
  27. package/components/DataTable/data-table.css +50 -52
  28. package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
  29. package/components/DataTable/helpers/getChartCellValue.ts +10 -7
  30. package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
  31. package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
  32. package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
  33. package/components/DownloadButton.tsx +14 -6
  34. package/components/EditorPanel/ColumnsEditor.tsx +38 -31
  35. package/components/EditorPanel/CustomSortOrder.tsx +94 -0
  36. package/components/EditorPanel/DataTableEditor.tsx +139 -23
  37. package/components/EditorPanel/EditorPanel.styles.css +71 -71
  38. package/components/EditorPanel/EditorPanel.tsx +3 -8
  39. package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
  40. package/components/EditorPanel/FootnotesEditor.tsx +2 -2
  41. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +7 -6
  42. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +12 -10
  43. package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
  44. package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
  45. package/{styles/v2/components → components/EditorPanel}/editor.scss +67 -13
  46. package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
  47. package/components/EditorPanel/sections/VisualSection.tsx +11 -0
  48. package/components/EditorWrapper/editor-wrapper.style.css +1 -1
  49. package/components/Filters/Filters.tsx +3 -5
  50. package/components/Filters/components/Tabs.tsx +19 -7
  51. package/{styles → components/Filters}/filters.scss +3 -3
  52. package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
  53. package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
  54. package/components/Layout/components/Responsive.tsx +14 -6
  55. package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
  56. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +12 -18
  57. package/components/Layout/components/Visualization/index.tsx +39 -38
  58. package/components/Layout/components/Visualization/visualizations.scss +232 -15
  59. package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
  60. package/components/Layout/components/VisualizationContainer.tsx +37 -0
  61. package/components/Layout/components/VisualizationContent.test.tsx +182 -0
  62. package/components/Layout/components/VisualizationContent.tsx +75 -0
  63. package/components/Layout/index.tsx +5 -5
  64. package/components/Layout/styles/editor-utils.scss +3 -3
  65. package/components/Layout/styles/editor.scss +4 -4
  66. package/components/Legend/Legend.Gradient.tsx +7 -1
  67. package/components/Loader/loader.styles.css +2 -2
  68. package/components/Loading.jsx +1 -1
  69. package/components/MediaControls.tsx +10 -2
  70. package/components/MultiSelect/multiselect.styles.css +19 -19
  71. package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
  72. package/components/PaletteSelector/PaletteSelector.css +15 -15
  73. package/components/RichTooltip/richTooltip.css +6 -6
  74. package/components/Table/table.styles.css +2 -2
  75. package/components/Waiting.tsx +1 -1
  76. package/components/_stories/Filters.stories.tsx +1 -1
  77. package/components/_stories/styles.scss +0 -1
  78. package/components/elements/Button.jsx +1 -1
  79. package/components/elements/Card.jsx +1 -1
  80. package/{styles/v2/components → components/elements}/button.scss +9 -8
  81. package/components/inputs/InputCheckbox.jsx +1 -1
  82. package/components/inputs/InputSelect.tsx +1 -1
  83. package/components/inputs/InputText.jsx +1 -1
  84. package/components/inputs/InputToggle.tsx +1 -1
  85. package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
  86. package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
  87. package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
  88. package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
  89. package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
  90. package/{styles → components}/loading.scss +1 -1
  91. package/components/managers/DataDesigner.tsx +1 -1
  92. package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
  93. package/components/ui/Accordion.jsx +1 -1
  94. package/components/ui/Icon.tsx +1 -1
  95. package/components/ui/LoadSpin.jsx +1 -1
  96. package/components/ui/Modal.jsx +1 -1
  97. package/components/ui/Overlay.jsx +1 -1
  98. package/components/ui/Title/index.test.tsx +34 -0
  99. package/components/ui/Title/index.tsx +24 -7
  100. package/components/ui/Title/title.styles.css +119 -25
  101. package/components/ui/Tooltip.tsx +1 -1
  102. package/components/ui/_stories/Title.stories.tsx +1 -1
  103. package/{styles/v2/components → components/ui}/accordion.scss +3 -3
  104. package/components/ui/accordion.styles.css +11 -11
  105. package/{styles/v2/components → components/ui}/modal.scss +2 -2
  106. package/{styles/v2/components → components/ui}/overlay.scss +6 -6
  107. package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
  108. package/{styles → components}/waiting.scss +9 -3
  109. package/devTemplate/dev.js +50 -0
  110. package/dist/cove-main.css +528 -231
  111. package/dist/cove-main.css.map +1 -1
  112. package/generateViteConfig.js +2 -2
  113. package/helpers/backfillDefaults.ts +35 -0
  114. package/helpers/constants.ts +12 -0
  115. package/helpers/cove/date.ts +32 -3
  116. package/helpers/cove/number.ts +29 -15
  117. package/helpers/coveUpdateWorker.ts +12 -8
  118. package/helpers/displayDataAsText.ts +1 -1
  119. package/helpers/embed/embedHelper.js +13 -2
  120. package/helpers/embed/index.ts +0 -4
  121. package/helpers/extractDataAndMetadata.ts +20 -0
  122. package/helpers/fetchRemoteData.ts +14 -8
  123. package/helpers/labelHash.ts +9 -0
  124. package/helpers/markupProcessor.ts +56 -38
  125. package/helpers/prepareScreenshot.ts +6 -3
  126. package/helpers/testing.ts +1 -1
  127. package/helpers/tests/abbreviateNumber.test.ts +59 -0
  128. package/helpers/tests/backfillDefaults.test.ts +253 -0
  129. package/helpers/tests/date.test.ts +46 -0
  130. package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
  131. package/helpers/tests/markupProcessor.test.ts +315 -124
  132. package/helpers/tests/number.test.ts +42 -0
  133. package/helpers/tests/prepareScreenshot.test.ts +28 -28
  134. package/helpers/tests/testStandaloneBuild.ts +36 -26
  135. package/helpers/tests/useDataVizClasses.test.ts +66 -0
  136. package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
  137. package/helpers/useDataVizClasses.ts +13 -7
  138. package/helpers/ver/4.24.4.ts +24 -0
  139. package/helpers/ver/4.26.3.ts +44 -0
  140. package/helpers/ver/4.26.4.ts +31 -0
  141. package/helpers/ver/tests/4.26.3.test.ts +168 -0
  142. package/helpers/ver/tests/4.26.4.test.ts +88 -0
  143. package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
  144. package/package.json +2 -2
  145. package/styles/_global.scss +7 -7
  146. package/styles/_reset.scss +2 -2
  147. package/styles/{v2/base → base}/_file-selector.scss +4 -4
  148. package/styles/{v2/base → base}/_general.scss +2 -4
  149. package/styles/{v2/base → base}/index.scss +1 -1
  150. package/styles/base.scss +107 -165
  151. package/styles/cove-main.scss +3 -6
  152. package/styles/layout/_component.scss +110 -0
  153. package/styles/{v2/layout → layout}/_data-table.scss +7 -7
  154. package/styles/layout/_wrapper-padding.scss +27 -0
  155. package/styles/{v2/main.scss → main.scss} +3 -1
  156. package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
  157. package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
  158. package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
  159. package/styles/{v2/utils → utils}/index.scss +2 -1
  160. package/types/Axis.ts +2 -0
  161. package/types/ComponentStyles.ts +1 -0
  162. package/types/ConfigureData.ts +1 -0
  163. package/types/MarkupInclude.ts +1 -0
  164. package/types/MarkupVariable.ts +2 -1
  165. package/types/Palette.ts +1 -0
  166. package/types/Table.ts +9 -0
  167. package/types/Visualization.ts +1 -0
  168. package/styles/_common-components.css +0 -73
  169. package/styles/_variables.scss +0 -63
  170. package/styles/v2/layout/_component.scss +0 -21
  171. package/styles/v2/utils/_variables.scss +0 -9
  172. package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
  173. /package/{styles/v2/components → components/ui}/icon.scss +0 -0
  174. /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
  175. /package/styles/{v2/base → base}/_heading.scss +0 -0
  176. /package/styles/{v2/base → base}/_reset.scss +0 -0
  177. /package/styles/{v2/layout → layout}/_alert.scss +0 -0
  178. /package/styles/{v2/layout → layout}/_progression.scss +0 -0
  179. /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
  180. /package/styles/{v2/layout → layout}/index.scss +0 -0
  181. /package/styles/{v2/themes → themes}/index.scss +0 -0
  182. /package/styles/{v2/utils → utils}/_align.scss +0 -0
  183. /package/styles/{v2/utils → utils}/_animations.scss +0 -0
  184. /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
  185. /package/styles/{v2/utils → utils}/_grid.scss +0 -0
  186. /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -41,7 +41,7 @@ const testChartRendering = async (canvasElement: HTMLElement, storyName: string)
41
41
  })
42
42
 
43
43
  await step('Verify COVE module wrapper is present', async () => {
44
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
44
+ const coveModule = canvasElement.querySelector('.cove-visualization')
45
45
  expect(coveModule).toBeInTheDocument()
46
46
  })
47
47
 
@@ -35,7 +35,7 @@ const testDataBiteRendering = async (canvasElement: HTMLElement, storyName: stri
35
35
  })
36
36
 
37
37
  await step('Verify COVE module wrapper is present', async () => {
38
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
38
+ const coveModule = canvasElement.querySelector('.cove-visualization')
39
39
  expect(coveModule).toBeInTheDocument()
40
40
  })
41
41
 
@@ -43,7 +43,7 @@ const testMapRendering = async (canvasElement: HTMLElement, storyName: string) =
43
43
  })
44
44
 
45
45
  await step('Verify COVE module wrapper is present', async () => {
46
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
46
+ const coveModule = canvasElement.querySelector('.cove-visualization')
47
47
  expect(coveModule).toBeInTheDocument()
48
48
  })
49
49
 
@@ -167,7 +167,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
167
167
  })
168
168
 
169
169
  await step('Verify at least one visualization rendered', async () => {
170
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
170
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
171
171
  expect(coveModules.length).toBeGreaterThan(0)
172
172
  })
173
173
 
@@ -171,7 +171,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
171
171
  })
172
172
 
173
173
  await step('Verify at least one visualization rendered', async () => {
174
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
174
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
175
175
  expect(coveModules.length).toBeGreaterThan(0)
176
176
  })
177
177
 
@@ -170,7 +170,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
170
170
  })
171
171
 
172
172
  await step('Verify at least one visualization rendered', async () => {
173
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
173
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
174
174
  expect(coveModules.length).toBeGreaterThan(0)
175
175
  })
176
176
 
@@ -66,7 +66,7 @@ const testMapRendering = async (canvasElement: HTMLElement, storyName: string) =
66
66
  })
67
67
 
68
68
  await step('Verify COVE module wrapper is present', async () => {
69
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
69
+ const coveModule = canvasElement.querySelector('.cove-visualization')
70
70
  expect(coveModule).toBeInTheDocument()
71
71
  })
72
72
 
@@ -193,7 +193,7 @@ export const All_EEE_Visualizations: StoryObj = {
193
193
  const timeout = 30000
194
194
 
195
195
  const checkModules = () => {
196
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
196
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
197
197
  if (coveModules.length >= 4) {
198
198
  resolve()
199
199
  } else if (Date.now() - startTime > timeout) {
@@ -207,7 +207,7 @@ export const All_EEE_Visualizations: StoryObj = {
207
207
  })
208
208
 
209
209
  await step('Verify at least 4 visualizations are present', async () => {
210
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
210
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
211
211
  expect(coveModules.length).toBeGreaterThanOrEqual(4)
212
212
  })
213
213
 
@@ -170,7 +170,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
170
170
  })
171
171
 
172
172
  await step('Verify at least one visualization rendered', async () => {
173
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
173
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
174
174
  expect(coveModules.length).toBeGreaterThan(0)
175
175
  })
176
176
 
@@ -167,7 +167,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
167
167
  })
168
168
 
169
169
  await step('Verify at least one visualization rendered', async () => {
170
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
170
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
171
171
  expect(coveModules.length).toBeGreaterThan(0)
172
172
  })
173
173
 
@@ -170,7 +170,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
170
170
  })
171
171
 
172
172
  await step('Verify at least one visualization rendered', async () => {
173
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
173
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
174
174
  expect(coveModules.length).toBeGreaterThan(0)
175
175
  })
176
176
 
@@ -127,7 +127,7 @@ const testMapRendering = async (canvasElement: HTMLElement, storyName: string) =
127
127
  })
128
128
 
129
129
  await step('Verify COVE module wrapper is present', async () => {
130
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
130
+ const coveModule = canvasElement.querySelector('.cove-visualization')
131
131
  expect(coveModule).toBeInTheDocument()
132
132
  })
133
133
 
@@ -154,7 +154,7 @@ const testChartRendering = async (canvasElement: HTMLElement, storyName: string)
154
154
  })
155
155
 
156
156
  await step('Verify COVE module wrapper is present', async () => {
157
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
157
+ const coveModule = canvasElement.querySelector('.cove-visualization')
158
158
  expect(coveModule).toBeInTheDocument()
159
159
  })
160
160
 
@@ -304,7 +304,7 @@ export const All_Visualizations: StoryObj = {
304
304
  const timeout = 20000
305
305
 
306
306
  const checkModules = () => {
307
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
307
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
308
308
  if (coveModules.length >= 4) {
309
309
  resolve()
310
310
  } else if (Date.now() - startTime > timeout) {
@@ -323,7 +323,7 @@ export const All_Visualizations: StoryObj = {
323
323
  })
324
324
 
325
325
  await step('Verify exactly 4 COVE modules are present', async () => {
326
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
326
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
327
327
  expect(coveModules.length).toBe(4)
328
328
  })
329
329
 
@@ -170,7 +170,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
170
170
  })
171
171
 
172
172
  await step('Verify at least one visualization rendered', async () => {
173
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
173
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
174
174
  expect(coveModules.length).toBeGreaterThan(0)
175
175
  })
176
176
 
@@ -170,7 +170,7 @@ const testDashboardRendering = async (canvasElement: HTMLElement, storyName: str
170
170
  })
171
171
 
172
172
  await step('Verify at least one visualization rendered', async () => {
173
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
173
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
174
174
  expect(coveModules.length).toBeGreaterThan(0)
175
175
  })
176
176
 
@@ -144,7 +144,7 @@ const testMapRendering = async (canvasElement: HTMLElement, storyName: string) =
144
144
  })
145
145
 
146
146
  await step('Verify COVE module wrapper is present', async () => {
147
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
147
+ const coveModule = canvasElement.querySelector('.cove-visualization')
148
148
  expect(coveModule).toBeInTheDocument()
149
149
  })
150
150
 
@@ -166,7 +166,7 @@ const testChartRendering = async (canvasElement: HTMLElement, storyName: string)
166
166
  })
167
167
 
168
168
  await step('Verify COVE module wrapper is present', async () => {
169
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
169
+ const coveModule = canvasElement.querySelector('.cove-visualization')
170
170
  expect(coveModule).toBeInTheDocument()
171
171
  })
172
172
 
@@ -454,7 +454,7 @@ export const All_Wastewater_Visualizations: StoryObj = {
454
454
  const timeout = 30000
455
455
 
456
456
  const checkModules = () => {
457
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
457
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
458
458
  if (coveModules.length >= 9) {
459
459
  resolve()
460
460
  } else if (Date.now() - startTime > timeout) {
@@ -468,7 +468,7 @@ export const All_Wastewater_Visualizations: StoryObj = {
468
468
  })
469
469
 
470
470
  await step('Verify at least 9 visualizations are present', async () => {
471
- const coveModules = canvasElement.querySelectorAll('.cdc-open-viz-module')
471
+ const coveModules = canvasElement.querySelectorAll('.cove-visualization')
472
472
  expect(coveModules.length).toBeGreaterThanOrEqual(9)
473
473
  })
474
474
 
@@ -120,7 +120,7 @@ export default meta
120
120
  const assertRendered = async ({ canvasElement }: { canvasElement: HTMLElement }) => {
121
121
  await waitFor(
122
122
  () => {
123
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
123
+ const coveModule = canvasElement.querySelector('.cove-visualization')
124
124
  expect(coveModule).toBeTruthy()
125
125
  },
126
126
  { timeout: 15000 }
@@ -135,7 +135,7 @@ const assertRendered = async ({ canvasElement }: { canvasElement: HTMLElement })
135
135
  const assertMapRendered = async ({ canvasElement }: { canvasElement: HTMLElement }) => {
136
136
  await waitFor(
137
137
  () => {
138
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
138
+ const coveModule = canvasElement.querySelector('.cove-visualization')
139
139
  expect(coveModule).toBeTruthy()
140
140
  },
141
141
  { timeout: 15000 }
@@ -177,7 +177,7 @@ const assertConversionFailed =
177
177
  }
178
178
 
179
179
  // Verify no visualization rendered
180
- const coveModule = canvasElement.querySelector('.cdc-open-viz-module')
180
+ const coveModule = canvasElement.querySelector('.cove-visualization')
181
181
  expect(coveModule).toBeNull()
182
182
  }
183
183
 
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
3
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="481.000000pt" height="563.000000pt" viewBox="0 0 481.000000 563.000000" preserveAspectRatio="xMidYMid meet">
4
+ <g transform="translate(0.000000,563.000000) scale(0.100000,-0.100000)" fill="#2c7a99" stroke="none">
5
+ <path d="M890 5514 c-161 -43 -308 -201 -354 -381 -14 -55 -16 -314 -16 -2527 0 -2015 2 -2466 13 -2466 7 0 51 14 97 30 47 17 92 33 100 35 8 2 16 4 18 5 1 2 7 4 12 5 6 1 11 3 13 4 1 2 13 4 26 7 14 2 30 9 38 15 7 6 13 8 13 4 0 -4 7 -2 15 5 8 7 15 10 15 6 0 -3 17 1 38 10 49 21 856 293 905 305 21 5 45 13 55 19 9 5 40 16 67 24 28 8 162 52 299 99 l249 85 151 -53 c83 -29 253 -90 379 -134 264 -94 556 -198 974 -346 164 -58 308 -110 321 -115 13 -6 27 -10 33 -10 11 0 8 4951 -4 4994 -22 80 -84 183 -152 252 -75 76 -141 114 -233 133 -38 8 -477 11 -1535 10 -1268 0 -1490 -3 -1537 -15z m2687 -1570 c49 -31 82 -134 64 -201 -10 -37 -41 -64 -422 -369 -227 -181 -430 -341 -452 -356 -43 -30 -84 -35 -136 -17 -17 6 -156 107 -309 224 l-277 213 -40 -31 c-50 -39 -318 -259 -325 -267 -3 -3 -27 -24 -55 -45 -27 -22 -55 -44 -61 -50 -86 -77 -253 -202 -277 -207 -20 -4 -53 -1 -84 8 -69 19 -105 64 -111 140 -6 70 8 100 69 149 105 84 134 107 168 133 19 15 92 74 164 132 71 58 144 116 162 130 86 68 114 90 187 150 124 102 156 120 206 120 23 0 57 -7 75 -16 18 -9 145 -103 282 -209 283 -217 293 -224 303 -210 4 6 42 39 86 74 43 35 88 71 100 81 31 27 153 127 231 190 37 30 111 91 164 135 142 119 217 145 288 99z m-1431 -983 c60 -44 59 -29 62 -601 3 -596 4 -589 -70 -638 -76 -49 -171 -29 -228 50 l-30 41 0 526 c0 591 -3 569 75 623 35 25 48 28 100 25 44 -2 69 -9 91 -26z m1252 15 c37 -19 67 -55 81 -95 8 -25 10 -183 9 -555 -3 -579 -1 -555 -71 -603 -67 -45 -144 -35 -211 27 l-41 39 -3 543 -2 544 23 35 c46 68 149 99 215 65z m-610 -343 c71 -57 71 -57 71 -448 0 -322 -1 -353 -19 -392 -27 -60 -83 -95 -155 -95 -63 -1 -95 16 -132 72 -23 33 -23 36 -23 407 0 406 -1 401 57 455 34 32 54 38 116 34 35 -2 57 -11 85 -33z m-1313 -142 c54 -24 92 -71 100 -124 4 -23 5 -159 3 -302 -3 -293 -3 -293 -82 -343 -66 -41 -160 -30 -207 24 -34 40 -39 84 -39 361 0 303 3 322 61 366 53 39 105 45 164 18z"/>
6
+ </g>
7
+ </svg>
@@ -7,7 +7,7 @@ import {
7
7
  type FilterMetadata,
8
8
  type FilterState
9
9
  } from '../../helpers/embed'
10
- import '../../helpers/embed' // Initialize embed helper for iframe resizing
10
+ import '../../helpers/embed/embedHelper.js' // Initialize embed helper for iframe resizing
11
11
 
12
12
  type EmbedEditorProps = {
13
13
  config?: any // Current visualization config
@@ -1,12 +1,12 @@
1
- .cdc-open-viz-module {
1
+ .cove-visualization {
2
2
  .accordion__panel > .alert {
3
3
  margin-bottom: 15px;
4
4
  }
5
5
 
6
6
  .alert {
7
7
  align-items: center;
8
- justify-content: center;
9
8
  display: inline-flex;
9
+ justify-content: center;
10
10
 
11
11
  .cove-icon {
12
12
  margin: 5px;
@@ -1,54 +1,54 @@
1
- .cdc-open-viz-module {
1
+ .cove-visualization {
2
2
  .cove-combobox {
3
3
  position: relative;
4
4
  width: 100%;
5
5
  }
6
6
 
7
7
  .cove-combobox-wrapper {
8
- position: relative;
9
- display: flex;
10
8
  align-items: center;
9
+ display: flex;
10
+ position: relative;
11
11
  width: 100%;
12
12
  }
13
13
 
14
14
  input.cove-combobox-input[role='combobox'] {
15
- width: 100%;
15
+ -webkit-appearance: none;
16
+ -moz-appearance: none;
17
+ appearance: none;
18
+ background-clip: padding-box;
19
+ background-color: white;
20
+ border: 1px solid var(--cool-gray-10) !important;
21
+ border-radius: 0.333rem;
22
+ color: var(--cool-gray-90);
23
+ cursor: text;
16
24
  display: block;
17
- padding: 0.5rem 3rem 0.5rem 0.5rem;
18
25
  font-family: var(--app-font-secondary);
19
- font-weight: 300;
20
26
  font-size: 0.833rem;
27
+ font-weight: 300;
21
28
  line-height: normal;
22
- color: var(--cool-gray-90);
23
- background-color: white;
24
- background-clip: padding-box;
25
- border: 1px solid var(--cool-gray-10) !important;
26
- border-radius: 0.333rem;
29
+ padding: 0.5rem 3rem 0.5rem 0.5rem;
27
30
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
28
- appearance: none;
29
- -webkit-appearance: none;
30
- -moz-appearance: none;
31
- cursor: text;
31
+ width: 100%;
32
32
  }
33
33
 
34
34
  input.cove-combobox-input[role='combobox']:focus {
35
- color: var(--cool-gray-90);
36
35
  background-color: white;
37
36
  border: 1px solid var(--cool-gray-10) !important;
38
37
  box-shadow: none;
38
+ color: var(--cool-gray-90);
39
39
  }
40
40
 
41
41
  input.cove-combobox-input[role='combobox']:focus-visible {
42
+ border-radius: 6px !important;
42
43
  outline: dashed 2px rgb(0, 122, 153) !important;
43
44
  outline-offset: 3px !important;
44
- border-radius: 6px !important;
45
45
  }
46
46
 
47
47
  input.cove-combobox-input[role='combobox']:disabled {
48
48
  background-color: var(--lightestGray);
49
49
  color: var(--cool-gray-90);
50
- opacity: 1;
51
50
  cursor: default;
51
+ opacity: 1;
52
52
  }
53
53
 
54
54
  input.cove-combobox-input[role='combobox']:disabled::placeholder {
@@ -62,21 +62,21 @@
62
62
  }
63
63
 
64
64
  .cove-combobox-button {
65
- position: absolute;
66
- right: 0.5rem;
67
- top: 50%;
68
- transform: translateY(-50%);
69
- display: flex;
70
65
  align-items: center;
71
- justify-content: center;
72
- width: 1em;
73
- height: 1em;
74
66
  background: transparent;
75
67
  border: none;
76
68
  cursor: pointer;
69
+ display: flex;
70
+ height: 1em;
71
+ justify-content: center;
77
72
  padding: 0;
78
- z-index: 2;
79
73
  pointer-events: none;
74
+ position: absolute;
75
+ right: 0.5rem;
76
+ top: 50%;
77
+ transform: translateY(-50%);
78
+ width: 1em;
79
+ z-index: 2;
80
80
  }
81
81
 
82
82
  .cove-combobox-button:disabled {
@@ -94,21 +94,21 @@
94
94
  }
95
95
 
96
96
  .cove-combobox-listbox {
97
- position: absolute;
98
- top: calc(100% + 0.125rem);
99
- left: 0;
100
- right: auto;
101
- width: 150%;
102
- z-index: 1000;
103
- max-height: 20rem;
104
- margin: 0;
105
- padding: 0;
106
- overflow-y: auto;
107
- list-style: none;
108
97
  background-color: white;
109
98
  border: 1px solid var(--cool-gray-10);
110
99
  border-radius: 0.333rem;
111
100
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
101
+ left: 0;
102
+ list-style: none;
103
+ margin: 0;
104
+ max-height: 20rem;
105
+ overflow-y: auto;
106
+ padding: 0;
107
+ position: absolute;
108
+ right: auto;
109
+ top: calc(100% + 0.125rem);
110
+ width: 150%;
111
+ z-index: 1000;
112
112
  }
113
113
 
114
114
  .cove-combobox-listbox:has(.no-results) {
@@ -116,14 +116,14 @@
116
116
  }
117
117
 
118
118
  .cove-combobox-option {
119
- padding: 0.5rem 0.5rem;
120
- font-family: var(--app-font-secondary);
121
- font-weight: 300;
122
- font-size: 0.778rem;
123
119
  color: var(--cool-gray-90);
124
120
  cursor: pointer;
125
- user-select: none;
121
+ font-family: var(--app-font-secondary);
122
+ font-size: 0.778rem;
123
+ font-weight: 300;
124
+ padding: 0.5rem 0.5rem;
126
125
  transition: background-color 0.15s ease-in-out;
126
+ user-select: none;
127
127
  }
128
128
 
129
129
  .cove-combobox-option .cove-combobox-option-highlight {
@@ -148,15 +148,15 @@
148
148
  }
149
149
 
150
150
  .sr-only {
151
- position: absolute;
152
- width: 1px;
151
+ border: 0;
152
+ clip: rect(0, 0, 0, 0);
153
153
  height: 1px;
154
- padding: 0;
155
154
  margin: -1px;
156
155
  overflow: hidden;
157
- clip: rect(0, 0, 0, 0);
156
+ padding: 0;
157
+ position: absolute;
158
158
  white-space: nowrap;
159
- border: 0;
159
+ width: 1px;
160
160
  }
161
161
 
162
162
  @media (prefers-reduced-motion: reduce) {