@abi-software/map-side-bar 2.11.2-acupoints.0 → 2.11.3

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/map-side-bar",
3
- "version": "2.11.2-acupoints.0",
3
+ "version": "2.11.3",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
package/src/App.vue CHANGED
@@ -18,7 +18,6 @@
18
18
  <el-button @click="keywordSearch">keyword search</el-button>
19
19
  <el-button @click="getFacets">Get facets</el-button>
20
20
  <el-button @click="toggleCreateData">Create Data/Annotation</el-button>
21
- <el-button @click="searchAcupoints">Search Acupoints</el-button>
22
21
  <el-button @click="openConnectivitySearch()">Connectivity Search</el-button>
23
22
  </div>
24
23
  <SideBar
@@ -27,18 +26,14 @@
27
26
  ref="sideBar"
28
27
  :visible="sideBarVisibility"
29
28
  :annotationEntry="annotationEntry"
30
- :acupointsInfoList="acupoints"
31
29
  :createData="createData"
32
30
  :connectivityEntry="connectivityEntry"
33
31
  :connectivityKnowledge="connectivityKnowledge"
34
32
  :showVisibilityFilter="true"
35
- :tabs="tabArray"
36
33
  @search-changed="searchChanged($event)"
37
34
  @hover-changed="hoverChanged($event)"
38
35
  @connectivity-hovered="onConnectivityHovered"
39
36
  @actionClick="action"
40
- @acupoints-clicked="onAcupointsClicked"
41
- @acupoints-hovered="onAcupointsHovered"
42
37
  @connectivity-collapse-change="onConnectivityCollapseChange"
43
38
  />
44
39
  </div>
@@ -47,7 +42,6 @@
47
42
  <script>
48
43
  /* eslint-disable no-alert, no-console */
49
44
  // optionally import default styles
50
- import { acupointEntries } from './acupoints.js'
51
45
  import SideBar from './components/SideBar.vue'
52
46
  import EventBus from './components/EventBus.js'
53
47
  import exampleConnectivityInput from './exampleConnectivityInput.js'
@@ -127,14 +121,6 @@ export default {
127
121
  },
