@abi-software/map-side-bar 1.3.5 → 1.3.8

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.
@@ -1344,6 +1344,177 @@ function _createClass(Constructor, protoProps, staticProps) {
1344
1344
  var external_algoliasearch_ = __webpack_require__("88eb");
1345
1345
  var external_algoliasearch_default = /*#__PURE__*/__webpack_require__.n(external_algoliasearch_);
1346
1346
 
1347
+ // CONCATENATED MODULE: ./src/algolia/markerZoomLevels.js
1348
+ // Set zoom values for micro and mesoscopic
1349
+ var microscopic = 7;
1350
+ var mesoscopic = 5; // Set what level each uberon shows at
1351
+
1352
+ /* harmony default export */ var markerZoomLevels = ([{
1353
+ "id": "UBERON:0000948",
1354
+ "name": "heart",
1355
+ "showAtZoom": 1
1356
+ }, {
1357
+ "id": "UBERON:0001759",
1358
+ "name": "vagus nerve",
1359
+ "showAtZoom": 1
1360
+ }, {
1361
+ "id": "UBERON:0001155",
1362
+ "name": "colon",
1363
+ "showAtZoom": 1
1364
+ }, {
1365
+ "id": "UBERON:0000945",
1366
+ "name": "stomach",
1367
+ "showAtZoom": 1
1368
+ }, {
1369
+ "id": "UBERON:0001013",
1370
+ "name": "adipose tissue",
1371
+ "showAtZoom": 1
1372
+ }, {
1373
+ "id": "UBERON:0001255",
1374
+ "name": "urinary bladder",
1375
+ "showAtZoom": 1
1376
+ }, {
1377
+ "id": "UBERON:0001348",
1378
+ "name": "brown adipose tissue",
1379
+ "showAtZoom": 6
1380
+ }, {
1381
+ "id": "UBERON:0002008",
1382
+ "name": "cardiac nerve plexus",
1383
+ "showAtZoom": 1
1384
+ }, {
1385
+ "id": "UBERON:0002240",
1386
+ "name": "spinal cord",
1387
+ "showAtZoom": 1
1388
+ }, {
1389
+ "id": "UBERON:0002005",
1390
+ "name": "Enteric Nervous System",
1391
+ "showAtZoom": 4
1392
+ }, {
1393
+ "id": "UBERON:0013702",
1394
+ "name": "body proper",
1395
+ "showAtZoom": 1
1396
+ }, {
1397
+ "id": "UBERON:0002298",
1398
+ "name": "brainstem",
1399
+ "showAtZoom": 1
1400
+ }, {
1401
+ "id": "UBERON:0002439",
1402
+ "name": "myenteric nerve plexus",
1403
+ "showAtZoom": 6
1404
+ }, {
1405
+ "id": "UBERON:0000010",
1406
+ "name": "peripheral nervous system",
1407
+ "showAtZoom": 6
1408
+ }, {
1409
+ "id": "UBERON:0002048",
1410
+ "name": "lung",
1411
+ "showAtZoom": 1
1412
+ }, {
1413
+ "id": "UBERON:0002410",
1414
+ "name": "autonomic nervous system",
1415
+ "showAtZoom": 6
1416
+ }, {
1417
+ "id": "UBERON:0002441",
1418
+ "name": "cervicothoracic ganglion",
1419
+ "showAtZoom": 6
1420
+ }, {
1421
+ "id": "UBERON:0005363",
1422
+ "name": "inferior vagus X ganglion",
1423
+ "showAtZoom": 6
1424
+ }, {
1425
+ "id": "UBERON:0001264",
1426
+ "name": "pancreas",
1427
+ "showAtZoom": 1
1428
+ }, {
1429
+ "id": "UBERON:0001884",
1430
+ "name": "phrenic nerve",
1431
+ "showAtZoom": 6
1432
+ }, {
1433
+ "id": "UBERON:0002059",
1434
+ "name": "submandibular ganglion",
1435
+ "showAtZoom": 7
1436
+ }, {
1437
+ "id": "UBERON:0001347",
1438
+ "name": "white adipose tissue",
1439
+ "showAtZoom": 6
1440
+ }, {
1441
+ "id": "UBERON:0001556",
1442
+ "name": "lower urinary tract",
1443
+ "showAtZoom": 1
1444
+ }, {
1445
+ "id": "UBERON:0002262",
1446
+ "name": "celiac ganglion",
1447
+ "showAtZoom": 5
1448
+ }, {
1449
+ "id": "UBERON:0000955",
1450
+ "name": "Brain",
1451
+ "showAtZoom": 1
1452
+ }, {
1453
+ "id": "UBERON:0000160",
1454
+ "name": "intestine",
1455
+ "showAtZoom": 1
1456
+ }, {
1457
+ "id": "UBERON:0001322",
1458
+ "name": "sciatic nerve",
1459
+ "showAtZoom": 1
1460
+ }, {
1461
+ "id": "UBERON:0001649",
1462
+ "name": "glossopharyngeal nerve",
1463
+ "showAtZoom": 6
1464
+ }, {
1465
+ "id": "UBERON:0002063",
1466
+ "name": "sinus venosus",
1467
+ "showAtZoom": 6
1468
+ }, {
1469
+ "id": "UBERON:0002107",
1470
+ "name": "liver",
1471
+ "showAtZoom": 1
1472
+ }, {
1473
+ "id": "UBERON:0002113",
1474
+ "name": "kidney",
1475
+ "showAtZoom": 1
1476
+ }, {
1477
+ "id": "UBERON:0002481",
1478
+ "name": "bone tissue",
1479
+ "showAtZoom": 1
1480
+ }, {
1481
+ "id": "UBERON:0004907",
1482
+ "name": "lower digestive tract",
1483
+ "showAtZoom": 4
1484
+ }, {
1485
+ "id": "UBERON:0000044",
1486
+ "name": "Dorsal root ganglion",
1487
+ "showAtZoom": 5
1488
+ }, // New levels from Keeran
1489
+ {
1490
+ "id": "UBERON:0001736",
1491
+ "name": "Submandibular gland",
1492
+ "showAtZoom": microscopic
1493
+ }, {
1494
+ "id": "UBERON:0001103",
1495
+ "name": "Diaphragm",
1496
+ "showAtZoom": mesoscopic
1497
+ }, {
1498
+ "id": "UBERON:0001160",
1499
+ "name": "Fundus of stomach",
1500
+ "showAtZoom": mesoscopic
1501
+ }, {
1502
+ "id": "UBERON:0000955",
1503
+ "name": "Brain",
1504
+ "showAtZoom": mesoscopic
1505
+ }, {
1506
+ "id": "UBERON:0003708",
1507
+ "name": "Carotid sinus",
1508
+ "showAtZoom": microscopic
1509
+ }, {
1510
+ "id": "UBERON:0002079",
1511
+ "name": "Left cardiac atrium",
1512
+ "showAtZoom": mesoscopic
1513
+ }, {
1514
+ "id": "ILX:0485722",
1515
+ "name": "Nodose ganglion",
1516
+ "showAtZoom": microscopic
1517
+ }]);
1347
1518
  // CONCATENATED MODULE: ./src/algolia/algolia.js
1348
1519
 
1349
1520
 
@@ -1384,6 +1555,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
1384
1555
  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; }
