@cdc/map 4.24.10 → 4.24.12

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 (50) hide show
  1. package/dist/cdcmap.js +27324 -27152
  2. package/examples/default-geocode.json +13 -4
  3. package/examples/default-usa-regions.json +267 -117
  4. package/examples/example-city-state.json +6 -3
  5. package/examples/pattern.json +861 -0
  6. package/examples/private/DEV-9644.json +184 -0
  7. package/examples/private/default-patterns.json +867 -0
  8. package/index.html +4 -5
  9. package/package.json +3 -3
  10. package/src/CdcMap.tsx +53 -52
  11. package/src/_stories/CdcMap.Legend.Gradient.stories.tsx +67 -0
  12. package/src/_stories/CdcMap.Legend.stories.tsx +40 -0
  13. package/src/_stories/CdcMap.Patterns.stories.tsx +29 -0
  14. package/src/_stories/CdcMap.stories.tsx +59 -0
  15. package/src/_stories/UsaMap.NoData.stories.tsx +19 -0
  16. package/src/_stories/_mock/custom-layer-map.json +1117 -0
  17. package/src/_stories/_mock/default-patterns.json +865 -0
  18. package/src/_stories/_mock/example-city-state.json +858 -0
  19. package/src/_stories/_mock/usa-state-gradient.json +238 -0
  20. package/src/_stories/_mock/wastewater-map.json +208 -0
  21. package/src/components/CityList.tsx +5 -2
  22. package/src/components/EditorPanel/components/EditorPanel.tsx +81 -61
  23. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +27 -23
  24. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +75 -16
  25. package/src/components/Legend/components/Legend.tsx +42 -20
  26. package/src/components/Legend/components/index.scss +24 -24
  27. package/src/components/UsaMap/components/HexIcon.tsx +7 -1
  28. package/src/components/UsaMap/components/SingleState/SingleState.CountyOutput.tsx +40 -6
  29. package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +10 -2
  30. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +57 -12
  31. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +95 -21
  32. package/src/components/UsaMap/components/Territory/TerritoryShape.ts +13 -0
  33. package/src/components/UsaMap/components/UsaMap.County.tsx +11 -13
  34. package/src/components/UsaMap/components/UsaMap.Region.tsx +59 -16
  35. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +2 -1
  36. package/src/components/UsaMap/components/UsaMap.State.tsx +60 -62
  37. package/src/components/UsaMap/helpers/shapes.ts +5 -4
  38. package/src/components/WorldMap/WorldMap.tsx +77 -16
  39. package/src/data/initial-state.js +2 -1
  40. package/src/helpers/applyColorToLegend.ts +80 -0
  41. package/src/helpers/colors.ts +23 -0
  42. package/src/hooks/useTooltip.ts +9 -6
  43. package/src/scss/editor-panel.scss +0 -3
  44. package/src/scss/filters.scss +1 -9
  45. package/src/scss/main.scss +0 -5
  46. package/src/scss/map.scss +11 -63
  47. package/src/types/MapConfig.ts +6 -1
  48. package/src/types/MapContext.ts +1 -0
  49. package/examples/default-patterns.json +0 -579
  50. package/src/scss/datatable.scss +0 -6
