@abi-software/mapintegratedvuer 1.20.0 → 1.21.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.
Files changed (45) hide show
  1. package/cypress.config.js +8 -7
  2. package/dist/ConnectivityGraph-CZMROk9r.js +121 -0
  3. package/dist/ContentMixin-Vn34n5t2.js +1672 -0
  4. package/dist/DynamicMarkerMixin-B087dVL_.js +50 -0
  5. package/dist/Flatmap-Bm7m_5m_.js +193 -0
  6. package/dist/Iframe-BWbhTjCR.js +18 -0
  7. package/dist/MultiFlatmap-JziqSEwL.js +303 -0
  8. package/dist/Plot-ChbPsDZX.js +28 -0
  9. package/dist/Scaffold-C6f7c7Ha.js +308 -0
  10. package/dist/Simulation-DcJScRYo.js +25 -0
  11. package/dist/connectivities-UXTqf7_0.js +35743 -0
  12. package/dist/mapintegratedvuer.js +43234 -3
  13. package/dist/mapintegratedvuer.umd.cjs +556 -297
  14. package/dist/style.css +2 -1
  15. package/eslint.config.js +33 -0
  16. package/package.json +61 -76
  17. package/src/App.vue +58 -24
  18. package/src/assets/fonts.scss +2 -0
  19. package/src/assets/header-icon.scss +2 -1
  20. package/src/assets/styles.scss +2 -3
  21. package/src/components/CustomSplitter.vue +3 -3
  22. package/src/components/MapContent.vue +11 -0
  23. package/src/components/SearchControls.vue +1 -1
  24. package/src/components/SplitFlow.vue +6 -5
  25. package/src/components/index.js +1 -0
  26. package/src/components/scripts/simulation_data.js +461 -0
  27. package/src/components/viewers/Flatmap.vue +13 -8
  28. package/src/components/viewers/MultiFlatmap.vue +13 -8
  29. package/src/components.d.ts +6 -2
  30. package/src/main.js +2 -1
  31. package/src/mixins/ContentMixin.js +81 -1
  32. package/vite.bundle-build.js +19 -4
  33. package/vite.config.js +16 -1
  34. package/babel.config.js +0 -0
  35. package/dist/ConnectivityGraph-B2xlAebI.js +0 -123
  36. package/dist/ContentMixin-jHFoA2A8.js +0 -1675
  37. package/dist/Flatmap-CBB2P9Ql.js +0 -202
  38. package/dist/Iframe-BXPDKp2g.js +0 -20
  39. package/dist/MultiFlatmap-BPUGtzDT.js +0 -316
  40. package/dist/Plot-CAAiTTub.js +0 -25
  41. package/dist/Scaffold-oW-i75jl.js +0 -305
  42. package/dist/Simulation-D5BM15nU.js +0 -28
  43. package/dist/index-B6Cnscja.js +0 -79215
  44. package/dist/style-DuFTyFX4.js +0 -57
  45. package/static.json +0 -7
@@ -0,0 +1,33 @@
1
+ import { includeIgnoreFile } from "eslint/config";
2
+ import js from "@eslint/js";
3
+ import cypress from "eslint-plugin-cypress";
4
+ import vue from "eslint-plugin-vue";
5
+ import globals from "globals";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url));
9
+
10
+ export default [
11
+ includeIgnoreFile(gitignorePath),
12
+ {
13
+ ignores: ["dist/**", "docs/.vitepress/**", "docs/components/**"],
14
+ },
15
+ js.configs.recommended,
16
+ ...vue.configs["flat/essential"],
17
+ {
18
+ ...cypress.configs.recommended,
19
+ files: ["cypress/**/*.js"],
20
+ },
21
+ {
22
+ files: ["**/*.{js,vue}"],
23
+ languageOptions: {
24
+ ecmaVersion: "latest",
25
+ sourceType: "module",
26
+ globals: {
27
+ ...globals.node,
28
+ ...globals.browser,
29
+ },
30
+ },
31
+ rules: {},
32
+ },
33
+ ];
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@abi-software/mapintegratedvuer",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "license": "Apache-2.0",
5
5
  "engines": {
6
- "node": ">=20"
6
+ "node": "^24.20.0"
7
7
  },
