@cdc/map 4.25.1 → 4.25.2-25
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/dist/cdcmap.js +19423 -19799
- package/examples/example-city-state.json +1 -1
- package/index.html +6 -6
- package/package.json +3 -3
- package/src/CdcMap.tsx +3 -5
- package/src/_stories/CdcMap.Filters.stories.tsx +19 -0
- package/src/_stories/_mock/wastewater-map.json +210 -206
- package/src/components/CityList.tsx +1 -7
- package/src/components/EditorPanel/components/EditorPanel.tsx +202 -263
- package/src/components/NavigationMenu.tsx +1 -1
- package/src/components/UsaMap/components/TerritoriesSection.tsx +18 -8
- package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +15 -16
- package/src/components/UsaMap/components/UsaMap.State.tsx +1 -1
|
@@ -41,10 +41,9 @@ import useMapLayers from '../../../hooks/useMapLayers.tsx'
|
|
|
41
41
|
import HexSetting from './HexShapeSettings.jsx'
|
|
42
42
|
import ConfigContext from '../../../context.ts'
|
|
43
43
|
import { MapContext } from '../../../types/MapContext.js'
|
|
44
|
-
import { TextField } from './Inputs'
|
|
45
44
|
import Alert from '@cdc/core/components/Alert'
|
|
46
45
|
import { updateFieldFactory } from '@cdc/core/helpers/updateFieldFactory'
|
|
47
|
-
import { Select } from '@cdc/core/components/EditorPanel/Inputs'
|
|
46
|
+
import { CheckBox, Select, TextField } from '@cdc/core/components/EditorPanel/Inputs'
|
|
48
47
|
|
|
49
48
|
// Todo: move to useReducer, seperate files out.
|
|
50
49
|
const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
@@ -1348,27 +1347,6 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1348
1347
|
|
|
1349
1348
|
const isLoadedFromUrl = state?.dataKey?.includes('http://') || state?.dataKey?.includes('https://')
|
|
1350
1349
|
|
|
1351
|
-
// if isDebug = true, then try to set the Geography Col and Data col to reduce clicking
|
|
1352
|
-
const setGeoColumn = () => {
|
|
1353
|
-
// only for debug mode
|
|
1354
|
-
let geoColFound = columnsInData.includes(state.columns.geo.name)
|
|
1355
|
-
if (undefined !== isDebug && isDebug && !geoColFound) {
|
|
1356
|
-
// then try to set the x axis to appropriate value so we dont have to manually do it
|
|
1357
|
-
let mapcols = columnsInData[0]
|
|
1358
|
-
if (mapcols !== '') editColumn('geo', 'name', mapcols)
|
|
1359
|
-
|
|
1360
|
-
if (
|
|
1361
|
-
!state.columns.hasOwnProperty('primary') ||
|
|
1362
|
-
undefined === state.columns.primary.name ||
|
|
1363
|
-
'' === state.columns.primary.name ||
|
|
1364
|
-
!state.columns.primary.name
|
|
1365
|
-
) {
|
|
1366
|
-
editColumn('primary', 'name', columnsInData[1]) // blindly picks first value col
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
if (isDebug) setGeoColumn()
|
|
1371
|
-
|
|
1372
1350
|
return (
|
|
1373
1351
|
<ErrorBoundary component='EditorPanel'>
|
|
1374
1352
|
<Layout.Sidebar
|
|
@@ -1386,21 +1364,6 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1386
1364
|
<AccordionItemButton>Type</AccordionItemButton>
|
|
1387
1365
|
</AccordionItemHeading>
|
|
1388
1366
|
<AccordionItemPanel>
|
|
1389
|
-
{/* Geography */}
|
|
1390
|
-
{/*<Select*/}
|
|
1391
|
-
{/* options={[*/}
|
|
1392
|
-
{/* { value: 'us', label: 'United States' },*/}
|
|
1393
|
-
{/* { value: 'us-region', label: 'U.S. Region' },*/}
|
|
1394
|
-
{/* { value: 'world', label: 'World' },*/}
|
|
1395
|
-
{/* { value: 'single-state', label: 'U.S. State' },*/}
|
|
1396
|
-
{/* { value: 'google-map', label: 'Google Map API' }*/}
|
|
1397
|
-
{/* ]}*/}
|
|
1398
|
-
{/* section={'general'}*/}
|
|
1399
|
-
{/* fieldName={'geoType'}*/}
|
|
1400
|
-
{/* label='Geography'*/}
|
|
1401
|
-
{/* updateField={updateField}*/}
|
|
1402
|
-
{/*/>*/}
|
|
1403
|
-
|
|
1404
1367
|
<label>
|
|
1405
1368
|
<span className='edit-label column-heading'>
|
|
1406
1369
|
<span>Geography</span>
|
|
@@ -1448,51 +1411,39 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1448
1411
|
<AlabamaGraphic />
|
|
1449
1412
|
<span>U.S. State</span>
|
|
1450
1413
|
</button>
|
|
1451
|
-
{/* <button
|
|
1452
|
-
className={`${state.general.geoType === 'google-map' ? 'active' : ''} full-width`}
|
|
1453
|
-
onClick={e => {
|
|
1454
|
-
e.preventDefault()
|
|
1455
|
-
handleEditorChanges('geoType', 'google-map')
|
|
1456
|
-
}}
|
|
1457
|
-
>
|
|
1458
|
-
<UsaGraphic />
|
|
1459
|
-
<span>Google Map Api</span>
|
|
1460
|
-
</button> */}
|
|
1461
1414
|
</ul>
|
|
1462
1415
|
</label>
|
|
1463
1416
|
{/* Select > State or County Map */}
|
|
1464
1417
|
{(state.general.geoType === 'us' || state.general.geoType === 'us-county') && (
|
|
1465
|
-
<
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
</label>
|
|
1418
|
+
<Select
|
|
1419
|
+
label='Geography Subtype'
|
|
1420
|
+
value={state.general.geoType}
|
|
1421
|
+
options={[
|
|
1422
|
+
{ value: 'us', label: 'US State-Level' },
|
|
1423
|
+
{ value: 'us-county', label: 'US County-Level' }
|
|
1424
|
+
]}
|
|
1425
|
+
onChange={event => {
|
|
1426
|
+
handleEditorChanges('geoType', event.target.value)
|
|
1427
|
+
}}
|
|
1428
|
+
/>
|
|
1477
1429
|
)}
|
|
1478
1430
|
{(state.general.geoType === 'us-county' || state.general.geoType === 'single-state') && (
|
|
1479
|
-
<
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
</label>
|
|
1431
|
+
<Select
|
|
1432
|
+
label='County Census Year'
|
|
1433
|
+
value={state.general.countyCensusYear || '2019'}
|
|
1434
|
+
options={[
|
|
1435
|
+
{ value: '2022', label: '2022' },
|
|
1436
|
+
{ value: '2021', label: '2021' },
|
|
1437
|
+
{ value: '2020', label: '2020' },
|
|
1438
|
+
{ value: '2019', label: '2019' },
|
|
1439
|
+
{ value: '2015', label: '2015' },
|
|
1440
|
+
{ value: '2014', label: '2014' },
|
|
1441
|
+
{ value: '2013', label: '2013' }
|
|
1442
|
+
]}
|
|
1443
|
+
onChange={event => {
|
|
1444
|
+
handleEditorChanges('countyCensusYear', event.target.value)
|
|
1445
|
+
}}
|
|
1446
|
+
/>
|
|
1496
1447
|
)}
|
|
1497
1448
|
{(state.general.geoType === 'us-county' || state.general.geoType === 'single-state') && (
|
|
1498
1449
|
<label>
|
|
@@ -1540,52 +1491,51 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1540
1491
|
</label>
|
|
1541
1492
|
)}
|
|
1542
1493
|
{/* Type */}
|
|
1543
|
-
<
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
<Tooltip
|
|
1548
|
-
<
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
<
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1494
|
+
<Select
|
|
1495
|
+
label={
|
|
1496
|
+
<>
|
|
1497
|
+
Map Type
|
|
1498
|
+
<Tooltip style={{ textTransform: 'none' }}>
|
|
1499
|
+
<Tooltip.Target>
|
|
1500
|
+
<Icon display='question' style={{ marginLeft: '0.5rem' }} />
|
|
1501
|
+
</Tooltip.Target>
|
|
1502
|
+
<Tooltip.Content>
|
|
1503
|
+
<p>
|
|
1504
|
+
Select "Data" to create a color-coded data map. To create a navigation-only map, select
|
|
1505
|
+
"Navigation."
|
|
1506
|
+
</p>
|
|
1507
|
+
</Tooltip.Content>
|
|
1508
|
+
</Tooltip>
|
|
1509
|
+
</>
|
|
1510
|
+
}
|
|
1511
|
+
value={state.general.type}
|
|
1512
|
+
options={[
|
|
1513
|
+
{ value: 'data', label: 'Data' },
|
|
1514
|
+
...(state.general.geoType === 'us-county' ? [{ value: 'us-geocode', label: 'Geocode' }] : []),
|
|
1515
|
+
...(state.general.geoType === 'world' ? [{ value: 'world-geocode', label: 'Geocode' }] : []),
|
|
1516
|
+
...(state.general.geoType !== 'us-county' ? [{ value: 'navigation', label: 'Navigation' }] : []),
|
|
1517
|
+
...(state.general.geoType === 'world' || state.general.geoType === 'us'
|
|
1518
|
+
? [{ value: 'bubble', label: 'Bubble' }]
|
|
1519
|
+
: [])
|
|
1520
|
+
]}
|
|
1521
|
+
onChange={event => {
|
|
1522
|
+
handleEditorChanges('editorMapType', event.target.value)
|
|
1523
|
+
}}
|
|
1524
|
+
/>
|
|
1573
1525
|
|
|
1574
1526
|
{/* Navigation Behavior */}
|
|
1575
1527
|
{(state.general.type === 'navigation' || state.general.type === 'data') && (
|
|
1576
|
-
<
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
</select>
|
|
1588
|
-
</label>
|
|
1528
|
+
<Select
|
|
1529
|
+
label='Navigation Behavior'
|
|
1530
|
+
value={state.general.navigationTarget}
|
|
1531
|
+
options={[
|
|
1532
|
+
{ value: '_self', label: 'Same Window' },
|
|
1533
|
+
{ value: '_blank', label: 'New Window' }
|
|
1534
|
+
]}
|
|
1535
|
+
onChange={event => {
|
|
1536
|
+
handleEditorChanges('navigationTarget', event.target.value)
|
|
1537
|
+
}}
|
|
1538
|
+
/>
|
|
1589
1539
|
)}
|
|
1590
1540
|
<label>
|
|
1591
1541
|
<span className='edit-label'>Data Classification Type</span>
|
|
@@ -1620,16 +1570,13 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1620
1570
|
{'us' === state.general.geoType &&
|
|
1621
1571
|
'bubble' !== state.general.type &&
|
|
1622
1572
|
false === state.general.displayAsHex && (
|
|
1623
|
-
<
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
/>
|
|
1631
|
-
<span className='edit-label'>
|
|
1632
|
-
Show state labels
|
|
1573
|
+
<CheckBox
|
|
1574
|
+
label='Show state labels'
|
|
1575
|
+
checked={state.general.displayStateLabels}
|
|
1576
|
+
onChange={event => {
|
|
1577
|
+
handleEditorChanges('displayStateLabels', event.target.checked)
|
|
1578
|
+
}}
|
|
1579
|
+
tooltip={
|
|
1633
1580
|
<Tooltip style={{ textTransform: 'none' }}>
|
|
1634
1581
|
<Tooltip.Target>
|
|
1635
1582
|
<Icon display='question' style={{ marginLeft: '0.5rem' }} />
|
|
@@ -1638,9 +1585,22 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1638
1585
|
<p>Recommended set to display for Section 508 compliance.</p>
|
|
1639
1586
|
</Tooltip.Content>
|
|
1640
1587
|
</Tooltip>
|
|
1641
|
-
|
|
1642
|
-
|
|
1588
|
+
}
|
|
1589
|
+
/>
|
|
1643
1590
|
)}
|
|
1591
|
+
|
|
1592
|
+
{'us' === state.general.geoType && (
|
|
1593
|
+
<label className='checkbox'>
|
|
1594
|
+
<input
|
|
1595
|
+
type='checkbox'
|
|
1596
|
+
checked={general.territoriesAlwaysShow || false}
|
|
1597
|
+
onChange={event => {
|
|
1598
|
+
handleEditorChanges('territoriesAlwaysShow', event.target.checked)
|
|
1599
|
+
}}
|
|
1600
|
+
/>
|
|
1601
|
+
<span className='edit-label'>Show All Territories</span>
|
|
1602
|
+
</label>
|
|
1603
|
+
)}
|
|
1644
1604
|
</AccordionItemPanel>
|
|
1645
1605
|
</AccordionItem>
|
|
1646
1606
|
<AccordionItem>
|
|
@@ -1756,18 +1716,7 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1756
1716
|
</Tooltip>
|
|
1757
1717
|
}
|
|
1758
1718
|
/>
|
|
1759
|
-
|
|
1760
|
-
<label className='checkbox'>
|
|
1761
|
-
<input
|
|
1762
|
-
type='checkbox'
|
|
1763
|
-
checked={general.territoriesAlwaysShow || false}
|
|
1764
|
-
onChange={event => {
|
|
1765
|
-
handleEditorChanges('territoriesAlwaysShow', event.target.checked)
|
|
1766
|
-
}}
|
|
1767
|
-
/>
|
|
1768
|
-
<span className='edit-label'>Show All Territories</span>
|
|
1769
|
-
</label>
|
|
1770
|
-
)}
|
|
1719
|
+
|
|
1771
1720
|
{/* <label className="checkbox mt-4">
|
|
1772
1721
|
<input type="checkbox" checked={ state.general.showDownloadMediaButton } onChange={(event) => { handleEditorChanges("toggleDownloadMediaButton", event.target.checked) }} />
|
|
1773
1722
|
<span className="edit-label">Enable Media Download</span>
|
|
@@ -1797,14 +1746,13 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1797
1746
|
</Tooltip.Content>
|
|
1798
1747
|
</Tooltip>
|
|
1799
1748
|
</span>
|
|
1800
|
-
<
|
|
1749
|
+
<Select
|
|
1801
1750
|
value={state.columns.geo ? state.columns.geo.name : columnsOptions[0]}
|
|
1751
|
+
options={columnsOptions.map(c => c.key)}
|
|
1802
1752
|
onChange={event => {
|
|
1803
1753
|
editColumn('geo', 'name', event.target.value)
|
|
1804
1754
|
}}
|
|
1805
|
-
|
|
1806
|
-
{columnsOptions}
|
|
1807
|
-
</select>
|
|
1755
|
+
/>
|
|
1808
1756
|
</label>
|
|
1809
1757
|
{state.general.type === 'us-geocode' && (
|
|
1810
1758
|
<label className='checkbox'>
|
|
@@ -1856,9 +1804,17 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1856
1804
|
</fieldset>
|
|
1857
1805
|
{'navigation' !== state.general.type && (
|
|
1858
1806
|
<fieldset className='primary-fieldset edit-block'>
|
|
1859
|
-
<
|
|
1860
|
-
|
|
1861
|
-
|
|
1807
|
+
<Select
|
|
1808
|
+
label='Data Column'
|
|
1809
|
+
value={columns.primary.name}
|
|
1810
|
+
options={columnsOptions.map(c => c.key)}
|
|
1811
|
+
onChange={event => {
|
|
1812
|
+
const _state = _.cloneDeep(state)
|
|
1813
|
+
_state.columns.primary.name = event.target.value
|
|
1814
|
+
_state.columns.primary.label = event.target.value
|
|
1815
|
+
setState(_state)
|
|
1816
|
+
}}
|
|
1817
|
+
tooltip={
|
|
1862
1818
|
<Tooltip style={{ textTransform: 'none' }}>
|
|
1863
1819
|
<Tooltip.Target>
|
|
1864
1820
|
<Icon display='question' style={{ marginLeft: '0.5rem' }} />
|
|
@@ -1867,16 +1823,8 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
1867
1823
|
<p>Select the source column containing the categorical or numeric values to be mapped.</p>
|
|
1868
1824
|
</Tooltip.Content>
|
|
1869
1825
|
</Tooltip>
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
value={state.columns.primary ? state.columns.primary.name : columnsOptions[0]}
|
|
1873
|
-
onChange={event => {
|
|
1874
|
-
editColumn('primary', 'name', event.target.value)
|
|
1875
|
-
}}
|
|
1876
|
-
>
|
|
1877
|
-
{columnsOptions}
|
|
1878
|
-
</select>
|
|
1879
|
-
</label>
|
|
1826
|
+
}
|
|
1827
|
+
/>
|
|
1880
1828
|
<label className='checkbox'>
|
|
1881
1829
|
<input
|
|
1882
1830
|
type='checkbox'
|
|
@@ -2001,24 +1949,22 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
2001
1949
|
)}
|
|
2002
1950
|
{
|
|
2003
1951
|
<>
|
|
2004
|
-
<
|
|
2005
|
-
|
|
2006
|
-
value={state.columns.latitude.name
|
|
1952
|
+
<Select
|
|
1953
|
+
label='Latitude Column'
|
|
1954
|
+
value={state.columns.latitude.name}
|
|
1955
|
+
options={columnsOptions.map(c => c.key)}
|
|
2007
1956
|
onChange={e => {
|
|
2008
1957
|
editColumn('latitude', 'name', e.target.value)
|
|
2009
1958
|
}}
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
value={state.columns.longitude.name ? state.columns.longitude.name : ''}
|
|
1959
|
+
/>
|
|
1960
|
+
<Select
|
|
1961
|
+
label='Longitude Column'
|
|
1962
|
+
value={state.columns.longitude.name}
|
|
1963
|
+
options={columnsOptions.map(c => c.key)}
|
|
2016
1964
|
onChange={e => {
|
|
2017
1965
|
editColumn('longitude', 'name', e.target.value)
|
|
2018
1966
|
}}
|
|
2019
|
-
|
|
2020
|
-
{columnsOptions}
|
|
2021
|
-
</select>
|
|
1967
|
+
/>
|
|
2022
1968
|
</>
|
|
2023
1969
|
}
|
|
2024
1970
|
|
|
@@ -2136,14 +2082,13 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
2136
2082
|
</Tooltip.Content>
|
|
2137
2083
|
</Tooltip>
|
|
2138
2084
|
</span>
|
|
2139
|
-
<
|
|
2140
|
-
value={state.columns.navigate ? state.columns.navigate.name :
|
|
2085
|
+
<Select
|
|
2086
|
+
value={state.columns.navigate ? state.columns.navigate.name : ''}
|
|
2087
|
+
options={columnsOptions.map(c => c.key)}
|
|
2141
2088
|
onChange={event => {
|
|
2142
2089
|
editColumn('navigate', 'name', event.target.value)
|
|
2143
2090
|
}}
|
|
2144
|
-
|
|
2145
|
-
{columnsOptions}
|
|
2146
|
-
</select>
|
|
2091
|
+
/>
|
|
2147
2092
|
</label>
|
|
2148
2093
|
{'navigation' !== state.general.type && (
|
|
2149
2094
|
<fieldset className='primary-fieldset edit-block'>
|
|
@@ -2341,18 +2286,17 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
2341
2286
|
</AccordionItemHeading>
|
|
2342
2287
|
<AccordionItemPanel>
|
|
2343
2288
|
{(state.legend.type === 'equalnumber' || state.legend.type === 'equalinterval') && (
|
|
2344
|
-
<
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
</label>
|
|
2289
|
+
<Select
|
|
2290
|
+
label='Legend Type'
|
|
2291
|
+
value={legend.type}
|
|
2292
|
+
options={[
|
|
2293
|
+
{ value: 'equalnumber', label: 'Equal Number (Quantiles)' },
|
|
2294
|
+
{ value: 'equalinterval', label: 'Equal Interval' }
|
|
2295
|
+
]}
|
|
2296
|
+
onChange={event => {
|
|
2297
|
+
handleEditorChanges('legendType', event.target.value)
|
|
2298
|
+
}}
|
|
2299
|
+
/>
|
|
2356
2300
|
)}
|
|
2357
2301
|
{'navigation' !== state.general.type && (
|
|
2358
2302
|
<label className='checkbox'>
|
|
@@ -2368,19 +2312,18 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
2368
2312
|
)}
|
|
2369
2313
|
{'navigation' !== state.general.type && (
|
|
2370
2314
|
<>
|
|
2371
|
-
<
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
</label>
|
|
2315
|
+
<Select
|
|
2316
|
+
label='Legend Position'
|
|
2317
|
+
value={legend.position || ''}
|
|
2318
|
+
options={[
|
|
2319
|
+
{ value: 'side', label: 'Side' },
|
|
2320
|
+
{ value: 'bottom', label: 'Bottom' },
|
|
2321
|
+
{ value: 'top', label: 'Top' }
|
|
2322
|
+
]}
|
|
2323
|
+
onChange={event => {
|
|
2324
|
+
handleEditorChanges('sidebarPosition', event.target.value)
|
|
2325
|
+
}}
|
|
2326
|
+
/>
|
|
2384
2327
|
{(state.legend.position === 'side' || !state.legend.position) &&
|
|
2385
2328
|
state.legend.style === 'gradient' && (
|
|
2386
2329
|
<span style={{ color: 'red', fontSize: '14px' }}>
|
|
@@ -2390,36 +2333,36 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
2390
2333
|
</>
|
|
2391
2334
|
)}
|
|
2392
2335
|
{'navigation' !== state.general.type && (
|
|
2393
|
-
<
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
<Tooltip
|
|
2398
|
-
<
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
<
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2336
|
+
<Select
|
|
2337
|
+
label={
|
|
2338
|
+
<>
|
|
2339
|
+
Legend Style
|
|
2340
|
+
<Tooltip style={{ textTransform: 'none' }}>
|
|
2341
|
+
<Tooltip.Target>
|
|
2342
|
+
<Icon
|
|
2343
|
+
display='question'
|
|
2344
|
+
style={{ marginLeft: '0.5rem', display: 'inline-block', whiteSpace: 'nowrap' }}
|
|
2345
|
+
/>
|
|
2346
|
+
</Tooltip.Target>
|
|
2347
|
+
<Tooltip.Content>
|
|
2348
|
+
<p>
|
|
2349
|
+
If using gradient style, limit the legend to five items for better mobile visibility, and
|
|
2350
|
+
position the legend at the top or bottom.
|
|
2351
|
+
</p>
|
|
2352
|
+
</Tooltip.Content>
|
|
2353
|
+
</Tooltip>
|
|
2354
|
+
</>
|
|
2355
|
+
}
|
|
2356
|
+
value={legend.style || ''}
|
|
2357
|
+
options={[
|
|
2358
|
+
{ value: 'circles', label: 'circles' },
|
|
2359
|
+
{ value: 'boxes', label: 'boxes' },
|
|
2360
|
+
...(legend.position !== 'side' ? [{ value: 'gradient', label: 'gradient' }] : [])
|
|
2361
|
+
]}
|
|
2362
|
+
onChange={event => {
|
|
2363
|
+
handleEditorChanges('legendStyle', event.target.value)
|
|
2364
|
+
}}
|
|
2365
|
+
/>
|
|
2423
2366
|
)}
|
|
2424
2367
|
{'navigation' !== state.general.type && state.legend.style === 'gradient' && (
|
|
2425
2368
|
<label>
|
|
@@ -2569,36 +2512,32 @@ const EditorPanel = ({ columnsRequiredChecker }) => {
|
|
|
2569
2512
|
</label>
|
|
2570
2513
|
)}
|
|
2571
2514
|
{'category' !== legend.type && (
|
|
2572
|
-
<
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
<Tooltip
|
|
2577
|
-
<
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
<
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
)
|
|
2599
|
-
})}
|
|
2600
|
-
</select>
|
|
2601
|
-
</label>
|
|
2515
|
+
<Select
|
|
2516
|
+
label={
|
|
2517
|
+
<>
|
|
2518
|
+
Number of Items
|
|
2519
|
+
<Tooltip style={{ textTransform: 'none' }}>
|
|
2520
|
+
<Tooltip.Target>
|
|
2521
|
+
<Icon display='question' style={{ marginLeft: '0.5rem' }} />
|
|
2522
|
+
</Tooltip.Target>
|
|
2523
|
+
<Tooltip.Content>
|
|
2524
|
+
<p>
|
|
2525
|
+
For numeric maps, select the number of data classes. Do not include designated special
|
|
2526
|
+
classes.
|
|
2527
|
+
</p>
|
|
2528
|
+
</Tooltip.Content>
|
|
2529
|
+
</Tooltip>
|
|
2530
|
+
</>
|
|
2531
|
+
}
|
|
2532
|
+
value={legend.numberOfItems}
|
|
2533
|
+
options={[...Array(numberOfItemsLimit).keys()].map(num => ({
|
|
2534
|
+
value: num + 1,
|
|
2535
|
+
label: num + 1
|
|
2536
|
+
}))}
|
|
2537
|
+
onChange={event => {
|
|
2538
|
+
handleEditorChanges('legendNumber', event.target.value)
|
|
2539
|
+
}}
|
|
2540
|
+
/>
|
|
2602
2541
|
)}
|
|
2603
2542
|
{'category' === legend.type && (
|
|
2604
2543
|
<React.Fragment>
|
|
@@ -11,7 +11,7 @@ const NavigationMenu = ({ data, navigationHandler, options, columns, displayGeoN
|
|
|
11
11
|
if (activeGeo !== '') {
|
|
12
12
|
const urlString = data[dropdownItems[activeGeo]][columns.navigate.name]
|
|
13
13
|
|
|
14
|
-
navigationHandler(
|
|
14
|
+
navigationHandler(urlString)
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|