@abi-software/map-side-bar 1.3.4 → 1.3.7

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.
@@ -1353,6 +1353,177 @@ function _createClass(Constructor, protoProps, staticProps) {
1353
1353
  var external_algoliasearch_ = __webpack_require__("88eb");
1354
1354
  var external_algoliasearch_default = /*#__PURE__*/__webpack_require__.n(external_algoliasearch_);
1355
1355
 
1356
+ // CONCATENATED MODULE: ./src/algolia/markerZoomLevels.js
1357
+ // Set zoom values for micro and mesoscopic
1358
+ var microscopic = 7;
1359
+ var mesoscopic = 5; // Set what level each uberon shows at
1360
+
1361
+ /* harmony default export */ var markerZoomLevels = ([{
1362
+ "id": "UBERON:0000948",
1363
+ "name": "heart",
1364
+ "showAtZoom": 1
1365
+ }, {
1366
+ "id": "UBERON:0001759",
1367
+ "name": "vagus nerve",
1368
+ "showAtZoom": 1
1369
+ }, {
1370
+ "id": "UBERON:0001155",
1371
+ "name": "colon",
1372
+ "showAtZoom": 1
1373
+ }, {
1374
+ "id": "UBERON:0000945",
1375
+ "name": "stomach",
1376
+ "showAtZoom": 1
1377
+ }, {
1378
+ "id": "UBERON:0001013",
1379
+ "name": "adipose tissue",
1380
+ "showAtZoom": 1
1381
+ }, {
1382
+ "id": "UBERON:0001255",
1383
+ "name": "urinary bladder",
1384
+ "showAtZoom": 1
1385
+ }, {
1386
+ "id": "UBERON:0001348",
1387
+ "name": "brown adipose tissue",
1388
+ "showAtZoom": 6
1389
+ }, {
1390
+ "id": "UBERON:0002008",
1391
+ "name": "cardiac nerve plexus",
1392
+ "showAtZoom": 1
1393
+ }, {
1394
+ "id": "UBERON:0002240",
1395
+ "name": "spinal cord",
1396
+ "showAtZoom": 1
1397
+ }, {
1398
+ "id": "UBERON:0002005",
1399
+ "name": "Enteric Nervous System",
1400
+ "showAtZoom": 4
1401
+ }, {
1402
+ "id": "UBERON:0013702",
1403
+ "name": "body proper",
1404
+ "showAtZoom": 1
1405
+ }, {
1406
+ "id": "UBERON:0002298",
1407
+ "name": "brainstem",
1408
+ "showAtZoom": 1
1409
+ }, {
1410
+ "id": "UBERON:0002439",
1411
+ "name": "myenteric nerve plexus",
1412
+ "showAtZoom": 6
1413
+ }, {
1414
+ "id": "UBERON:0000010",
1415
+ "name": "peripheral nervous system",
1416
+ "showAtZoom": 6
1417
+ }, {
1418
+ "id": "UBERON:0002048",
1419
+ "name": "lung",
1420
+ "showAtZoom": 1
1421
+ }, {
1422
+ "id": "UBERON:0002410",
1423
+ "name": "autonomic nervous system",
1424
+ "showAtZoom": 6
1425
+ }, {
1426
+ "id": "UBERON:0002441",
1427
+ "name": "cervicothoracic ganglion",
1428
+ "showAtZoom": 6
1429
+ }, {
1430
+ "id": "UBERON:0005363",
1431
+ "name": "inferior vagus X ganglion",
1432
+ "showAtZoom": 6
1433
+ }, {
1434
+ "id": "UBERON:0001264",
1435
+ "name": "pancreas",
1436
+ "showAtZoom": 1
1437
+ }, {
1438
+ "id": "UBERON:0001884",
1439
+ "name": "phrenic nerve",
1440
+ "showAtZoom": 6
1441
+ }, {
1442
+ "id": "UBERON:0002059",
1443
+ "name": "submandibular ganglion",
1444
+ "showAtZoom": 7
1445
+ }, {
1446
+ "id": "UBERON:0001347",
1447
+ "name": "white adipose tissue",
1448
+ "showAtZoom": 6
1449
+ }, {
1450
+ "id": "UBERON:0001556",
1451
+ "name": "lower urinary tract",
1452
+ "showAtZoom": 1
1453
+ }, {
1454
+ "id": "UBERON:0002262",
1455
+ "name": "celiac ganglion",
1456
+ "showAtZoom": 5
1457
+ }, {
1458
+ "id": "UBERON:0000955",
1459
+ "name": "Brain",
1460
+ "showAtZoom": 1
1461
+ }, {
1462
+ "id": "UBERON:0000160",
1463
+ "name": "intestine",
1464
+ "showAtZoom": 1
1465
+ }, {
1466
+ "id": "UBERON:0001322",
1467
+ "name": "sciatic nerve",
1468
+ "showAtZoom": 1
1469
+ }, {
1470
+ "id": "UBERON:0001649",
1471
+ "name": "glossopharyngeal nerve",
1472
+ "showAtZoom": 6
1473
+ }, {
1474
+ "id": "UBERON:0002063",
1475
+ "name": "sinus venosus",
1476
+ "showAtZoom": 6
1477
+ }, {
1478
+ "id": "UBERON:0002107",
1479
+ "name": "liver",
1480
+ "showAtZoom": 1
1481
+ }, {
1482
+ "id": "UBERON:0002113",
1483
+ "name": "kidney",
1484
+ "showAtZoom": 1
1485
+ }, {
1486
+ "id": "UBERON:0002481",
1487
+ "name": "bone tissue",
1488
+ "showAtZoom": 1
1489
+ }, {
1490
+ "id": "UBERON:0004907",
1491
+ "name": "lower digestive tract",
1492
+ "showAtZoom": 4
1493
+ }, {
1494
+ "id": "UBERON:0000044",
1495
+ "name": "Dorsal root ganglion",
1496
+ "showAtZoom": 5
1497
+ }, // New levels from Keeran
1498
+ {
1499
+ "id": "UBERON:0001736",
1500
+ "name": "Submandibular gland",
1501
+ "showAtZoom": microscopic
1502
+ }, {
1503
+ "id": "UBERON:0001103",
1504
+ "name": "Diaphragm",
1505
+ "showAtZoom": mesoscopic
1506
+ }, {
1507
+ "id": "UBERON:0001160",
1508
+ "name": "Fundus of stomach",
1509
+ "showAtZoom": mesoscopic
1510
+ }, {
1511
+ "id": "UBERON:0000955",
1512
+ "name": "Brain",
1513
+ "showAtZoom": mesoscopic
1514
+ }, {
1515
+ "id": "UBERON:0003708",
1516
+ "name": "Carotid sinus",
1517
+ "showAtZoom": microscopic
1518
+ }, {
1519
+ "id": "UBERON:0002079",
1520
+ "name": "Left cardiac atrium",
1521
+ "showAtZoom": mesoscopic
1522
+ }, {
1523
+ "id": "ILX:0485722",
1524
+ "name": "Nodose ganglion",
1525
+ "showAtZoom": microscopic
1526
+ }]);
1356
1527
  // CONCATENATED MODULE: ./src/algolia/algolia.js
1357
1528
 
1358
1529
 
@@ -1385,6 +1556,7 @@ var external_algoliasearch_default = /*#__PURE__*/__webpack_require__.n(external
1385
1556
 
1386
1557
 
1387
1558
 
1559
+
1388
1560
 
1389
1561
 
1390
1562
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
@@ -1392,6 +1564,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
1392
1564
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1393
1565
 
1394
1566
  /* eslint-disable no-alert, no-console */
1567
+
1395
1568
  // export `createAlgoliaClient` to use it in page components
1396
1569
 
1397
1570
  var algolia_AlgoliaClient =
@@ -1536,18 +1709,29 @@ function () {
1536
1709
  var keyword = keywordObj.keyword;
1537
1710
 
1538
1711
  if (keyword.includes('UBERON') || keyword.includes('ilxtr') || keyword.includes('ILX')) {
1539
- foundKeyWords.push(_this2._splitUberonURL(keyword));
1540
- uniqueKeywords = _toConsumableArray(new Set(foundKeyWords));
1712
+ foundKeyWords.push(_this2._processUberonURL(keyword));
1541
1713
  }
1542
1714
  });
1543
1715
  }
