@abi-software/map-side-bar 2.10.0-beta.0 → 2.10.0-beta.2

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.
@@ -55,6 +55,7 @@
55
55
  :showVisibilityFilter="showVisibilityFilter"
56
56
  @search-changed="searchChanged(tab.id, $event)"
57
57
  @hover-changed="hoverChanged(tab.id, $event)"
58
+ @connectivity-explorer-reset="onConnectivityExplorerReset"
58
59
  @show-connectivity="showConnectivity"
59
60
  @show-reference-connectivities="onShowReferenceConnectivities"
60
61
  @connectivity-hovered="onConnectivityHovered"
@@ -185,6 +186,16 @@ export default {
185
186
  activeTabId: 1,
186
187
  activeAnnotationData: { tabType: "annotation" },
187
188
  activeConnectivityData: { tabType: "connectivity" },
189
+ state: {
190
+ dataset: {
191
+ search: '',
192
+ filters: [],
193
+ },
194
+ connectivity: {
195
+ search: '',
196
+ filters: [],
197
+ },
198
+ },
188
199
  }
189
200
  },
190
201
  methods: {
@@ -215,6 +226,12 @@ export default {
215
226
  this.activeAnnotationData = data;
216
227
  }
217
228
  },
229
+ /**
230
+ * This event is emitted after clicking reset button in connectivity explorer
231
+ */
232
+ onConnectivityExplorerReset: function (payload) {
233
+ this.$emit('connectivity-explorer-reset', payload);
234
+ },
218
235
  /**
219
236
  * This event is emitted when the show connectivity button is clicked.
220
237
  * @arg featureIds
@@ -390,6 +407,25 @@ export default {
390
407
  closeConnectivity: function () {
391
408
  EventBus.emit('close-connectivity');
392
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
+ },
393
429
  },
394
430
  computed: {
395
431
  // This should respect the information provided by the property
@@ -3,3 +3,6 @@ import SideBar from "./SideBar.vue"
3
3
  export {
4
4
  SideBar
5
5
  };
6
+
7
+
8
+
@@ -30,6 +30,7 @@ declare module 'vue' {
30
30
  ElIconClose: typeof import('@element-plus/icons-vue')['Close']
31
31
  ElIconDelete: typeof import('@element-plus/icons-vue')['Delete']
32
32
  ElIconLocation: typeof import('@element-plus/icons-vue')['Location']
33
+ ElIconSearch: typeof import('@element-plus/icons-vue')['Search']
33
34
  ElIconWarning: typeof import('@element-plus/icons-vue')['Warning']
34
35
  ElIconWarnTriangleFilled: typeof import('@element-plus/icons-vue')['WarnTriangleFilled']
35
36
  ElInput: typeof import('element-plus/es')['ElInput']