@abi-software/map-side-bar 2.9.2-beta.6 → 2.9.2-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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.9.2-beta.
|
|
3
|
+
"version": "2.9.2-beta.7",
|
|
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.6.1-beta.
|
|
42
|
+
"@abi-software/map-utilities": "^1.6.1-beta.7",
|
|
43
43
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
44
44
|
"@element-plus/icons-vue": "^2.3.1",
|
|
45
45
|
"algoliasearch": "^4.10.5",
|
|
@@ -305,7 +305,6 @@ export default {
|
|
|
305
305
|
},
|
|
306
306
|
onConnectivityClicked: function (data) {
|
|
307
307
|
this.searchInput = data.query;
|
|
308
|
-
this.filter = data.filter;
|
|
309
308
|
this.searchAndFilterUpdate();
|
|
310
309
|
},
|
|
311
310
|
collapseChange:function (data) {
|
|
@@ -472,6 +471,7 @@ export default {
|
|
|
472
471
|
searchAndFilterUpdate: function () {
|
|
473
472
|
this.resetPageNavigation();
|
|
474
473
|
this.searchKnowledge(this.filter, this.searchInput);
|
|
474
|
+
this.$refs.filtersRef.setCascader(this.filter);
|
|
475
475
|
this.searchHistoryUpdate(this.filter, this.searchInput);
|
|
476
476
|
},
|
|
477
477
|
searchHistoryUpdate: function (filters, search) {
|
|
@@ -530,6 +530,12 @@ export default {
|
|
|
530
530
|
}
|
|
531
531
|
});
|
|
532
532
|
},
|
|
533
|
+
getSearch: function () {
|
|
534
|
+
return this.searchInput;
|
|
535
|
+
},
|
|
536
|
+
getFilters: function () {
|
|
537
|
+
return this.filter;
|
|
538
|
+
},
|
|
533
539
|
},
|
|
534
540
|
mounted: function () {
|
|
535
541
|
localStorage.removeItem('connectivity-active-view');
|
|
@@ -477,6 +477,12 @@ export default {
|
|
|
477
477
|
this.filter = item.filters
|
|
478
478
|
this.openSearch([...item.filters], item.search);
|
|
479
479
|
},
|
|
480
|
+
getSearch: function () {
|
|
481
|
+
return this.searchInput
|
|
482
|
+
},
|
|
483
|
+
getFilters: function () {
|
|
484
|
+
return this.filter;
|
|
485
|
+
},
|
|
480
486
|
},
|
|
481
487
|
mounted: function () {
|
|
482
488
|
// initialise algolia
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
:envVars="envVars"
|
|
51
51
|
:connectivityEntry="connectivityEntry"
|
|
52
52
|
:availableAnatomyFacets="availableAnatomyFacets"
|
|
53
|
-
@filter-visibility="$emit('filter-visibility', $event)"
|
|
54
53
|
:connectivityFilterOptions="filterOptions"
|
|
54
|
+
@filter-visibility="$emit('filter-visibility', $event)"
|
|
55
55
|
:showVisibilityFilter="showVisibilityFilter"
|
|
56
56
|
@search-changed="searchChanged(tab.id, $event)"
|
|
57
57
|
@hover-changed="hoverChanged(tab.id, $event)"
|
|
@@ -186,6 +186,16 @@ export default {
|
|
|
186
186
|
activeTabId: 1,
|
|
187
187
|
activeAnnotationData: { tabType: "annotation" },
|
|
188
188
|
activeConnectivityData: { tabType: "connectivity" },
|
|
189
|
+
state: {
|
|
190
|
+
dataset: {
|
|
191
|
+
search: '',
|
|
192
|
+
filters: [],
|
|
193
|
+
},
|
|
194
|
+
connectivity: {
|
|
195
|
+
search: '',
|
|
196
|
+
filters: [],
|
|
197
|
+
},
|
|
198
|
+
},
|
|
189
199
|
}
|
|
190
200
|
},
|
|
191
201
|
methods: {
|
|
@@ -397,6 +407,25 @@ export default {
|
|
|
397
407
|
closeConnectivity: function () {
|
|
398
408
|
EventBus.emit('close-connectivity');
|
|
399
409
|
},
|
|
410
|
+
updateState: function () {
|
|
411
|
+
const datasetExplorerTabRef = this.getTabRef(undefined, 'datasetExplorer');
|
|
412
|
+
const connectivityExplorerTabRef = this.getTabRef(undefined, 'connectivityExplorer');
|
|
413
|
+
this.state.dataset.search = datasetExplorerTabRef.getSearch();
|
|
414
|
+
this.state.dataset.filters = datasetExplorerTabRef.getFilters();
|
|
415
|
+
this.state.connectivity.search = connectivityExplorerTabRef.getSearch();
|
|
416
|
+
this.state.connectivity.filters = connectivityExplorerTabRef.getFilters();
|
|
417
|
+
},
|
|
418
|
+
getState: function () {
|
|
419
|
+
this.updateState();
|
|
420
|
+
return this.state;
|
|
421
|
+
},
|
|
422
|
+
setState: function (state) {
|
|
423
|
+
// if state is not provided or formatted incorrectly, do nothing
|
|
424
|
+
if (!state || !state.dataset || !state.connectivity) return;
|
|
425
|
+
this.state = state;
|
|
426
|
+
this.openSearch(state.dataset.filters, state.dataset.search);
|
|
427
|
+
this.openConnectivitySearch(state.connectivity.filters, state.connectivity.search);
|
|
428
|
+
},
|
|
400
429
|
},
|
|
401
430
|
computed: {
|
|
402
431
|
// This should respect the information provided by the property
|