8
8
  "scripts": {
9
9
  "serve": "vite --host --force",
10
10
  "heroku-postbuild": "vite build",
11
11
  "build-bundle": "vite build -c vite.bundle-build.js",
12
12
  "build-static": "vite build -c vite.static-build.js",
13
+ "lint": "eslint .",
13
14
  "start": "vite build && vite preview",
14
15
  "test-unit": "mochapack --webpack-config test/unit/webpack.config.js --require test/unit/setup.js test/unit/**/*.spec.js",
15
16
  "test": "vitest --dom",
@@ -55,89 +56,63 @@
55
56
  "*.js"
56
57
  ],
57
58
  "dependencies": {
58
- "@abi-software/flatmapvuer": "1.14.0",
59
- "@abi-software/map-side-bar": "2.16.0",
60
- "@abi-software/map-utilities": "1.9.0",
61
- "@abi-software/plotvuer": "1.1.0",
62
- "@abi-software/scaffoldvuer": "1.18.0",
63
- "@abi-software/simulationvuer": "3.3.0",
59
+ "@abi-software/flatmapvuer": "1.16.0",
60
+ "@abi-software/map-side-bar": "2.18.0",
61
+ "@abi-software/map-utilities": "1.11.0",
62
+ "@abi-software/plotvuer": "1.3.0",
63
+ "@abi-software/scaffoldvuer": "1.20.0",
64
+ "@abi-software/simulationvuer": "4.3.0",
64
65
  "@abi-software/sparc-annotation": "0.3.2",
65
- "@abi-software/svg-sprite": "1.1.0",
66
- "@element-plus/icons-vue": "^2.3.1",
67
- "@vitejs/plugin-vue": "^4.6.2",
66
+ "@abi-software/svg-sprite": "1.4.0",
67
+ "@element-plus/icons-vue": "^2.3.2",
68
+ "@vitejs/plugin-vue": "^6.0.8",
68
69
  "css-element-queries": "^1.2.3",
69
- "element-plus": "2.8.4",
70
- "marked": "^4.3.0",
70
+ "element-plus": "^2.14.5",
71
+ "marked": "^8.0.1",
71
72
  "mitt": "^3.0.1",
72
- "pinia": "^2.1.7",
73
- "splitpanes": "^3.1.5",
74
- "unplugin-vue-components": "^0.26.0",
75
- "vue": "^3.4.21",
76
- "xss": "^1.0.14"
73
+ "pinia": "^4.0.3",
74
+ "splitpanes": "^4.1.2",
75
+ "unplugin-vue-components": "^32.1.0",
76
+ "vue": "^3.5.41",
77
+ "xss": "^1.0.15"
77
78
  },
