@abi-software/map-side-bar 2.4.2-beta.7 → 2.4.2-beta.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.
- package/dist/map-side-bar.js +30 -10
- package/dist/map-side-bar.umd.cjs +4 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/map-side-bar.js
CHANGED
|
@@ -45212,9 +45212,9 @@ ws.warnings = function(e) {
|
|
|
45212
45212
|
};
|
|
45213
45213
|
ws.version = ede;
|
|
45214
45214
|
ws.stylesheet = ws.Stylesheet = Q_;
|
|
45215
|
-
let tde = class {
|
|
45215
|
+
let tde = class extends EventTarget {
|
|
45216
45216
|
constructor(e, t) {
|
|
45217
|
-
ha(this, "cyg", null), ha(this, "nodes", []), ha(this, "edges", []), ha(this, "axons", []), ha(this, "dendrites", []), ha(this, "labelCache", /* @__PURE__ */ new Map()), ha(this, "graphCanvas", null), this.labelCache = e, this.graphCanvas = t;
|
|
45217
|
+
super(), ha(this, "cyg", null), ha(this, "nodes", []), ha(this, "edges", []), ha(this, "axons", []), ha(this, "dendrites", []), ha(this, "labelCache", /* @__PURE__ */ new Map()), ha(this, "graphCanvas", null), this.labelCache = e, this.graphCanvas = t;
|
|
45218
45218
|
}
|
|
45219
45219
|
async addConnectivity(e) {
|
|
45220
45220
|
if (this.axons = e.axons.map((t) => JSON.stringify(t)), this.dendrites = e.dendrites.map((t) => JSON.stringify(t)), e.connectivity.length)
|
|
@@ -45233,7 +45233,12 @@ let tde = class {
|
|
|
45233
45233
|
});
|
|
45234
45234
|
}
|
|
45235
45235
|
showConnectivity(e) {
|
|
45236
|
-
this.cyg = new rde(this, e)
|
|
45236
|
+
this.cyg = new rde(this, e), this.cyg.on("tap-node", (t) => {
|
|
45237
|
+
const n = new CustomEvent("tap-node", {
|
|
45238
|
+
detail: t.detail
|
|
45239
|
+
});
|
|
45240
|
+
this.dispatchEvent(n);
|
|
45241
|
+
});
|
|
45237
45242
|
}
|
|
45238
45243
|
clearConnectivity() {
|
|
45239
45244
|
var e;
|
|
@@ -45270,6 +45275,9 @@ let tde = class {
|
|
|
45270
45275
|
};
|
|
45271
45276
|
return this.axons.includes(t) ? this.dendrites.includes(t) ? o["both-a-d"] = !0 : o.axon = !0 : this.dendrites.includes(t) && (o.dendrite = !0), o;
|
|
45272
45277
|
}
|
|
45278
|
+
on(e, t) {
|
|
45279
|
+
this.addEventListener(e, t);
|
|
45280
|
+
}
|
|
45273
45281
|
};
|
|
45274
45282
|
const nde = [
|
|
45275
45283
|
{
|
|
@@ -45312,11 +45320,10 @@ const nde = [
|
|
|
45312
45320
|
}
|
|
45313
45321
|
}
|
|
45314
45322
|
];
|
|
45315
|
-
class rde {
|
|
45323
|
+
class rde extends EventTarget {
|
|
45316
45324
|
constructor(t, n) {
|
|
45317
|
-
ha(this, "cy"), ha(this, "tooltip");
|
|
45318
45325
|
var r;
|
|
45319
|
-
this.cy = ws({
|
|
45326
|
+
super(), ha(this, "cy"), ha(this, "tooltip"), this.cy = ws({
|
|
45320
45327
|
container: n,
|
|
45321
45328
|
elements: t.elements,
|
|
45322
45329
|
layout: {
|
|
@@ -45329,7 +45336,7 @@ class rde {
|
|
|
45329
45336
|
minZoom: 0.5,
|
|
45330
45337
|
maxZoom: 10,
|
|
45331
45338
|
wheelSensitivity: 0.4
|
|
45332
|
-
}).on("mouseover", "node", this.overNode.bind(this)).on("mouseout", "node", this.exitNode.bind(this)).on("position", "node", this.moveNode.bind(this)), this.tooltip = document.createElement("div"), this.tooltip.className = "cy-graph-tooltip", this.tooltip.hidden = !0, (r = n == null ? void 0 : n.lastChild) == null || r.appendChild(this.tooltip);
|
|
45339
|
+
}).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)), this.tooltip = document.createElement("div"), this.tooltip.className = "cy-graph-tooltip", this.tooltip.hidden = !0, (r = n == null ? void 0 : n.lastChild) == null || r.appendChild(this.tooltip);
|
|
45333
45340
|
}
|
|
45334
45341
|
remove() {
|
|
45335
45342
|
this.cy && this.cy.destroy();
|
|
@@ -45349,6 +45356,15 @@ class rde {
|
|
|
45349
45356
|
exitNode(t) {
|
|
45350
45357
|
this.tooltip.hidden = !0;
|
|
45351
45358
|
}
|
|
45359
|
+
tapNode(t) {
|
|
45360
|
+
const n = t.target.data(), r = new CustomEvent("tap-node", {
|
|
45361
|
+
detail: n
|
|
45362
|
+
});
|
|
45363
|
+
this.dispatchEvent(r);
|
|
45364
|
+
}
|
|
45365
|
+
on(t, n) {
|
|
45366
|
+
this.addEventListener(t, n);
|
|
45367
|
+
}
|
|
45352
45368
|
}
|
|
45353
45369
|
const ode = 1.3, ade = 24 * 60 * 60 * 1e3, ide = "Reset position", hk = "Lock zoom (to scroll)", sde = "Unlock zoom", lde = "#8300bf", ude = {
|
|
45354
45370
|
name: "ConnectivityGraph",
|
|
@@ -45423,7 +45439,11 @@ const ode = 1.3, ade = 24 * 60 * 60 * 1e3, ide = "Reset position", hk = "Lock zo
|
|
|
45423
45439
|
},
|
|
45424
45440
|
showGraph: async function(e) {
|
|
45425
45441
|
const t = this.$refs.graphCanvas;
|
|
45426
|
-
this.showSpinner(), this.connectivityGraph = new tde(this.labelCache, t), await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(e)), this.hideSpinner(), this.connectivityGraph.showConnectivity(t)
|
|
45442
|
+
this.showSpinner(), this.connectivityGraph = new tde(this.labelCache, t), await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(e)), this.hideSpinner(), this.connectivityGraph.showConnectivity(t), this.connectivityGraph.on("tap-node", (n) => {
|
|
45443
|
+
const { label: r } = n.detail, o = r.split(`
|
|
45444
|
+
`);
|
|
45445
|
+
this.$emit("tap-node", o);
|
|
45446
|
+
});
|
|
45427
45447
|
},
|
|
45428
45448
|
query: async function(e, t) {
|
|
45429
45449
|
const n = `${this.mapServer}knowledge/query/`, r = { sql: e, params: t };
|
|
@@ -45530,7 +45550,7 @@ const ode = 1.3, ade = 24 * 60 * 60 * 1e3, ide = "Reset position", hk = "Lock zo
|
|
|
45530
45550
|
}, cde = { class: "connectivity-graph" }, dde = {
|
|
45531
45551
|
ref: "graphCanvas",
|
|
45532
45552
|
class: "graph-canvas"
|
|
45533
|
-
}, pde = { class: "control-panel" }, fde = /* @__PURE__ */ a8('<div class="node-key" data-v-
|
|
45553
|
+
}, pde = { class: "control-panel" }, fde = /* @__PURE__ */ a8('<div class="node-key" data-v-d620c023><div class="key-head" data-v-d620c023>Node type:</div><div data-v-d620c023><div data-v-d620c023><span data-v-d620c023>Node:</span><span class="key-box" style="background:#80F0F0;" data-v-d620c023></span></div><div data-v-d620c023><span data-v-d620c023>Axon:</span><span class="key-box" style="background:green;" data-v-d620c023></span></div><div data-v-d620c023><span data-v-d620c023>Dendrite:</span><span class="key-box" style="background:red;" data-v-d620c023></span></div><div data-v-d620c023><span data-v-d620c023>Both:</span><span class="key-box" style="background:gray;" data-v-d620c023></span></div></div></div>', 1), hde = { class: "tools" }, vde = { class: "visually-hidden" }, gde = { class: "visually-hidden" };
|
|
45534
45554
|
function mde(e, t, n, r, o, a) {
|
|
45535
45555
|
const i = XY, s = yr, u = Xp, l = qc, c = uZ, d = dZ, f = dre;
|
|
45536
45556
|
return ot((F(), j("div", cde, [
|
|
@@ -45594,7 +45614,7 @@ function mde(e, t, n, r, o, a) {
|
|
|
45594
45614
|
[f, e.loading]
|
|
45595
45615
|
]);
|
|
45596
45616
|
}
|
|
45597
|
-
const yde = /* @__PURE__ */ FE(ude, [["render", mde], ["__scopeId", "data-v-
|
|
45617
|
+
const yde = /* @__PURE__ */ FE(ude, [["render", mde], ["__scopeId", "data-v-d620c023"]]), bde = {
|
|
45598
45618
|
data() {
|
|
45599
45619
|
return {
|
|
45600
45620
|
ElIconView: iC
|