@abi-software/flatmapvuer 1.1.4-beta.0 → 1.1.4-beta.2

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.
@@ -12391,6 +12391,19 @@ let xit = function() {
12391
12391
  }), n.flat();
12392
12392
  }, this.stripPMIDPrefix = function(e) {
12393
12393
  return e.split(":")[1];
12394
+ }, this.extractTermFromURLString = function(e) {
12395
+ if (!e)
12396
+ return;
12397
+ const t = decodeURIComponent(e);
12398
+ let r = "";
12399
+ return [
12400
+ "doi.org/",
12401
+ "nih.gov/pubmed/",
12402
+ "pubmed.ncbi.nlm.nih.gov/"
12403
+ ].forEach((i) => {
12404
+ const o = t.lastIndexOf(i);
12405
+ o !== -1 && (r = t.slice(o + i.length));
12406
+ }), r.endsWith("/") && (r = r.slice(0, -1)), r;
12394
12407
  }, this.buildPubmedSqlStatement = function(e) {
12395
12408
  let t = "select distinct publication from publications where entity in (";
12396
12409
  if (e.length === 1)
@@ -12419,11 +12432,7 @@ let xit = function() {
12419
12432
  return;
12420
12433
  const i = this.buildPubmedSqlStatement(r);
12421
12434
  this.flatmapQuery(i).then((o) => {
12422
- o.values.length > 0 ? (this.urls = [
12423
- this.pubmedSearchUrl(
12424
- o.values.map((a) => this.stripPMIDPrefix(a[0]))
12425
- )
12426
- ], t(!0)) : this.pubmedQueryOnModels(n).then((a) => {
12435
+ o.values.length > 0 ? (this.urls = this.getURLsForPubMed(o), t(!0)) : this.pubmedQueryOnModels(n).then((a) => {
12427
12436
  t(a);
12428
12437
  });
12429
12438
  });
@@ -12431,11 +12440,14 @@ let xit = function() {
12431
12440
  }, this.pubmedQueryOnModels = function(e) {
12432
12441
  return this.flatmapQuery(
12433
12442
  this.buildPubmedSqlStatementForModels(e)
12434
- ).then((t) => Array.isArray(t.values) && t.values.length > 0 ? (this.urls = [
12435
- this.pubmedSearchUrl(
12436
- t.values.map((r) => this.stripPMIDPrefix(r[0]))
12437
- )
12438
- ], !0) : (this.urls = [], !1));
12443
+ ).then((t) => Array.isArray(t.values) && t.values.length > 0 ? (this.urls = this.getURLsForPubMed(t), !0) : (this.urls = [], !1));
12444
+ }, this.getURLsForPubMed = function(e) {
12445
+ const t = e.values.map((n) => this.extractTermFromURLString(n[0])), r = this.transformPubMedSearchTerms(t);
12446
+ return [
12447
+ this.pubmedSearchUrl(r)
12448
+ ];
12449
+ }, this.transformPubMedSearchTerms = function(e) {
12450
+ return e.join(" OR ");
12439
12451
  }, this.pubmedSearchUrl = function(e) {
12440
12452
  let t = "https://pubmed.ncbi.nlm.nih.gov/?", r = new URLSearchParams();
12441
12453
  return r.append("term", e), t + r.toString();
@@ -99532,7 +99544,7 @@ const rOt = tOt("main", {
99532
99544
  popUpCssHacks: function() {
99533
99545
  const e = document.querySelector(".flatmap-tooltip-popup"), t = document.querySelector(".maplibregl-popup-close-button");
99534
99546
  e && (e.style.display = "none"), t.style.display = "block", this.$refs.tooltip.$el.style.display = "flex", t.onclick = () => {
99535
- this.$emit("provenance-popup-close"), e && (e.style.display = "block");
99547
+ this.$emit("connectivity-info-close"), e && (e.style.display = "block");
99536
99548
  };
99537
99549
  },
99538
99550
  /**
@@ -99651,11 +99663,11 @@ const rOt = tOt("main", {
99651
99663
  displayTooltip: function(e, t = void 0) {
99652
99664
  this.tooltipDisplay = !0;
99653
99665
  let r, n = { className: "flatmapvuer-popover" };
99654
- if (t ? (r = e, n.annotationFeatureGeometry = t) : (r = this.mapImp.modelFeatureIds(e)[0], this.activeDrawTool || (n.positionAtLastClick = !0)), this.provenanceSidebar) {
99666
+ if (t ? (r = e, n.annotationFeatureGeometry = t) : (r = this.mapImp.modelFeatureIds(e)[0], this.activeDrawTool || (n.positionAtLastClick = !0)), this.connectivityInfoSidebar) {
99655
99667
  const i = [e];
99656
- this.moveMap(i), this.$emit("provenance-popup-open", this.tooltipEntry);
99668
+ this.moveMap(i), this.$emit("connectivity-info-open", this.tooltipEntry);
99657
99669
  }
99658
- !this.disableUI && !this.provenanceSidebar && this.$nextTick(() => {
99670
+ !this.disableUI && !this.connectivityInfoSidebar && this.$nextTick(() => {
99659
99671
  this.mapImp.showPopup(r, this.$refs.tooltip.$el, n), this.popUpCssHacks();
99660
99672
  });
99661
99673
  },
@@ -99827,7 +99839,7 @@ const rOt = tOt("main", {
99827
99839
  handleMapClick: function() {
99828
99840
  const e = this.mapImp._map;
99829
99841
  e && e.on("click", (t) => {
99830
- this.tooltipEntry.featureId && this.$emit("provenance-popup-close");
99842
+ this.tooltipEntry.featureId && this.$emit("connectivity-info-close");
99831
99843
  });
99832
99844
  },
99833
99845
  /**
@@ -100071,9 +100083,9 @@ const rOt = tOt("main", {
100071
100083
  default: !1
100072
100084
  },
100073
100085
  /**
100074
- * The option to show provenance information in sidebar
100086
+ * The option to show connectivity information in sidebar
100075
100087
  */
100076
- provenanceSidebar: {
100088
+ connectivityInfoSidebar: {
100077
100089
  type: Boolean,
100078
100090
  default: !1
100079
100091
  }
@@ -100260,7 +100272,7 @@ const rOt = tOt("main", {
100260
100272
  mounted: function() {
100261
100273
  this.openMapRef = oa(this.$refs.openMapRef), this.backgroundIconRef = oa(this.$refs.backgroundIconRef), this.tooltipWait = [], this.tooltipWait.length = this.hoverVisibilities.length, this.mapManager = new tM(this.flatmapAPI), this.flatmapQueries = new xit(), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap();
100262
100274
  }
100263
- }, Xa = (e) => (Q6("data-v-80d59da9"), e = e(), m6(), e), aOt = {
100275
+ }, Xa = (e) => (Q6("data-v-78a7555b"), e = e(), m6(), e), aOt = {
100264
100276
  class: "flatmap-container",
100265
100277
  ref: "flatmapContainer",
100266
100278
  "element-loading-text": "Loading...",
@@ -101009,14 +101021,14 @@ function SOt(e, t, r, n, i, o) {
101009
101021
  annotationDisplay: o.viewingMode === "Annotation",
101010
101022
  onAnnotation: o.commitAnnotationEvent
101011
101023
  }, null, 8, ["annotationEntry", "entry", "annotationDisplay", "onAnnotation"]), [
101012
- [Dn, e.tooltipDisplay && !r.provenanceSidebar]
101024
+ [Dn, e.tooltipDisplay && !r.connectivityInfoSidebar]
101013
101025
  ])
101014
101026
  ])
101015
101027
  ])), [
101016
101028
  [ot, e.loading]
101017
101029
  ]);
101018
101030
  }