78
79
  "devDependencies": {
79
- "@pinia/testing": "^0.1.3",
80
- "@vue/test-utils": "^2.4.4",
80
+ "@eslint/js": "^10.0.1",
81
+ "@pinia/testing": "^2.0.1",
82
+ "@vue/test-utils": "^2.4.11",
81
83
  "@vuese/markdown-render": "^2.11.3",
82
- "auto-changelog": "^2.4.0",
83
- "babel-eslint": "^10.0.3",
84
+ "auto-changelog": "^2.6.0",
84
85
  "babel-plugin-component": "^1.1.1",
85
- "chai": "^4.1.2",
86
- "chokidar": "^3.6.0",
87
- "concurrently": "^8.2.2",
88
- "cypress": "^13.17.0",
89
- "cypress-multi-reporters": "^1.6.4",
90
- "cypress-visual-regression": "^5.2.2",
91
- "cypress-wait-until": "^1.7.1",
92
- "dom-parser": "^0.1.6",
93
- "eslint": "^8.56.0",
94
- "eslint-plugin-cypress": "^2.15.1",
95
- "eslint-plugin-vue": "^9.19.2",
96
- "happy-dom": "^15.11.6",
97
- "jsdom": "^16.2.2",
98
- "jsdom-global": "^3.0.2",
99
- "mocha": "^10.4.0",
100
- "mochapack": "^2.1.4",
101
- "mochawesome": "^7.1.3",
102
- "mochawesome-merge": "^4.3.0",
103
- "mochawesome-report-generator": "^6.2.0",
104
- "sass": "^1.69.5",
105
- "vite": "^5.0.10",
106
- "vitepress": "^1.0.0-rc.45",
107
- "vitest": "^1.2.2",
86
+ "chokidar": "^5.0.0",
87
+ "concurrently": "^9.2.4",
88
+ "cypress": "^15.21.0",
89
+ "cypress-multi-reporters": "^2.0.5",
90
+ "cypress-visual-regression": "^6.0.0",
91
+ "cypress-wait-until": "^3.0.2",
92
+ "dom-parser": "^1.1.5",
93
+ "eslint": "^10.9.1",
94
+ "eslint-plugin-cypress": "^7.0.0",
95
+ "eslint-plugin-vue": "^10.10.0",
96
+ "globals": "^17.11.0",
97
+ "happy-dom": "^20.11.6",
98
+ "mocha": "^10.8.2",
99
+ "mochapack": "^2.1.5",
100
+ "mochawesome": "^8.0.1",
101
+ "mochawesome-merge": "^4.4.1",
102
+ "mochawesome-report-generator": "^6.3.2",
103
+ "sass": "^1.103.1",
104
+ "vite": "^8.2.1",
105
+ "vitepress": "^1.6.4",
106
+ "vitest": "^4.1.11",
108
107
  "vue-docgen-api": "^4.79.2",
109
- "vue-router": "^4.2.5"
108
+ "vue-router": "^5.2.0"
110
109
  },
111
110
  "optionalDependencies": {
112
- "@esbuild/darwin-arm64": "^0.25.3",
113
- "@rollup/rollup-darwin-arm64": "4.62.3",
114
- "@rollup/rollup-linux-x64-gnu": "4.62.3",
115
- "@rollup/rollup-win32-x64-msvc": "4.62.3"
116
- },
117
- "eslintConfig": {
118
- "root": true,
119
- "env": {
120
- "node": true
121
- },
122
- "extends": [
123
- "plugin:vue/essential",
124
- "eslint:recommended"
125
- ],
126
- "rules": {},
127
- "parserOptions": {
128
- "parser": "babel-eslint"
129
- },
130
- "overrides": [
131
- {
132
- "files": [
133
- "**/__tests__/*.{j,t}s?(x)",
134
- "**/tests/unit/**/*.spec.{j,t}s?(x)"
135
- ],
136
- "env": {
137
- "mocha": true
138
- }
139
- }
140
- ]
111
+ "@esbuild/darwin-arm64": "0.28.2",
112
+ "@esbuild/linux-x64": "0.28.2",
113
+ "@rollup/rollup-darwin-arm64": "4.63.0",
114
+ "@rollup/rollup-linux-x64-gnu": "4.63.0",
115
+ "@rollup/rollup-win32-x64-msvc": "4.63.0"
141
116
  },
142
117
  "overrides": {
143
118
  "@abi-software/flatmapvuer": "$@abi-software/flatmapvuer",
@@ -146,5 +121,15 @@
146
121
  "browserslist": [
147
122
  "> 1%",
148
123
  "last 2 versions"
149
- ]
124
+ ],
125
+ "allowScripts": {
126
+ "esbuild@0.21.5": true,
127
+ "nodent-runtime@3.2.1": true,
128
+ "fsevents@2.3.3": true,
129
+ "es5-ext@0.10.64": true,
130
+ "cypress@15.21.1": true,
131
+ "core-js-pure@3.50.0": true,
132
+ "core-js@3.50.0": true,
133
+ "@parcel/watcher@2.6.0": true
134
+ }
150
135
  }
package/src/App.vue CHANGED
@@ -4,34 +4,46 @@
4
4
  href="https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap">
5
5
  <div class="button-container">
6
6
  <el-popover
7
+ ref="optionsPopover"
7
8
  placement="bottom"
