@abi-software/flatmapvuer 0.6.1-annotator.0 → 0.6.1-demo-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "0.6.1-annotator.0",
3
+ "version": "0.6.1-demo-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.9",
46
+ "@abi-software/flatmap-viewer": "^2.5.10",
39
47
  "@abi-software/sparc-annotation": "0.1.1",
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
- "current-script-polyfill": "^1.0.0",
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
- "@vue/compiler-sfc": "^3.3.13",
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
- "babel-plugin-component": "^1.1.1",
60
- "base64-inline-loader": "^2.0.1",
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
- "webpack-node-externals": "^2.5.2"
74
+ "vitepress": "^1.0.0-rc.44"
66
75
  },
67
76
  "eslintConfig": {
68
77
  "root": true,
@@ -0,0 +1,10 @@
1
+ {
2
+ "reporterEnabled": "mochawesome",
3
+ "mochawesomeReporterOptions": {
4
+ "reportDir": "cypress/reports/mocha",
5
+ "quiet": true,
6
+ "overwrite": false,
7
+ "html": true,
8
+ "json": true
9
+ }
10
+ }
package/src/App.vue CHANGED
@@ -67,11 +67,7 @@
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"
@@ -166,10 +162,6 @@ export default {
166
162
  data: function () {
167
163
  return {
168
164
  searchText: '',
169
- featureInfo: true,
170
- searchable: true,
171
- pathControls: true,
172
- layerControl: true,
173
165
  disableUI: false,
174
166
  minZoom: 4,
175
167
  availableSpecies: {
@@ -226,15 +218,15 @@ export default {
226
218
  position: 'absolute',
227
219
  },
228
220
  displayCloseButton: false,
229
- initial: 'Rat (NPO)',
221
+ initial: 'Rat',
230
222
  helpMode: false,
231
223
  mapSettings: [],
232
224
  //flatmapAPI: "https://mapcore-demo.org/current/flatmap/v2/"
233
225
  //flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
234
226
  //flatmapAPI: "https://mapcore-demo.org/current/flatmap/v3/"
235
227
  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/",
228
+ //flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
229
+ //flatmapAPI: "https://mapcore-demo.org/staging/flatmap/v1/"
238
230
  // flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/",
239
231
  ElIconSetting: shallowRef(ElIconSetting)
240
232
  }
@@ -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: {
@@ -314,9 +315,10 @@ export default {
314
315
  if (this.annotationEntry['type'] === 'deleted') {
315
316
  userAnnotation.feature = undefined
316
317
  }
318
+ if (this.creator) userAnnotation.creator = this.creator
317
319
  this.$annotator
318
- .addAnnotation(userAnnotation)
319
- .then(() => {
320
+ .addAnnotation(userAnnotation)
321
+ .then(() => {
320
322
  this.$emit('annotation', userAnnotation)
321
323
  this.errorMessage = ''
322
324
  this.resetSubmission()
@@ -341,23 +343,29 @@ export default {
341
343
  },
342
344
  watch: {
343
345
  annotationEntry: {
344
- handler: function () {
345
- this.resetSubmission()
346
- this.updatePrevSubmissions()
346
+ handler: function (newVal, oldVal) {
347
+ if (newVal !== oldVal) {
348
+ this.resetSubmission()
349
+ this.updatePrevSubmissions()
350
+ }
347
351
  },
348
352
  immediate: false,
349
353
  deep: false,
350
354
  },
351
355
  },
352
356
  mounted: function () {
353
- this.$annotator.authenticate().then((userData) => {
354
- if (userData.name && userData.email) {
355
- this.authenticated = true
356
- this.updatePrevSubmissions()
357
- } else {
358
- this.errorMessage = ''
359
- }
360
- })
357
+ if (this.$annotator) {
358
+ this.$annotator.authenticate().then((userData) => {
359
+ if (userData.name && userData.email) {
360
+ this.creator = userData
361
+ if (!userData.orcid) this.creator.orcid = '0000-0000-0000-0000'
362
+ this.authenticated = true
363
+ this.updatePrevSubmissions()
364
+ } else {
365
+ this.errorMessage = ''
366
+ }
367
+ })
368
+ }
361
369
  },
362
370
  }
363
371
  </script>
@@ -5,6 +5,7 @@
5
5
  <el-button
6
6
  v-if="resource.id === 'pubmed'"
7
7
  class="button"
8
+ id="open-pubmed-button"
8
9
  :icon="ElIconNotebook"
9
10
  @click="openUrl(resource.url)"
10
11
  >