@cdc/map 4.25.1 → 4.25.3-6

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.
@@ -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
- <label>
1466
- <span className='edit-label column-heading'>Geography Subtype</span>
1467
- <select
1468
- value={state.general.geoType}
1469
- onChange={event => {
1470
- handleEditorChanges('geoType', event.target.value)
1471
- }}
1472
- >
1473
- <option value='us'>US State-Level</option>
1474
- <option value='us-county'>US County-Level</option>
1475
- </select>
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
- <label>
1480
- <span className='edit-label column-heading'>County Census Year</span>
1481
- <select
1482
- value={state.general.countyCensusYear || '2019'}
1483
- onChange={event => {
1484
- handleEditorChanges('countyCensusYear', event.target.value)
1485
- }}
1486
- >
1487
- <option value='2022'>2022</option>
1488
- <option value='2021'>2021</option>
1489
- <option value='2020'>2020</option>
1490
- <option value='2019'>2019</option>
1491
- <option value='2015'>2015</option>
1492
- <option value='2014'>2014</option>
1493
- <option value='2013'>2013</option>
1494
- </select>
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
- <label>
1544
- <span className='edit-label column-heading'>
1545
- Map Type
1546
- <Tooltip style={{ textTransform: 'none' }}>
1547
- <Tooltip.Target>
1548
- <Icon display='question' style={{ marginLeft: '0.5rem' }} />
1549
- </Tooltip.Target>
1550
- <Tooltip.Content>
1551
- <p>
1552
- Select "Data" to create a color-coded data map. To create a navigation-only map, select
1553
- "Navigation."
1554
- </p>
1555
- </Tooltip.Content>
1556
- </Tooltip>
1557
- </span>
1558
- <select
1559
- value={state.general.type}
1560
- onChange={event => {
1561
- handleEditorChanges('editorMapType', event.target.value)
1562
- }}
1563
- >
1564
- <option value='data'>Data</option>
1565
- {state.general.geoType === 'us-county' && <option value='us-geocode'>Geocode</option>}
1566
- {state.general.geoType === 'world' && <option value='world-geocode'>Geocode</option>}
1567
- {state.general.geoType !== 'us-county' && <option value='navigation'>Navigation</option>}
1568
- {(state.general.geoType === 'world' || state.general.geoType === 'us') && (
1569
- <option value='bubble'>Bubble</option>
1570
- )}
1571
- </select>
1572
- </label>
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
- <label>
1577
- <span className='edit-label column-heading'>Navigation Behavior</span>
1578
- <select
1579
- value={state.general.navigationTarget}
1580
- onChange={event => {
1581
- event.preventDefault()
1582
- handleEditorChanges('navigationTarget', event.target.value)
1583
- }}
1584
- >
1585
- <option value='_self'>Same Window</option>
1586
- <option value='_blank'>New Window</option>
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
- <label className='checkbox'>
1624
- <input
1625
- type='checkbox'
1626
- checked={state.general.displayStateLabels}
1627
- onChange={event => {
1628
- handleEditorChanges('displayStateLabels', event.target.checked)
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
- </span>
1642
- </label>
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
- {'us' === state.general.geoType && (
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
- <select
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
- <label>
1860
- <span className='edit-label column-heading'>
1861
- Data Column
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
- </span>
1871
- <select
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
- <label>Latitude Column</label>
2005
- <select
2006
- value={state.columns.latitude.name ? 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
- {columnsOptions}
2012
- </select>
2013
- <label>Longitude Column</label>
2014
- <select
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
- <select
2140
- value={state.columns.navigate ? state.columns.navigate.name : columnsOptions[0]}
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
- <label>
2345
- <span className='edit-label'>Legend Type</span>
2346
- <select
2347
- value={legend.type}
2348
- onChange={event => {
2349
- handleEditorChanges('legendType', event.target.value)
2350
- }}
2351
- >
2352
- <option value='equalnumber'>Equal Number (Quantiles)</option>
2353
- <option value='equalinterval'>Equal Interval</option>
2354
- </select>
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
- <label>
2372
- <span className='edit-label'>Legend Position</span>
2373
- <select
2374
- value={legend.position || false}
2375
- onChange={event => {
2376
- handleEditorChanges('sidebarPosition', event.target.value)
2377
- }}
2378
- >
2379
- <option value='side'>Side</option>
2380
- <option value='bottom'>Bottom</option>
2381
- <option value='top'>Top</option>
2382
- </select>
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
- <label>
2394
- <span className='edit-label column-heading'>
2395
- Legend Style
2396
- <Tooltip style={{ textTransform: 'none' }}>
2397
- <Tooltip.Target>
2398
- <Icon
2399
- display='question'
2400
- style={{ marginLeft: '0.5rem', display: 'inline-block', whiteSpace: 'nowrap' }}
2401
- />
2402
- </Tooltip.Target>
2403
- <Tooltip.Content>
2404
- <p>
2405
- If using gradient style, limit the legend to five items for better mobile visibility, and
2406
- position the legend at the top or bottom.
2407
- </p>
2408
- </Tooltip.Content>
2409
- </Tooltip>
2410
- </span>
2411
-
2412
- <select
2413
- value={legend.style || ''}
2414
- onChange={event => {
2415
- handleEditorChanges('legendStyle', event.target.value)
2416
- }}
2417
- >
2418
- <option value='circles'>circles</option>
2419
- <option value='boxes'>boxes</option>
2420
- {legend.position !== 'side' && <option value='gradient'>gradient</option>}
2421
- </select>
2422
- </label>
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
- <label>
2573
- <span className='edit-label'>
2574
- Number of Items
2575
- <Tooltip style={{ textTransform: 'none' }}>
2576
- <Tooltip.Target>
2577
- <Icon display='question' style={{ marginLeft: '0.5rem' }} />
2578
- </Tooltip.Target>
2579
- <Tooltip.Content>
2580
- <p>
2581
- For numeric maps, select the number of data classes. Do not include designated special
2582
- classes.
2583
- </p>
2584
- </Tooltip.Content>
2585
- </Tooltip>
2586
- </span>
2587
- <select
2588
- value={legend.numberOfItems}
2589
- onChange={event => {
2590
- handleEditorChanges('legendNumber', event.target.value)
2591
- }}
2592
- >
2593
- {[...Array(numberOfItemsLimit).keys()].map(num => {
2594
- return (
2595
- <option value={num + 1} key={num + 1}>
2596
- {num + 1}
2597
- </option>
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(state.general.navigationTarget, urlString)
14
+ navigationHandler(urlString)
15
15
  }
16
16
  }
17
17