8
9
  trigger="click"
9
10
  width=500
10
11
  class="popover"
11
12
  :teleported=false
12
- >
13
- <div class="options-container">
14
- <div class="row">
15
- <el-button @click="saveSettings()" size="small">Save Settings</el-button>
16
- <el-button @click="restoreSettings()" size="small">Restore Settings</el-button>
17
- <el-button @click="getShareableURL()" size="small">Get Link</el-button>
18
- </div>
19
- <div class="row">
20
- <el-button @click="setRatFlatmap()" size="small">Set Rat Flatmap</el-button>
21
- <el-button @click="setMultiFlatmap()" size="small">Set MultiFlatmap</el-button>
22
- <el-button @click="setLegacyMultiFlatmap()" size="small">Set Legacy MultiFlatmap</el-button>
23
- <el-button @click="setScaffold()" size="small">Set To Scaffold</el-button>
24
- <el-button @click="setWholebody()" size="small">Set to Wholebody</el-button>
25
- <el-button @click="setFlatmap()" size="small">Set Flatmap</el-button>
26
- <el-button @click="setSearch()" size="small">Set Search</el-button>
27
- <el-button @click="toggleLongLabel()" size="small">Toggle Long Label</el-button>
28
- </div>
13
+ >
14
+ <div class="options-container">
15
+ <div class="row">
16
+ <el-button @click="saveSettings()" size="small">Save Settings</el-button>
17
+ <el-button @click="restoreSettings()" size="small">Restore Settings</el-button>
18
+ <el-button @click="getShareableURL()" size="small">Get Link</el-button>
29
19
  </div>
30
- <template #reference>
31
-
32
- <el-button class="options-button" :icon="ElIconSetting">Options</el-button>
33
-
34
- </template>
20
+ <div class="row">
21
+ <el-button @click="setRatFlatmap()" size="small">Set Rat Flatmap</el-button>
22
+ <el-button @click="setMultiFlatmap()" size="small">Set MultiFlatmap</el-button>
23
+ <el-button @click="setLegacyMultiFlatmap()" size="small">Set Legacy MultiFlatmap</el-button>
24
+ <el-button @click="setScaffold()" size="small">Set To Scaffold</el-button>
25
+ <el-button @click="setWholebody()" size="small">Set to Wholebody</el-button>
26
+ <el-button @click="setFlatmap()" size="small">Set Flatmap</el-button>
27
+ <el-button @click="setSearch()" size="small">Set Search</el-button>
28
+ </div>
29
+ <div class="row">
30
+ <div style="font-weight: 600">Connectivity tooltip labels:</div>
31
+ </div>
32
+ <div class="row">
33
+ <el-checkbox @change="onShowLongLabelChange" v-model="showLongLabel" size="small">
34
+ Show long label
35
+ </el-checkbox>
36
+ <el-checkbox @change="onTruncateLongLabelChange" :disabled="!showLongLabel" v-model="truncateLongLabel" size="small">
37
+ Truncate long label
38
+ </el-checkbox>
39
+ <el-checkbox @change="onShowIdInTooltipChange" :disabled="!showLongLabel" v-model="showIdInTooltip" size="small">
40
+ Show ID in tooltip
41
+ </el-checkbox>
42
+ </div>
43
+ </div>
44
+ <template #reference>
45
+ <el-button class="options-button" :icon="ElIconSetting">Options</el-button>
46
+ </template>
35
47
  </el-popover>
36
48
  </div>
37
49
  <div class="map-app">
@@ -42,6 +54,8 @@
42
54
  :options="options"
43
55
  :state="state"
44
56
  :showLongLabel="showLongLabel"
57
+ :truncateLongLabel="truncateLongLabel"
58
+ :showIdInTooltip="showIdInTooltip"
45
59
  :shareLink="shareLink"
46
60
  :useHelpModeDialog="true"
47
61
  :connectivityInfoSidebar="true"
@@ -161,6 +175,8 @@ export default {
161
175
  ElIconSetting: shallowRef(ElIconSetting),
162
176
  routerIsReady: false,
163
177
  showLongLabel: true,
178
+ truncateLongLabel: true,
179
+ showIdInTooltip: true,
164
180
  }
