@abi-software/mapintegratedvuer 1.7.0 → 1.7.1-beta.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.
- package/dist/{ContentMixin-Bny6AX7L.js → ContentMixin-C3555r1D.js} +1 -1
- package/dist/{Flatmap-_71SkR8B.js → Flatmap-BqmkEmF_.js} +3 -3
- package/dist/{Iframe-B0Gceqgo.js → Iframe-BJZsCkYs.js} +2 -2
- package/dist/{MultiFlatmap-1OYvhH8W.js → MultiFlatmap-DgSK-1sZ.js} +3 -3
- package/dist/{Plot-NNWXz6_n.js → Plot-BTKTI4P0.js} +2 -2
- package/dist/{Scaffold-CbXO9X8d.js → Scaffold-D2x_f5Va.js} +12 -13
- package/dist/{Simulation-Db6fkT8B.js → Simulation-CrjYm_QC.js} +2 -2
- package/dist/{index-Be9BtgnQ.js → index-Lnx8-52s.js} +2145 -2144
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +316 -316
- package/dist/{style-Dmnajx5F.js → style-DuQlT2DD.js} +1471 -1474
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/src/App.vue +10 -0
- package/src/components/MapContent.vue +65 -38
- package/src/components/scripts/utilities.js +5 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.7.0",
|
3
|
+
"version": "1.7.1-beta.0",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -50,11 +50,11 @@
|
|
50
50
|
"*.js"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@abi-software/flatmapvuer": "1.7.
|
54
|
-
"@abi-software/map-side-bar": "2.6.
|
55
|
-
"@abi-software/map-utilities": "1.3.
|
53
|
+
"@abi-software/flatmapvuer": "1.7.2",
|
54
|
+
"@abi-software/map-side-bar": "2.6.2",
|
55
|
+
"@abi-software/map-utilities": "1.3.1",
|
56
56
|
"@abi-software/plotvuer": "^1.0.3",
|
57
|
-
"@abi-software/scaffoldvuer": "1.7.
|
57
|
+
"@abi-software/scaffoldvuer": "1.7.1",
|
58
58
|
"@abi-software/simulationvuer": "1.0.1",
|
59
59
|
"@abi-software/sparc-annotation": "0.3.2",
|
60
60
|
"@abi-software/svg-sprite": "^1.0.1",
|
package/src/App.vue
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
<el-button @click="setMultiFlatmap()" size="small">Set MultiFlatmap</el-button>
|
21
21
|
<el-button @click="setLegacyMultiFlatmap()" size="small">Set Legacy MultiFlatmap</el-button>
|
22
22
|
<el-button @click="setScaffold()" size="small">Set To Scaffold</el-button>
|
23
|
+
<el-button @click="setWholebody()" size="small">Set to Wholebody</el-button>
|
23
24
|
<el-button @click="setFlatmap()" size="small">Set Flatmap</el-button>
|
24
25
|
<el-button @click="setSearch()" size="small">Set Search</el-button>
|
25
26
|
</el-row>
|
@@ -166,6 +167,15 @@ export default {
|
|
166
167
|
}
|
167
168
|
);
|
168
169
|
},
|
170
|
+
setWholebody: function() {
|
171
|
+
this.$refs.map.setCurrentEntry(
|
172
|
+
{
|
173
|
+
type: "Scaffold",
|
174
|
+
label: "Human",
|
175
|
+
isBodyScaffold: true
|
176
|
+
}
|
177
|
+
);
|
178
|
+
},
|
169
179
|
setSearch: function() {
|
170
180
|
this.$refs.map.openSearch([], "10.26275/1uno-tynt");
|
171
181
|
},
|
@@ -27,7 +27,7 @@ import { useSettingsStore } from '../stores/settings';
|
|
27
27
|
import { useSplitFlowStore } from '../stores/splitFlow';
|
28
28
|
import { findSpeciesKey } from './scripts/utilities.js';
|
29
29
|
import { MapSvgSpriteColor} from '@abi-software/svg-sprite';
|
30
|
-
import { initialState } from "./scripts/utilities.js";
|
30
|
+
import { initialState, getBodyScaffoldInfo } from "./scripts/utilities.js";
|
31
31
|
import RetrieveContextCardMixin from "../mixins/RetrieveContextCardMixin.js"
|
32
32
|
import {
|
33
33
|
ElLoading as Loading
|
@@ -155,6 +155,9 @@ export default {
|
|
155
155
|
} else if (document.msExitFullscreen) { /* IE/Edge */
|
156
156
|
document.msExitFullscreen();
|
157
157
|
}
|
158
|
+
|
159
|
+
let mapApp = this.$refs.MapApp;
|
160
|
+
this.replacePopupsOnFullscreen(mapApp, document.body);
|
158
161
|
}
|
159
162
|
},
|
160
163
|
/**
|
@@ -172,6 +175,15 @@ export default {
|
|
172
175
|
} else if (parent.msRequestFullscreen) { /* IE/Edge */
|
173
176
|
mapApp.msRequestFullscreen();
|
174
177
|
}
|
178
|
+
|
179
|
+
this.replacePopupsOnFullscreen(document.body, mapApp);
|
180
|
+
},
|
181
|
+
replacePopupsOnFullscreen: function (containerA, containerB) {
|
182
|
+
const allTeleportedPopovers = containerA.querySelectorAll('[id^="el-popper-container"]');
|
183
|
+
|
184
|
+
allTeleportedPopovers.forEach((teleportedPopover) => {
|
185
|
+
containerB.append(teleportedPopover);
|
186
|
+
});
|
175
187
|
},
|
176
188
|
setState: function(state){
|
177
189
|
return this.$refs.flow.setState(state);
|
@@ -189,7 +201,7 @@ export default {
|
|
189
201
|
*/
|
190
202
|
setCurrentEntry: async function(state) {
|
191
203
|
if (state && state.type) {
|
192
|
-
if (state.type === "Scaffold" && state.url) {
|
204
|
+
if (state.type === "Scaffold" && (state.url || state.isBodyScaffold)) {
|
193
205
|
//State for scaffold containing the following items:
|
194
206
|
// label - Setting the name of the dialog
|
195
207
|
// region - Which region/group currently focusing on
|
@@ -204,52 +216,67 @@ export default {
|
|
204
216
|
state: state.state,
|
205
217
|
viewUrl: state.viewUrl
|
206
218
|
};
|
207
|
-
|
208
|
-
|
209
|
-
|
219
|
+
if (state.isBodyScaffold) {
|
220
|
+
const data = await getBodyScaffoldInfo(this.options.sparcApi, state.label);
|
221
|
+
newView = { ...newView, ...data.datasetInfo, resource: data.url };
|
222
|
+
} else {
|
223
|
+
// Add content from scicrunch for the context card
|
224
|
+
const contextCardInfo = await this.retrieveContextCardFromUrl(state.url);
|
225
|
+
newView = { ...newView, ...contextCardInfo };
|
226
|
+
}
|
210
227
|
this.$refs.flow.createNewEntry(newView);
|
211
228
|
} else if (state.type === "MultiFlatmap") {
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
229
|
+
if (state.resource) {
|
230
|
+
//State for new multiflatmap containing the following items:
|
231
|
+
// label - Setting the name of the dialog
|
232
|
+
// resource - the url to metadata
|
233
|
+
// state - state to restore (viewport)
|
234
|
+
const newView = {
|
235
|
+
type: state.type,
|
236
|
+
resource: state.resource,
|
237
|
+
state: state.state,
|
238
|
+
label: state.label
|
239
|
+
};
|
240
|
+
this.$refs.flow.createNewEntry(newView);
|
241
|
+
} else {
|
242
|
+
//State for multiflatmap containing the following items:
|
243
|
+
// taxo - taxo of species to set
|
244
|
+
// biologicalSex - biological sex to be displayed (PATO)
|
245
|
+
// organ - Target organ, flatmap will conduct a local search
|
246
|
+
// using this
|
247
|
+
|
248
|
+
//Look for the key in the available species array,
|
249
|
+
//it will use the taxo and biologicalSex as hints.
|
250
|
+
const key = findSpeciesKey(state);
|
251
|
+
if (key) {
|
252
|
+
const currentState = this.getState();
|
253
|
+
if (currentState && currentState.entries) {
|
254
|
+
for (let i = 0; i < currentState.entries.length; i++) {
|
255
|
+
const entry = currentState.entries[i];
|
256
|
+
if (entry.type === "MultiFlatmap") {
|
257
|
+
entry.resource = key;
|
258
|
+
entry.state = { species: key };
|
259
|
+
if (state.organ || state.uuid) {
|
260
|
+
entry.state.state = { searchTerm: state.organ, uuid: state.uuid };
|
261
|
+
//if it contains an uuid, use the taxo to help identify if the uuid
|
262
|
+
//is current
|
263
|
+
if (state.uuid) entry.state.state.entry = state.taxo;
|
264
|
+
}
|
265
|
+
this.$refs.flow.setState(currentState);
|
266
|
+
//Do not create a new entry, instead set the multiflatmap viewer
|
267
|
+
//to the primary slot
|
268
|
+
this.$refs.flow.setIdToPrimaryPane(entry.id);
|
269
|
+
break;
|
235
270
|
}
|
236
|
-
this.$refs.flow.setState(currentState);
|
237
|
-
//Do not create a new entry, instead set the multiflatmap viewer
|
238
|
-
//to the primary slot
|
239
|
-
this.$refs.flow.setIdToPrimaryPane(entry.id);
|
240
|
-
break;
|
241
271
|
}
|
242
272
|
}
|
243
273
|
}
|
244
274
|
}
|
245
|
-
}
|
246
|
-
|
247
|
-
//State for scaffold containing the following items:
|
275
|
+
} else if (state.type === "Flatmap") {
|
276
|
+
//State for flatmap containing the following items:
|
248
277
|
// label - Setting the name of the dialog
|
249
|
-
// region - Which region/group currently focusing on
|
250
278
|
// resource - the url to metadata
|
251
279
|
// state - state to restore (viewport)
|
252
|
-
// viewUrl - relative path of the view file to metadata
|
253
280
|
const newView = {
|
254
281
|
type: state.type,
|
255
282
|
resource: state.resource,
|
@@ -88,11 +88,11 @@ const capitalise = term => {
|
|
88
88
|
*/
|
89
89
|
const availableSpecies = () => {
|
90
90
|
return {
|
91
|
-
"Human Female": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass: "mapicon-icon_human", displayLatestChanges: true, displayWarning:
|
92
|
-
"Human Male": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass: "mapicon-icon_human", displayLatestChanges: true, displayWarning:
|
93
|
-
"Rat": { taxo: "NCBITaxon:10114", iconClass: "mapicon-icon_rat", displayLatestChanges: true, displayWarning:
|
94
|
-
"Mouse": { taxo: "NCBITaxon:10090", iconClass: "mapicon-icon_mouse", displayLatestChanges: true, displayWarning:
|
95
|
-
"Pig": { taxo: "NCBITaxon:9823", iconClass: "mapicon-icon_pig", displayLatestChanges: true, displayWarning:
|
91
|
+
"Human Female": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass: "mapicon-icon_human", displayLatestChanges: true, displayWarning: false },
|
92
|
+
"Human Male": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass: "mapicon-icon_human", displayLatestChanges: true, displayWarning: false },
|
93
|
+
"Rat": { taxo: "NCBITaxon:10114", iconClass: "mapicon-icon_rat", displayLatestChanges: true, displayWarning: false },
|
94
|
+
"Mouse": { taxo: "NCBITaxon:10090", iconClass: "mapicon-icon_mouse", displayLatestChanges: true, displayWarning: false },
|
95
|
+
"Pig": { taxo: "NCBITaxon:9823", iconClass: "mapicon-icon_pig", displayLatestChanges: true, displayWarning: false },
|
96
96
|
"Cat": { taxo: "NCBITaxon:9685", iconClass: "mapicon-icon_cat", displayLatestChanges: true, displayWarning: true },
|
97
97
|
}
|
98
98
|
}
|