@abi-software/map-side-bar 2.5.3-beta.18 → 2.5.3-beta.19

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.
@@ -39,6 +39,7 @@
39
39
  :ref="'connectivityTab_' + tab.id"
40
40
  @show-connectivity="showConnectivity"
41
41
  @connectivity-component-click="onConnectivityComponentClick"
42
+ @neuron-connection-change="showNeuronConnection"
42
43
  />
43
44
  </template>
44
45
  <template v-else-if="tab.type === 'annotation'">
@@ -195,6 +196,9 @@ export default {
195
196
  onConnectivityComponentClick: function (data) {
196
197
  this.$emit('connectivity-component-click', data);
197
198
  },
199
+ showNeuronConnection: function (data) {
200
+ this.$emit('neuron-connection-change', data);
201
+ },
198
202
  /**
199
203
  * This event is emitted when the search filters are changed.
200
204
  * @arg `obj` {data, id}
@@ -95,7 +95,6 @@ var handleErrors = async function (response) {
95
95
  }
96
96
 
97
97
  var initial_state = {
98
- filters: [],
99
98
  searchInput: '',
100
99
  lastSearch: '',
101
100
  results: [],
@@ -173,7 +172,7 @@ export default {
173
172
  this.results = []
174
173
  this.loadingCards = false
175
174
  },
176
- openSearch: function (filter, search = '', option = { withSearch: true }) {
175
+ openSearch: function (filter, search = '') {
177
176
  this.searchInput = search
178
177
  this.resetPageNavigation()
179
178
  //Proceed normally if cascader is ready
@@ -192,16 +191,14 @@ export default {
192
191
  this.$refs.filtersRef.checkShowAllBoxes()
193
192
  this.resetSearch()
194
193
  } else if (this.filter) {
195
- if (option.withSearch) {
196
- this.searchAlgolia(this.filter, search)
197
- }
194
+ this.searchAlgolia(this.filter, search)
198
195
  this.$refs.filtersRef.setCascader(this.filter)
199
196
  }
200
197
  } else {
201
198
  //cascader is not ready, perform search if no filter is set,
202
199
  //otherwise waith for cascader to be ready
203
200
  this.filter = filter
204
- if ((!filter || filter.length == 0) && option.withSearch) {
201
+ if (!filter || filter.length == 0) {
205
202
  this.searchAlgolia(this.filter, search)
206
203
  }
207
204
  }
@@ -226,49 +223,31 @@ export default {
226
223
  this.openSearch(this.filter, this.searchInput)
227
224
  },
228
225
  clearSearchClicked: function () {
229
- this.searchInput = '';
230
- this.searchAndFilterUpdate();
226
+ this.searchInput = ''
227
+ this.resetPageNavigation()
228
+ this.searchAlgolia(this.filters, this.searchInput)
229
+ this.$refs.searchHistory.selectValue = 'Full search history'
231
230
  },
232
231
  searchEvent: function (event = false) {
233
232
  if (event.keyCode === 13 || event instanceof MouseEvent) {
234
- this.searchInput = this.searchInput.trim();
235
- this.searchAndFilterUpdate();
233
+ this.resetPageNavigation()
234
+ this.searchAlgolia(this.filters, this.searchInput)
235
+ this.$refs.searchHistory.selectValue = 'Full search history'
236
+ this.$refs.searchHistory.addSearchToHistory(
237
+ this.filters,
238
+ this.searchInput
239
+ )
236
240
  }
237
241
  },
238
242
  filterUpdate: function (filters) {
239
243
  this.filters = [...filters]
240
- this.searchAndFilterUpdate();
244
+ this.resetPageNavigation()
245
+ this.searchAlgolia(filters, this.searchInput)
241
246
  this.$emit('search-changed', {
242
247
  value: filters,
243
248
  type: 'filter-update',
244
249
  })
245
250
  },
246
- /**
247
- * Transform filters for third level items to perform search
248
- * because cascader keeps adding it back.
249
- */
250
- transformFiltersBeforeSearch: function (filters) {
251
- return filters.map((filter) => {
252
- if (filter.facet2) {
253
- filter.facet = filter.facet2;
254
- delete filter.facet2;
255
- }
256
- return filter;
257
- });
258
- },
259
- searchAndFilterUpdate: function () {
260
- this.resetPageNavigation();
261
- const transformedFilters = this.transformFiltersBeforeSearch(this.filters);
262
- this.searchAlgolia(transformedFilters, this.searchInput);
263
- this.$refs.searchHistory.selectValue = 'Search history';
264
- // save history only if there has value
265
- if (this.filters.length || this.searchInput?.trim()) {
266
- this.$refs.searchHistory.addSearchToHistory(
267
- this.filters,
268
- this.searchInput
269
- );
270
- }
271
- },
272
251
  searchAlgolia(filters, query = '') {
273
252
  // Algolia search
274
253
 
@@ -460,9 +439,7 @@ export default {
460
439
  searchHistorySearch: function (item) {
461
440
  this.searchInput = item.search
462
441
  this.filters = item.filters
463
- this.searchAndFilterUpdate();
464
- // withSearch: false to prevent algoliaSearch in openSearch
465
- this.openSearch([...item.filters], item.search, { withSearch: false });
442
+ this.openSearch(item.filters, item.search)
466
443
  },
467
444
  },
468
445
  mounted: function () {
@@ -510,9 +487,6 @@ export default {
510
487
  height: 100%;
511
488
  flex-flow: column;
512
489
  display: flex;
513
- border: 0;
514
- border-top-right-radius: 0;
515
- border-bottom-right-radius: 0;
516
490
  }
517
491
 
518
492
  .step-item {
@@ -525,16 +499,15 @@ export default {
525
499
  width: 298px !important;
526
500
  height: 40px;
527
501
  padding-right: 14px;
528
-
529
- :deep(.el-input__inner) {
530
- font-family: inherit;
531
- }
502
+ align-items: left;
532
503
  }
533
504
 
534
505
  .header {
535
- .el-button {
536
- font-family: inherit;
506
+ border: solid 1px #292b66;
507
+ background-color: #292b66;
508
+ text-align: left;
537
509
 
510
+ .el-button {
538
511
  &:hover,
539
512
  &:focus {
540
513
  background: $app-primary-color;
@@ -587,8 +560,6 @@ export default {
587
560
  background-color: #ffffff;
588
561
  overflow-y: scroll;
589
562
  scrollbar-width: thin;
590
- border-radius: var(--el-border-radius-base);
591
- z-index: 1;
592
563
  }
593
564
 
594
565
  .content :deep(.el-loading-spinner .path) {
@@ -16,14 +16,10 @@ declare module 'vue' {
16
16
  ElCascader: typeof import('element-plus/es')['ElCascader']
17
17
  ElCol: typeof import('element-plus/es')['ElCol']
18
18
  ElDrawer: typeof import('element-plus/es')['ElDrawer']
19
- ElDropdown: typeof import('element-plus/es')['ElDropdown']
20
- ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
21
- ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
22
19
  ElIcon: typeof import('element-plus/es')['ElIcon']
23
- ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
24
20
  ElIconArrowLeft: typeof import('@element-plus/icons-vue')['ArrowLeft']
25
21
  ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight']
26
- ElIconDelete: typeof import('@element-plus/icons-vue')['Delete']
22
+ ElIconConnection: typeof import('@element-plus/icons-vue')['Connection']
27
23
  ElIconLocation: typeof import('@element-plus/icons-vue')['Location']
28
24
  ElIconWarning: typeof import('@element-plus/icons-vue')['Warning']
29
25
  ElIconWarnTriangleFilled: typeof import('@element-plus/icons-vue')['WarnTriangleFilled']
@@ -285,5 +285,6 @@ export default {
285
285
  "Homo sapiens",
286
286
  "Canis lupus familiaris",
287
287
  "Domestic Pig"
288
- ]
288
+ ],
289
+ neuronCuration: true
289
290
  }