@cdc/map 4.26.2 → 4.26.4
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.
- package/CONFIG.md +235 -0
- package/README.md +70 -24
- package/dist/cdcmap-CY9IcPSi.es.js +6 -0
- package/dist/cdcmap-DlpiY3fQ.es.js +4 -0
- package/dist/cdcmap.js +31260 -27946
- package/examples/{testing-layer-2.json → __data__/testing-layer-2.json} +1 -1
- package/examples/{testing-layer.json → __data__/testing-layer.json} +1 -1
- package/examples/county-hsa-toggle.json +51993 -0
- package/examples/custom-map-layers.json +2 -2
- package/examples/default-county.json +3 -3
- package/examples/minimal-example.json +69 -0
- package/examples/private/annotation-bug.json +642 -0
- package/examples/private/css-issue.json +314 -0
- package/examples/private/region-breaking.json +1639 -0
- package/examples/private/test1.json +27247 -0
- package/package.json +4 -4
- package/src/CdcMap.tsx +3 -14
- package/src/CdcMapComponent.tsx +302 -164
- package/src/_stories/CdcMap.Defaults.smoke.stories.tsx +76 -0
- package/src/_stories/CdcMap.Editor.ColumnsSectionTests.stories.tsx +601 -0
- package/src/_stories/CdcMap.Editor.DataTableSectionTests.stories.tsx +404 -0
- package/src/_stories/CdcMap.Editor.FiltersSectionTests.stories.tsx +229 -0
- package/src/_stories/CdcMap.Editor.GeneralSectionTests.stories.tsx +262 -0
- package/src/_stories/CdcMap.Editor.LegendSectionTests.stories.tsx +541 -0
- package/src/_stories/CdcMap.Editor.MultiCountryWorldMapTests.stories.tsx +359 -0
- package/src/_stories/CdcMap.Editor.PatternSettingsSectionTests.stories.tsx +516 -0
- package/src/_stories/CdcMap.Editor.SmallMultiplesSectionTests.stories.tsx +165 -0
- package/src/_stories/CdcMap.Editor.TextAnnotationsSectionTests.stories.tsx +145 -0
- package/src/_stories/CdcMap.Editor.TypeSectionTests.stories.tsx +312 -0
- package/src/_stories/CdcMap.Editor.VisualSectionTests.stories.tsx +359 -0
- package/src/_stories/CdcMap.Editor.ZoomControlsTests.stories.tsx +88 -0
- package/src/_stories/{CdcMap.stories.tsx → CdcMap.smoke.stories.tsx} +23 -1
- package/src/_stories/Map.HTMLInDataTable.stories.tsx +385 -0
- package/src/_stories/_mock/legends/legend-tests.json +3 -3
- package/src/_stories/_mock/multi-state-show-unselected.json +82 -0
- package/src/cdcMapComponent.styles.css +2 -2
- package/src/components/Annotation/Annotation.Draggable.styles.css +4 -4
- package/src/components/Annotation/AnnotationDropdown.styles.css +1 -1
- package/src/components/Annotation/AnnotationList.styles.css +13 -13
- package/src/components/Annotation/AnnotationList.tsx +1 -1
- package/src/components/EditorPanel/components/EditorPanel.tsx +905 -416
- package/src/components/EditorPanel/components/HexShapeSettings.tsx +1 -1
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +112 -117
- package/src/components/EditorPanel/components/Panels/Panel.PatternSettings-style.css +1 -1
- package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +31 -15
- package/src/components/EditorPanel/components/editorPanel.styles.css +55 -25
- package/src/components/Legend/components/Legend.tsx +12 -7
- package/src/components/Legend/components/LegendGroup/legend.group.css +5 -5
- package/src/components/Legend/components/LegendItem.Hex.tsx +4 -2
- package/src/components/Legend/components/index.scss +2 -3
- package/src/components/NavigationMenu.tsx +2 -1
- package/src/components/SmallMultiples/SmallMultiples.css +5 -5
- package/src/components/SmallMultiples/SynchronizedTooltip.tsx +1 -1
- package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +32 -17
- package/src/components/UsaMap/components/TerritoriesSection.tsx +3 -2
- package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +13 -8
- package/src/components/UsaMap/components/UsaMap.County.tsx +629 -231
- package/src/components/UsaMap/components/UsaMap.Region.styles.css +1 -1
- package/src/components/UsaMap/components/UsaMap.SingleState.styles.css +2 -2
- package/src/components/UsaMap/components/UsaMap.State.tsx +14 -9
- package/src/components/UsaMap/data/cb_2019_us_county_20m.json +75817 -1
- package/src/components/UsaMap/data/hsa_fips_mapping.json +3144 -0
- package/src/components/WorldMap/WorldMap.tsx +10 -13
- package/src/components/WorldMap/data/world-topo-updated.json +1 -0
- package/src/components/WorldMap/data/world-topo.json +1 -1
- package/src/components/WorldMap/worldMap.styles.css +1 -1
- package/src/components/ZoomControls.tsx +49 -18
- package/src/components/zoomControls.styles.css +27 -11
- package/src/data/initial-state.js +15 -5
- package/src/data/legacy-defaults.ts +8 -0
- package/src/data/supported-counties.json +1 -1
- package/src/data/supported-geos.js +19 -0
- package/src/helpers/colors.ts +2 -1
- package/src/helpers/countyTerritories.ts +38 -0
- package/src/helpers/dataTableHelpers.ts +85 -0
- package/src/helpers/displayGeoName.ts +19 -11
- package/src/helpers/getMapContainerClasses.ts +8 -2
- package/src/helpers/getMatchingPatternForRow.ts +67 -0
- package/src/helpers/getPatternForRow.ts +11 -18
- package/src/helpers/tests/countyTerritories.test.ts +87 -0
- package/src/helpers/tests/dataTableHelpers.test.ts +78 -0
- package/src/helpers/tests/displayGeoName.test.ts +17 -0
- package/src/helpers/tests/getMatchingPatternForRow.test.ts +150 -0
- package/src/helpers/tests/getPatternForRow.test.ts +140 -2
- package/src/helpers/urlDataHelpers.ts +7 -1
- package/src/hooks/useApplyTooltipsToGeo.tsx +7 -4
- package/src/hooks/useMapLayers.tsx +1 -1
- package/src/hooks/useResizeObserver.ts +36 -22
- package/src/hooks/useTooltip.test.tsx +64 -0
- package/src/hooks/useTooltip.ts +46 -15
- package/src/scss/editor-panel.scss +1 -1
- package/src/scss/main.scss +140 -6
- package/src/scss/map.scss +9 -4
- package/src/store/map.actions.ts +5 -0
- package/src/store/map.reducer.ts +13 -0
- package/src/test/CdcMap.test.jsx +26 -2
- package/src/types/MapConfig.ts +28 -4
- package/src/types/MapContext.ts +5 -1
- package/topojson-updater/README.txt +1 -1
- package/dist/cdcmap-Cf9_fbQf.es.js +0 -6
- package/examples/__data__/city-state-data.json +0 -668
- package/examples/city-state.json +0 -434
- package/examples/default-world-data.json +0 -1450
- package/examples/new-cities.json +0 -656
- package/src/_stories/CdcMap.Editor.stories.tsx +0 -3475
- package/src/helpers/componentHelpers.ts +0 -8
- package/topojson-updater/package-lock.json +0 -223
- /package/src/_stories/{CdcMap.ColumnWrap.stories.tsx → CdcMap.ColumnWrap.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.DistrictOfColumbia.stories.tsx → CdcMap.DistrictOfColumbia.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Filters.stories.tsx → CdcMap.Filters.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Legend.Gradient.stories.tsx → CdcMap.Legend.Gradient.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Legend.stories.tsx → CdcMap.Legend.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Patterns.stories.tsx → CdcMap.Patterns.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.SmallMultiples.stories.tsx → CdcMap.SmallMultiples.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.Table.stories.tsx → CdcMap.Table.smoke.stories.tsx} +0 -0
- /package/src/_stories/{CdcMap.ZeroColor.stories.tsx → CdcMap.ZeroColor.smoke.stories.tsx} +0 -0
- /package/src/_stories/{GoogleMap.stories.tsx → GoogleMap.smoke.stories.tsx} +0 -0
- /package/src/_stories/{UsaMap.NoData.stories.tsx → UsaMap.NoData.smoke.stories.tsx} +0 -0
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"layers": [
|
|
101
101
|
{
|
|
102
102
|
"name": "Layer One",
|
|
103
|
-
"url": "./examples/testing-layer.json",
|
|
103
|
+
"url": "./examples/__data__/testing-layer.json",
|
|
104
104
|
"namespace": "cove",
|
|
105
105
|
"fill": "blue",
|
|
106
106
|
"stroke": "orange",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
"name": "Layer Two",
|
|
111
|
-
"url": "./examples/testing-layer-2.json",
|
|
111
|
+
"url": "./examples/__data__/testing-layer-2.json",
|
|
112
112
|
"namespace": "cove",
|
|
113
113
|
"fill": "blue",
|
|
114
114
|
"stroke": "orange",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"layers": [
|
|
34
34
|
{
|
|
35
35
|
"name": "Layer One",
|
|
36
|
-
"url": "./examples/testing-layer.json",
|
|
36
|
+
"url": "./examples/__data__/testing-layer.json",
|
|
37
37
|
"namespace": "cove"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"name": "Layer Two",
|
|
41
|
-
"url": "./examples/testing-layer.json",
|
|
41
|
+
"url": "./examples/__data__/testing-layer.json",
|
|
42
42
|
"namespace": "cove"
|
|
43
43
|
}
|
|
44
44
|
]
|
|
@@ -140,4 +140,4 @@
|
|
|
140
140
|
"link": ""
|
|
141
141
|
}
|
|
142
142
|
]
|
|
143
|
-
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "4.26.4",
|
|
3
|
+
"color": "pinkpurple",
|
|
4
|
+
"general": {
|
|
5
|
+
"title": "Minimal US Map",
|
|
6
|
+
"geoType": "us",
|
|
7
|
+
"type": "data",
|
|
8
|
+
"showTitle": true
|
|
9
|
+
},
|
|
10
|
+
"type": "map",
|
|
11
|
+
"columns": {
|
|
12
|
+
"geo": {
|
|
13
|
+
"name": "FIPS Codes",
|
|
14
|
+
"label": "Location",
|
|
15
|
+
"tooltip": false,
|
|
16
|
+
"dataTable": true
|
|
17
|
+
},
|
|
18
|
+
"primary": {
|
|
19
|
+
"name": "Rate",
|
|
20
|
+
"label": "Rate",
|
|
21
|
+
"prefix": "",
|
|
22
|
+
"suffix": "%",
|
|
23
|
+
"tooltip": true,
|
|
24
|
+
"dataTable": true
|
|
25
|
+
},
|
|
26
|
+
"navigate": {
|
|
27
|
+
"name": ""
|
|
28
|
+
},
|
|
29
|
+
"latitude": {
|
|
30
|
+
"name": ""
|
|
31
|
+
},
|
|
32
|
+
"longitude": {
|
|
33
|
+
"name": ""
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"legend": {
|
|
37
|
+
"type": "equalnumber",
|
|
38
|
+
"numberOfItems": 3,
|
|
39
|
+
"position": "side",
|
|
40
|
+
"style": "circles",
|
|
41
|
+
"title": "Legend",
|
|
42
|
+
"description": "",
|
|
43
|
+
"descriptions": {},
|
|
44
|
+
"specialClasses": [],
|
|
45
|
+
"unified": false,
|
|
46
|
+
"singleColumn": false,
|
|
47
|
+
"singleRow": false,
|
|
48
|
+
"verticalSorted": false,
|
|
49
|
+
"showSpecialClassesLast": false,
|
|
50
|
+
"dynamicDescription": false,
|
|
51
|
+
"hideBorder": false
|
|
52
|
+
},
|
|
53
|
+
"filters": [],
|
|
54
|
+
"filterBehavior": "Filter Change",
|
|
55
|
+
"data": [
|
|
56
|
+
{
|
|
57
|
+
"FIPS Codes": "01",
|
|
58
|
+
"Rate": 10
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"FIPS Codes": "02",
|
|
62
|
+
"Rate": 20
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"FIPS Codes": "04",
|
|
66
|
+
"Rate": 30
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|