165
181
  },
166
182
  computed: {
@@ -182,6 +198,11 @@ export default {
182
198
  }
183
199
  },
184
200
  methods: {
201
+ closePopover: function() {
202
+ if (this.$refs.optionsPopover) {
203
+ this.$refs.optionsPopover.hide();
204
+ }
205
+ },
185
206
  changeViewingMode: function(modeName) {
186
207
  this.$refs.map.changeViewingMode(modeName);
187
208
  },
@@ -261,6 +282,7 @@ export default {
261
282
  label: "Functional"
262
283
  }
263
284
  );
285
+ this.closePopover();
264
286
  },
265
287
  setLegacyMultiFlatmap: function() {
266
288
  this.$refs.map.setCurrentEntry(
@@ -270,6 +292,7 @@ export default {
270
292
  uuid: "01fedbf9-d783-509c-a10c-827941ab13da",
271
293
  }
272
294
  );
295
+ this.closePopover();
273
296
  },
274
297
  setMultiFlatmap: function() {
275
298
  this.$refs.map.setCurrentEntry(
@@ -281,6 +304,7 @@ export default {
281
304
  organ: "UBERON:0018675"
282
305
  }
283
306
  );
307
+ this.closePopover();
284
308
  },
285
309
  setRatFlatmap: function() {
286
310
  this.$refs.map.setCurrentEntry(
@@ -289,6 +313,7 @@ export default {
289
313
  taxo: "NCBITaxon:10114"
290
314
  }
291
315
  );
316
+ this.closePopover();
292
317
  },
293
318
  setScaffold: function() {
294
319
  this.$refs.map.setCurrentEntry(
@@ -299,6 +324,7 @@ export default {
299
324
  viewUrl: "colonMouse_Layout1_view.json"
300
325
  }
301
326
  );
327
+ this.closePopover();
302
328
  },
303
329
  setWholebody: function() {
304
330
  this.$refs.map.setCurrentEntry(
@@ -308,12 +334,20 @@ export default {
308
334
  isBodyScaffold: true
309
335
  }
310
336
  );
337
+ this.closePopover();
311
338
  },
312
339
  setSearch: function() {
313
340
  this.$refs.map.openSearch([], "10.26275/1uno-tynt");
341
+ this.closePopover();
342
+ },
343
+ onShowLongLabelChange: function() {
344
+ this.closePopover();
345
+ },
346
+ onTruncateLongLabelChange: function() {
347
+ this.closePopover();
314
348
  },
