@abi-software/mapintegratedvuer 0.7.1-auth.1 → 0.7.1-auth.2
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/mapintegratedvuer.js +18583 -18571
- package/dist/mapintegratedvuer.umd.cjs +350 -350
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +0 -1
- package/src/components/MapContent.vue +0 -1
- package/src/mixins/ContentMixin.js +6 -4
- package/src/store/index.js +20 -0
- package/src/stores/settings.js +0 -4
- package/vite.config.js +5 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
@@ -233,7 +233,6 @@ export default {
|
|
233
233
|
this.options.flatmapAPI ? this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI) : null,
|
234
234
|
this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null
|
235
235
|
this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null
|
236
|
-
this.options.userToken ? this.settingsStore.updateUserToken(this.options.userToken) : null
|
237
236
|
}
|
238
237
|
},
|
239
238
|
mounted: async function() {
|
@@ -9,6 +9,7 @@ import markerZoomLevels from "../components/markerZoomLevelsHardCoded.js";
|
|
9
9
|
import { mapStores } from 'pinia';
|
10
10
|
import { useSettingsStore } from '../stores/settings';
|
11
11
|
import { useSplitFlowStore } from '../stores/splitFlow';
|
12
|
+
import { useMainStore } from '@/store/index';
|
12
13
|
|
13
14
|
function capitalise(text) {
|
14
15
|
return text[0].toUpperCase() + text.substring(1)
|
@@ -32,10 +33,13 @@ export default {
|
|
32
33
|
},
|
33
34
|
},
|
34
35
|
computed: {
|
35
|
-
...mapStores(useSettingsStore, useSplitFlowStore),
|
36
|
+
...mapStores(useSettingsStore, useSplitFlowStore, useMainStore),
|
36
37
|
syncMode() {
|
37
38
|
return this.splitFlowStore.syncMode;
|
38
39
|
},
|
40
|
+
userApiKey() {
|
41
|
+
return this.mainStore.userToken;
|
42
|
+
}
|
39
43
|
},
|
40
44
|
mounted: function () {
|
41
45
|
EventBus.on("startHelp", () => {
|
@@ -428,14 +432,12 @@ export default {
|
|
428
432
|
};
|
429
433
|
},
|
430
434
|
created: function () {
|
435
|
+
console.log("🚀 ~ useMainStore:", useMainStore())
|
431
436
|
this.flatmapAPI = undefined;
|
432
437
|
this.apiLocation = undefined;
|
433
|
-
this.userApiKey = undefined;
|
434
438
|
if (this.settingsStore.flatmapAPI)
|
435
439
|
this.flatmapAPI = this.settingsStore.flatmapAPI;
|
436
440
|
if (this.settingsStore.sparcApi)
|
437
441
|
this.apiLocation = this.settingsStore.sparcApi;
|
438
|
-
if (this.settingsStore.userToken)
|
439
|
-
this.userApiKey = this.settingsStore.userToken;
|
440
442
|
},
|
441
443
|
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { defineStore } from 'pinia'
|
2
|
+
|
3
|
+
export const useMainStore = defineStore('main', {
|
4
|
+
state: () => ({
|
5
|
+
userProfile: {
|
6
|
+
token: ''
|
7
|
+
}
|
8
|
+
}),
|
9
|
+
getters: {
|
10
|
+
userToken(state) {
|
11
|
+
return state.userProfile.token
|
12
|
+
},
|
13
|
+
},
|
14
|
+
actions: {
|
15
|
+
|
16
|
+
},
|
17
|
+
persist: {
|
18
|
+
|
19
|
+
}
|
20
|
+
})
|
package/src/stores/settings.js
CHANGED
@@ -14,7 +14,6 @@ export const useSettingsStore = defineStore('settings', {
|
|
14
14
|
flatmapAPI: undefined,
|
15
15
|
nlLinkPrefix: undefined,
|
16
16
|
rootUrl: undefined,
|
17
|
-
userToken: undefined,
|
18
17
|
facets: { species: [], gender: [], organ: [] },
|
19
18
|
facetLabels: [],
|
20
19
|
markers: [],
|
@@ -65,9 +64,6 @@ export const useSettingsStore = defineStore('settings', {
|
|
65
64
|
updateRootUrl(rootUrl) {
|
66
65
|
this.rootUrl = rootUrl;
|
67
66
|
},
|
68
|
-
updateUserToken(userToken) {
|
69
|
-
this.userToken = userToken;
|
70
|
-
},
|
71
67
|
updateMarkers(markers) {
|
72
68
|
this.markers = markers;
|
73
69
|
},
|
package/vite.config.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import path from "path";
|
2
|
-
const pathSrc = path.resolve(__dirname, "./src");
|
3
2
|
import { defineConfig } from 'vite'
|
4
3
|
import vue from '@vitejs/plugin-vue'
|
5
4
|
import Components from 'unplugin-vue-components/vite'
|
@@ -33,6 +32,11 @@ export default defineConfig(({ command, mode }) => {
|
|
33
32
|
// https://github.com/antfu/unocss
|
34
33
|
// see unocss.config.ts for config
|
35
34
|
],
|
35
|
+
resolve: {
|
36
|
+
alias: {
|
37
|
+
'@': path.resolve(__dirname, './src'),
|
38
|
+
}
|
39
|
+
},
|
36
40
|
build: {
|
37
41
|
lib: {
|
38
42
|
entry: path.resolve(__dirname, "./src/components/index.js"),
|