128
122
  data: function () {
129
123
  return {
130
- acupoints: acupointEntries,
131
- contextArray: [null, null],
132
- tabArray: [
133
- { title: 'Dataset Explorer', id: 1, type: 'datasetExplorer', closable: false },
134
- { title: 'Connectivity Explorer', id: 2, type: 'connectivityExplorer', closable: false },
135
- { title: 'Annotation', id: 3, type: 'annotation', closable: true },
136
- {title: 'Acupoints', id: 4, type: 'acupoints' },
137
- ],
138
124
  annotationEntry: [{
139
125
  featureId: "epicardium",
140
126
  resourceId: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/others/29_Jan_2020/heartICN_metadata.json",
@@ -170,12 +156,6 @@ export default {
170
156
  }
171
157
  },
172
158
  methods: {
173
- onAcupointsClicked: function (data) {
174
- console.log("acupoints-clicked", data)
175
- },
176
- onAcupointsHovered: function (data) {
177
- console.log("acupoints-hovered", data)
178
- },
179
159
  loadConnectivityKnowledge: async function () {
180
160
  const sql = `select knowledge from knowledge
181
161
  where source="${this.sckanVersion}"
@@ -252,9 +232,6 @@ export default {
252
232
  'http://purl.obolibrary.org/obo/UBERON_0001103'
253
233
  )
254
234
  },
255
- searchAcupoints: function() {
256
- this.$refs.sideBar.openAcupointsSearch("LU 1")
257
- },
258
235
  singleFacets: function () {
259
236
  this.$refs.sideBar.addFilter({
260
237
  facet: 'Cardiovascular system',
@@ -429,4 +406,4 @@ body {
429
406
  align-items: center;
430
407
  gap: 0.5rem;
431
408
  }
432
- </style>./acupoints.js
409
+ </style>
@@ -103,9 +103,9 @@
103
103
  <el-icon class="info"><el-icon-warning /></el-icon>
104
104
  </template>
105
105
  <span style="word-break: keep-all">
106
- <strong>Map</strong> - connectivity as defined in displayed map
106
+ <strong>Map</strong> - connectivity as defined in active map.
107
107
  <br>
108
- <strong>SCKAN</strong> - connectivity as defined in SCKAN
108
+ <strong>SCKAN</strong> - connectivity as defined in SCKAN.
109
109
  </span>
110
110
  </el-popover>
111
111
  </span>
@@ -64,14 +64,6 @@
64
64
  @connectivity-item-close="onConnectivityItemClose"
65
65
  />
66
66
  </template>
67
- <template v-else-if="tab.type === 'acupoints' && acupointsInfoList">
68
- <acupoints-info-search
69
- :ref="'acupointsTab_' + tab.id"
70
- :entry="acupointsInfoList"
71
- @on-acupoints-click="acupointClicked"
72
- v-show="tab.id === activeTabId"
73
- />
74
- </template>
75
67
  <template v-else>
76
68
  <DatasetExplorer
77
69
  class="sidebar-content-container"
@@ -100,7 +92,6 @@ import { ElDrawer as Drawer, ElIcon as Icon } from 'element-plus'
100
92
  import DatasetExplorer from './DatasetExplorer.vue'
101
93
  import EventBus from './EventBus.js'
102
94
  import Tabs from './Tabs.vue'
103
- import AcupointsInfoSearch from './AcupointsInfoSearch.vue'
104
95
  import AnnotationTool from './AnnotationTool.vue'
105
96
  import ConnectivityExplorer from './ConnectivityExplorer.vue'
106
97
  import { removeShowAllFacets } from '../algolia/utils.js'
@@ -160,13 +151,6 @@ export default {
160
151
  type: Array,
161
152
  default: [],
162
153
  },
163
- /**
164
- * The acupoints info to show in sidebar.
165
- */
166
- acupointsInfoList: {
167
- type: Object,
168
- default: null,
169
- },
170
154
  /**
171
155
  * The annotation data to show in sidebar.
172
156
  */
@@ -220,13 +204,6 @@ export default {
220
204
  }
221
205
  },
222
206
  methods: {
223
- /**
224
- * This event is emitted with a mouse click on acupoint card
225
- * @arg data
226
- */
227
- acupointClicked: function (data) {
228
- this.$emit('acupoints-clicked', data)
229
- },
230
207
  onConnectivityCollapseChange: function (data) {
231
208
  this.$emit('connectivity-collapse-change', data)
232
209
  },
@@ -318,6 +295,9 @@ export default {
318
295
  datasetExplorerTabRef.openSearch(facets, query);
319
296
  })
320
297
  },
298
+ /**
299
+ * Get the ref id of the tab by id and type.
300
+ */
321
301
  getTabRef: function (id, type, switchTab = false) {
322
302
  const matchedTab = this.tabEntries.filter((tabEntry) => {
323
303
  return (id === undefined || tabEntry.id === id) &&
@@ -427,14 +407,6 @@ export default {
427
407
  updateConnectivityError: function (errorInfo) {
428
408
  EventBus.emit('connectivity-error', errorInfo);
429
409
  },
430
- openAcupointsSearch: function (term) {
431
- this.drawerOpen = true
432
- // Because refs are in v-for, nextTick is needed here
433
- this.$nextTick(() => {
434
- const tabRef = this.getTabRef(undefined, 'acupoints', true);
435
- tabRef.search(term);
436
- })
437
- },
438
410
  /**
439
411
  * Store available anatomy facets data for connectivity list component
440
412
  */
@@ -531,11 +503,6 @@ export default {
531
503
  // This should respect the information provided by the property
532
504
  tabEntries: function () {
533
505
  return this.tabs.filter((tab) =>
534
- (tab.type === "acupoints" &&
535
- (
536
- this.acupointsInfoList &&
537
- Object.keys(this.acupointsInfoList).length > 0
538
- )) ||
539
506
  tab.type === "datasetExplorer" ||
540
507
  tab.type === "connectivityExplorer" ||
541
508
  (
@@ -598,16 +565,6 @@ export default {
598
565
  this.$emit('connectivity-source-change', payLoad);
599
566
  })
600
567
 
601
- // Emit acupoints clicked event
602
- EventBus.on('acupoints-clicked', (payLoad) => {
603
- this.$emit('acupoints-clicked', payLoad);
604
- })
605
-
606
- // Emit acupoints hovered event
607
- EventBus.on('acupoints-hovered', (payLoad) => {
608
- this.$emit('acupoints-hovered', payLoad);
609
- })
610
-
611
568
  // Get available anatomy facets for the connectivity info
612
569
  EventBus.on('available-facets', (payLoad) => {
613
570
  this.availableAnatomyFacets = payLoad.find((facet) => facet.label === 'Anatomical Structure').children
@@ -7,8 +7,6 @@ export {}
7
7
 
8
8
  declare module 'vue' {
9
9
  export interface GlobalComponents {
10
- AcupointsCard: typeof import('./components/AcupointsCard.vue')['default']
11
- AcupointsInfoSearch: typeof import('./components/AcupointsInfoSearch.vue')['default']
12
10
  AnnotationTool: typeof import('./components/AnnotationTool.vue')['default']
13
11
  BadgesGroup: typeof import('./components/BadgesGroup.vue')['default']
14
12
  ConnectivityCard: typeof import('./components/ConnectivityCard.vue')['default']
package/src/acupoints.js DELETED
@@ -1,32 +0,0 @@
1
- export const acupointEntries = {
2
- "LU 1": {
3
- "Acupoint": "LU 1",
4
- "Label": "LU 1",
5
- "Synonym": "Test data",
6
- "UMLS CUI": "",
7
- "Meridian": "LTest data",
8
- "Chinese Name": "Zhongfu",
9
- "English Name": "Central Treasury",
10
- "Location": " z zxczc.",
11
- "Reference": "Test data",
12
- "Indications": "Test data",
13
- "Acupuncture Method": "Test data",
14
- "Vasculature": "Test data",
15
- "Innervation": "Test data"
16
- },
17
- "LU 2": {
18
- "Acupoint": "LU 2",
19
- "Label": "LU 2",
20
- "Synonym": "Test data",
21
- "UMLS CUI": "",
22
- "Meridian": "LTest data",
23
- "Chinese Name": "Yunmen",
24
- "English Name": "Cloud Gate",
25
- "Location": " z zxczc.",
26
- "Reference": "Test data",
27
- "Indications": "Test data",
28
- "Acupuncture Method": "Test data",
29
- "Vasculature": "Test data",
30
- "Innervation": "Test data"
31
- }
32
- }
@@ -1,187 +0,0 @@
1
- <template>
2
- <div class="dataset-card-container" ref="container">
3
- <div class="dataset-card" ref="card">
4
- <div class="seperator-path"></div>
5
- <div class="card"
6
- @click="cardClicked(entry)"
7
- @mouseover="cardHovered(entry)"
8
- @mouseleave="cardHovered(undefined)"
9
- >
10
- <div class="card-right">
11
- <div class="title">Acupoint: {{ entry.Acupoint }}</div>
12
- <template v-for="field in displayFields" :key="field['name']">
13
- <div class="details" >
14
- <strong>{{ field['name'] }}: </strong>
15
- <span
16
- v-if="!field['isEditing']"
17
- @click="field['isEditing'] = true"
18
- >
19
- {{ entry[field['name']] || 'Not Available' }}
20
- </span>
21
- <el-input
22
- v-else
23
- v-model="entry[field['name']]"
24
- @blur="field['isEditing'] = false"
25
- @keyup.enter="field['isEditing'] = false"
26
- @vue:mounted="inputMounted"
27
- type="textarea"
28
- />
29
- </div>
30
- </template>
31
- </div>
32
- </div>
33
- </div>
34
- </div>
35
- </template>
36
-
37
- <script>
38
- import EventBus from './EventBus.js'
39
- /* eslint-disable no-alert, no-console */
40
-
41
- export default {
42
- data() {
43
- return {
44
- displayFields: [
45
- {name: "Synonym", isEditing: false},
46
- {name: "Chinese Name", isEditing: false},
47
- {name: "English Name", isEditing: false},
48
- {name: "Reference", isEditing: false},
49
- {name: "Indications", isEditing: false},
50
- {name: "Acupuncture Method", isEditing: false},
51
- {name: "Vasculature", isEditing: false},
52
- {name: "Innervation", isEditing: false},
53
- {name: "Notes", isEditing: false},
54
- ]
55
- }
56
- },
57
- name: 'AcupointsCard',
58
- props: {
59
- /**
60
- * Object containing information for
61
- * the required viewing.
62
- */
63
- entry: {
64
- type: Object,
65
- default: () => {},
66
- },
67
- },
68
- methods: {
69
- cardClicked: function (data) {
70
- EventBus.emit('acupoints-clicked', data);
71
- },
72
- cardHovered: function (data) {
73
- EventBus.emit('acupoints-hovered', data);
74
- },
75
- inputMounted: function(event) {
76
- event.el?.querySelector('textarea')?.focus();
77
- }
78
- }
79
- }
80
- </script>
81
-
82
- <style lang="scss" scoped>
83
- .dataset-card {
84
- padding-left: 5px;
85
- padding-right: 5px;
86
- position: relative;
87
- min-height: 17rem;
88
- }
89
-
90
- .title {
91
- padding-bottom: 0.75rem;
92
- font-family: Asap;
93
- font-size: 14px;
94
- font-weight: bold;
95
- font-stretch: normal;
96
- font-style: normal;
97
- line-height: 1.5;
98
- letter-spacing: 1.05px;
99
- color: #484848;
100
- cursor: pointer;
101
- }
102
- .card {
103
- padding-top: 18px;
104
- position: relative;
105
- display: flex;
106
- }
107
-
108
- .card-left {
109
- flex: 1;
110
- }
111
-
112
- .card-right {
113
- flex: 1.3;
114
- padding-left: 6px;
115
- }
116
-
117
- .button {
118
- z-index: 10;
119
- font-family: Asap;
120
- font-size: 14px;
121
- font-weight: normal;
122
- font-stretch: normal;
123
- font-style: normal;
124
- line-height: normal;
125
- letter-spacing: normal;
126
- background-color: $app-primary-color;
127
- border: $app-primary-color;
128
- color: white;
129
- cursor: pointer;
130
- margin-top: 8px;
131
- }
132
-
133
- .button:hover {
134
- background-color: $app-primary-color;
135
- color: white;
136
- }
137
-
138
- .banner-img {
139
- width: 128px;
140
- height: 128px;
141
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
142
- background-color: #ffffff;
143
- cursor: pointer;
144
- }
145
- .details {
146
- font-family: Asap;
147
- font-size: 14px;
148
- font-weight: normal;
149
- font-stretch: normal;
150
- font-style: normal;
151
- line-height: 1.5;
152
- letter-spacing: 1.05px;
153
- color: #484848;
154
- }
155
-
156
- .badges-container {
157
- margin-top: 0.75rem;
158
- }
159
-
160
- .loading-icon {
161
- z-index: 20;
162
- width: 40px;
163
- height: 40px;
164
- left: 80px;
165
- }
166
-
167
- .loading-icon :deep(.el-loading-mask) {
168
- background-color: rgba(117, 190, 218, 0) !important;
169
- }
170
-
171
- .loading-icon :deep(.el-loading-spinner .path) {
172
- stroke: $app-primary-color;
173
- }
174
-
175
- .float-button-container {
176
- position: absolute;
177
- bottom: 8px;
178
- right: 16px;
179
- opacity: 0;
180
- visibility: hidden;
181
-
182
- .card:hover & {
183
- opacity: 1;
184
- visibility: visible;
185
- }
186
- }
187
- </style>