@abi-software/flatmapvuer 0.6.1-annotator.0 → 0.6.1-auth.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/README.md +17 -4
- package/cypress.config.js +24 -0
- package/dist/flatmapvuer.js +28268 -28239
- package/dist/flatmapvuer.umd.cjs +183 -170
- package/dist/style.css +1 -1
- package/package.json +24 -15
- package/reporter-config.json +10 -0
- package/src/App.vue +4 -10
- package/src/components/AnnotationTool.vue +14 -7
- package/src/components/ExternalResourceCard.vue +1 -0
- package/src/components/FlatmapVuer.vue +795 -330
- package/src/components/MultiFlatmapVuer.vue +168 -45
- package/src/components/ProvenancePopup.vue +13 -8
- package/src/components/RelevanceDialog.vue +102 -0
- package/src/components/Tooltip.vue +2 -2
- package/src/components.d.ts +1 -1
- package/src/icons/yellowstar.js +1 -1
- package/src/services/flatmapQueries.js +2 -0
- package/vite.config.js +4 -1
- package/vuese-generator.js +65 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "0.6.1-
|
|
3
|
+
"version": "0.6.1-auth.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -17,11 +17,19 @@
|
|
|
17
17
|
"serve": "vite --host",
|
|
18
18
|
"build-bundle": "vite build",
|
|
19
19
|
"build-static": "vite build -c vite.static-build.js",
|
|
20
|
+
"test": "cypress run --component",
|
|
21
|
+
"cypress:open": "cypress open",
|
|
20
22
|
"release:beta": "npm version prerelease --preid=beta; npm publish --tag beta",
|
|
21
23
|
"release:minor": "npm version minor; npm publish",
|
|
22
24
|
"release:patch": "npm version patch; npm publish",
|
|
23
25
|
"changelog": "auto-changelog -p --output CHANGELOG.md --template keepachangelog",
|
|
24
|
-
"version": "npm run build-bundle;npm run changelog; git add CHANGELOG.md"
|
|
26
|
+
"version": "npm run build-bundle;npm run changelog; git add CHANGELOG.md",
|
|
27
|
+
"vuese-gen": "node vuese-generator.js",
|
|
28
|
+
"vuese-watch": "node vuese-generator.js watch",
|
|
29
|
+
"docs:dev": "vitepress dev docs",
|
|
30
|
+
"docs:watch": "concurrently \"npm run vuese-watch\" \"npm run docs:dev\"",
|
|
31
|
+
"docs:build": "npm run vuese-gen; vitepress build docs",
|
|
32
|
+
"docs:preview": "vitepress preview docs"
|
|
25
33
|
},
|
|
26
34
|
"type": "module",
|
|
27
35
|
"main": "./dist/flatmapvuer.umd.cjs",
|
|
@@ -35,34 +43,35 @@
|
|
|
35
43
|
"./src/*": "./src/*"
|
|
36
44
|
},
|
|
37
45
|
"dependencies": {
|
|
38
|
-
"@abi-software/flatmap-viewer": "^2.5.
|
|
39
|
-
"@abi-software/sparc-annotation": "0.
|
|
46
|
+
"@abi-software/flatmap-viewer": "^2.5.10",
|
|
47
|
+
"@abi-software/sparc-annotation": "0.2.0",
|
|
40
48
|
"@abi-software/svg-sprite": "^0.4.0-vue3.3",
|
|
41
49
|
"@element-plus/icons-vue": "^2.3.1",
|
|
42
|
-
"@vue/compat": "^3.3.13",
|
|
43
|
-
"core-js": "^3.22.5",
|
|
44
50
|
"css-element-queries": "^1.2.2",
|
|
45
|
-
"
|
|
46
|
-
"customised-viewer": "^0.1.4",
|
|
47
|
-
"element-plus": "^2.4.4",
|
|
48
|
-
"file-loader": "^5.0.2",
|
|
49
|
-
"lodash": "^4.17.21",
|
|
51
|
+
"element-plus": "2.5.5",
|
|
50
52
|
"mitt": "^3.0.1",
|
|
51
53
|
"unplugin-vue-components": "^0.26.0",
|
|
52
54
|
"vue": "^3.3.13"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
57
|
+
"@cypress/webpack-dev-server": "^3.6.1",
|
|
55
58
|
"@vitejs/plugin-vue": "^4.6.2",
|
|
56
|
-
"@
|
|
59
|
+
"@vuese/markdown-render": "^2.11.3",
|
|
60
|
+
"@vuese/parser": "^2.10.3",
|
|
57
61
|
"auto-changelog": "^2.4.0",
|
|
58
62
|
"babel-eslint": "^10.1.0",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
63
|
+
"chokidar": "^3.6.0",
|
|
64
|
+
"concurrently": "^8.2.2",
|
|
65
|
+
"cypress": "^13.6.6",
|
|
66
|
+
"cypress-multi-reporters": "^1.6.4",
|
|
67
|
+
"cypress-wait-until": "^2.0.1",
|
|
61
68
|
"eslint": "^8.56.0",
|
|
69
|
+
"eslint-plugin-cypress": "^2.15.1",
|
|
62
70
|
"eslint-plugin-vue": "^9.19.2",
|
|
71
|
+
"mochawesome": "^7.1.3",
|
|
63
72
|
"sass": "^1.69.5",
|
|
64
73
|
"vite": "^5.0.10",
|
|
65
|
-
"
|
|
74
|
+
"vitepress": "^1.0.0-rc.44"
|
|
66
75
|
},
|
|
67
76
|
"eslintConfig": {
|
|
68
77
|
"root": true,
|
package/src/App.vue
CHANGED
|
@@ -67,15 +67,12 @@
|
|
|
67
67
|
@pan-zoom-callback="panZoomcallback"
|
|
68
68
|
@open-map="openMap"
|
|
69
69
|
@ready="FlatmapReady"
|
|
70
|
-
:featureInfo="featureInfo"
|
|
71
|
-
:searchable="searchable"
|
|
72
|
-
:layerControl="layerControl"
|
|
73
70
|
:initial="initial"
|
|
74
|
-
:pathControls="pathControls"
|
|
75
71
|
:helpMode="helpMode"
|
|
76
72
|
:displayMinimap="true"
|
|
77
73
|
:enableOpenMapUI="true"
|
|
78
74
|
:flatmapAPI="flatmapAPI"
|
|
75
|
+
:userApiKey="userApiKey"
|
|
79
76
|
:disableUI="disableUI"
|
|
80
77
|
/>
|
|
81
78
|
</div>
|
|
@@ -166,10 +163,6 @@ export default {
|
|
|
166
163
|
data: function () {
|
|
167
164
|
return {
|
|
168
165
|
searchText: '',
|
|
169
|
-
featureInfo: true,
|
|
170
|
-
searchable: true,
|
|
171
|
-
pathControls: true,
|
|
172
|
-
layerControl: true,
|
|
173
166
|
disableUI: false,
|
|
174
167
|
minZoom: 4,
|
|
175
168
|
availableSpecies: {
|
|
@@ -233,9 +226,10 @@ export default {
|
|
|
233
226
|
//flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
|
|
234
227
|
//flatmapAPI: "https://mapcore-demo.org/current/flatmap/v3/"
|
|
235
228
|
flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
|
|
236
|
-
//flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
|
|
237
|
-
//flatmapAPI: "https://mapcore-demo.org/staging/flatmap/v1/"
|
|
229
|
+
//flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
|
|
230
|
+
//flatmapAPI: "https://mapcore-demo.org/staging/flatmap/v1/"
|
|
238
231
|
// flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/",
|
|
232
|
+
userApiKey: '',
|
|
239
233
|
ElIconSetting: shallowRef(ElIconSetting)
|
|
240
234
|
}
|
|
241
235
|
},
|
|
@@ -189,7 +189,7 @@ export default {
|
|
|
189
189
|
type: Object,
|
|
190
190
|
},
|
|
191
191
|
},
|
|
192
|
-
inject: ['flatmapAPI', '$annotator'],
|
|
192
|
+
inject: ['flatmapAPI', 'userApiKey', '$annotator'],
|
|
193
193
|
data: function () {
|
|
194
194
|
return {
|
|
195
195
|
displayPair: {
|
|
@@ -209,6 +209,7 @@ export default {
|
|
|
209
209
|
prevSubs: [],
|
|
210
210
|
showSubmissions: true,
|
|
211
211
|
errorMessage: '',
|
|
212
|
+
creator: undefined
|
|
212
213
|
}
|
|
213
214
|
},
|
|
214
215
|
computed: {
|
|
@@ -258,6 +259,7 @@ export default {
|
|
|
258
259
|
) {
|
|
259
260
|
this.$annotator
|
|
260
261
|
.itemAnnotations(
|
|
262
|
+
this.userApiKey,
|
|
261
263
|
this.annotationEntry['resourceId'],
|
|
262
264
|
this.annotationEntry['featureId']
|
|
263
265
|
)
|
|
@@ -314,9 +316,10 @@ export default {
|
|
|
314
316
|
if (this.annotationEntry['type'] === 'deleted') {
|
|
315
317
|
userAnnotation.feature = undefined
|
|
316
318
|
}
|
|
319
|
+
if (this.creator) userAnnotation.creator = this.creator
|
|
317
320
|
this.$annotator
|
|
318
|
-
|
|
319
|
-
|
|
321
|
+
.addAnnotation(this.userApiKey, userAnnotation)
|
|
322
|
+
.then(() => {
|
|
320
323
|
this.$emit('annotation', userAnnotation)
|
|
321
324
|
this.errorMessage = ''
|
|
322
325
|
this.resetSubmission()
|
|
@@ -341,17 +344,21 @@ export default {
|
|
|
341
344
|
},
|
|
342
345
|
watch: {
|
|
343
346
|
annotationEntry: {
|
|
344
|
-
handler: function () {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
+
handler: function (newVal, oldVal) {
|
|
348
|
+
if (newVal !== oldVal) {
|
|
349
|
+
this.resetSubmission()
|
|
350
|
+
this.updatePrevSubmissions()
|
|
351
|
+
}
|
|
347
352
|
},
|
|
348
353
|
immediate: false,
|
|
349
354
|
deep: false,
|
|
350
355
|
},
|
|
351
356
|
},
|
|
352
357
|
mounted: function () {
|
|
353
|
-
this.$annotator.authenticate().then((userData) => {
|
|
358
|
+
this.$annotator.authenticate(this.userApiKey).then((userData) => {
|
|
354
359
|
if (userData.name && userData.email) {
|
|
360
|
+
this.creator = userData
|
|
361
|
+
if (!userData.orcid) this.creator.orcid = '0000-0000-0000-0000'
|
|
355
362
|
this.authenticated = true
|
|
356
363
|
this.updatePrevSubmissions()
|
|
357
364
|
} else {
|