@cdc/map 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 (105) hide show
  1. package/CONFIG.md +268 -0
  2. package/README.md +74 -24
  3. package/dist/cdcmap-CY9IcPSi.es.js +6 -0
  4. package/dist/cdcmap-DlpiY3fQ.es.js +4 -0
  5. package/dist/cdcmap.js +29168 -27482
  6. package/examples/{testing-layer-2.json → __data__/testing-layer-2.json} +1 -1
  7. package/examples/{testing-layer.json → __data__/testing-layer.json} +1 -1
  8. package/examples/county-hsa-toggle.json +51993 -0
  9. package/examples/custom-map-layers.json +2 -2
  10. package/examples/default-county.json +6 -3
  11. package/examples/minimal-example.json +73 -0
  12. package/examples/private/annotation-bug.json +2 -2
  13. package/examples/private/css-issue.json +314 -0
  14. package/examples/private/region-breaking.json +1639 -0
  15. package/examples/private/test1.json +27247 -0
  16. package/package.json +4 -4
  17. package/src/CdcMapComponent.tsx +107 -14
  18. package/src/_stories/CdcMap.AltText.stories.tsx +122 -0
  19. package/src/_stories/CdcMap.Editor.ColumnsSectionTests.stories.tsx +600 -0
  20. package/src/_stories/CdcMap.Editor.DataTableSectionTests.stories.tsx +404 -0
  21. package/src/_stories/CdcMap.Editor.FiltersSectionTests.stories.tsx +229 -0
  22. package/src/_stories/CdcMap.Editor.GeneralSectionTests.stories.tsx +262 -0
  23. package/src/_stories/CdcMap.Editor.LegendSectionTests.stories.tsx +541 -0
  24. package/src/_stories/CdcMap.Editor.MultiCountryWorldMapTests.stories.tsx +359 -0
  25. package/src/_stories/CdcMap.Editor.PatternSettingsSectionTests.stories.tsx +516 -0
  26. package/src/_stories/CdcMap.Editor.SmallMultiplesSectionTests.stories.tsx +165 -0
  27. package/src/_stories/CdcMap.Editor.TextAnnotationsSectionTests.stories.tsx +145 -0
  28. package/src/_stories/CdcMap.Editor.TypeSectionTests.stories.tsx +312 -0
  29. package/src/_stories/CdcMap.Editor.VisualSectionTests.stories.tsx +359 -0
  30. package/src/_stories/CdcMap.Editor.ZoomControlsTests.stories.tsx +88 -0
  31. package/src/_stories/CdcMap.FocusVisibility.stories.tsx +87 -0
  32. package/src/_stories/CdcMap.HiddenMount.stories.tsx +69 -0
  33. package/src/_stories/CdcMap.ResetBehavior.stories.tsx +32 -0
  34. package/src/_stories/CdcMap.Zoom.stories.tsx +111 -0
  35. package/src/_stories/{CdcMap.stories.tsx → CdcMap.smoke.stories.tsx} +60 -0
  36. package/src/_stories/_mock/alt_text_metadata.json +65 -0
  37. package/src/_stories/_mock/legends/legend-tests.json +3 -3
  38. package/src/_stories/_mock/world-bubble-reset.json +138 -0
  39. package/src/_stories/_mock/world-data-zoom-filters.json +166 -0
  40. package/src/components/Annotation/AnnotationList.tsx +1 -1
  41. package/src/components/BubbleList.tsx +13 -0
  42. package/src/components/EditorPanel/components/EditorPanel.tsx +637 -382
  43. package/src/components/EditorPanel/components/HexShapeSettings.tsx +1 -1
  44. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +112 -117
  45. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +26 -13
  46. package/src/components/EditorPanel/components/editorPanel.styles.css +22 -2
  47. package/src/components/FilterControls.tsx +21 -0
  48. package/src/components/Legend/components/Legend.tsx +3 -3
  49. package/src/components/Legend/components/LegendItem.Hex.tsx +4 -2
  50. package/src/components/SmallMultiples/SmallMultiples.tsx +2 -2
  51. package/src/components/SmallMultiples/SynchronizedTooltip.tsx +1 -1
  52. package/src/components/UsaMap/components/UsaMap.County.tsx +309 -108
  53. package/src/components/UsaMap/components/UsaMap.Region.tsx +5 -2
  54. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +33 -10
  55. package/src/components/UsaMap/components/UsaMap.State.tsx +10 -3
  56. package/src/components/UsaMap/data/cb_2019_us_county_20m.json +75817 -1
  57. package/src/components/UsaMap/data/hsa_fips_mapping.json +3144 -0
  58. package/src/components/WorldMap/WorldMap.tsx +37 -4
  59. package/src/components/WorldMap/data/world-topo.json +1 -1
  60. package/src/components/ZoomableGroup.tsx +23 -3
  61. package/src/components/filterControls.styles.css +6 -0
  62. package/src/data/initial-state.js +3 -0
  63. package/src/data/supported-counties.json +1 -1
  64. package/src/helpers/countyTerritories.ts +38 -0
  65. package/src/helpers/dataTableHelpers.ts +35 -6
  66. package/src/helpers/generateRuntimeFilters.ts +2 -1
  67. package/src/helpers/handleMapAriaLabels.ts +45 -30
  68. package/src/helpers/shouldAutoResetSingleStateZoom.ts +22 -0
  69. package/src/helpers/tests/countyTerritories.test.ts +87 -0
  70. package/src/helpers/tests/handleMapAriaLabels.test.ts +71 -0
  71. package/src/helpers/tests/shouldAutoResetSingleStateZoom.test.ts +71 -0
  72. package/src/hooks/useApplyTooltipsToGeo.tsx +7 -4
  73. package/src/hooks/useGeoClickHandler.ts +13 -1
  74. package/src/hooks/useMapLayers.tsx +1 -1
  75. package/src/hooks/useStateZoom.tsx +39 -20
  76. package/src/hooks/useTooltip.test.tsx +2 -16
  77. package/src/hooks/useTooltip.ts +18 -7
  78. package/src/index.jsx +5 -2
  79. package/src/scss/main.scss +6 -21
  80. package/src/scss/map.scss +20 -0
  81. package/src/store/map.actions.ts +5 -2
  82. package/src/store/map.reducer.ts +12 -3
  83. package/src/test/CdcMap.test.jsx +24 -0
  84. package/src/types/MapConfig.ts +11 -0
  85. package/src/types/MapContext.ts +6 -1
  86. package/topojson-updater/README.txt +1 -1
  87. package/dist/cdcmap-vr9HZwRt.es.js +0 -6
  88. package/examples/__data__/city-state-data.json +0 -668
  89. package/examples/city-state.json +0 -434
  90. package/examples/default-world-data.json +0 -1450
  91. package/examples/new-cities.json +0 -656
  92. package/src/_stories/CdcMap.Editor.stories.tsx +0 -3648
  93. package/topojson-updater/package-lock.json +0 -223
  94. /package/src/_stories/{CdcMap.ColumnWrap.stories.tsx → CdcMap.ColumnWrap.smoke.stories.tsx} +0 -0
  95. /package/src/_stories/{CdcMap.Defaults.stories.tsx → CdcMap.Defaults.smoke.stories.tsx} +0 -0
  96. /package/src/_stories/{CdcMap.DistrictOfColumbia.stories.tsx → CdcMap.DistrictOfColumbia.smoke.stories.tsx} +0 -0
  97. /package/src/_stories/{CdcMap.Filters.stories.tsx → CdcMap.Filters.smoke.stories.tsx} +0 -0
  98. /package/src/_stories/{CdcMap.Legend.Gradient.stories.tsx → CdcMap.Legend.Gradient.smoke.stories.tsx} +0 -0
  99. /package/src/_stories/{CdcMap.Legend.stories.tsx → CdcMap.Legend.smoke.stories.tsx} +0 -0
  100. /package/src/_stories/{CdcMap.Patterns.stories.tsx → CdcMap.Patterns.smoke.stories.tsx} +0 -0
  101. /package/src/_stories/{CdcMap.SmallMultiples.stories.tsx → CdcMap.SmallMultiples.smoke.stories.tsx} +0 -0
  102. /package/src/_stories/{CdcMap.Table.stories.tsx → CdcMap.Table.smoke.stories.tsx} +0 -0
  103. /package/src/_stories/{CdcMap.ZeroColor.stories.tsx → CdcMap.ZeroColor.smoke.stories.tsx} +0 -0
  104. /package/src/_stories/{GoogleMap.stories.tsx → GoogleMap.smoke.stories.tsx} +0 -0
  105. /package/src/_stories/{UsaMap.NoData.stories.tsx → UsaMap.NoData.smoke.stories.tsx} +0 -0