1385
1556
 
1386
1557
  /* eslint-disable no-alert, no-console */
1558
+
1387
1559
  // export `createAlgoliaClient` to use it in page components
1388
1560
 
1389
1561
  var algolia_AlgoliaClient =
@@ -1529,18 +1701,28 @@ function () {
1529
1701
 
1530
1702
  if (keyword.includes('UBERON') || keyword.includes('ilxtr') || keyword.includes('ILX')) {
1531
1703
  foundKeyWords.push(_this2._processUberonURL(keyword));
1532
- uniqueKeywords = _toConsumableArray(new Set(foundKeyWords));
1533
1704
  }
1534
1705
  });
1535
1706
  }
1707
+
1708
+ if (hit.anatomy && hit.anatomy.organ) {
1709
+ hit.anatomy.organ.forEach(function (anatomy) {
1710
+ markerZoomLevels.forEach(function (marker) {
1711
+ if (anatomy.name.toLowerCase() === marker.name.toLowerCase()) {
1712
+ foundKeyWords.push(marker.id);
1713
+ }
1714
+ });
1715
+ });
1716
+ }
1536
1717
  });
1718
+ uniqueKeywords = _toConsumableArray(new Set(foundKeyWords));
1537
1719
  return uniqueKeywords;
1538
1720
  }
1539
1721
  }, {
1540
1722
  key: "_processUberonURL",
1541
1723
  value: function _processUberonURL(url) {
1542
1724
  var ub = url.split('/').pop();
1543
- ub.replace('_', ':');
1725
+ return ub.replace('_', ':');
1544
1726
  }
1545
1727
  /**
1546
1728
  * Get Search results
@@ -1598,7 +1780,7 @@ function () {
1598
1780
  page: page - 1,
1599
1781
  filters: filter,
1600
1782
  attributesToHighlight: [],
1601
- attributesToRetrieve: ['item.keywords.keyword']
1783
+ attributesToRetrieve: ['item.keywords.keyword', 'anatomy.organ.name']
1602
1784
  }).then(function (response) {
1603
1785
  var keywords = _this4._processKeywords(response.hits);
1604
1786