315
- toggleLongLabel: function() {
316
- this.showLongLabel = !this.showLongLabel;
349
+ onShowIdInTooltipChange: function() {
350
+ this.closePopover();
317
351
  },
318
352
  mapIsLoaded: function(map) {
319
353
  console.log("map is loaded", map)
@@ -0,0 +1,2 @@
1
+ @use 'variables' as *;
2
+ @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
@@ -1,4 +1,5 @@
1
- @import '_variables.scss';
1
+ @use '_variables' as *;
2
+ @forward '_variables';
2
3
 
3
4
  .tooltip {
4
5
  font-family: 'Asap', 'Avenir', Arial, sans-serif;
@@ -1,6 +1,5 @@
1
- @import '_variables';
2
-
3
- @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
1
+ @use '_variables' as *;
2
+ @forward '_variables';
4
3
 
5
4
  /* icon font path, required */
6
5
  $--color-primary: $app-primary-color !default;
@@ -6,7 +6,7 @@
6
6
  <splitpanes
7
7
  class="default-theme"
8
8
  :horizontal="isHorizontal"
9
- :dbl-click-splitter="false"
9
+ :maximize-panes="false"
10
10
  >
11
11
  <template v-for="(child) in children" :key="child">
12
12
  <pane :ref="child" @vue:beforeUnmount="childUnmounted(child)">
@@ -14,7 +14,7 @@
14
14
  v-if="customLayout[child].content"
15
15
  @resize="calculateStyles(child)">
16
16
  </resize-sensor>
17
- <custom-splitter
17
+ <custom-splitter
18
18
  v-else
19
19
  :key="child"
20
20
  :index="child"
@@ -53,7 +53,7 @@ export default {
53
53
  methods: {
54
54
  requestStylesUpdate: function(refName) {
55
55
  if (this.$refs) {
56
- if (refName in this.$refs && this.$refs[refName] &&
56
+ if (refName in this.$refs && this.$refs[refName] &&
57
57
  this.$refs[refName][0] && this.$refs[refName][0].$el) {
58
58
  const el = this.$refs[refName][0].$el;
59
59
  const rect = el.getBoundingClientRect();
@@ -20,6 +20,7 @@
20
20
 
21
21
  <script>
22
22
  /* eslint-disable no-alert, no-console */
23
+ import { computed } from 'vue';
23
24
  import Tagging from '../services/tagging.js';
24
25
  import SplitFlow from './SplitFlow.vue';
25
26
  import EventBus from './EventBus';
@@ -64,6 +65,14 @@ export default {
64
65
  type: Boolean,
65
66
  default: true,
66
67
  },
68
+ truncateLongLabel: {
69
+ type: Boolean,
70
+ default: true,
71
+ },
72
+ showIdInTooltip: {
73
+ type: Boolean,
74
+ default: true,
75
+ },
67
76
  /**
68
77
  * The options include APIs and Keys.
69
78
  */
@@ -133,6 +142,8 @@ export default {
133
142
  return {
134
143
  showGlobalSettings: this.showGlobalSettings,
135
144
  showOpenMapButton: this.showOpenMapButton,
145
+ truncateLongLabel: computed(() => this.truncateLongLabel),
146
+ showIdInTooltip: computed(() => this.showIdInTooltip),
136
147
  };
137
148
  },
138
149
  data: function () {
@@ -80,7 +80,7 @@ export default {
80
80
  font-size: 0.8rem;
81
81
  margin-left: 0.5rem;
82
82
  }
83
- :deep(.search-box) {
83
+ :deep(.search-box.el-autocomplete) {
84
84
  margin-top: 2px;
85
85
  margin-left:0.5rem;
86
86
  height:28px;
@@ -30,7 +30,7 @@
30
30
  :connectivityKnowledge="connectivityKnowledge"
31
31
  :filterOptions="filterOptions"
32
32
  :showVisibilityFilter="showVisibilityFilter"
33
- :showLongLabel="showLongLabel"
33
+ :showLongLabel="true"
34
34
  @tabClicked="onSidebarTabClicked"
35
35
  @tabClosed="onSidebarTabClosed"
36
36
  @actionClick="actionClick"
@@ -67,7 +67,7 @@
67
67
 
68
68
  <script>
69
69
  /* eslint-disable no-alert, no-console */
70
- import { provide, markRaw } from 'vue'
70
+ import { provide, markRaw, computed } from 'vue';
71
71
  import Tagging from '../services/tagging.js';
72
72
  import DialogToolbarContent from "./DialogToolbarContent.vue";
73
73
  import EventBus from "./EventBus";
@@ -141,12 +141,13 @@ export default {
141
141
  SplitDialog,
142
142
  SideBar,
143
143
  },
144
- setup() {
144
+ setup(props) {
145
145
  const mainStore = useMainStore();
146
- provide('userApiKey', mainStore.userToken);
147
146
  const settings = useSettingsStore();
148
147
  let annotator = markRaw(new AnnotationService(`${settings.flatmapAPI}annotator`));
149
- provide('$annotator', annotator)
148
+ provide('userApiKey', mainStore.userToken);
149
+ provide('$annotator', annotator);
150
+ provide('showLongLabel', computed(() => props.showLongLabel));
150
151
  return { annotator }
151
152
  },
152
153
  props: {
@@ -1,6 +1,7 @@
1
1
  // The Vue build version to load with the `import` command
2
2
  // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
3
  import MapContent from './MapContent.vue';
4
+ import '../assets/fonts.scss';
4
5
 
5
6
  export {
6
7
  MapContent