@@ -0,0 +1,184 @@
1
+ {
2
+ "annotations": [],
3
+ "general": {
4
+ "geoType": "us",
5
+ "noStateFoundMessage": "Map Unavailable",
6
+ "annotationDropdownText": "Annotations",
7
+ "geoBorderColor": "darkGray",
8
+ "headerColor": "theme-blue",
9
+ "title": "Number, percentage, and proportion of infants born with use of assisted reproductive technology in 2022, by preterm gestational age and female patient’s reporting area of residence at time of treatment",
10
+ "showTitle": false,
11
+ "showSidebar": true,
12
+ "showDownloadButton": true,
13
+ "showDownloadMediaButton": false,
14
+ "displayAsHex": false,
15
+ "displayStateLabels": false,
16
+ "territoriesLabel": "Territories",
17
+ "territoriesAlwaysShow": false,
18
+ "language": "en",
19
+ "geoLabelOverride": "",
20
+ "hasRegions": false,
21
+ "fullBorder": false,
22
+ "type": "data",
23
+ "convertFipsCodes": true,
24
+ "palette": {
25
+ "isReversed": false
26
+ },
27
+ "allowMapZoom": true,
28
+ "hideGeoColumnInTooltip": false,
29
+ "hidePrimaryColumnInTooltip": false,
30
+ "statePicked": {
31
+ "fipsCode": "01",
32
+ "stateName": "Alabama"
33
+ },
34
+ "expandDataTable": false
35
+ },
36
+ "type": "map",
37
+ "color": "sequential-blue-2(MPX)",
38
+ "columns": {
39
+ "geo": {
40
+ "name": "State",
41
+ "label": "Location",
42
+ "tooltip": false,
43
+ "dataTable": true
44
+ },
45
+ "primary": {
46
+ "dataTable": true,
47
+ "tooltip": true,
48
+ "prefix": "",
49
+ "suffix": "",
50
+ "name": "Ranges",
51
+ "label": "",
52
+ "roundToPlace": "1"
53
+ },
54
+ "navigate": {
55
+ "name": ""
56
+ },
57
+ "latitude": {
58
+ "name": ""
59
+ },
60
+ "longitude": {
61
+ "name": ""
62
+ }
63
+ },
64
+ "legend": {
65
+ "descriptions": {
66
+ "0,0": [
67
+ "National Rate: 17.3"
68
+ ],
69
+ "0,1": [
70
+ "National Rate: 4.3"
71
+ ]
72
+ },
73
+ "specialClasses": [],
74
+ "unified": false,
75
+ "singleColumn": true,
76
+ "singleRow": false,
77
+ "verticalSorted": false,
78
+ "showSpecialClassesLast": false,
79
+ "dynamicDescription": true,
80
+ "type": "category",
81
+ "numberOfItems": 5,
82
+ "position": "side",
83
+ "title": "",
84
+ "style": "circles",
85
+ "subStyle": "linear blocks",
86
+ "tickRotation": "",
87
+ "singleColumnLegend": false,
88
+ "hideBorder": false,
89
+ "categoryValuesOrder": [
90
+ "20.6 - 23.3",
91
+ "23.4 - 28.3",
92
+ "18.5 - 20.5",
93
+ "10.2 - 15.5",
94
+ "15.6 - 18.4"
95
+ ]
96
+ },
97
+ "filters": [
98
+ {
99
+ "order": "asc",
100
+ "label": "Select a Measure",
101
+ "columnName": "Year",
102
+ "values": [
103
+ "Percentages of preterm infants conceived through ART",
104
+ "Proportion of infants conceived through ART that were born preterm among all preterm births "
105
+ ],
106
+ "active": "Percentages of preterm infants conceived through ART",
107
+ "filterStyle": "dropdown"
108
+ }
109
+ ],
110
+ "table": {
111
+ "wrapColumns": false,
112
+ "label": "Data Table",
113
+ "expanded": false,
114
+ "limitHeight": false,
115
+ "height": "",
116
+ "caption": "",
117
+ "showDownloadUrl": false,
118
+ "showDataTableLink": false,
119
+ "showFullGeoNameInCSV": false,
120
+ "forceDisplay": true,
121
+ "download": true,
122
+ "indexLabel": ""
123
+ },
124
+ "tooltips": {
125
+ "appearanceType": "hover",
126
+ "linkLabel": "Learn More",
127
+ "capitalizeLabels": true,
128
+ "opacity": 90
129
+ },
130
+ "visual": {
131
+ "minBubbleSize": 1,
132
+ "maxBubbleSize": 20,
133
+ "extraBubbleBorder": false,
134
+ "cityStyle": "circle",
135
+ "cityStyleLabel": "",
136
+ "showBubbleZeros": false,
137
+ "additionalCityStyles": [],
138
+ "geoCodeCircleSize": 8
139
+ },
140
+ "mapPosition": {
141
+ "coordinates": [
142
+ 0,
143
+ 30
144
+ ],
145
+ "zoom": 1
146
+ },
147
+ "map": {
148
+ "layers": [],
149
+ "patterns": []
150
+ },
151
+ "hexMap": {
152
+ "type": "",
153
+ "shapeGroups": [
154
+ {
155
+ "legendTitle": "",
156
+ "legendDescription": "",
157
+ "items": [
158
+ {
159
+ "key": "",
160
+ "shape": "Arrow Up",
161
+ "column": "",
162
+ "operator": "=",
163
+ "value": ""
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ },
169
+ "filterBehavior": "Filter Change",
170
+ "openModal": true,
171
+ "uid": "map1728585388205",
172
+ "dataDescription": {
173
+ "horizontal": false,
174
+ "series": false
175
+ },
176
+ "dataKey": "table - 6 dashboard.csv",
177
+ "version": "4.24.9",
178
+ "editor": {
179
+ "activeFilterValueForDescription": [
180
+ 0,
181
+ 0
182
+ ]
183
+ }
184
+ }