1716
+
1717
+ if (hit.anatomy && hit.anatomy.organ) {
1718
+ hit.anatomy.organ.forEach(function (anatomy) {
1719
+ markerZoomLevels.forEach(function (marker) {
1720
+ if (anatomy.name.toLowerCase() === marker.name.toLowerCase()) {
1721
+ foundKeyWords.push(marker.id);
1722
+ }
1723
+ });
1724
+ });
1725
+ }
1544
1726
  });
1727
+ uniqueKeywords = _toConsumableArray(new Set(foundKeyWords));
1545
1728
  return uniqueKeywords;
1546
1729
  }
1547
1730
  }, {
1548
- key: "_splitUberonURL",
1549
- value: function _splitUberonURL(url) {
1550
- return url.split('/').pop();
1731
+ key: "_processUberonURL",
1732
+ value: function _processUberonURL(url) {
1733
+ var ub = url.split('/').pop();
1734
+ return ub.replace('_', ':');
1551
1735
  }
1552
1736
  /**
1553
1737
  * Get Search results
@@ -1605,7 +1789,7 @@ function () {
1605
1789
  page: page - 1,
1606
1790
  filters: filter,
1607
1791
  attributesToHighlight: [],
1608
- attributesToRetrieve: ['item.keywords.keyword']
1792
+ attributesToRetrieve: ['item.keywords.keyword', 'anatomy.organ.name']
1609
1793
  }).then(function (response) {
1610
1794
  var keywords = _this4._processKeywords(response.hits);
1611
1795