@@ -1,223 +0,0 @@
1
- {
2
- "name": "topojson-updater",
3
- "version": "0.0.1",
4
- "lockfileVersion": 2,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "topojson-updater",
9
- "version": "0.0.1",
10
- "license": "Apache-2.0",
11
- "dependencies": {
12
- "shapefile": "^0.6.6",
13
- "topojson": "^3.0.2"
14
- }
15
- },
16
- "node_modules/array-source": {
17
- "version": "0.0.4",
18
- "resolved": "https://registry.npmjs.org/array-source/-/array-source-0.0.4.tgz",
19
- "integrity": "sha512-frNdc+zBn80vipY+GdcJkLEbMWj3xmzArYApmUGxoiV8uAu/ygcs9icPdsGdA26h0MkHUMW6EN2piIvVx+M5Mw=="
20
- },
21
- "node_modules/commander": {
22
- "version": "2.20.3",
23
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
24
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
25
- },
26
- "node_modules/file-source": {
27
- "version": "0.6.1",
28
- "resolved": "https://registry.npmjs.org/file-source/-/file-source-0.6.1.tgz",
29
- "integrity": "sha512-1R1KneL7eTXmXfKxC10V/9NeGOdbsAXJ+lQ//fvvcHUgtaZcZDWNJNblxAoVOyV1cj45pOtUrR3vZTBwqcW8XA==",
30
- "dependencies": {
31
- "stream-source": "0.3"
32
- }
33
- },
34
- "node_modules/path-source": {
35
- "version": "0.1.3",
36
- "resolved": "https://registry.npmjs.org/path-source/-/path-source-0.1.3.tgz",
37
- "integrity": "sha512-dWRHm5mIw5kw0cs3QZLNmpUWty48f5+5v9nWD2dw3Y0Hf+s01Ag8iJEWV0Sm0kocE8kK27DrIowha03e1YR+Qw==",
38
- "dependencies": {
39
- "array-source": "0.0",
40
- "file-source": "0.6"
41
- }
42
- },
43
- "node_modules/shapefile": {
44
- "version": "0.6.6",
45
- "resolved": "https://registry.npmjs.org/shapefile/-/shapefile-0.6.6.tgz",
46
- "integrity": "sha512-rLGSWeK2ufzCVx05wYd+xrWnOOdSV7xNUW5/XFgx3Bc02hBkpMlrd2F1dDII7/jhWzv0MSyBFh5uJIy9hLdfuw==",
47
- "dependencies": {
48
- "array-source": "0.0",
49
- "commander": "2",
50
- "path-source": "0.1",
51
- "slice-source": "0.4",
52
- "stream-source": "0.3",
53
- "text-encoding": "^0.6.4"
54
- },
55
- "bin": {
56
- "dbf2json": "bin/dbf2json",
57
- "shp2json": "bin/shp2json"
58
- }
59
- },
60
- "node_modules/slice-source": {
61
- "version": "0.4.1",
62
- "resolved": "https://registry.npmjs.org/slice-source/-/slice-source-0.4.1.tgz",
63
- "integrity": "sha512-YiuPbxpCj4hD9Qs06hGAz/OZhQ0eDuALN0lRWJez0eD/RevzKqGdUx1IOMUnXgpr+sXZLq3g8ERwbAH0bCb8vg=="
64
- },
65
- "node_modules/stream-source": {
66
- "version": "0.3.5",
67
- "resolved": "https://registry.npmjs.org/stream-source/-/stream-source-0.3.5.tgz",
68
- "integrity": "sha512-ZuEDP9sgjiAwUVoDModftG0JtYiLUV8K4ljYD1VyUMRWtbVf92474o4kuuul43iZ8t/hRuiDAx1dIJSvirrK/g=="
69
- },
70
- "node_modules/text-encoding": {
71
- "version": "0.6.4",
72
- "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz",
73
- "integrity": "sha512-hJnc6Qg3dWoOMkqP53F0dzRIgtmsAge09kxUIqGrEUS4qr5rWLckGYaQAVr+opBrIMRErGgy6f5aPnyPpyGRfg==",
74
- "deprecated": "no longer maintained"
75
- },
76
- "node_modules/topojson": {
77
- "version": "3.0.2",
78
- "resolved": "https://registry.npmjs.org/topojson/-/topojson-3.0.2.tgz",
79
- "integrity": "sha512-u3zeuL6WEVL0dmsRn7uHZKc4Ao4gpW3sORUv+N3ezLTvY3JdCuyg0hvpWiIfFw8p/JwVN++SvAsFgcFEeR15rQ==",
80
- "deprecated": "Use topojson-client, topojson-server or topojson-simplify directly.",
81
- "dependencies": {
82
- "topojson-client": "3.0.0",
83
- "topojson-server": "3.0.0",
84
- "topojson-simplify": "3.0.2"
85
- },
86
- "bin": {
87
- "geo2topo": "node_modules/topojson-server/bin/geo2topo",
88
- "topo2geo": "node_modules/topojson-client/bin/topo2geo",
89
- "topomerge": "node_modules/topojson-client/bin/topomerge",
90
- "topoquantize": "node_modules/topojson-client/bin/topoquantize",
91
- "toposimplify": "node_modules/topojson-simplify/bin/toposimplify"
92
- }
93
- },
94
- "node_modules/topojson-client": {
95
- "version": "3.0.0",
96
- "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.0.0.tgz",
97
- "integrity": "sha512-2phZ98wg/iKvsWxbB6JQcq0/N0f+sRx8ZogdvjCg+CjaJdmV0knP0OQwK5XbgnytAPx5lPZk41kiWpgH2w9FHg==",
98
- "dependencies": {
99
- "commander": "2"
100
- },
101
- "bin": {
102
- "topo2geo": "bin/topo2geo",
103
- "topomerge": "bin/topomerge",
104
- "topoquantize": "bin/topoquantize"
105
- }
106
- },
107
- "node_modules/topojson-server": {
108
- "version": "3.0.0",
109
- "resolved": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.0.tgz",
110
- "integrity": "sha512-UhhwQk4e2+lwhAVYkja3J5nQHQmKwORDuIQPkMnFFZFcLqWKLQWI3u7fZWtNIXTElBjTYdBUL1kzi1+oS/qDQw==",
111
- "dependencies": {
112
- "commander": "2"
113
- },
114
- "bin": {
115
- "geo2topo": "bin/geo2topo"
116
- }
117
- },
118
- "node_modules/topojson-simplify": {
119
- "version": "3.0.2",
120
- "resolved": "https://registry.npmjs.org/topojson-simplify/-/topojson-simplify-3.0.2.tgz",
121
- "integrity": "sha512-gyYSVRt4jO/0RJXKZQPzTDQRWV+D/nOfiljNUv0HBXslFLtq3yxRHrl7jbrjdbda5Ytdr7M8BZUI4OxU7tnbRQ==",
122
- "dependencies": {
123
- "commander": "2",
124
- "topojson-client": "3"
125
- },
126
- "bin": {
127
- "toposimplify": "bin/toposimplify"
128
- }
129
- }
130
- },
131
- "dependencies": {
132
- "array-source": {
133
- "version": "0.0.4",
134
- "resolved": "https://registry.npmjs.org/array-source/-/array-source-0.0.4.tgz",
135
- "integrity": "sha512-frNdc+zBn80vipY+GdcJkLEbMWj3xmzArYApmUGxoiV8uAu/ygcs9icPdsGdA26h0MkHUMW6EN2piIvVx+M5Mw=="
136
- },
137
- "commander": {
138
- "version": "2.20.3",
139
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
140
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
141
- },
142
- "file-source": {
143
- "version": "0.6.1",
144
- "resolved": "https://registry.npmjs.org/file-source/-/file-source-0.6.1.tgz",
145
- "integrity": "sha512-1R1KneL7eTXmXfKxC10V/9NeGOdbsAXJ+lQ//fvvcHUgtaZcZDWNJNblxAoVOyV1cj45pOtUrR3vZTBwqcW8XA==",
146
- "requires": {
147
- "stream-source": "0.3"
148
- }
149
- },
150
- "path-source": {
151
- "version": "0.1.3",
152
- "resolved": "https://registry.npmjs.org/path-source/-/path-source-0.1.3.tgz",
153
- "integrity": "sha512-dWRHm5mIw5kw0cs3QZLNmpUWty48f5+5v9nWD2dw3Y0Hf+s01Ag8iJEWV0Sm0kocE8kK27DrIowha03e1YR+Qw==",
154
- "requires": {
155
- "array-source": "0.0",
156
- "file-source": "0.6"
157
- }
158
- },
159
- "shapefile": {
160
- "version": "0.6.6",
161
- "resolved": "https://registry.npmjs.org/shapefile/-/shapefile-0.6.6.tgz",
162
- "integrity": "sha512-rLGSWeK2ufzCVx05wYd+xrWnOOdSV7xNUW5/XFgx3Bc02hBkpMlrd2F1dDII7/jhWzv0MSyBFh5uJIy9hLdfuw==",
163
- "requires": {
164
- "array-source": "0.0",
165
- "commander": "2",
166
- "path-source": "0.1",
167
- "slice-source": "0.4",
168
- "stream-source": "0.3",
169
- "text-encoding": "^0.6.4"
170
- }
171
- },
172
- "slice-source": {
173
- "version": "0.4.1",
174
- "resolved": "https://registry.npmjs.org/slice-source/-/slice-source-0.4.1.tgz",
175
- "integrity": "sha512-YiuPbxpCj4hD9Qs06hGAz/OZhQ0eDuALN0lRWJez0eD/RevzKqGdUx1IOMUnXgpr+sXZLq3g8ERwbAH0bCb8vg=="
176
- },
177
- "stream-source": {
178
- "version": "0.3.5",
179
- "resolved": "https://registry.npmjs.org/stream-source/-/stream-source-0.3.5.tgz",
180
- "integrity": "sha512-ZuEDP9sgjiAwUVoDModftG0JtYiLUV8K4ljYD1VyUMRWtbVf92474o4kuuul43iZ8t/hRuiDAx1dIJSvirrK/g=="
181
- },
182
- "text-encoding": {
183
- "version": "0.6.4",
184
- "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz",
185
- "integrity": "sha512-hJnc6Qg3dWoOMkqP53F0dzRIgtmsAge09kxUIqGrEUS4qr5rWLckGYaQAVr+opBrIMRErGgy6f5aPnyPpyGRfg=="
186
- },
187
- "topojson": {
188
- "version": "3.0.2",
189
- "resolved": "https://registry.npmjs.org/topojson/-/topojson-3.0.2.tgz",
190
- "integrity": "sha512-u3zeuL6WEVL0dmsRn7uHZKc4Ao4gpW3sORUv+N3ezLTvY3JdCuyg0hvpWiIfFw8p/JwVN++SvAsFgcFEeR15rQ==",
191
- "requires": {
192
- "topojson-client": "3.0.0",
193
- "topojson-server": "3.0.0",
194
- "topojson-simplify": "3.0.2"
195
- }
196
- },
197
- "topojson-client": {
198
- "version": "3.0.0",
199
- "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.0.0.tgz",
200
- "integrity": "sha512-2phZ98wg/iKvsWxbB6JQcq0/N0f+sRx8ZogdvjCg+CjaJdmV0knP0OQwK5XbgnytAPx5lPZk41kiWpgH2w9FHg==",
201
- "requires": {
202
- "commander": "2"
203
- }
204
- },
205
- "topojson-server": {
206
- "version": "3.0.0",
207
- "resolved": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.0.tgz",
208
- "integrity": "sha512-UhhwQk4e2+lwhAVYkja3J5nQHQmKwORDuIQPkMnFFZFcLqWKLQWI3u7fZWtNIXTElBjTYdBUL1kzi1+oS/qDQw==",
209
- "requires": {
210
- "commander": "2"
211
- }
212
- },
213
- "topojson-simplify": {
214
- "version": "3.0.2",
215
- "resolved": "https://registry.npmjs.org/topojson-simplify/-/topojson-simplify-3.0.2.tgz",
216
- "integrity": "sha512-gyYSVRt4jO/0RJXKZQPzTDQRWV+D/nOfiljNUv0HBXslFLtq3yxRHrl7jbrjdbda5Ytdr7M8BZUI4OxU7tnbRQ==",
217
- "requires": {
218
- "commander": "2",
219
- "topojson-client": "3"
220
- }
221
- }
222
- }
223
- }