@abi-software/map-utilities 0.0.0-beta.6 → 0.0.0-beta.7
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 +27 -27
- package/dist/map-utilities.js +10817 -4666
- package/dist/map-utilities.umd.cjs +54 -40
- package/dist/style.css +1 -1
- package/jsconfig.json +8 -8
- package/package.json +45 -40
- package/src/App.vue +511 -511
- package/src/assets/_variables.scss +43 -43
- package/src/assets/styles.scss +5 -5
- package/src/components/DrawToolbar/ConnectionDialog.vue +118 -118
- package/src/components/DrawToolbar/DrawToolbar.vue +627 -627
- package/src/components/EventBus.js +3 -3
- package/src/components/HelpModeDialog/HelpModeDialog.vue +394 -394
- package/src/components/ImageDialog/IframeImageDialog.vue +70 -0
- package/src/components/Tooltip/AnnotationPopup.vue +467 -467
- package/src/components/Tooltip/ExternalResourceCard.vue +108 -108
- package/src/components/Tooltip/ImageGalleryPopup.vue +343 -0
- package/src/components/Tooltip/ProvenancePopup.vue +601 -518
- package/src/components/Tooltip/Tooltip.vue +75 -53
- package/src/components/TreeControls/TreeControls.vue +418 -350
- package/src/components/index.js +7 -6
- package/src/components.d.ts +3 -0
- package/src/main.js +16 -16
- package/src/mixins/flatmapImageMixin.js +42 -0
- package/vite.config.js +56 -56
package/src/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import DrawToolbar from "./DrawToolbar/DrawToolbar.vue";
|
|
2
|
-
import HelpModeDialog from "./HelpModeDialog/HelpModeDialog.vue";
|
|
3
|
-
import Tooltip from "./Tooltip/Tooltip.vue";
|
|
4
|
-
import TreeControls from "./TreeControls/TreeControls.vue";
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import DrawToolbar from "./DrawToolbar/DrawToolbar.vue";
|
|
2
|
+
import HelpModeDialog from "./HelpModeDialog/HelpModeDialog.vue";
|
|
3
|
+
import Tooltip from "./Tooltip/Tooltip.vue";
|
|
4
|
+
import TreeControls from "./TreeControls/TreeControls.vue";
|
|
5
|
+
import IframeImageDialog from "./ImageDialog/IframeImageDialog.vue";
|
|
6
|
+
|
|
7
|
+
export { DrawToolbar, HelpModeDialog, Tooltip, TreeControls, IframeImageDialog };
|
package/src/components.d.ts
CHANGED
|
@@ -29,9 +29,12 @@ declare module 'vue' {
|
|
|
29
29
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
|
30
30
|
ElRow: typeof import('element-plus/es')['ElRow']
|
|
31
31
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
32
|
+
ElTag: typeof import('element-plus/es')['ElTag']
|
|
32
33
|
ElTree: typeof import('element-plus/es')['ElTree']
|
|
33
34
|
ExternalResourceCard: typeof import('./components/Tooltip/ExternalResourceCard.vue')['default']
|
|
34
35
|
HelpModeDialog: typeof import('./components/HelpModeDialog/HelpModeDialog.vue')['default']
|
|
36
|
+
IframeImageDialog: typeof import('./components/ImageDialog/IframeImageDialog.vue')['default']
|
|
37
|
+
ImageGalleryPopup: typeof import('./components/Tooltip/ImageGalleryPopup.vue')['default']
|
|
35
38
|
ProvenancePopup: typeof import('./components/Tooltip/ProvenancePopup.vue')['default']
|
|
36
39
|
Tooltip: typeof import('./components/Tooltip/Tooltip.vue')['default']
|
|
37
40
|
TreeControls: typeof import('./components/TreeControls/TreeControls.vue')['default']
|
package/src/main.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
|
|
4
|
-
import DrawToolbar from "./components/DrawToolbar/DrawToolbar.vue";
|
|
5
|
-
import HelpModeDialog from "./components/HelpModeDialog/HelpModeDialog.vue";
|
|
6
|
-
import Tooltip from "./components/Tooltip/Tooltip.vue";
|
|
7
|
-
import TreeControls from "./components/TreeControls/TreeControls.vue";
|
|
8
|
-
|
|
9
|
-
const app = createApp(App);
|
|
10
|
-
|
|
11
|
-
app.component("DrawToolbar", DrawToolbar);
|
|
12
|
-
app.component("HelpModeDialog", HelpModeDialog);
|
|
13
|
-
app.component("Tooltip", Tooltip);
|
|
14
|
-
app.component("TreeControls", TreeControls);
|
|
15
|
-
|
|
16
|
-
app.mount("#app");
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
|
|
4
|
+
import DrawToolbar from "./components/DrawToolbar/DrawToolbar.vue";
|
|
5
|
+
import HelpModeDialog from "./components/HelpModeDialog/HelpModeDialog.vue";
|
|
6
|
+
import Tooltip from "./components/Tooltip/Tooltip.vue";
|
|
7
|
+
import TreeControls from "./components/TreeControls/TreeControls.vue";
|
|
8
|
+
|
|
9
|
+
const app = createApp(App);
|
|
10
|
+
|
|
11
|
+
app.component("DrawToolbar", DrawToolbar);
|
|
12
|
+
app.component("HelpModeDialog", HelpModeDialog);
|
|
13
|
+
app.component("Tooltip", Tooltip);
|
|
14
|
+
app.component("TreeControls", TreeControls);
|
|
15
|
+
|
|
16
|
+
app.mount("#app");
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
// Note that the setting store is included in MapContent.vue
|
|
3
|
+
methods: {
|
|
4
|
+
findImagesForSpeciesFromGalleryItems: function (galleryItems, speciesToFind) {
|
|
5
|
+
let imageList = []
|
|
6
|
+
galleryItems.forEach((image) => {
|
|
7
|
+
if (image.species && image.species.length > 0) {
|
|
8
|
+
image.species.forEach((species) => {
|
|
9
|
+
if (species.species && species.species.curie === speciesToFind) {
|
|
10
|
+
imageList.push(image)
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
return imageList
|
|
16
|
+
},
|
|
17
|
+
findAllSpeciesFromGalleryItems: function (galleryItems) {
|
|
18
|
+
let speciesList = [];
|
|
19
|
+
let speciesSet = new Set();
|
|
20
|
+
|
|
21
|
+
galleryItems.forEach((image) => {
|
|
22
|
+
if (image.species && image.species.length > 0) {
|
|
23
|
+
image.species.forEach((species) => {
|
|
24
|
+
if (species.species) {
|
|
25
|
+
let ispc = species.species;
|
|
26
|
+
if (!speciesSet.has(ispc.curie)) {
|
|
27
|
+
speciesSet.add(ispc.curie);
|
|
28
|
+
speciesList.push({ 'taxon': ispc.curie, 'name': ispc.name, 'count': 1});
|
|
29
|
+
} else {
|
|
30
|
+
speciesList.forEach((sp) => {
|
|
31
|
+
if (sp.taxon === ispc.curie) sp.count++;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return speciesList;
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
}
|
package/vite.config.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
|
|
3
|
-
import { defineConfig } from "vite";
|
|
4
|
-
import vue from "@vitejs/plugin-vue";
|
|
5
|
-
|
|
6
|
-
import Components from "unplugin-vue-components/vite";
|
|
7
|
-
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
8
|
-
|
|
9
|
-
// https://vitejs.dev/config/
|
|
10
|
-
export default defineConfig({
|
|
11
|
-
server: {
|
|
12
|
-
port: 8081,
|
|
13
|
-
},
|
|
14
|
-
plugins: [
|
|
15
|
-
vue(),
|
|
16
|
-
Components({
|
|
17
|
-
// allow auto load markdown components under `./src/components/`
|
|
18
|
-
extensions: ["vue", "md"],
|
|
19
|
-
// allow auto import and register components used in markdown
|
|
20
|
-
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
21
|
-
resolvers: [
|
|
22
|
-
ElementPlusResolver({
|
|
23
|
-
importStyle: "sass",
|
|
24
|
-
}),
|
|
25
|
-
],
|
|
26
|
-
dts: "./src/components.d.ts",
|
|
27
|
-
}),
|
|
28
|
-
],
|
|
29
|
-
resolve: {
|
|
30
|
-
alias: {
|
|
31
|
-
"@": resolve(__dirname, "./src"),
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
build: {
|
|
35
|
-
lib: {
|
|
36
|
-
entry: resolve(__dirname, "./src/components/index.js"),
|
|
37
|
-
name: "MapUtilities",
|
|
38
|
-
fileName: "map-utilities",
|
|
39
|
-
},
|
|
40
|
-
rollupOptions: {
|
|
41
|
-
external: ["vue"],
|
|
42
|
-
output: {
|
|
43
|
-
globals: {
|
|
44
|
-
vue: "Vue",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
css: {
|
|
50
|
-
preprocessorOptions: {
|
|
51
|
-
scss: {
|
|
52
|
-
additionalData: `@use './src/assets/styles' as *;`,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
});
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
import vue from "@vitejs/plugin-vue";
|
|
5
|
+
|
|
6
|
+
import Components from "unplugin-vue-components/vite";
|
|
7
|
+
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
8
|
+
|
|
9
|
+
// https://vitejs.dev/config/
|
|
10
|
+
export default defineConfig({
|
|
11
|
+
server: {
|
|
12
|
+
port: 8081,
|
|
13
|
+
},
|
|
14
|
+
plugins: [
|
|
15
|
+
vue(),
|
|
16
|
+
Components({
|
|
17
|
+
// allow auto load markdown components under `./src/components/`
|
|
18
|
+
extensions: ["vue", "md"],
|
|
19
|
+
// allow auto import and register components used in markdown
|
|
20
|
+
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
21
|
+
resolvers: [
|
|
22
|
+
ElementPlusResolver({
|
|
23
|
+
importStyle: "sass",
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
dts: "./src/components.d.ts",
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
resolve: {
|
|
30
|
+
alias: {
|
|
31
|
+
"@": resolve(__dirname, "./src"),
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
build: {
|
|
35
|
+
lib: {
|
|
36
|
+
entry: resolve(__dirname, "./src/components/index.js"),
|
|
37
|
+
name: "MapUtilities",
|
|
38
|
+
fileName: "map-utilities",
|
|
39
|
+
},
|
|
40
|
+
rollupOptions: {
|
|
41
|
+
external: ["vue"],
|
|
42
|
+
output: {
|
|
43
|
+
globals: {
|
|
44
|
+
vue: "Vue",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
css: {
|
|
50
|
+
preprocessorOptions: {
|
|
51
|
+
scss: {
|
|
52
|
+
additionalData: `@use './src/assets/styles' as *;`,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|