@abi-software/map-utilities 1.1.3-beta.7 → 1.1.3-beta.9

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.
@@ -10931,7 +10931,7 @@ function QS(t, e, r, n, a, i) {
10931
10931
  ]) : pe("", !0)
10932
10932
  ]);
10933
10933
  }
10934
- const mF = /* @__PURE__ */ rn(XS, [["render", QS], ["__scopeId", "data-v-6ac1a744"]]), JS = {
10934
+ const yF = /* @__PURE__ */ rn(XS, [["render", QS], ["__scopeId", "data-v-6ac1a744"]]), JS = {
10935
10935
  name: "HelpModeDialog",
10936
10936
  props: {
10937
10937
  /**
@@ -11114,7 +11114,7 @@ function nT(t, e, r, n, a, i) {
11114
11114
  ], 64))
11115
11115
  ], 2);
11116
11116
  }
11117
- const yF = /* @__PURE__ */ rn(JS, [["render", nT], ["__scopeId", "data-v-3efb89fb"]]);
11117
+ const bF = /* @__PURE__ */ rn(JS, [["render", nT], ["__scopeId", "data-v-3efb89fb"]]);
11118
11118
  function aT(t) {
11119
11119
  return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, r) {
11120
11120
  var n = t.get(e);
@@ -11935,7 +11935,7 @@ function r5(t, e, r, n, a, i) {
11935
11935
  }, null, 8, ["tooltipEntry"]))
11936
11936
  ]);
11937
11937
  }
