@abi-software/mapintegratedvuer 0.7.2-vue3.0-alpha.0 → 1.0.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/LICENSE +201 -201
- package/README.md +150 -150
- package/assets/styleguide.css +19 -19
- package/cypress.config.js +23 -23
- package/dist/index.html +17 -17
- package/dist/mapintegratedvuer.js +74203 -73758
- package/dist/mapintegratedvuer.umd.cjs +878 -515
- package/dist/style.css +1 -1
- package/package.json +134 -135
- package/public/index.html +17 -17
- package/reporter-config.json +9 -9
- package/src/App.vue +245 -245
- package/src/assets/_variables.scss +43 -43
- package/src/assets/fonts/mapicon-species.eot +0 -0
- package/src/assets/fonts/mapicon-species.ttf +0 -0
- package/src/assets/fonts/mapicon-species.woff +0 -0
- package/src/assets/header-icon.scss +67 -67
- package/src/assets/mapicon-species-style.css +41 -41
- package/src/assets/styles.scss +9 -9
- package/src/components/ContentBar.vue +376 -376
- package/src/components/ContentVuer.vue +217 -217
- package/src/components/ContextCard.vue +385 -385
- package/src/components/ContextHelp.vue +73 -73
- package/src/components/CustomSplitter.vue +151 -151
- package/src/components/DatasetHeader.vue +97 -97
- package/src/components/DialogToolbarContent.vue +464 -464
- package/src/components/EventBus.js +3 -3
- package/src/components/FlatmapContextCard.vue +134 -134
- package/src/components/MapContent.vue +328 -333
- package/src/components/ResizeSensor.vue +47 -47
- package/src/components/SearchControls.vue +115 -115
- package/src/components/SimulatedData.js +721 -721
- package/src/components/SplitDialog.vue +287 -287
- package/src/components/SplitFlow.vue +414 -414
- package/src/components/index.js +7 -7
- package/src/components/markerZoomLevelsHardCoded.js +255 -255
- package/src/components/scripts/utilities.js +173 -173
- package/src/components/viewers/Flatmap.vue +145 -145
- package/src/components/viewers/Iframe.vue +31 -31
- package/src/components/viewers/MultiFlatmap.vue +384 -384
- package/src/components/viewers/Plot.vue +23 -23
- package/src/components/viewers/Scaffold.vue +198 -198
- package/src/components/viewers/Simulation.vue +21 -21
- package/src/icons/yellowstar.js +1 -1
- package/src/main.js +31 -31
- package/src/mixins/ContentMixin.js +438 -438
- package/src/mixins/DynamicMarkerMixin.js +88 -88
- package/src/mixins/S3Bucket.vue +37 -37
- package/src/stores/entries.js +40 -40
- package/src/stores/index.js +23 -23
- package/src/stores/settings.js +144 -144
- package/src/stores/splitFlow.js +523 -523
- package/static.json +7 -7
- package/vite.config.js +70 -70
- package/vite.static-build.js +12 -12
- package/vitest.workspace.js +3 -3
- package/vuese-generator.js +65 -65
- package/assets/gazelle-icons-no-background.css +0 -32
- package/dist/matterport.pdf +0 -0
- package/dist/test.txt +0 -0
- package/public/matterport.pdf +0 -0
- package/public/test.txt +0 -0
- package/q.json +0 -690
- package/src/mixins/RetrieveContextCardMixin.js +0 -82
- package/tsconfig.json +0 -19
@@ -1,82 +0,0 @@
|
|
1
|
-
|
2
|
-
/* eslint-disable no-alert, no-console */
|
3
|
-
export default {
|
4
|
-
// Note that the setting store is included in MapContent.vue
|
5
|
-
methods: {
|
6
|
-
retrieveContextCardFromUrl: async function (url) {
|
7
|
-
// split the url to get the datasetId
|
8
|
-
const [datasetId, basePath, scaffoldPath, s3uri] = this.splitInfoFromUrl(url);
|
9
|
-
|
10
|
-
// get the context file from scicrunch
|
11
|
-
const sciResults = await this.getContextFileFromScicrunch(datasetId, scaffoldPath);
|
12
|
-
if (!sciResults.success){
|
13
|
-
return {} // return empty object if no context file is found (the empty object will be added to the entry)
|
14
|
-
}
|
15
|
-
|
16
|
-
// return the context file
|
17
|
-
const fullPath = basePath + sciResults.contextFile + s3uri;
|
18
|
-
return {
|
19
|
-
s3uri: sciResults.s3uri,
|
20
|
-
contextCardUrl: fullPath,
|
21
|
-
}
|
22
|
-
},
|
23
|
-
splitInfoFromUrl: function (url) {
|
24
|
-
// example url: "https://mapcore-demo.org/current/sparc-api-v2/s3-resource/221/3/files/derivative/Scaffolds/mouse_colon_metadata.json",
|
25
|
-
// find the part after 's3-resource'
|
26
|
-
let s3path = url.split('s3-resource')[1];
|
27
|
-
let basePath = url.split('files/')[0] + 'files/' // This gives us the base path for our relative path we will get from scicrunch
|
28
|
-
let scaffoldPath = url.split('files/')[1].split('?')[0] // This gives us the relative path to the file we want to get from scicrunch
|
29
|
-
let s3uri = '?' + url.split('?')[1] // This gives us the full path to the file we want to get from scicrunch
|
30
|
-
|
31
|
-
// split the url by '/'
|
32
|
-
const parts = s3path.split('/');
|
33
|
-
// remove the first part
|
34
|
-
parts.shift();
|
35
|
-
// return the parts
|
36
|
-
const datasetId = parts[0];
|
37
|
-
|
38
|
-
return [datasetId, basePath, scaffoldPath, s3uri];
|
39
|
-
},
|
40
|
-
getContextFileFromScicrunch: async function (datasetId, scaffoldPath) {
|
41
|
-
// get the context file from scicrunch
|
42
|
-
let results = await fetch(`${this.settingsStore.sparcApi}/dataset_info/using_multiple_discoverIds/?discoverIds=${datasetId}`)
|
43
|
-
.then(response => response.json())
|
44
|
-
.then(data => {
|
45
|
-
// get the context file
|
46
|
-
if (data.numberOfHits === 1) { // chgeck if there is only one hit
|
47
|
-
const contextFile = data.results[0]['abi-contextual-information']
|
48
|
-
|
49
|
-
// check if there is only one context file
|
50
|
-
if ( contextFile && contextFile.length === 1) {
|
51
|
-
return {
|
52
|
-
success: true,
|
53
|
-
contextFile: contextFile[0],
|
54
|
-
s3uri: data.results[0]['s3uri']
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
// If there are multiple context files, find the one that matches the scaffold path
|
59
|
-
else if (contextFile && contextFile.length > 1) {
|
60
|
-
let search = this.findContextInforForFilePath(data.results[0]['abi-context-file'], scaffoldPath);
|
61
|
-
if (search) {
|
62
|
-
return {
|
63
|
-
success: true,
|
64
|
-
contextFile: search,
|
65
|
-
s3uri: data.results[0]['s3uri']
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
}
|
70
|
-
return {success: false};
|
71
|
-
}).catch(error => {
|
72
|
-
console.error('Error:', error);
|
73
|
-
return {success: false};
|
74
|
-
});
|
75
|
-
return results;
|
76
|
-
},
|
77
|
-
findContextInforForFilePath: function (dataciteInfo, filePath) {
|
78
|
-
let result = dataciteInfo.find((info) => info.datacite.isDerivedFrom.path.includes(filePath))
|
79
|
-
return result?.dataset?.path
|
80
|
-
}
|
81
|
-
}
|
82
|
-
}
|
package/tsconfig.json
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": "2.4.2",
|
3
|
-
"compilerOptions": {
|
4
|
-
"lib": ["es5", "es6"],
|
5
|
-
"target": "es6",
|
6
|
-
"module": "commonjs",
|
7
|
-
"moduleResolution": "node",
|
8
|
-
"emitDecoratorMetadata": true,
|
9
|
-
"experimentalDecorators": true,
|
10
|
-
"sourceMap": true,
|
11
|
-
"rootDirs": [
|
12
|
-
"src",
|
13
|
-
"static",
|
14
|
-
]
|
15
|
-
},
|
16
|
-
"exclude": [
|
17
|
-
"node_modules"
|
18
|
-
]
|
19
|
-
}
|