101019
- const Gz = /* @__PURE__ */ fa(oOt, [["render", SOt], ["__scopeId", "data-v-80d59da9"]]), Vk = {
101031
+ const Gz = /* @__PURE__ */ fa(oOt, [["render", SOt], ["__scopeId", "data-v-78a7555b"]]), Vk = {
101020
101032
  "NCBITaxon:10114": "01fedbf9-d783-509c-a10c-827941ab13da",
101021
101033
  "NCBITaxon:9823": "a336ac04-24db-561f-a25f-1c994fe17410",
101022
101034
  "NCBITaxon:9606": "42ed6323-f645-5fbe-bada-9581819cf689",
@@ -101115,11 +101127,11 @@ const Gz = /* @__PURE__ */ fa(oOt, [["render", SOt], ["__scopeId", "data-v-80d59
101115
101127
  panZoomCallback: function(e) {
101116
101128
  this.$emit("pan-zoom-callback", e);
101117
101129
  },
101118
- onProvenancePopupClose: function() {
101119
- this.$emit("provenance-popup-close");
101130
+ onConnectivityInfoClose: function() {
101131
+ this.$emit("connectivity-info-close");
101120
101132
  },
101121
- onProvenancePopupOpen: function(e) {
101122
- this.$emit("provenance-popup-open", e);
101133
+ onConnectivityInfoOpen: function(e) {
101134
+ this.$emit("connectivity-info-open", e);
101123
101135
  },
101124
101136
  onSelectionsDataChanged: function(e) {
101125
101137
  this.$emit("pathway-selection-changed", e);
@@ -101497,9 +101509,9 @@ const Gz = /* @__PURE__ */ fa(oOt, [["render", SOt], ["__scopeId", "data-v-80d59
101497
101509
  default: !1
101498
101510
  },
101499
101511
  /**
101500
- * The option to show provenance information in sidebar
101512
+ * The option to show connectivity information in sidebar
101501
101513
  */
101502
- provenanceSidebar: {
101514
+ connectivityInfoSidebar: {
101503
101515
  type: Boolean,
101504
101516
  default: !1
101505
101517
  }
@@ -101520,7 +101532,7 @@ const Gz = /* @__PURE__ */ fa(oOt, [["render", SOt], ["__scopeId", "data-v-80d59
101520
101532
  deep: !0
101521
101533
  }
101522
101534
  }
101523
- }, COt = (e) => (Q6("data-v-f78570a0"), e = e(), m6(), e), OOt = {
101535
+ }, COt = (e) => (Q6("data-v-c373f9aa"), e = e(), m6(), e), OOt = {
101524
101536
  class: "multi-container",
101525
101537
  ref: "multiContainer"
101526
101538
  }, POt = {
@@ -101593,9 +101605,9 @@ function VOt(e, t, r, n, i, o) {
101593
101605
  onResourceSelected: o.resourceSelected,
101594
101606
  onReady: o.FlatmapReady,
101595
101607
  onPanZoomCallback: o.panZoomCallback,
101596
- provenanceSidebar: r.provenanceSidebar,
101597
- onProvenancePopupOpen: o.onProvenancePopupOpen,
101598
- onProvenancePopupClose: o.onProvenancePopupClose,
101608
+ connectivityInfoSidebar: r.connectivityInfoSidebar,
101609
+ onConnectivityInfoOpen: o.onConnectivityInfoOpen,
101610
+ onConnectivityInfoClose: o.onConnectivityInfoClose,
101599
101611
  onOpenMap: t[1] || (t[1] = (Q) => (
101600
101612
  /**
101601
101613
  * This event is emitted when the user chooses a different map option
@@ -101619,12 +101631,12 @@ function VOt(e, t, r, n, i, o) {
101619
101631
  style: { height: "100%" },
101620
101632
  flatmapAPI: r.flatmapAPI,
101621
101633
  sparcAPI: r.sparcAPI
101622
- }, null, 8, ["entry", "uuid", "biologicalSex", "displayWarning", "displayLatestChanges", "isLegacy", "enableOpenMapUI", "openMapOptions", "disableUI", "onViewLatestMap", "onResourceSelected", "onReady", "onPanZoomCallback", "provenanceSidebar", "onProvenancePopupOpen", "onProvenancePopupClose", "onPathwaySelectionChanged", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "renderAtMounted", "displayMinimap", "showStarInLegend", "flatmapAPI", "sparcAPI"])), [
101634
+ }, null, 8, ["entry", "uuid", "biologicalSex", "displayWarning", "displayLatestChanges", "isLegacy", "enableOpenMapUI", "openMapOptions", "disableUI", "onViewLatestMap", "onResourceSelected", "onReady", "onPanZoomCallback", "connectivityInfoSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onPathwaySelectionChanged", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "renderAtMounted", "displayMinimap", "showStarInLegend", "flatmapAPI", "sparcAPI"])), [
101623
101635
  [Dn, e.activeSpecies == f]
101624
101636
  ])), 128))
101625
101637
  ], 512);
101626
101638
  }
101627
- const GOt = /* @__PURE__ */ fa(AOt, [["render", VOt], ["__scopeId", "data-v-f78570a0"]]), ROt = {
101639
+ const GOt = /* @__PURE__ */ fa(AOt, [["render", VOt], ["__scopeId", "data-v-c373f9aa"]]), ROt = {
101628
101640
  name: "HelpModeDialog",
101629
101641
  components: {
101630
101642
  Button: h2