@abi-software/map-side-bar 2.8.3-beta.5 → 2.8.3-beta.6
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/dist/map-side-bar.js +182 -151
- package/dist/map-side-bar.umd.cjs +29 -29
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/AnnotationTool.vue +2 -0
- package/src/components/ConnectivityExplorer.vue +17 -4
- package/src/components/SearchFilters.vue +6 -5
- package/src/components/SideBar.vue +44 -0
- package/src/components/SidebarContent.vue +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.8.3-beta.
|
|
3
|
+
"version": "2.8.3-beta.6",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/*",
|
|
6
6
|
"src/*",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@abi-software/gallery": "^1.1.2",
|
|
42
|
-
"@abi-software/map-utilities": "^1.
|
|
42
|
+
"@abi-software/map-utilities": "^1.6.0-beta.0",
|
|
43
43
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
44
44
|
"@element-plus/icons-vue": "^2.3.1",
|
|
45
45
|
"algoliasearch": "^4.10.5",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
class="annotation-popup"
|
|
13
13
|
:annotationEntry="annotationEntry"
|
|
14
14
|
@annotation="$emit('annotation', $event)"
|
|
15
|
+
@hover-changed="$emit('hover-changed', $event)"
|
|
15
16
|
/>
|
|
16
17
|
<div v-if="createData && createData.toBeDeleted" class="delete-container">
|
|
17
18
|
<el-row>
|
|
@@ -75,6 +76,7 @@ export default {
|
|
|
75
76
|
data: function () {
|
|
76
77
|
return {
|
|
77
78
|
ElIconDelete: shallowRef(ElIconDelete),
|
|
79
|
+
annotationPopupData: null,
|
|
78
80
|
};
|
|
79
81
|
},
|
|
80
82
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<el-card
|
|
3
3
|
:body-style="bodyStyle"
|
|
4
4
|
class="content-card"
|
|
5
|
-
@mouseleave="
|
|
5
|
+
@mouseleave="onHoverChanged($event, undefined)"
|
|
6
6
|
>
|
|
7
7
|
<template #header>
|
|
8
8
|
<div class="header">
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
class="content scrollbar"
|
|
52
52
|
v-loading="loadingCards || initLoading"
|
|
53
53
|
ref="content"
|
|
54
|
-
@mouseleave="
|
|
54
|
+
@mouseleave="onHoverChanged($event, undefined)"
|
|
55
55
|
>
|
|
56
56
|
<div class="error-feedback" v-if="results.length === 0 && !loadingCards">
|
|
57
57
|
No results found - Please change your search / filter criteria.
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
:key="result.id"
|
|
62
62
|
:ref="'stepItem-' + result.id"
|
|
63
63
|
class="step-item"
|
|
64
|
-
@mouseenter="
|
|
64
|
+
@mouseenter="onHoverChanged($event, result)"
|
|
65
65
|
>
|
|
66
66
|
<ConnectivityCard
|
|
67
67
|
v-show="expanded !== result.id"
|
|
@@ -188,7 +188,11 @@ export default {
|
|
|
188
188
|
numberOfHits: this.numberOfHits,
|
|
189
189
|
filterFacets: this.filter,
|
|
190
190
|
options: this.connectivityFilterOptions,
|
|
191
|
-
showFilters: true
|
|
191
|
+
showFilters: true,
|
|
192
|
+
helper: {
|
|
193
|
+
within: "'CNS' OR 'Local circuit neuron'",
|
|
194
|
+
between: "'Somatic lower motor' AND 'Human'"
|
|
195
|
+
}
|
|
192
196
|
};
|
|
193
197
|
},
|
|
194
198
|
paginatedResults: function () {
|
|
@@ -262,6 +266,15 @@ export default {
|
|
|
262
266
|
});
|
|
263
267
|
}
|
|
264
268
|
},
|
|
269
|
+
onHoverChanged: function (event, data) {
|
|
270
|
+
const { target } = event;
|
|
271
|
+
|
|
272
|
+
// mouseleave event won't trigger if the connectivity explorer tab is not in view
|
|
273
|
+
// e.g., switching to annotation tab on item click
|
|
274
|
+
if (data || (target && target.checkVisibility())) {
|
|
275
|
+
this.hoverChanged(data)
|
|
276
|
+
}
|
|
277
|
+
},
|
|
265
278
|
hoverChanged: function (data) {
|
|
266
279
|
let payload = { tabType: "connectivity" };
|
|
267
280
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
closable
|
|
10
10
|
@close="cascadeTagClose(presentTags[0])"
|
|
11
11
|
>
|
|
12
|
-
<
|
|
12
|
+
<span class="tag-text">{{ presentTags[0] }}</span>
|
|
13
13
|
</el-tag>
|
|
14
14
|
<el-popover
|
|
15
15
|
v-if="presentTags.length > 1"
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
<div>
|
|
76
76
|
<strong>Within categories:</strong> OR
|
|
77
77
|
<br />
|
|
78
|
-
example:
|
|
78
|
+
example: {{ entry.helper.within }}
|
|
79
79
|
<br />
|
|
80
80
|
<br />
|
|
81
81
|
<strong>Between categories:</strong> AND
|
|
82
82
|
<br />
|
|
83
|
-
example:
|
|
83
|
+
example: {{ entry.helper.between }}
|
|
84
84
|
</div>
|
|
85
85
|
</el-popover>
|
|
86
86
|
</span>
|
|
@@ -834,8 +834,8 @@ export default {
|
|
|
834
834
|
result.push(validatedFilter)
|
|
835
835
|
terms.push(validatedFilter.term)
|
|
836
836
|
}
|
|
837
|
-
})
|
|
838
|
-
// make sure unused filter terms' show all checkbox is always checked
|
|
837
|
+
})
|
|
838
|
+
// make sure unused filter terms' show all checkbox is always checked
|
|
839
839
|
this.options.forEach((option)=>{
|
|
840
840
|
if (!terms.includes(option.label)) {
|
|
841
841
|
result.push({
|
|
@@ -886,6 +886,7 @@ export default {
|
|
|
886
886
|
}
|
|
887
887
|
|
|
888
888
|
.tag-text {
|
|
889
|
+
display: block;
|
|
889
890
|
max-width: 75px;
|
|
890
891
|
white-space: nowrap;
|
|
891
892
|
overflow: hidden;
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
@confirm-create="$emit('confirm-create', $event)"
|
|
40
40
|
@cancel-create="$emit('cancel-create')"
|
|
41
41
|
@confirm-delete="$emit('confirm-delete', $event)"
|
|
42
|
+
@hover-changed="hoverChanged(tab.id, $event)"
|
|
42
43
|
/>
|
|
43
44
|
</template>
|
|
44
45
|
<template v-else-if="tab.type === 'connectivityExplorer'">
|
|
@@ -176,6 +177,8 @@ export default {
|
|
|
176
177
|
drawerOpen: false,
|
|
177
178
|
availableAnatomyFacets: [],
|
|
178
179
|
activeTabId: 1,
|
|
180
|
+
activeAnnotationData: { tabType: "annotation" },
|
|
181
|
+
activeConnectivityData: { tabType: "connectivity" },
|
|
179
182
|
}
|
|
180
183
|
},
|
|
181
184
|
methods: {
|
|
@@ -196,6 +199,15 @@ export default {
|
|
|
196
199
|
*/
|
|
197
200
|
hoverChanged: function (id, data) {
|
|
198
201
|
this.$emit('hover-changed', {...data, tabId: id })
|
|
202
|
+
|
|
203
|
+
const activeTabType = this.getActiveTabTypeById(id);
|
|
204
|
+
// save the last highlighted data for connectivity and annotation tabs
|
|
205
|
+
if (activeTabType === 'connectivityExplorer') {
|
|
206
|
+
this.activeConnectivityData = data;
|
|
207
|
+
}
|
|
208
|
+
if (activeTabType === 'annotation') {
|
|
209
|
+
this.activeAnnotationData = data;
|
|
210
|
+
}
|
|
199
211
|
},
|
|
200
212
|
/**
|
|
201
213
|
* This event is emitted when the show connectivity button is clicked.
|
|
@@ -317,9 +329,41 @@ export default {
|
|
|
317
329
|
const tabInfo = matchedTab.length ? matchedTab : this.tabEntries;
|
|
318
330
|
this.activeTabId = tabInfo[0].id;
|
|
319
331
|
},
|
|
332
|
+
getActiveTabTypeById: function (id) {
|
|
333
|
+
const foundTab = this.tabs.find((tab) => tab.id === id);
|
|
334
|
+
if (foundTab) {
|
|
335
|
+
return foundTab.type;
|
|
336
|
+
}
|
|
337
|
+
return '';
|
|
338
|
+
},
|
|
339
|
+
highlightActiveTabData: function (tab) {
|
|
340
|
+
let data = null;
|
|
341
|
+
|
|
342
|
+
if (tab.type === 'connectivityExplorer') {
|
|
343
|
+
const connectivityExplorerTabRef = this.getTabRef(undefined, 'connectivityExplorer', true);
|
|
344
|
+
// check if any opened item
|
|
345
|
+
// if no opened item, highlight items will be based on the results in explorer
|
|
346
|
+
if (connectivityExplorerTabRef && !connectivityExplorerTabRef.expanded) {
|
|
347
|
+
data = { tabType: 'connectivity' };
|
|
348
|
+
} else {
|
|
349
|
+
data = {...this.activeConnectivityData};
|
|
350
|
+
}
|
|
351
|
+
} else if (tab.type === 'annotation') {
|
|
352
|
+
data = {...this.activeAnnotationData};
|
|
353
|
+
} else {
|
|
354
|
+
// switching to dataset explorer tab will not highlight
|
|
355
|
+
// the highlight is from the last tab
|
|
356
|
+
// if needed, to update it here
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (data) {
|
|
360
|
+
this.$emit('hover-changed', {...data, tabId: tab.id })
|
|
361
|
+
}
|
|
362
|
+
},
|
|
320
363
|
tabClicked: function (tab) {
|
|
321
364
|
this.setActiveTab(tab);
|
|
322
365
|
this.$emit('tabClicked', tab);
|
|
366
|
+
this.highlightActiveTabData(tab);
|
|
323
367
|
},
|
|
324
368
|
tabClosed: function (tab) {
|
|
325
369
|
this.$emit('tabClosed', tab);
|
|
@@ -167,7 +167,11 @@ export default {
|
|
|
167
167
|
return {
|
|
168
168
|
numberOfHits: this.numberOfHits,
|
|
169
169
|
filterFacets: this.filter,
|
|
170
|
-
showFilters: true
|
|
170
|
+
showFilters: true,
|
|
171
|
+
helper: {
|
|
172
|
+
within: "'heart' OR 'colon'",
|
|
173
|
+
between: "'rat' AND 'lung'"
|
|
174
|
+
}
|
|
171
175
|
}
|
|
172
176
|
},
|
|
173
177
|
},
|