@abi-software/mapintegratedvuer 0.7.1-demo.0 → 0.7.2-vue3.0-alpha.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 -142
- package/assets/gazelle-icons-no-background.css +32 -0
- package/assets/styleguide.css +19 -19
- package/cypress.config.js +23 -23
- package/dist/index.html +17 -17
- package/dist/mapintegratedvuer.js +60394 -59859
- package/dist/mapintegratedvuer.umd.cjs +515 -907
- package/dist/matterport.pdf +0 -0
- package/dist/style.css +1 -1
- package/dist/test.txt +0 -0
- package/package.json +135 -136
- package/public/index.html +17 -17
- package/public/matterport.pdf +0 -0
- package/public/test.txt +0 -0
- package/q.json +690 -0
- 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 +333 -285
- 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 +32 -22
- package/src/mixins/ContentMixin.js +438 -438
- package/src/mixins/DynamicMarkerMixin.js +88 -88
- package/src/mixins/RetrieveContextCardMixin.js +82 -0
- package/src/mixins/S3Bucket.vue +37 -37
- package/src/stores/entries.js +40 -40
- package/src/stores/index.js +24 -16
- package/src/stores/settings.js +144 -144
- package/src/stores/splitFlow.js +523 -523
- package/static.json +7 -7
- package/tsconfig.json +19 -0
- package/vite.config.js +70 -66
- package/vite.static-build.js +12 -12
- package/vitest.workspace.js +3 -3
- package/vuese-generator.js +65 -0
package/src/stores/settings.js
CHANGED
@@ -1,144 +1,144 @@
|
|
1
|
-
import { defineStore } from 'pinia';
|
2
|
-
|
3
|
-
/* eslint-disable no-alert, no-console */
|
4
|
-
|
5
|
-
export const useSettingsStore = defineStore('settings', {
|
6
|
-
state: () => {
|
7
|
-
return {
|
8
|
-
shareLink: undefined,
|
9
|
-
sparcApi: undefined,
|
10
|
-
algoliaIndex: "k-core_dev_published_time_desc",
|
11
|
-
algoliaKey: undefined,
|
12
|
-
algoliaId: undefined,
|
13
|
-
pennsieveApi: undefined,
|
14
|
-
flatmapAPI: undefined,
|
15
|
-
nlLinkPrefix: undefined,
|
16
|
-
rootUrl: undefined,
|
17
|
-
facets: { species: [], gender: [], organ: [] },
|
18
|
-
facetLabels: [],
|
19
|
-
markers: [],
|
20
|
-
featuredMarkers: [],
|
21
|
-
featuredMarkerIdentifiers: [],
|
22
|
-
featuredMarkerDois: [],
|
23
|
-
featuredMarkerSpecies: [],
|
24
|
-
featuredDatasetIdentifiers: [],
|
25
|
-
helpDelay: 0,
|
26
|
-
}
|
27
|
-
},
|
28
|
-
getters: {
|
29
|
-
isFeaturedMarkerIdentifier: state => identifier => {
|
30
|
-
return state.featuredMarkerIdentifiers.includes(identifier);
|
31
|
-
},
|
32
|
-
featuredMarkerDoi: state => identifier => {
|
33
|
-
const index = state.featuredMarkerIdentifiers.findIndex(
|
34
|
-
element => element == identifier
|
35
|
-
);
|
36
|
-
return state.featuredMarkerDois[index];
|
37
|
-
},
|
38
|
-
},
|
39
|
-
actions: {
|
40
|
-
updateShareLink(newLink) {
|
41
|
-
this.shareLink = newLink;
|
42
|
-
},
|
43
|
-
updateSparcAPI(api) {
|
44
|
-
this.sparcApi = api;
|
45
|
-
},
|
46
|
-
updateAlgoliaIndex(algoliaIndex) {
|
47
|
-
this.algoliaIndex = algoliaIndex;
|
48
|
-
},
|
49
|
-
updateAlgoliaKey(algoliaKey) {
|
50
|
-
this.algoliaKey = algoliaKey;
|
51
|
-
},
|
52
|
-
updateAlgoliaId(algoliaId) {
|
53
|
-
this.algoliaId = algoliaId;
|
54
|
-
},
|
55
|
-
updatePennsieveApi(pennsieveApi) {
|
56
|
-
this.pennsieveApi = pennsieveApi;
|
57
|
-
},
|
58
|
-
updateFlatmapAPI(flatmapAPI) {
|
59
|
-
this.flatmapAPI = flatmapAPI;
|
60
|
-
},
|
61
|
-
updateNLLinkPrefix(nlLinkPrefix) {
|
62
|
-
this.nlLinkPrefix = nlLinkPrefix;
|
63
|
-
},
|
64
|
-
updateRootUrl(rootUrl) {
|
65
|
-
this.rootUrl = rootUrl;
|
66
|
-
},
|
67
|
-
updateMarkers(markers) {
|
68
|
-
this.markers = markers;
|
69
|
-
},
|
70
|
-
updateFeatured(datasetIdentifiers) {
|
71
|
-
this.featuredMarkerIdentifiers = new Array(datasetIdentifiers.length);
|
72
|
-
this.featuredMarkers = new Array(datasetIdentifiers.length);
|
73
|
-
this.featuredMarkerDois = new Array(datasetIdentifiers.length);
|
74
|
-
this.featuredMarkerSpecies = new Array(datasetIdentifiers.length);
|
75
|
-
this.featuredDatasetIdentifiers = datasetIdentifiers;
|
76
|
-
},
|
77
|
-
updateFeaturedMarker(payload) {
|
78
|
-
const index = this.featuredDatasetIdentifiers.findIndex(
|
79
|
-
element => element == payload.identifier
|
80
|
-
);
|
81
|
-
this.featuredMarkers[index] = payload.marker;
|
82
|
-
this.featuredMarkerDois[index] = payload.doi;
|
83
|
-
this.featuredMarkerSpecies[index] = payload.species;
|
84
|
-
},
|
85
|
-
updateFeaturedMarkerIdentifier(payload) {
|
86
|
-
this.featuredMarkerIdentifiers[payload.index] = payload.markerIdentifier;
|
87
|
-
},
|
88
|
-
resetFeaturedMarkerIdentifier() {
|
89
|
-
this.featuredMarkerIdentifiers = new Array(
|
90
|
-
this.featuredDatasetIdentifiers.length
|
91
|
-
);
|
92
|
-
},
|
93
|
-
updateFacets(facetsIn) {
|
94
|
-
// The following codes aim to minimise changes on the array
|
95
|
-
let facets = { species: [], gender: [], organ: [] };
|
96
|
-
//First add missing item
|
97
|
-
if (facetsIn) {
|
98
|
-
facetsIn.forEach(e => {
|
99
|
-
switch (e.term.toLowerCase()) {
|
100
|
-
case "species":
|
101
|
-
if (e.facet.toLowerCase() !== "show all") {
|
102
|
-
facets.species.push(e.facet);
|
103
|
-
if (!this.facets.species.includes(e.facet)) {
|
104
|
-
this.facets.species.push(e.facet);
|
105
|
-
}
|
106
|
-
} else {
|
107
|
-
this.facets.species = [];
|
108
|
-
}
|
109
|
-
break;
|
110
|
-
case "gender":
|
111
|
-
if (e.facet.toLowerCase() !== "show all") {
|
112
|
-
facets.gender.push(e.facet);
|
113
|
-
if (!this.facets.species.includes(e.facet))
|
114
|
-
this.facets.gender.push(e.facet);
|
115
|
-
}
|
116
|
-
break;
|
117
|
-
case "organ":
|
118
|
-
if (e.facet.toLowerCase() !== "show all") {
|
119
|
-
facets.organ.push(e.facet);
|
120
|
-
if (!this.facets.species.includes(e.facet))
|
121
|
-
this.facets.organ.push(e.facet);
|
122
|
-
}
|
123
|
-
break;
|
124
|
-
default:
|
125
|
-
break;
|
126
|
-
}
|
127
|
-
});
|
128
|
-
//Remove item not in list
|
129
|
-
for (const [key, arr] of Object.entries(this.facets)) {
|
130
|
-
let i = 0;
|
131
|
-
for (i = arr.length - 1; i >= 0; i -= 1) {
|
132
|
-
const index = facets[key].indexOf(arr[i]);
|
133
|
-
if (index == -1) {
|
134
|
-
arr.splice(i, 1);
|
135
|
-
}
|
136
|
-
}
|
137
|
-
}
|
138
|
-
}
|
139
|
-
},
|
140
|
-
updateFacetLabels(facetLabels) {
|
141
|
-
this.facetLabels = facetLabels;
|
142
|
-
}
|
143
|
-
}
|
144
|
-
});
|
1
|
+
import { defineStore } from 'pinia';
|
2
|
+
|
3
|
+
/* eslint-disable no-alert, no-console */
|
4
|
+
|
5
|
+
export const useSettingsStore = defineStore('settings', {
|
6
|
+
state: () => {
|
7
|
+
return {
|
8
|
+
shareLink: undefined,
|
9
|
+
sparcApi: undefined,
|
10
|
+
algoliaIndex: "k-core_dev_published_time_desc",
|
11
|
+
algoliaKey: undefined,
|
12
|
+
algoliaId: undefined,
|
13
|
+
pennsieveApi: undefined,
|
14
|
+
flatmapAPI: undefined,
|
15
|
+
nlLinkPrefix: undefined,
|
16
|
+
rootUrl: undefined,
|
17
|
+
facets: { species: [], gender: [], organ: [] },
|
18
|
+
facetLabels: [],
|
19
|
+
markers: [],
|
20
|
+
featuredMarkers: [],
|
21
|
+
featuredMarkerIdentifiers: [],
|
22
|
+
featuredMarkerDois: [],
|
23
|
+
featuredMarkerSpecies: [],
|
24
|
+
featuredDatasetIdentifiers: [],
|
25
|
+
helpDelay: 0,
|
26
|
+
}
|
27
|
+
},
|
28
|
+
getters: {
|
29
|
+
isFeaturedMarkerIdentifier: state => identifier => {
|
30
|
+
return state.featuredMarkerIdentifiers.includes(identifier);
|
31
|
+
},
|
32
|
+
featuredMarkerDoi: state => identifier => {
|
33
|
+
const index = state.featuredMarkerIdentifiers.findIndex(
|
34
|
+
element => element == identifier
|
35
|
+
);
|
36
|
+
return state.featuredMarkerDois[index];
|
37
|
+
},
|
38
|
+
},
|
39
|
+
actions: {
|
40
|
+
updateShareLink(newLink) {
|
41
|
+
this.shareLink = newLink;
|
42
|
+
},
|
43
|
+
updateSparcAPI(api) {
|
44
|
+
this.sparcApi = api;
|
45
|
+
},
|
46
|
+
updateAlgoliaIndex(algoliaIndex) {
|
47
|
+
this.algoliaIndex = algoliaIndex;
|
48
|
+
},
|
49
|
+
updateAlgoliaKey(algoliaKey) {
|
50
|
+
this.algoliaKey = algoliaKey;
|
51
|
+
},
|
52
|
+
updateAlgoliaId(algoliaId) {
|
53
|
+
this.algoliaId = algoliaId;
|
54
|
+
},
|
55
|
+
updatePennsieveApi(pennsieveApi) {
|
56
|
+
this.pennsieveApi = pennsieveApi;
|
57
|
+
},
|
58
|
+
updateFlatmapAPI(flatmapAPI) {
|
59
|
+
this.flatmapAPI = flatmapAPI;
|
60
|
+
},
|
61
|
+
updateNLLinkPrefix(nlLinkPrefix) {
|
62
|
+
this.nlLinkPrefix = nlLinkPrefix;
|
63
|
+
},
|
64
|
+
updateRootUrl(rootUrl) {
|
65
|
+
this.rootUrl = rootUrl;
|
66
|
+
},
|
67
|
+
updateMarkers(markers) {
|
68
|
+
this.markers = markers;
|
69
|
+
},
|
70
|
+
updateFeatured(datasetIdentifiers) {
|
71
|
+
this.featuredMarkerIdentifiers = new Array(datasetIdentifiers.length);
|
72
|
+
this.featuredMarkers = new Array(datasetIdentifiers.length);
|
73
|
+
this.featuredMarkerDois = new Array(datasetIdentifiers.length);
|
74
|
+
this.featuredMarkerSpecies = new Array(datasetIdentifiers.length);
|
75
|
+
this.featuredDatasetIdentifiers = datasetIdentifiers;
|
76
|
+
},
|
77
|
+
updateFeaturedMarker(payload) {
|
78
|
+
const index = this.featuredDatasetIdentifiers.findIndex(
|
79
|
+
element => element == payload.identifier
|
80
|
+
);
|
81
|
+
this.featuredMarkers[index] = payload.marker;
|
82
|
+
this.featuredMarkerDois[index] = payload.doi;
|
83
|
+
this.featuredMarkerSpecies[index] = payload.species;
|
84
|
+
},
|
85
|
+
updateFeaturedMarkerIdentifier(payload) {
|
86
|
+
this.featuredMarkerIdentifiers[payload.index] = payload.markerIdentifier;
|
87
|
+
},
|
88
|
+
resetFeaturedMarkerIdentifier() {
|
89
|
+
this.featuredMarkerIdentifiers = new Array(
|
90
|
+
this.featuredDatasetIdentifiers.length
|
91
|
+
);
|
92
|
+
},
|
93
|
+
updateFacets(facetsIn) {
|
94
|
+
// The following codes aim to minimise changes on the array
|
95
|
+
let facets = { species: [], gender: [], organ: [] };
|
96
|
+
//First add missing item
|
97
|
+
if (facetsIn) {
|
98
|
+
facetsIn.forEach(e => {
|
99
|
+
switch (e.term.toLowerCase()) {
|
100
|
+
case "species":
|
101
|
+
if (e.facet.toLowerCase() !== "show all") {
|
102
|
+
facets.species.push(e.facet);
|
103
|
+
if (!this.facets.species.includes(e.facet)) {
|
104
|
+
this.facets.species.push(e.facet);
|
105
|
+
}
|
106
|
+
} else {
|
107
|
+
this.facets.species = [];
|
108
|
+
}
|
109
|
+
break;
|
110
|
+
case "gender":
|
111
|
+
if (e.facet.toLowerCase() !== "show all") {
|
112
|
+
facets.gender.push(e.facet);
|
113
|
+
if (!this.facets.species.includes(e.facet))
|
114
|
+
this.facets.gender.push(e.facet);
|
115
|
+
}
|
116
|
+
break;
|
117
|
+
case "organ":
|
118
|
+
if (e.facet.toLowerCase() !== "show all") {
|
119
|
+
facets.organ.push(e.facet);
|
120
|
+
if (!this.facets.species.includes(e.facet))
|
121
|
+
this.facets.organ.push(e.facet);
|
122
|
+
}
|
123
|
+
break;
|
124
|
+
default:
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
});
|
128
|
+
//Remove item not in list
|
129
|
+
for (const [key, arr] of Object.entries(this.facets)) {
|
130
|
+
let i = 0;
|
131
|
+
for (i = arr.length - 1; i >= 0; i -= 1) {
|
132
|
+
const index = facets[key].indexOf(arr[i]);
|
133
|
+
if (index == -1) {
|
134
|
+
arr.splice(i, 1);
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
},
|
140
|
+
updateFacetLabels(facetLabels) {
|
141
|
+
this.facetLabels = facetLabels;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
});
|