11938
- const bF = /* @__PURE__ */ rn(e5, [["render", r5], ["__scopeId", "data-v-229b3988"]]), n5 = {
11938
+ const wF = /* @__PURE__ */ rn(e5, [["render", r5], ["__scopeId", "data-v-229b3988"]]), n5 = {
11939
11939
  name: "TreeControls",
11940
11940
  props: {
11941
11941
  /**
@@ -12164,7 +12164,7 @@ function f5(t, e, r, n, a, i) {
12164
12164
  ], 512)
12165
12165
  ]);
12166
12166
  }
12167
- const wF = /* @__PURE__ */ rn(n5, [["render", f5], ["__scopeId", "data-v-aa649eae"]]), jd = "Copy to clipboard", v5 = "Copied!", h5 = "#8300bf", p5 = {
12167
+ const xF = /* @__PURE__ */ rn(n5, [["render", f5], ["__scopeId", "data-v-aa649eae"]]), jd = "Copy to clipboard", v5 = "Copied!", h5 = "#8300bf", p5 = {
12168
12168
  name: "CopyToClipboard",
12169
12169
  props: {
12170
12170
  content: {
@@ -12244,7 +12244,7 @@ function m5(t, e, r, n, a, i) {
12244
12244
  _: 1
12245
12245
  }, 8, ["content", "hide-after", "onHide"]);
12246
12246
  }
12247
- const xF = /* @__PURE__ */ rn(p5, [["render", m5], ["__scopeId", "data-v-de3b5311"]]);
12247
+ const CF = /* @__PURE__ */ rn(p5, [["render", m5], ["__scopeId", "data-v-de3b5311"]]);
12248
12248
  function It(t) {
12249
12249
  "@babel/helpers - typeof";
12250
12250
  return It = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
@@ -28393,7 +28393,7 @@ let jL = class extends EventTarget {
28393
28393
  });
28394
28394
  }
28395
28395
  showConnectivity(r) {
28396
- this.cyg = new JL(this, r), this.cyg.on("tap-node", (n) => {
28396
+ this.cyg = new eF(this, r), this.cyg.on("tap-node", (n) => {
28397
28397
  const a = new CustomEvent("tap-node", {
28398
28398
  detail: n.detail
28399
28399
  });
@@ -28480,7 +28480,12 @@ const QL = [
28480
28480
  }
28481
28481
  }
28482
28482
  ];
28483
- class JL extends EventTarget {
28483
+ function JL(t) {
28484
+ return t.split(`
28485
+ `).map((e) => e && e[0] >= "a" && e[0] <= "z" ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(`
28486
+ `);
28487
+ }
28488
+ class eF extends EventTarget {
28484
28489
  constructor(r, n) {
28485
28490
  var a;
28486
28491
  super();
@@ -28499,7 +28504,7 @@ class JL extends EventTarget {
28499
28504
  minZoom: 0.5,
28500
28505
  maxZoom: 10,
28501
28506
  wheelSensitivity: 0.4
28502
- }).on("mouseover", "node", this.overNode.bind(this)).on("mouseout", "node", this.exitNode.bind(this)).on("position", "node", this.moveNode.bind(this)).on("tap", "node", this.tapNode.bind(this)).on("tap", this.tapNode.bind(this)), this.tooltip = document.createElement("div"), this.tooltip.className = "cy-graph-tooltip", this.tooltip.hidden = !0, (a = n == null ? void 0 : n.lastChild) == null || a.appendChild(this.tooltip);
28507
+ }).on("mouseover", "node", this.overNode.bind(this)).on("mouseout", "node", this.exitNode.bind(this)).on("position", "node", this.moveNode.bind(this)).on("tap", this.tapNode.bind(this)), this.tooltip = document.createElement("div"), this.tooltip.className = "cy-graph-tooltip", this.tooltip.hidden = !0, (a = n == null ? void 0 : n.lastChild) == null || a.appendChild(this.tooltip);
28503
28508
  }
28504
28509
  remove() {
28505
28510
  this.cy && this.cy.destroy();
@@ -28509,8 +28514,8 @@ class JL extends EventTarget {
28509
28514
  r + this.tooltip.offsetWidth >= ((n = this.tooltip.parentElement) == null ? void 0 : n.offsetWidth) && (this.tooltip.style.left = `${r - this.tooltip.offsetWidth}px`);
28510
28515
  }
28511
28516
  overNode(r) {
28512
- const n = r.target;
28513
- this.tooltip.innerText = n.data().label, this.tooltip.style.left = `${r.renderedPosition.x}px`, this.tooltip.style.top = `${r.renderedPosition.y}px`, this.tooltip.hidden = !1, this.checkRightBoundary(r.renderedPosition.x);
28517
+ const n = r.target, a = JL(n.data().label);
28518
+ this.tooltip.innerText = a, this.tooltip.style.left = `${r.renderedPosition.x}px`, this.tooltip.style.top = `${r.renderedPosition.y}px`, this.tooltip.style.maxWidth = "240px", this.tooltip.hidden = !1, this.checkRightBoundary(r.renderedPosition.x);
28514
28519
  }
28515
28520
  moveNode(r) {
28516
28521
  const n = r.target;
@@ -28529,7 +28534,7 @@ class JL extends EventTarget {
28529
28534
  this.addEventListener(r, n);
28530
28535
  }
28531
28536
  }
28532
- const eF = 1.3, tF = 24 * 60 * 60 * 1e3, rF = "Reset position", fv = "Lock zoom (to scroll)", nF = "Unlock zoom", aF = "#8300bf", iF = {
28537
+ const tF = 1.3, rF = 24 * 60 * 60 * 1e3, nF = "Reset position", fv = "Lock zoom (to scroll)", aF = "Unlock zoom", iF = "#8300bf", oF = {
28533
28538
  name: "ConnectivityGraph",
28534
28539
  props: {
28535
28540
  /**
@@ -28554,9 +28559,9 @@ const eF = 1.3, tF = 24 * 60 * 60 * 1e3, rF = "Reset position", fv = "Lock zoom
28554
28559
  knowledgeByPath: /* @__PURE__ */ new Map(),
28555
28560
  labelledTerms: /* @__PURE__ */ new Set(),
28556
28561
  labelCache: /* @__PURE__ */ new Map(),
28557
- resetLabel: rF,
28562
+ resetLabel: nF,
28558
28563
  zoomLockLabel: fv,
28559
- iconColor: aF,
28564
+ iconColor: iF,
28560
28565
  zoomEnabled: !1,
28561
28566
  errorMessage: ""
28562
28567
  };
@@ -28591,11 +28596,11 @@ const eF = 1.3, tF = 24 * 60 * 60 * 1e3, rF = "Reset position", fv = "Lock zoom
28591
28596
  (/* @__PURE__ */ new Date()).getTime() > t && this.removeAllCacheData();
28592
28597
  },
28593
28598
  updateCacheExpiry: function() {
28594
- const e = (/* @__PURE__ */ new Date()).getTime() + tF;
28599
+ const e = (/* @__PURE__ */ new Date()).getTime() + rF;
28595
28600
  sessionStorage.setItem("connectivity-graph-expiry", e);
28596
28601
  },
28597
28602
  run: async function() {
28598
- if (this.schemaVersion || (this.schemaVersion = await this.getSchemaVersion(), sessionStorage.setItem("connectivity-graph-schema-version", this.schemaVersion), this.updateCacheExpiry()), this.schemaVersion < eF) {
28603
+ if (this.schemaVersion || (this.schemaVersion = await this.getSchemaVersion(), sessionStorage.setItem("connectivity-graph-schema-version", this.schemaVersion), this.updateCacheExpiry()), this.schemaVersion < tF) {
28599
28604
  console.warn("No Server!");
28600
28605
  return;
28601
28606
  }
@@ -28712,26 +28717,28 @@ const eF = 1.3, tF = 24 * 60 * 60 * 1e3, rF = "Reset position", fv = "Lock zoom
28712
28717
  * Enable/disable user zoom for scrolling
28713
28718
  */
28714
28719
  toggleZoom: function() {
28715
- this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? nF : fv, this.connectivityGraph.enableZoom(!this.zoomEnabled);
28720
+ this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? aF : fv, this.connectivityGraph.enableZoom(!this.zoomEnabled);
28716
28721
  },
28717
- updateErrorMessage: function(t) {
28718
- this.errorMessage = t;
28722
+ showErrorMessage: function(t) {
28723
+ this.errorMessage = t, setTimeout(() => {
28724
+ this.errorMessage = "";
28725
+ }, 3e3);
28719
28726
  }
28720
28727
  }
28721
- }, oF = { class: "connectivity-graph" }, sF = {
28728
+ }, sF = { class: "connectivity-graph" }, lF = {
28722
28729
  ref: "graphCanvas",
28723
28730
  class: "graph-canvas"
28724
- }, lF = { class: "control-panel" }, uF = /* @__PURE__ */ P0('<div class="node-key" data-v-0e21ec8d><div class="key-head" data-v-0e21ec8d>Node type:</div><div data-v-0e21ec8d><div data-v-0e21ec8d><span data-v-0e21ec8d>Node:</span><span class="key-box" style="background:#80F0F0;" data-v-0e21ec8d></span></div><div data-v-0e21ec8d><span data-v-0e21ec8d>Axon:</span><span class="key-box" style="background:green;" data-v-0e21ec8d></span></div><div data-v-0e21ec8d><span data-v-0e21ec8d>Dendrite:</span><span class="key-box" style="background:red;" data-v-0e21ec8d></span></div><div data-v-0e21ec8d><span data-v-0e21ec8d>Both:</span><span class="key-box" style="background:gray;" data-v-0e21ec8d></span></div></div></div>', 1), cF = { class: "tools" }, dF = { class: "visually-hidden" }, fF = { class: "visually-hidden" }, vF = {
28731
+ }, uF = { class: "control-panel" }, cF = /* @__PURE__ */ P0('<div class="node-key" data-v-66636c8c><div class="key-head" data-v-66636c8c>Node type:</div><div data-v-66636c8c><div data-v-66636c8c><span data-v-66636c8c>Node:</span><span class="key-box" style="background:#80F0F0;" data-v-66636c8c></span></div><div data-v-66636c8c><span data-v-66636c8c>Axon:</span><span class="key-box" style="background:green;" data-v-66636c8c></span></div><div data-v-66636c8c><span data-v-66636c8c>Dendrite:</span><span class="key-box" style="background:red;" data-v-66636c8c></span></div><div data-v-66636c8c><span data-v-66636c8c>Both:</span><span class="key-box" style="background:gray;" data-v-66636c8c></span></div></div></div>', 1), dF = { class: "tools" }, fF = { class: "visually-hidden" }, vF = { class: "visually-hidden" }, hF = {
28725
28732
  key: 0,
28726
28733
  class: "connectivity-graph-error"
28727
28734
  };
28728
- function hF(t, e, r, n, a, i) {
28735
+ function pF(t, e, r, n, a, i) {
28729
28736
  const o = Xb, s = Vt, u = pn, l = xo, c = g2, d = w2, v = tc;
28730
- return je(($(), Z("div", oF, [
28731
- J("div", sF, null, 512),
28732
- J("div", lF, [
28733
- uF,
28734
- J("div", cF, [
28737
+ return je(($(), Z("div", sF, [
28738
+ J("div", lF, null, 512),
28739
+ J("div", uF, [
28740
+ cF,
28741
+ J("div", dF, [
28735
28742
  ce(l, {
28736
28743
  content: t.resetLabel,
28737
28744
  placement: "bottom",
@@ -28750,7 +28757,7 @@ function hF(t, e, r, n, a, i) {
28750
28757
  ]),
28751
28758
  _: 1
28752
28759
  }),
28753
- J("span", dF, Ne(t.resetLabel), 1)
28760
+ J("span", fF, Ne(t.resetLabel), 1)
28754
28761
  ]),
28755
28762
  _: 1
28756
28763
  }, 8, ["class", "onClick"])
@@ -28775,7 +28782,7 @@ function hF(t, e, r, n, a, i) {
28775
28782
  ]),
28776
28783
  _: 1
28777
28784
  }),
28778
- J("span", fF, Ne(t.zoomLockLabel), 1)
28785
+ J("span", vF, Ne(t.zoomLockLabel), 1)
28779
28786
  ]),
28780
28787
  _: 1
28781
28788
  }, 8, ["class", "onClick"])
@@ -28784,17 +28791,17 @@ function hF(t, e, r, n, a, i) {
28784
28791
  }, 8, ["content"])
28785
28792
  ])
28786
28793
  ]),
28787
- t.errorMessage ? ($(), Z("div", vF, Ne(t.errorMessage), 1)) : pe("", !0)
28794
+ t.errorMessage ? ($(), Z("div", hF, Ne(t.errorMessage), 1)) : pe("", !0)
28788
28795
  ])), [
28789
28796
  [v, t.loading]
28790
28797
  ]);
28791
28798
  }
28792
- const EF = /* @__PURE__ */ rn(iF, [["render", hF], ["__scopeId", "data-v-0e21ec8d"]]);
28799
+ const kF = /* @__PURE__ */ rn(oF, [["render", pF], ["__scopeId", "data-v-66636c8c"]]);
28793
28800
  export {
28794
- EF as ConnectivityGraph,
28795
- xF as CopyToClipboard,
28796
- mF as DrawToolbar,
28797
- yF as HelpModeDialog,
28798
- bF as Tooltip,
28799
- wF as TreeControls
28801
+ kF as ConnectivityGraph,
28802
+ CF as CopyToClipboard,
28803
+ yF as DrawToolbar,
28804
+ bF as HelpModeDialog,
28805
+ wF as Tooltip,
28806
+ xF as TreeControls
28800
28807
  };