Skip to content
Open
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [v2.7.1](https://github.com/alan-wu/map-sidebar/compare/v2.7.0...v2.7.1)
## [v2.7.2](https://github.com/alan-wu/map-sidebar/compare/v2.7.1...v2.7.2)

### Merged

- Add a note in connectivity list component [`#120`](https://github.com/alan-wu/map-sidebar/pull/120)
- Fix SidebarContent component loading twice [`#119`](https://github.com/alan-wu/map-sidebar/pull/119)

### Commits

- Update dependencies. [`07a81e4`](https://github.com/alan-wu/map-sidebar/commit/07a81e48eaae458d393a4723b1737778f5919d96)
- Fix sidebarcontent component loading twice [`d1cd4b7`](https://github.com/alan-wu/map-sidebar/commit/d1cd4b758dab931b8b444a5eabf0ba3ca7ced8bb)
- Update content [`0be1ca1`](https://github.com/alan-wu/map-sidebar/commit/0be1ca1c7d5547a597834d6408f81e76d5348b75)

## [v2.7.1](https://github.com/alan-wu/map-sidebar/compare/v2.7.0...v2.7.1) - 2025-02-28

### Commits

Expand Down
2,703 changes: 765 additions & 1,938 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abi-software/map-side-bar",
"version": "2.7.1",
"version": "2.7.3-beta.0",
"files": [
"dist/*",
"src/*",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@abi-software/gallery": "^1.1.2",
"@abi-software/map-utilities": "^1.4.0",
"@abi-software/map-utilities": "^1.4.3-beta.3",
"@abi-software/svg-sprite": "^1.0.1",
"@element-plus/icons-vue": "^2.3.1",
"algoliasearch": "^4.10.5",
Expand Down
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ export default {
facetPropPath: 'attributes.subject.sex.value',
},
{
facet: 'Cardiovascular system',
facet2: 'Heart',
facet: 'Heart',
term: 'Anatomical structure',
facetSubPropPath: "anatomy.organ.name",
facetPropPath: 'anatomy.organ.category.name',
label :'Heart',
AND: true,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/algolia/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function getFilters(selectedFacetArray=undefined) {
}

// Switch the 'term' attribute to 'label' if 'label' does not exist
selectedFacetArray.forEach(f=>f.label=f.facet)
selectedFacetArray.forEach(f=>f.label = f.facet2 ? f.facet2 : f.facet)


let facets = removeShowAllFacets(selectedFacetArray)
Expand Down
18 changes: 13 additions & 5 deletions src/components/ConnectivityInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export default {
if (newVal !== oldVal) {
this.connectivityLoading = true;
this.updateKeys();
this.checkAndUpdateDualConnection();
this.updateGraphConnectivity();
this.updateConnectionsData(newVal);
this.connectivityLoading = false;
Expand Down Expand Up @@ -524,6 +525,7 @@ export default {
this.graphViewLoaded = false;
}

this.checkAndUpdateDualConnection();
this.updateGraphConnectivity();
this.updateKeys();

Expand Down Expand Up @@ -599,6 +601,16 @@ export default {
this.connectivitySource = connectivitySource;
}
},
checkAndUpdateDualConnection: async function () {
const response = await this.getConnectionsFromMap(this.mapuuid, this.entry.featureId[0])

if (response?.connectivity?.length) {
this.dualConnectionSource = true;
} else {
this.dualConnectionSource = false;
this.connectivitySource = 'sckan';
}
},
},
mounted: function () {
this.sckanVersion = this.entry['knowledge-source'];
Expand All @@ -608,14 +620,10 @@ export default {

this.updateSettingsFromState();
this.updateKeys();
this.checkAndUpdateDualConnection();
this.updateGraphConnectivity();
this.updateConnectionsData(this.entry);

// TODO: only rat flatmap has dual connections now
if (this.mapId === 'rat-flatmap') {
this.dualConnectionSource = true;
}

EventBus.on('connectivity-graph-error', (errorInfo) => {
this.pushConnectivityError(errorInfo);
});
Expand Down
1 change: 1 addition & 0 deletions src/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<!-- Connectivity Info -->
<template v-if="tab.type === 'connectivity' && connectivityInfo">
<connectivity-info
:key="connectivityInfo.title"
:entry="connectivityInfo"
:availableAnatomyFacets="availableAnatomyFacets"
v-if="tab.id === activeTabId"
Expand Down
12 changes: 9 additions & 3 deletions src/components/SidebarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,15 @@ export default {
this.searchAlgolia(this.filter, search)
}
this.$refs.filtersRef.setCascader(this.filter)
this.searchHistoryUpdate(this.filter, search);
}
} else {
//cascader is not ready, perform search if no filter is set,
//otherwise waith for cascader to be ready
this.filter = filter
if ((!filter || filter.length == 0) && option.withSearch) {
this.searchAlgolia(this.filter, search)
this.searchHistoryUpdate(this.filter, search);
}
}
},
Expand Down Expand Up @@ -260,12 +262,16 @@ export default {
this.resetPageNavigation();
const transformedFilters = this.transformFiltersBeforeSearch(this.filters);
this.searchAlgolia(transformedFilters, this.searchInput);
this.searchHistoryUpdate(this.filters, this.searchInput);
},
searchHistoryUpdate: function (filters, search) {
this.$refs.searchHistory.selectValue = 'Search history';
// save history only if there has value
if (this.filters.length || this.searchInput?.trim()) {
if (filters.length || search?.trim()) {
const transformedFilters = this.transformFiltersBeforeSearch(filters);
this.$refs.searchHistory.addSearchToHistory(
this.filters,
this.searchInput
transformedFilters,
search
);
}
},
Expand Down