@abi-software/flatmapvuer 1.19.0 → 1.19.1-demo.0

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.
@@ -9001,7 +9001,63 @@ var q_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), J_ = (e) => {
9001
9001
  }
9002
9002
  return o;
9003
9003
  });
9004
- })))()), Z_ = Ie, Q_ = Re("main", {
9004
+ })))()), Z_ = Ie, Q_ = "#1b7f6b", $_ = "#f4f1de", ev = "#12312b", tv = "99+", nv = function(e) {
9005
+ return (Array.isArray(e) ? e : []).map((e) => ({
9006
+ label: String(e?.label || "").trim(),
9007
+ curie: String(e?.curie || "").trim(),
9008
+ count: Number(e?.count || 0)
9009
+ })).filter((e) => e.curie && e.count > 0);
9010
+ }, rv = function(e) {
9011
+ return e > 99 ? tv : String(e);
9012
+ }, iv = function(e) {
9013
+ let t = document.createElement("div");
9014
+ return t.className = "flatmapvuer-soma-location-marker", t.title = e.label || e.curie, t.style.width = "34px", t.style.height = "48px", t.style.display = "flex", t.style.alignItems = "center", t.style.justifyContent = "center", t.style.transform = "translate(-50%, -100%)", t.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 27 42" width="34" height="48" aria-hidden="true">
9015
+ <ellipse style="fill: rgb(0, 0, 0); fill-opacity: 0.18;" cx="12" cy="36" rx="8" ry="4"/>
9016
+ <path d="M12.25.25a12.254 12.254 0 0 0-12 12.494
9017
+ c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0
9018
+ C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z"
9019
+ style="fill:${Q_};stroke:${$_};stroke-width:1.1"/>
9020
+ <circle cx="12.5" cy="12.5" r="8" fill="${$_}"/>
9021
+ <text x="12.5" y="16.1" text-anchor="middle" style="font-size:7.5px;font-weight:700;fill:${ev};font-family:Arial, sans-serif">${rv(e.count)}</text>
9022
+ </svg>`, t;
9023
+ }, av = function(e, t) {
9024
+ let n = Array.isArray(e?.modelFeatureIds?.(t)) ? e.modelFeatureIds(t) : [], r = [], i = /* @__PURE__ */ new Set();
9025
+ for (let t of n) {
9026
+ let n = e.annotation(t), a = String(n?.uri || "").trim();
9027
+ a && !i.has(a) && (i.add(a), r.push({
9028
+ type: "feature-uri",
9029
+ value: a
9030
+ }));
9031
+ }
9032
+ return !r.length && n.length && r.push({
9033
+ type: "model",
9034
+ value: t
9035
+ }), r;
9036
+ }, ov = function(e) {
9037
+ if (!e || e.addSomaLocationMarkers) return e;
9038
+ let t = [];
9039
+ return e.clearSomaLocationMarkers = function() {
9040
+ t.forEach((t) => {
9041
+ e.removeMarker(t);
9042
+ }), t = [];
9043
+ }, e.addSomaLocationMarkers = function(n) {
9044
+ let r = nv(n), i = [];
9045
+ return e.clearSomaLocationMarkers(), r.forEach((n) => {
9046
+ let r = av(e, n.curie);
9047
+ if (!r.length) return;
9048
+ let a = !1;
9049
+ r.forEach((r) => {
9050
+ let i = iv(n), o = [];
9051
+ if (r.type === "feature-uri") o = e.addMarkerByFeatureUri(r.value, { element: i });
9052
+ else if (r.type === "model") {
9053
+ let t = e.addMarker(r.value, { element: i });
9054
+ o = t > -1 ? [t] : [];
9055
+ }
9056
+ o.length && (t.push(...o), a = !0);
9057
+ }), a && i.push(n);
9058
+ }), i;
9059
+ }, e;
9060
+ }, sv = Re("main", {
9005
9061
  state: () => ({ userProfile: { token: "" } }),
9006
9062
  getters: { userToken(e) {
9007
9063
  return e.userProfile.token;
@@ -9012,7 +9068,7 @@ var q_ = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), J_ = (e) => {
9012
9068
  });
9013
9069
  //#endregion
9014
9070
  //#region node_modules/mitt/dist/mitt.mjs
9015
- function $_(e) {
9071
+ function cv(e) {
9016
9072
  return {
9017
9073
  all: e ||= /* @__PURE__ */ new Map(),
9018
9074
  on: function(t, n) {
@@ -9035,7 +9091,7 @@ function $_(e) {
9035
9091
  }
9036
9092
  //#endregion
9037
9093
  //#region src/components/EventBus.js
9038
- var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9094
+ var lv = new cv(), uv = "cannot be found on the map.", dv = (e) => {
9039
9095
  let t = {
9040
9096
  lng: 0,
9041
9097
  lat: 0
@@ -9043,17 +9099,17 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9043
9099
  return e.type === "Polygon" ? e.coordinates.length && (n = e.coordinates[0]) : n = e.coordinates, n && (e.type === "Point" ? (t.lng += parseFloat(n[0]), t.lat += parseFloat(n[1])) : (n.map((e) => {
9044
9100
  t.lng += parseFloat(e[0]), t.lat += parseFloat(e[1]);
9045
9101
  }), t.lng /= n.length, t.lat /= n.length)), t;
9046
- }, rv = (e, t) => {
9102
+ }, fv = (e, t) => {
9047
9103
  let n = [], r = e.organs ? e.organs : e.ftus, i = r ? r.filter((e, t) => r.findIndex((t) => t.label === e.label) === t) : void 0;
9048
9104
  return i && i.forEach((e) => {
9049
9105
  let r = {
9050
9106
  label: e.label,
9051
9107
  models: e.models,
9052
9108
  key: `${t}.${e.label}`
9053
- }, i = rv(e, r.key);
9109
+ }, i = fv(e, r.key);
9054
9110
  i.length > 0 && (r.children = i), n.push(r);
9055
9111
  }), n;
9056
- }, iv = {
9112
+ }, pv = {
9057
9113
  name: "FlatmapVuer",
9058
9114
  components: {
9059
9115
  MapSvgIcon: Oe,
@@ -9229,7 +9285,7 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9229
9285
  enabled: e.enabled,
9230
9286
  label: e.id,
9231
9287
  key: e.id
9232
- }, r = rv(e, n.key);
9288
+ }, r = fv(e, n.key);
9233
9289
  r.length > 0 && (n.children = r), t.children.push(n);
9234
9290
  }), this.systems.push(t);
9235
9291
  }
@@ -9535,7 +9591,7 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9535
9591
  emitConnectivityError: function(e) {
9536
9592
  this.$emit("connectivity-error", { data: {
9537
9593
  errorData: e,
9538
- errorMessage: tv
9594
+ errorMessage: uv
9539
9595
  } });
9540
9596
  },
9541
9597
  checkConnectivityTooltipEntry: function(e) {
@@ -9559,7 +9615,7 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9559
9615
  featureId: e.featureId ? e.featureId : e.feature?.id,
9560
9616
  offline: this.offlineAnnotationEnabled
9561
9617
  });
9562
- }), t[0].feature) this.activeDrawTool || this.activeDrawMode || this.isValidDrawnCreated ? (this.featureAnnotationSubmitted = !1, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(t[0].feature.id, nv(t[0].feature.geometry))) : this.rollbackAnnotationEvent();
9618
+ }), t[0].feature) this.activeDrawTool || this.activeDrawMode || this.isValidDrawnCreated ? (this.featureAnnotationSubmitted = !1, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(t[0].feature.id, dv(t[0].feature.geometry))) : this.rollbackAnnotationEvent();
9563
9619
  else {
9564
9620
  let e = this.annotationEntry.filter((e) => e.featureId && e.models).map((e) => e.models);
9565
9621
  e.length > 0 && this.displayTooltip(e);
@@ -9794,7 +9850,7 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9794
9850
  container: this.$refs.display,
9795
9851
  tooltipDelay: 15
9796
9852
  }).then((t) => {
9797
- this.mapImp = t, this.serverURL = this.mapImp.makeServerUrl("").slice(0, -1);
9853
+ this.mapImp = ov(t), this.serverURL = this.mapImp.makeServerUrl("").slice(0, -1);
9798
9854
  let n = this.mapImp.details.version;
9799
9855
  this.setFlightPathInfo(n);
9800
9856
  let r = this._stateToBeSet ? this._stateToBeSet : e;
@@ -9929,7 +9985,7 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
9929
9985
  return this.mapImp ? this.mapImp.search(e) : [];
9930
9986
  },
9931
9987
  onActionClick: function(e) {
9932
- ev.emit("onActionClick", e);
9988
+ lv.emit("onActionClick", e);
9933
9989
  },
9934
9990
  setConnectionType: function(e) {
9935
9991
  this.connectionType = e;
@@ -10287,7 +10343,7 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
10287
10343
  };
10288
10344
  },
10289
10345
  computed: {
10290
- ...ze(Q_, ["userToken"]),
10346
+ ...ze(sv, ["userToken"]),
10291
10347
  isValidDrawnCreated: function() {
10292
10348
  return Object.keys(this.drawnCreatedEvent).length > 0;
10293
10349
  },
@@ -10380,39 +10436,39 @@ var ev = new $_(), tv = "cannot be found on the map.", nv = (e) => {
10380
10436
  beforeUnmount: function() {
10381
10437
  this.tooltipObserver &&= (this.tooltipObserver.disconnect(), null);
10382
10438
  }
10383
- }, av = {
10439
+ }, mv = {
10384
10440
  class: "flatmap-container",
10385
10441
  ref: "flatmapContainer",
10386
10442
  "element-loading-text": "Loading...",
10387
10443
  "element-loading-background": "rgba(0, 0, 0, 0.3)"
10388
- }, ov = { style: {
10444
+ }, hv = { style: {
10389
10445
  height: "100%",
10390
10446
  width: "100%",
10391
10447
  position: "relative",
10392
10448
  "overflow-y": "none"
10393
- } }, sv = {
10449
+ } }, gv = {
10394
10450
  style: {
10395
10451
  height: "100%",
10396
10452
  width: "100%"
10397
10453
  },
10398
10454
  ref: "display",
10399
10455
  class: "flatmap-display"
10400
- }, cv = { class: "beta-popovers" }, lv = {
10456
+ }, _v = { class: "beta-popovers" }, vv = {
10401
10457
  key: 2,
10402
10458
  class: "warning-text"
10403
- }, uv = { class: "bottom-right-control" }, dv = ["innerHTML"], fv = { style: { "margin-bottom": "2px" } }, pv = {
10459
+ }, yv = { class: "bottom-right-control" }, bv = ["innerHTML"], xv = { style: { "margin-bottom": "2px" } }, Sv = {
10404
10460
  key: 0,
10405
10461
  class: "viewing-mode-title"
10406
- }, mv = ["onClick"], hv = ["onClick"];
10407
- function gv(e, n, r, i, a, o) {
10462
+ }, Cv = ["onClick"], wv = ["onClick"];
10463
+ function Tv(e, n, r, i, a, o) {
10408
10464
  let s = L("map-svg-sprite-color"), f = A_, h = De, g = Mf, _ = Wg, v = ye, y = L("DrawToolbar"), b = L("map-svg-icon"), x = x_, S = L("tree-controls"), C = u_, w = be, D = fh, O = Pg, k = Fg, ee = Yh, A = Jh, j = kg, te = Ag, ne = L("Tooltip"), N = Ug, re = t_;
10409
- return U((M(), u("div", av, [m(s), d("div", ov, [
10410
- d("div", sv, null, 512),
10465
+ return U((M(), u("div", mv, [m(s), d("div", hv, [
10466
+ d("div", gv, null, 512),
10411
10467
  e.flatmapError ? (M(), c(f, {
10412
10468
  key: 0,
10413
10469
  flatmapError: e.flatmapError
10414
10470
  }, null, 8, ["flatmapError"])) : l("", !0),
10415
- U(d("div", cv, [d("div", null, [r.displayWarning || r.isLegacy ? (M(), c(_, {
10471
+ U(d("div", _v, [d("div", null, [r.displayWarning || r.isLegacy ? (M(), c(_, {
10416
10472
  key: 0,
10417
10473
  placement: "right",
10418
10474
  "popper-class": "warning-popper flatmap-popper",
@@ -10430,7 +10486,7 @@ function gv(e, n, r, i, a, o) {
10430
10486
  })) : l("", !0), r.isLegacy ? (M(), u(t, { key: 1 }, [n[31] ||= d("span", { class: "warning-text" }, "Legacy Map", -1), d("div", {
10431
10487
  class: "latest-map-text",
10432
10488
  onClick: n[6] ||= (...e) => o.viewLatestMap && o.viewLatestMap(...e)
10433
- }, " Click here for the latest map ")], 64)) : r.displayWarning ? (M(), u("span", lv, "Beta")) : l("", !0)], 32)]),
10489
+ }, " Click here for the latest map ")], 64)) : r.displayWarning ? (M(), u("span", vv, "Beta")) : l("", !0)], 32)]),
10434
10490
  default: H(() => [r.isLegacy ? (M(), u("p", {
10435
10491
  key: 0,
10436
10492
  onMouseover: n[0] ||= (e) => o.showTooltip(7),
@@ -10540,7 +10596,7 @@ function gv(e, n, r, i, a, o) {
10540
10596
  "onShowTooltip",
10541
10597
  "onHideTooltip"
10542
10598
  ])) : l("", !0),
10543
- U(d("div", uv, [
10599
+ U(d("div", yv, [
10544
10600
  m(_, {
10545
10601
  content: "Zoom in",
10546
10602
  placement: "left",
@@ -10654,7 +10710,7 @@ function gv(e, n, r, i, a, o) {
10654
10710
  reference: H(() => [U(d("div", {
10655
10711
  class: "flatmap-marker-help",
10656
10712
  innerHTML: e.flatmapMarker
10657
- }, null, 8, dv), [[ge, e.hoverVisibilities[0].value], [
10713
+ }, null, 8, bv), [[ge, e.hoverVisibilities[0].value], [
10658
10714
  N,
10659
10715
  void 0,
10660
10716
  "markerPopover"
@@ -10794,11 +10850,11 @@ function gv(e, n, r, i, a, o) {
10794
10850
  }),
10795
10851
  m(O, { class: "backgroundControl" }, {
10796
10852
  default: H(() => [
10797
- d("div", fv, [(M(!0), u(t, null, F(e.viewingModes, (n, r) => (M(), u(t, { key: r }, [r === e.viewingMode ? (M(), u("span", pv, [d("b", null, R(r), 1)])) : (M(), u("span", {
10853
+ d("div", xv, [(M(!0), u(t, null, F(e.viewingModes, (n, r) => (M(), u(t, { key: r }, [r === e.viewingMode ? (M(), u("span", Sv, [d("b", null, R(r), 1)])) : (M(), u("span", {
10798
10854
  key: 1,
10799
10855
  class: "viewing-mode-unselected",
10800
10856
  onClick: (e) => o.changeViewingMode(r)
10801
- }, R(r), 9, mv))], 64))), 128))]),
10857
+ }, R(r), 9, Cv))], 64))), 128))]),
10802
10858
  m(O, { class: "viewing-mode-description" }, {
10803
10859
  default: H(() => [p(R(o.modeDescription), 1)]),
10804
10860
  _: 1
@@ -10936,7 +10992,7 @@ function gv(e, n, r, i, a, o) {
10936
10992
  t == e.currentBackground ? "active" : ""
10937
10993
  ]),
10938
10994
  onClick: (e) => o.backgroundChangeCallback(t)
10939
- }, null, 10, hv))), 128))]),
10995
+ }, null, 10, wv))), 128))]),
10940
10996
  _: 1
10941
10997
  })
10942
10998
  ])]),
@@ -11008,22 +11064,22 @@ function gv(e, n, r, i, a, o) {
11008
11064
  ])) : l("", !0)
11009
11065
  ])])), [[re, e.loading]]);
11010
11066
  }
11011
- var _v = /*#__PURE__*/ n_(iv, [["render", gv], ["__scopeId", "data-v-5d2365bc"]]), vv = {
11067
+ var Ev = /*#__PURE__*/ n_(pv, [["render", Tv], ["__scopeId", "data-v-d2e5e646"]]), Dv = {
11012
11068
  "NCBITaxon:10114": "01fedbf9-d783-509c-a10c-827941ab13da",
11013
11069
  "NCBITaxon:9823": "a336ac04-24db-561f-a25f-1c994fe17410",
11014
11070
  "NCBITaxon:9606": "42ed6323-f645-5fbe-bada-9581819cf689",
11015
11071
  "NCBITaxon:10090": "25285fab-48a0-5620-a6a0-f9a0374837d5",
11016
11072
  "NCBITaxon:9685": "73060497-46a6-52bf-b975-cac511c127cb"
11017
- }, yv = {
11073
+ }, Ov = {
11018
11074
  name: "MultiFlatmapVuer",
11019
- components: { FlatmapVuer: _v },
11075
+ components: { FlatmapVuer: Ev },
11020
11076
  created: function() {
11021
11077
  this.loadMapManager();
11022
11078
  },
11023
11079
  mounted: function() {
11024
- this.initialise(), ev.on("onActionClick", (e) => {
11080
+ this.initialise(), lv.on("onActionClick", (e) => {
11025
11081
  this.resourceSelected(e);
11026
- }), ev.on("open-pubmed-url", (e) => {
11082
+ }), lv.on("open-pubmed-url", (e) => {
11027
11083
  this.$emit("open-pubmed-url", e);
11028
11084
  });
11029
11085
  },
@@ -11171,7 +11227,7 @@ var _v = /*#__PURE__*/ n_(iv, [["render", gv], ["__scopeId", "data-v-5d2365bc"]]
11171
11227
  let n = e.state;
11172
11228
  if (!n.uuid) {
11173
11229
  if (n.entry) {
11174
- let r = n.entry in vv ? vv[n.entry] : void 0;
11230
+ let r = n.entry in Dv ? Dv[n.entry] : void 0;
11175
11231
  t(this.createLegacyEntry(e, n.entry, r) || e);
11176
11232
  }
11177
11233
  } else if (n.entry) return new Promise(() => {
@@ -11381,23 +11437,23 @@ var _v = /*#__PURE__*/ n_(iv, [["render", gv], ["__scopeId", "data-v-5d2365bc"]]
11381
11437
  t && this.$refs[t][0].forceContextLoss();
11382
11438
  } }
11383
11439
  }
11384
- }, bv = {
11440
+ }, kv = {
11385
11441
  class: "multi-container",
11386
11442
  ref: "multiContainer"
11387
- }, xv = {
11443
+ }, Av = {
11388
11444
  key: 0,
11389
11445
  style: {
11390
11446
  position: "absolute",
11391
11447
  "z-index": "100"
11392
11448
  }
11393
- }, Sv = { class: "option-label" }, Cv = { class: "option-title" }, wv = { class: "select-box-icon" }, Tv = {
11449
+ }, jv = { class: "option-label" }, Mv = { class: "option-title" }, Nv = { class: "select-box-icon" }, Pv = {
11394
11450
  key: 1,
11395
11451
  class: "option-title active-species"
11396
- }, Ev = { class: "select-box-icon" }, Dv = ["aria-label", "onClick"];
11397
- function Ov(e, n, r, i, a, o) {
11398
- let s = am, f = Yh, h = Jh, g = Wg, _ = _v, v = A_;
11399
- return M(), u("div", bv, [
11400
- r.disableUI ? l("", !0) : (M(), u("div", xv, [n[3] ||= d("div", { class: "species-display-text" }, "Species", -1), m(g, {
11452
+ }, Fv = { class: "select-box-icon" }, Iv = ["aria-label", "onClick"];
11453
+ function Lv(e, n, r, i, a, o) {
11454
+ let s = am, f = Yh, h = Jh, g = Wg, _ = Ev, v = A_;
11455
+ return M(), u("div", kv, [
11456
+ r.disableUI ? l("", !0) : (M(), u("div", Av, [n[3] ||= d("div", { class: "species-display-text" }, "Species", -1), m(g, {
11401
11457
  content: "Select a species",
11402
11458
  placement: "right",
11403
11459
  trigger: "manual",
@@ -11423,7 +11479,7 @@ function Ov(e, n, r, i, a, o) {
11423
11479
  label: i,
11424
11480
  value: i
11425
11481
  }, {
11426
- default: H(() => [d("span", Sv, [e.activeSpecies === i ? (M(), u("span", Tv, [d("span", Ev, [d("i", { class: T(t.iconClass) }, null, 2)]), p(" " + R(i), 1)])) : (M(), c(s, {
11482
+ default: H(() => [d("span", jv, [e.activeSpecies === i ? (M(), u("span", Pv, [d("span", Fv, [d("i", { class: T(t.iconClass) }, null, 2)]), p(" " + R(i), 1)])) : (M(), c(s, {
11427
11483
  key: 0,
11428
11484
  content: `Change species to ${i}`,
11429
11485
  placement: "top",
@@ -11431,7 +11487,7 @@ function Ov(e, n, r, i, a, o) {
11431
11487
  "show-after": 200,
11432
11488
  "popper-class": "flatmap-species-option-tooltip"
11433
11489
  }, {
11434
- default: H(() => [d("span", Cv, [d("span", wv, [d("i", { class: T(t.iconClass) }, null, 2)]), p(" " + R(i), 1)])]),
11490
+ default: H(() => [d("span", Mv, [d("span", Nv, [d("i", { class: T(t.iconClass) }, null, 2)]), p(" " + R(i), 1)])]),
11435
11491
  _: 2
11436
11492
  }, 1032, ["content"])), r.enableOpenMapUI ? (M(), c(s, {
11437
11493
  key: 2,
@@ -11466,7 +11522,7 @@ function Ov(e, n, r, i, a, o) {
11466
11522
  }),
11467
11523
  d("path", { d: "M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3" }),
11468
11524
  d("path", { d: "M14.5 11.5v6M11.5 14.5h6" })
11469
- ], -1)]], 8, Dv)]),
11525
+ ], -1)]], 8, Iv)]),
11470
11526
  _: 2
11471
11527
  }, 1032, ["content"])) : l("", !0)])]),
11472
11528
  _: 2
@@ -11532,6 +11588,6 @@ function Ov(e, n, r, i, a, o) {
11532
11588
  }, null, 8, ["flatmapError"])) : l("", !0)
11533
11589
  ], 512);
11534
11590
  }
11535
- var kv = /*#__PURE__*/ n_(yv, [["render", Ov], ["__scopeId", "data-v-c3226113"]]);
11591
+ var Rv = /*#__PURE__*/ n_(Ov, [["render", Lv], ["__scopeId", "data-v-c3226113"]]);
11536
11592
  //#endregion
11537
- export { _v as FlatmapVuer, kv as MultiFlatmapVuer };
11593
+ export { Ev as FlatmapVuer, Rv as MultiFlatmapVuer };