@abi-software/map-side-bar 2.2.1-beta.1 → 2.2.1-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "2.2.1-beta.1",
3
+ "version": "2.2.1-beta.2",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div v-if="entry" class="main" v-loading="loading">
3
- <!-- Provenance Info Title -->
4
- <div class="provenance-info-title">
3
+ <!-- Connectivity Info Title -->
4
+ <div class="connectivity-info-title">
5
5
  <div>
6
6
  <div class="block" v-if="entry.title">
7
7
  <div class="title">{{ capitalise(entry.title) }}</div>
@@ -182,7 +182,7 @@ const capitalise = function (str) {
182
182
  }
183
183
 
184
184
  export default {
185
- name: 'ProvenancePopup',
185
+ name: 'ConnectivityInfo',
186
186
  components: {
187
187
  Button,
188
188
  Container,
@@ -266,19 +266,19 @@ export default {
266
266
  window.open(url, '_blank')
267
267
  },
268
268
  openAll: function () {
269
- EventBus.emit('onProvenanceActionClick', {
269
+ EventBus.emit('onConnectivityActionClick', {
270
270
  type: 'Facets',
271
271
  labels: this.entry.componentsWithDatasets.map((a) => a.name),
272
272
  })
273
273
  },
274
274
  openAxons: function () {
275
- EventBus.emit('onProvenanceActionClick', {
275
+ EventBus.emit('onConnectivityActionClick', {
276
276
  type: 'Facets',
277
277
  labels: this.entry.destinationsWithDatasets.map((a) => a.name),
278
278
  })
279
279
  },
280
280
  openDendrites: function () {
281
- EventBus.emit('onProvenanceActionClick', {
281
+ EventBus.emit('onConnectivityActionClick', {
282
282
  type: 'Facets',
283
283
  labels: this.entry.originsWithDatasets.map((a) => a.name),
284
284
  })
@@ -297,7 +297,7 @@ export default {
297
297
  word-break: normal;
298
298
  }
299
299
 
300
- .provenance-info-title {
300
+ .connectivity-info-title {
301
301
  padding: 1rem;
302
302
  display: flex;
303
303
  flex-direction: row;
@@ -510,7 +510,7 @@ export default {
510
510
  padding-top: 0.5em;
511
511
  }
512
512
 
513
- .provenance-info-title ~ & {
513
+ .connectivity-info-title ~ & {
514
514
  padding-top: 0;
515
515
  }
516
516
  }
@@ -22,17 +22,17 @@
22
22
  </div>
23
23
  <div class="sidebar-container">
24
24
  <Tabs
25
- v-if="tabs.length > 1 && provenanceEntry"
25
+ v-if="tabs.length > 1 && connectivityInfo"
26
26
  :tabTitles="tabs"
27
27
  :activeId="activeId"
28
28
  @titleClicked="tabClicked"
29
29
  @tab-close="tabClose"
30
30
  />
31
31
  <template v-for="tab in tabs" key="tab.id">
32
- <!-- Provenance Info -->
32
+ <!-- Connectivity Info -->
33
33
  <template v-if="tab.id === 2">
34
- <provenance-popup
35
- :entry="provenanceEntry"
34
+ <connectivity-info
35
+ :entry="connectivityInfo"
36
36
  v-show="tab.id === activeId"
37
37
  :ref="tab.id"
38
38
  />
@@ -65,7 +65,7 @@ import { ElDrawer as Drawer, ElIcon as Icon } from 'element-plus'
65
65
  import SidebarContent from './SidebarContent.vue'
66
66
  import EventBus from './EventBus.js'
67
67
  import Tabs from './Tabs.vue'
68
- import ProvenancePopup from './ProvenancePopup.vue'
68
+ import ConnectivityInfo from './ConnectivityInfo.vue'
69
69
 
70
70
  /**
71
71
  * Aims to provide a sidebar for searching capability for SPARC portal.
@@ -78,7 +78,7 @@ export default {
78
78
  ElIconArrowRight,
79
79
  Drawer,
80
80
  Icon,
81
- ProvenancePopup,
81
+ ConnectivityInfo,
82
82
  },
83
83
  name: 'SideBar',
84
84
  props: {
@@ -124,9 +124,9 @@ export default {
124
124
  default: false,
125
125
  },
126
126
  /**
127
- * The provenance info data to show in sidebar.
127
+ * The connectivity info data to show in sidebar.
128
128
  */
129
- provenanceEntry: {
129
+ connectivityInfo: {
130
130
  type: Object,
131
131
  default: null,
132
132
  },
@@ -169,6 +169,7 @@ export default {
169
169
  this.drawerOpen = true
170
170
  // Because refs are in v-for, nextTick is needed here
171
171
  this.$nextTick(() => {
172
+ // TODO: refs[1] is for `search` which should be renamed
172
173
  this.$refs[1][0].openSearch(facets, query)
173
174
  })
174
175
  },
@@ -217,7 +218,7 @@ export default {
217
218
  this.$emit('tabClicked', id)
218
219
  },
219
220
  tabClose: function (id) {
220
- this.$emit('provenance-popup-close');
221
+ this.$emit('connectivity-info-close');
221
222
  },
222
223
  },
223
224
  created: function () {
@@ -263,7 +264,7 @@ export default {
263
264
  */
264
265
  this.$emit('datalink-clicked', payLoad);
265
266
  })
266
- EventBus.on('onProvenanceActionClick', (payLoad) => {
267
+ EventBus.on('onConnectivityActionClick', (payLoad) => {
267
268
  this.tabClicked(1);
268
269
  this.$emit('actionClick', payLoad);
269
270
  })
@@ -119,6 +119,11 @@ $tab-height: 30px;
119
119
  outline: none;
120
120
  background-color: transparent;
121
121
 
122
+ :deep(> span) {
123
+ height: $tab-height - 2; // tab height minus border
124
+ font-family: Arial; // to fix font alignment on different browsers
125
+ }
126
+
122
127
  &:hover,
123
128
  &:focus {
124
129
  border: 0 none;
@@ -8,6 +8,7 @@ export {}
8
8
  declare module 'vue' {
9
9
  export interface GlobalComponents {
10
10
  BadgesGroup: typeof import('./components/BadgesGroup.vue')['default']
11
+ ConnectivityInfo: typeof import('./components/ConnectivityInfo.vue')['default']
11
12
  DatasetCard: typeof import('./components/DatasetCard.vue')['default']
12
13
  ElButton: typeof import('element-plus/es')['ElButton']
13
14
  ElCard: typeof import('element-plus/es')['ElCard']
@@ -25,7 +26,6 @@ declare module 'vue' {
25
26
  ElTag: typeof import('element-plus/es')['ElTag']
26
27
  ExternalResourceCard: typeof import('./components/ExternalResourceCard.vue')['default']
27
28
  ImageGallery: typeof import('./components/ImageGallery.vue')['default']
28
- ProvenancePopup: typeof import('./components/ProvenancePopup.vue')['default']
29
29
  SearchFilters: typeof import('./components/SearchFilters.vue')['default']
30
30
  SearchHistory: typeof import('./components/SearchHistory.vue')['default']
31
31
  SideBar: typeof import('./components/SideBar.vue')['default']