From 3272595b5f1a47b01f14645a6a32ecd217ddd26f Mon Sep 17 00:00:00 2001 From: alan-wu Date: Tue, 29 Oct 2024 10:48:15 +1300 Subject: [PATCH 1/8] Add annotation tool to the sidebar. --- package-lock.json | 12 +++---- package.json | 4 +-- src/App.vue | 11 ++++++- src/components.d.ts | 2 ++ src/components/AnnotationTool.vue | 54 +++++++++++++++++++++++++++++++ src/components/SideBar.vue | 45 +++++++++++++++++++++++--- src/components/Tabs.vue | 2 +- 7 files changed, 116 insertions(+), 14 deletions(-) create mode 100644 src/components/AnnotationTool.vue diff --git a/package-lock.json b/package-lock.json index 2166aadc..6c20f994 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@abi-software/map-side-bar", - "version": "2.4.2", + "version": "2.5.0-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@abi-software/map-side-bar", - "version": "2.4.2", + "version": "2.5.0-beta.0", "dependencies": { "@abi-software/gallery": "^1.1.2", - "@abi-software/map-utilities": "^1.1.2", + "@abi-software/map-utilities": "^1.2.0-beta.3", "@abi-software/svg-sprite": "^1.0.1", "@element-plus/icons-vue": "^2.3.1", "algoliasearch": "^4.10.5", @@ -65,9 +65,9 @@ } }, "node_modules/@abi-software/map-utilities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@abi-software/map-utilities/-/map-utilities-1.1.2.tgz", - "integrity": "sha512-NMERIqSq6pVwy7Daq+Uip8Cm1UE2KEJoquOqVXACrMoTDHV77LPbWAtawn3f7De5HK69oqLwZ+wbnFLy5aisrQ==", + "version": "1.2.0-beta.3", + "resolved": "https://registry.npmjs.org/@abi-software/map-utilities/-/map-utilities-1.2.0-beta.3.tgz", + "integrity": "sha512-3o1s/9NB5zzJQ2XYdlG8P/uw1ZjK6zPwrc7ixE0wBBPN+wo1G9hb/DceI0vdWDA9sZe2F2LUoaWUyK6ZzlMWgA==", "dependencies": { "@abi-software/svg-sprite": "^1.0.1", "@element-plus/icons-vue": "^2.3.1", diff --git a/package.json b/package.json index 2b7a23a2..e0df30a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@abi-software/map-side-bar", - "version": "2.4.2", + "version": "2.5.0-beta.0", "files": [ "dist/*", "src/*", @@ -39,7 +39,7 @@ }, "dependencies": { "@abi-software/gallery": "^1.1.2", - "@abi-software/map-utilities": "^1.1.2", + "@abi-software/map-utilities": "^1.2.0-beta.3", "@abi-software/svg-sprite": "^1.0.1", "@element-plus/icons-vue": "^2.3.1", "algoliasearch": "^4.10.5", diff --git a/src/App.vue b/src/App.vue index 1258c40c..c03ef7cb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,6 +22,7 @@ :visible="sideBarVisibility" :tabs="tabs" :activeTabId="activeId" + :annotationEntry="annotationEntry" :connectivityInfo="connectivityInput" @tabClicked="tabClicked" @search-changed="searchChanged($event)" @@ -100,8 +101,16 @@ export default { }, data: function () { return { + annotationEntry: { + featureId :"epicardium", + resourceId: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/others/29_Jan_2020/heartICN_metadata.json","resource":"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/others/29_Jan_2020/heartICN_metadata.json" + }, contextArray: [null, null], - tabArray: [{ title: 'Flatmap', id: 1, type: 'search'}, { title: 'Connectivity', id: 2, type: 'connectivity' }], + tabArray: [ + { title: 'Flatmap', id: 1, type: 'search'}, + { title: 'Connectivity', id: 2, type: 'connectivity' }, + { title: 'Annotation', id: 3, type: 'annotation' }, + ], sideBarVisibility: true, envVars: { API_LOCATION: import.meta.env.VITE_APP_API_LOCATION, diff --git a/src/components.d.ts b/src/components.d.ts index ba5eedf9..e7d665e7 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,6 +7,7 @@ export {} declare module 'vue' { export interface GlobalComponents { + AnnotationTool: typeof import('./components/AnnotationTool.vue')['default'] BadgesGroup: typeof import('./components/BadgesGroup.vue')['default'] ConnectivityInfo: typeof import('./components/ConnectivityInfo.vue')['default'] DatasetCard: typeof import('./components/DatasetCard.vue')['default'] @@ -19,6 +20,7 @@ declare module 'vue' { ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight'] ElIconLocation: typeof import('@element-plus/icons-vue')['Location'] ElIconWarning: typeof import('@element-plus/icons-vue')['Warning'] + ElIconWarnTriangleFilled: typeof import('@element-plus/icons-vue')['WarnTriangleFilled'] ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] diff --git a/src/components/AnnotationTool.vue b/src/components/AnnotationTool.vue new file mode 100644 index 00000000..8913eecf --- /dev/null +++ b/src/components/AnnotationTool.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/components/SideBar.vue b/src/components/SideBar.vue index dd8a9349..3fd3e27e 100644 --- a/src/components/SideBar.vue +++ b/src/components/SideBar.vue @@ -22,8 +22,8 @@