@abi-software/mapintegratedvuer 1.9.0-externalise.0 → 1.9.0-externalise.1

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.
@@ -1,5 +1,5 @@
1
1
  import { markRaw as b } from "vue";
2
- import { u as I, b as M, E as h, T as F, c as w, d as A } from "./index-DPgI7wGR.js";
2
+ import { u as I, b as M, E as h, T as F, c as w, d as A } from "./index-DXbdAVdH.js";
3
3
  import { mapStores as C } from "pinia";
4
4
  const d = function(e) {
5
5
  return e ? [...new Set(e.map((t) => JSON.stringify(t)))].map(
@@ -1,6 +1,6 @@
1
- import { _ as c, G as h, t as u, T as l, E as r } from "./index-DPgI7wGR.js";
2
- import { C as g } from "./ContentMixin-DZNBigKl.js";
3
- import { D as M } from "./style-C-2wp5WK.js";
1
+ import { _ as c, G as h, t as u, T as l, E as r } from "./index-DXbdAVdH.js";
2
+ import { C as g } from "./ContentMixin-DuzUGOr7.js";
3
+ import { D as M } from "./style-D2AYtXeS.js";
4
4
  import { FlatmapVuer as I } from "@abi-software/flatmapvuer";
5
5
  import { resolveComponent as p, openBlock as s, createElementBlock as y, createVNode as v, createBlock as S, createCommentVNode as C } from "vue";
6
6
  const F = {
@@ -1,6 +1,6 @@
1
- import { C as r } from "./ContentMixin-DZNBigKl.js";
1
+ import { C as r } from "./ContentMixin-DuzUGOr7.js";
2
2
  import { openBlock as o, createElementBlock as t, createElementVNode as s } from "vue";
3
- import { _ as n } from "./index-DPgI7wGR.js";
3
+ import { _ as n } from "./index-DXbdAVdH.js";
4
4
  const a = {
5
5
  name: "Iframe",
6
6
  mixins: [r]
@@ -1,6 +1,6 @@
1
- import { _ as u, G as h, a as y, g, E as s, t as M, T as p } from "./index-DPgI7wGR.js";
2
- import { C as v } from "./ContentMixin-DZNBigKl.js";
3
- import { D as I } from "./style-C-2wp5WK.js";
1
+ import { _ as u, G as h, a as y, g, E as s, t as M, T as p } from "./index-DXbdAVdH.js";
2
+ import { C as v } from "./ContentMixin-DuzUGOr7.js";
3
+ import { D as I } from "./style-D2AYtXeS.js";
4
4
  import { MultiFlatmapVuer as C } from "@abi-software/flatmapvuer";
5
5
  import { resolveComponent as f, openBlock as c, createElementBlock as S, createVNode as F, createBlock as w, createCommentVNode as k } from "vue";
6
6
  const R = '<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>', d = (e) => {
@@ -1,7 +1,7 @@
1
1
  import { PlotVuer as o } from "@abi-software/plotvuer";
2
- import { C as r } from "./ContentMixin-DZNBigKl.js";
2
+ import { C as r } from "./ContentMixin-DuzUGOr7.js";
3
3
  import { resolveComponent as a, openBlock as n, createBlock as s } from "vue";
4
- import { _ as m } from "./index-DPgI7wGR.js";
4
+ import { _ as m } from "./index-DXbdAVdH.js";
5
5
  const p = {
6
6
  name: "Plot",
7
7
  mixins: [r],
@@ -0,0 +1,180 @@
1
+ import { _ as p, G as c, E as l } from "./index-DXbdAVdH.js";
2
+ import { C as u } from "./ContentMixin-DuzUGOr7.js";
3
+ import { ScaffoldVuer as m } from "@abi-software/scaffoldvuer";
4
+ import { resolveComponent as r, openBlock as f, createElementBlock as g, createVNode as y, createBlock as M, createCommentVNode as S } from "vue";
5
+ const v = {
6
+ name: "Scaffold",
7
+ mixins: [u],
8
+ components: {
9
+ ScaffoldVuer: m,
10
+ HelpModeDialog: c
11
+ },
12
+ methods: {
13
+ onResize: function() {
14
+ this.scaffoldCamera.onResize();
15
+ },
16
+ getState: function() {
17
+ return this.$refs.scaffold.getState();
18
+ },
19
+ /**
20
+ * Perform a local search on this contentvuer
21
+ */
22
+ search: function(e) {
23
+ return this.$refs.scaffold.search(e, !0);
24
+ },
25
+ searchSuggestions: function(e, o) {
26
+ if (e === "" || !this.$refs.scaffold)
27
+ return o;
28
+ this.$refs.scaffold.fetchSuggestions(e).forEach((a) => {
29
+ a.suggestion && o.push(a.suggestion);
30
+ });
31
+ },
32
+ /**
33
+ * Handle sync pan zoom event
34
+ */
35
+ handleSyncPanZoomEvent: function(e) {
36
+ if (!this.mouseHovered && e.type !== this.entry.type) {
37
+ const o = e.payload.origin, t = e.payload.size, a = [o[0] + t[0] / 2, o[1] + t[1] / 2], i = [
38
+ (a[0] - 0.5) * 2,
39
+ (0.5 - a[1]) * 2
40
+ ], n = 1 / Math.max(t[0], t[1]);
41
+ this.$refs.scaffold.$module.setSyncControlCenterZoom(
42
+ i,
43
+ n
44
+ );
45
+ }
46
+ },
47
+ displayTooltip: function(e) {
48
+ let o;
49
+ e && (o = e.name), o ? this.$refs.scaffold.search(o, !0) : this.$refs.scaffold.hideRegionTooltip();
50
+ },
51
+ zoomToFeatures: function(e, o) {
52
+ let t;
53
+ Array.isArray(e) ? t = e : t = [e.name], o && this.$refs.scaffold.changeActiveByName(t, "", !1), this.$refs.scaffold.viewRegion(t);
54
+ },
55
+ highlightFeatures: function(e) {
56
+ let o;
57
+ Array.isArray(e) ? o = e : o = [e.name], this.$refs.scaffold.changeHighlightedByName(o, "", !1);
58
+ },
59
+ scaffoldIsReady: function() {
60
+ if (this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.isVisible()) {
61
+ let e = "free";
62
+ this.entry.rotation && (e = this.entry.rotation), this.$refs.scaffold.toggleSyncControl(this.splitFlowStore.globalCallback, e), this.splitFlowStore.syncMode && this.$refs.scaffold.fitWindow();
63
+ }
64
+ l.emit("mapLoaded", this.$refs.scaffold);
65
+ },
66
+ requestSynchronisedEvent: function(e) {
67
+ if (this.scaffoldLoaded) {
68
+ let o = "free";
69
+ this.entry.rotation && (o = this.entry.rotation), this.$refs.scaffold.toggleSyncControl(e, o);
70
+ }
71
+ },
72
+ /**
73
+ * Callback when the vuers emit a selected event.
74
+ */
75
+ scaffoldHighlighted: function(e, o) {
76
+ var a, i, n;
77
+ const t = {
78
+ paneIndex: this.entry.id,
79
+ type: e,
80
+ resource: o,
81
+ internalName: void 0
82
+ };
83
+ o && o[0] && ((((a = o[0].data) == null ? void 0 : a.id) === void 0 || ((i = o[0].data) == null ? void 0 : i.id) === "") && (o[0].data.id = (n = o[0].data) == null ? void 0 : n.group), t.internalName = o[0].data.id, t.eventType = "highlighted"), this.$emit("resource-selected", t);
84
+ },
85
+ /**
86
+ * Callback when the vuers emit a selected event.
87
+ */
88
+ scaffoldNavigated: function(e, o) {
89
+ if (this.mouseHovered) {
90
+ const t = {
91
+ paneIndex: this.entry.id,
92
+ eventType: "panZoom",
93
+ payload: o,
94
+ type: e
95
+ };
96
+ this.$emit("resource-selected", t);
97
+ }
98
+ },
99
+ updateWithViewUrl: function(e) {
100
+ this.$refs.scaffold.updateViewURL(e);
101
+ },
102
+ /**
103
+ * Change the view mode of the current scaffold
104
+ */
105
+ changeViewingMode: function(e) {
106
+ this.$refs.scaffold.changeViewingMode(e);
107
+ }
108
+ },
109
+ computed: {
110
+ warningMessage: function() {
111
+ return this.entry.isBodyScaffold ? "This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed." : "Under active development";
112
+ },
113
+ markerLabels: function() {
114
+ return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
115
+ }
116
+ },
117
+ data: function() {
118
+ return {
119
+ apiLocation: process.env.VUE_APP_API_LOCATION,
120
+ scaffoldCamera: void 0,
121
+ scaffoldLoaded: !1
122
+ };
123
+ },
124
+ mounted: function() {
125
+ this.scaffoldCamera = this.$refs.scaffold.$module.scene.getZincCameraControls(), l.on("startHelp", () => {
126
+ this.startHelp();
127
+ }), l.on("hoverUpdate", () => {
128
+ this.scaffoldLoaded && this.cardHoverHighlight();
129
+ });
130
+ }
131
+ }, w = { class: "viewer-container" };
132
+ function H(e, o, t, a, i, n) {
133
+ const d = r("ScaffoldVuer"), h = r("HelpModeDialog");
134
+ return f(), g("div", w, [
135
+ y(d, {
136
+ state: e.entry.state,
137
+ url: e.entry.resource,
138
+ region: e.entry.region,
139
+ onScaffoldSelected: o[0] || (o[0] = (s) => e.resourceSelected(e.entry.type, s, !0)),
140
+ onScaffoldHighlighted: o[1] || (o[1] = (s) => n.scaffoldHighlighted(e.entry.type, s)),
141
+ onScaffoldNavigated: o[2] || (o[2] = (s) => n.scaffoldNavigated(e.entry.type, s)),
142
+ onOnReady: n.scaffoldIsReady,
143
+ onOpenMap: e.openMap,
144
+ ref: "scaffold",
145
+ "background-toggle": !0,
146
+ traditional: !0,
147
+ helpMode: e.helpMode,
148
+ helpModeActiveItem: e.helpModeActiveItem,
149
+ helpModeDialog: e.useHelpModeDialog,
150
+ onAnnotationOpen: e.onAnnotationOpen,
151
+ onAnnotationClose: e.onAnnotationClose,
152
+ annotationSidebar: e.annotationSidebar,
153
+ onHelpModeLastItem: e.onHelpModeLastItem,
154
+ onShownTooltip: e.onTooltipShown,
155
+ onShownMapTooltip: e.onMapTooltipShown,
156
+ render: e.visible,
157
+ "display-latest-message": !0,
158
+ "warning-message": n.warningMessage,
159
+ "display-minimap": !1,
160
+ "display-markers": !1,
161
+ enableOpenMapUI: !0,
162
+ "view-u-r-l": e.entry.viewUrl,
163
+ markerCluster: !0,
164
+ markerLabels: n.markerLabels,
165
+ flatmapAPI: e.flatmapAPI
166
+ }, null, 8, ["state", "url", "region", "onOnReady", "onOpenMap", "helpMode", "helpModeActiveItem", "helpModeDialog", "onAnnotationOpen", "onAnnotationClose", "annotationSidebar", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "render", "warning-message", "view-u-r-l", "markerLabels", "flatmapAPI"]),
167
+ e.helpMode && e.useHelpModeDialog ? (f(), M(h, {
168
+ key: 0,
169
+ ref: "scaffoldHelp",
170
+ scaffoldRef: e.scaffoldRef,
171
+ lastItem: e.helpModeLastItem,
172
+ onShowNext: e.onHelpModeShowNext,
173
+ onFinishHelpMode: e.onFinishHelpMode
174
+ }, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : S("", !0)
175
+ ]);
176
+ }
177
+ const b = /* @__PURE__ */ p(v, [["render", H], ["__scopeId", "data-v-fa031bde"]]);
178
+ export {
179
+ b as default
180
+ };
@@ -1,7 +1,7 @@
1
- import { C as i } from "./ContentMixin-DZNBigKl.js";
1
+ import { C as i } from "./ContentMixin-DuzUGOr7.js";
2
2
  import { SimulationVuer as t } from "@abi-software/simulationvuer";
3
3
  import { resolveComponent as e, openBlock as r, createBlock as a } from "vue";
4
- import { _ as m } from "./index-DPgI7wGR.js";
4
+ import { _ as m } from "./index-DXbdAVdH.js";
5
5
  const c = {
6
6
  name: "Simulation",
7
7
  mixins: [i],