@abi-software/map-side-bar 2.7.2-beta.5 → 2.7.2-beta.6
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/dist/map-side-bar.js +6562 -6540
- package/dist/map-side-bar.umd.cjs +60 -63
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ConnectivityInfo.vue +332 -177
- package/src/components/SearchFilters.vue +13 -0
- package/src/components/SearchHistory.vue +0 -1
- package/src/components/SideBar.vue +3 -13
- package/src/components.d.ts +1 -2
- package/src/exampleConnectivityInput.js +2 -2
- package/src/components/flatmapQueries.js +0 -291
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="entry" class="main" v-loading="loading">
|
|
3
|
+
<div v-if="connectivityEntry.length > 1" class="button-container">
|
|
4
|
+
<el-popover
|
|
5
|
+
width="auto"
|
|
6
|
+
trigger="hover"
|
|
7
|
+
:teleported="false"
|
|
8
|
+
>
|
|
9
|
+
<template #reference>
|
|
10
|
+
<el-button class="button" @click="previous">Previous</el-button>
|
|
11
|
+
</template>
|
|
12
|
+
<span>{{ previousLabel }}</span>
|
|
13
|
+
</el-popover>
|
|
14
|
+
<el-popover
|
|
15
|
+
width="auto"
|
|
16
|
+
trigger="hover"
|
|
17
|
+
:teleported="false"
|
|
18
|
+
>
|
|
19
|
+
<template #reference>
|
|
20
|
+
<el-button class="button" @click="next">Next</el-button>
|
|
21
|
+
</template>
|
|
22
|
+
<span>{{ nextLabel }}</span>
|
|
23
|
+
</el-popover>
|
|
24
|
+
</div>
|
|
3
25
|
<!-- Connectivity Info Title -->
|
|
4
26
|
<div class="connectivity-info-title">
|
|
5
27
|
<div class="title-content">
|
|
@@ -44,7 +66,7 @@
|
|
|
44
66
|
popper-class="popover-map-pin"
|
|
45
67
|
>
|
|
46
68
|
<template #reference>
|
|
47
|
-
<el-button class="button-circle" circle @click="showConnectivity
|
|
69
|
+
<el-button class="button-circle" circle @click="showConnectivity">
|
|
48
70
|
<el-icon color="white">
|
|
49
71
|
<el-icon-location />
|
|
50
72
|
</el-icon>
|
|
@@ -58,53 +80,152 @@
|
|
|
58
80
|
</div>
|
|
59
81
|
</div>
|
|
60
82
|
|
|
61
|
-
<div
|
|
62
|
-
class="content-container population-display"
|
|
63
|
-
:class="dualConnectionSource ? 'population-display-toolbar' : ''"
|
|
64
|
-
>
|
|
83
|
+
<div class="content-container population-display">
|
|
65
84
|
<div class="block attribute-title-container">
|
|
66
85
|
<span class="attribute-title">Population Display</span>
|
|
67
86
|
</div>
|
|
68
87
|
<div class="block buttons-row">
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
88
|
+
<el-button
|
|
89
|
+
:class="activeView === 'listView' ? 'button' : 'el-button-secondary'"
|
|
90
|
+
@click="switchConnectivityView('listView')"
|
|
91
|
+
>
|
|
92
|
+
List view
|
|
93
|
+
</el-button>
|
|
94
|
+
<el-button
|
|
95
|
+
:class="activeView === 'graphView' ? 'button' : 'el-button-secondary'"
|
|
96
|
+
@click="switchConnectivityView('graphView')"
|
|
97
|
+
>
|
|
98
|
+
Graph view
|
|
99
|
+
</el-button>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div class="content-container content-container-connectivity" v-show="activeView === 'listView'">
|
|
104
|
+
{{ entry.paths }}
|
|
105
|
+
<div v-if="entry.origins && entry.origins.length > 0" class="block">
|
|
106
|
+
<div class="attribute-title-container">
|
|
107
|
+
<span class="attribute-title">Origin</span>
|
|
108
|
+
<el-popover
|
|
109
|
+
width="250"
|
|
110
|
+
trigger="hover"
|
|
111
|
+
:teleported="false"
|
|
112
|
+
popper-class="popover-origin-help"
|
|
80
113
|
>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
114
|
+
<template #reference>
|
|
115
|
+
<el-icon class="info"><el-icon-warning /></el-icon>
|
|
116
|
+
</template>
|
|
117
|
+
<span style="word-break: keep-all">
|
|
118
|
+
<i>Origin</i> {{ originDescription }}
|
|
119
|
+
</span>
|
|
120
|
+
|
|
121
|
+
</el-popover>
|
|
122
|
+
</div>
|
|
123
|
+
<div
|
|
124
|
+
v-for="(origin, i) in entry.origins"
|
|
125
|
+
class="attribute-content"
|
|
126
|
+
:origin-item-label="origin"
|
|
127
|
+
:key="origin"
|
|
128
|
+
@mouseenter="toggleConnectivityTooltip(origin, {show: true})"
|
|
129
|
+
@mouseleave="toggleConnectivityTooltip(origin, {show: false})"
|
|
130
|
+
>
|
|
131
|
+
{{ capitalise(origin) }}
|
|
132
|
+
</div>
|
|
133
|
+
<el-button
|
|
134
|
+
v-show="
|
|
135
|
+
entry.originsWithDatasets && entry.originsWithDatasets.length > 0 &&
|
|
136
|
+
shouldShowExploreButton(entry.originsWithDatasets)
|
|
137
|
+
"
|
|
138
|
+
class="button"
|
|
139
|
+
id="open-dendrites-button"
|
|
140
|
+
@click="openDendrites"
|
|
141
|
+
>
|
|
142
|
+
Explore origin data
|
|
143
|
+
</el-button>
|
|
144
|
+
</div>
|
|
145
|
+
<div
|
|
146
|
+
v-if="entry.components && entry.components.length > 0"
|
|
147
|
+
class="block"
|
|
148
|
+
>
|
|
149
|
+
<div class="attribute-title-container">
|
|
150
|
+
<div class="attribute-title">Components</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div
|
|
153
|
+
v-for="(component, i) in entry.components"
|
|
154
|
+
class="attribute-content"
|
|
155
|
+
:component-item-label="component"
|
|
156
|
+
:key="component"
|
|
157
|
+
@mouseenter="toggleConnectivityTooltip(component, {show: true})"
|
|
158
|
+
@mouseleave="toggleConnectivityTooltip(component, {show: false})"
|
|
159
|
+
>
|
|
160
|
+
{{ capitalise(component) }}
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div
|
|
164
|
+
v-if="entry.destinations && entry.destinations.length > 0"
|
|
165
|
+
class="block"
|
|
166
|
+
>
|
|
167
|
+
<div class="attribute-title-container">
|
|
168
|
+
<span class="attribute-title">Destination</span>
|
|
169
|
+
<el-popover
|
|
170
|
+
width="250"
|
|
171
|
+
trigger="hover"
|
|
172
|
+
:teleported="false"
|
|
173
|
+
popper-class="popover-origin-help"
|
|
86
174
|
>
|
|
87
|
-
|
|
88
|
-
|
|
175
|
+
<template #reference>
|
|
176
|
+
<el-icon class="info"><el-icon-warning /></el-icon>
|
|
177
|
+
</template>
|
|
178
|
+
<span style="word-break: keep-all">
|
|
179
|
+
<i>Destination</i> is where the axons terminate
|
|
180
|
+
</span>
|
|
181
|
+
</el-popover>
|
|
182
|
+
</div>
|
|
183
|
+
<div
|
|
184
|
+
v-for="(destination, i) in entry.destinations"
|
|
185
|
+
class="attribute-content"
|
|
186
|
+
:destination-item-label="destination"
|
|
187
|
+
:key="destination"
|
|
188
|
+
@mouseenter="toggleConnectivityTooltip(destination, {show: true})"
|
|
189
|
+
@mouseleave="toggleConnectivityTooltip(destination, {show: false})"
|
|
190
|
+
>
|
|
191
|
+
{{ capitalise(destination) }}
|
|
89
192
|
</div>
|
|
193
|
+
<el-button
|
|
194
|
+
v-show="
|
|
195
|
+
entry.destinationsWithDatasets &&
|
|
196
|
+
entry.destinationsWithDatasets.length > 0 &&
|
|
197
|
+
shouldShowExploreButton(entry.destinationsWithDatasets)
|
|
198
|
+
"
|
|
199
|
+
class="button"
|
|
200
|
+
@click="openAxons"
|
|
201
|
+
>
|
|
202
|
+
Explore destination data
|
|
203
|
+
</el-button>
|
|
204
|
+
</div>
|
|
205
|
+
<div
|
|
206
|
+
v-show="
|
|
207
|
+
entry.componentsWithDatasets &&
|
|
208
|
+
entry.componentsWithDatasets.length > 0 &&
|
|
209
|
+
shouldShowExploreButton(entry.componentsWithDatasets)
|
|
210
|
+
"
|
|
211
|
+
class="block"
|
|
212
|
+
>
|
|
213
|
+
<el-button
|
|
214
|
+
class="button"
|
|
215
|
+
@click="openAll"
|
|
216
|
+
>
|
|
217
|
+
Search for data on components
|
|
218
|
+
</el-button>
|
|
90
219
|
</div>
|
|
91
|
-
</div>
|
|
92
220
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
:componentsWithDatasets="componentsWithDatasets"
|
|
102
|
-
:destinationsWithDatasets="destinationsWithDatasets"
|
|
103
|
-
:availableAnatomyFacets="availableAnatomyFacets"
|
|
104
|
-
:connectivityError="connectivityError"
|
|
105
|
-
@toggle-connectivity-tooltip="onToggleConnectivityTooltip"
|
|
106
|
-
@connectivity-action-click="onConnectivityActionClick"
|
|
107
|
-
></connectivity-list>
|
|
221
|
+
<div class="connectivity-error-container">
|
|
222
|
+
<div class="connectivity-error" v-if="connectivityError">
|
|
223
|
+
<strong v-if="connectivityError.errorConnectivities">
|
|
224
|
+
{{ connectivityError.errorConnectivities }}
|
|
225
|
+
</strong>
|
|
226
|
+
{{ connectivityError.errorMessage }}
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
108
229
|
</div>
|
|
109
230
|
|
|
110
231
|
<div class="content-container" v-show="activeView === 'graphView'">
|
|
@@ -112,9 +233,8 @@
|
|
|
112
233
|
<connectivity-graph
|
|
113
234
|
:key="entry.featureId[0]"
|
|
114
235
|
:entry="entry.featureId[0]"
|
|
115
|
-
:mapServer="
|
|
236
|
+
:mapServer="envVars.FLATMAPAPI_LOCATION"
|
|
116
237
|
:sckanVersion="sckanVersion"
|
|
117
|
-
:connectivityFromMap="connectivityFromMap"
|
|
118
238
|
@tap-node="onTapNode"
|
|
119
239
|
ref="connectivityGraphRef"
|
|
120
240
|
/>
|
|
@@ -132,6 +252,11 @@
|
|
|
132
252
|
</template>
|
|
133
253
|
|
|
134
254
|
<script>
|
|
255
|
+
import {
|
|
256
|
+
ArrowUp as ElIconArrowUp,
|
|
257
|
+
ArrowDown as ElIconArrowDown,
|
|
258
|
+
Warning as ElIconWarning,
|
|
259
|
+
} from '@element-plus/icons-vue'
|
|
135
260
|
/* eslint-disable no-alert, no-console */
|
|
136
261
|
import {
|
|
137
262
|
ElButton as Button,
|
|
@@ -143,11 +268,9 @@ import EventBus from './EventBus.js'
|
|
|
143
268
|
import {
|
|
144
269
|
CopyToClipboard,
|
|
145
270
|
ConnectivityGraph,
|
|
146
|
-
ConnectivityList,
|
|
147
271
|
ExternalResourceCard,
|
|
148
272
|
} from '@abi-software/map-utilities';
|
|
149
273
|
import '@abi-software/map-utilities/dist/style.css';
|
|
150
|
-
import { processConnectivity } from './flatmapQueries.js';
|
|
151
274
|
|
|
152
275
|
const titleCase = (str) => {
|
|
153
276
|
return str.replace(/\w\S*/g, (t) => {
|
|
@@ -168,24 +291,17 @@ export default {
|
|
|
168
291
|
Button,
|
|
169
292
|
Container,
|
|
170
293
|
Icon,
|
|
294
|
+
ElIconArrowUp,
|
|
295
|
+
ElIconArrowDown,
|
|
296
|
+
ElIconWarning,
|
|
171
297
|
ExternalResourceCard,
|
|
172
298
|
CopyToClipboard,
|
|
173
299
|
ConnectivityGraph,
|
|
174
|
-
ConnectivityList,
|
|
175
300
|
},
|
|
176
301
|
props: {
|
|
177
|
-
|
|
178
|
-
type:
|
|
179
|
-
default:
|
|
180
|
-
destinations: [],
|
|
181
|
-
origins: [],
|
|
182
|
-
components: [],
|
|
183
|
-
destinationsWithDatasets: [],
|
|
184
|
-
originsWithDatasets: [],
|
|
185
|
-
componentsWithDatasets: [],
|
|
186
|
-
resource: undefined,
|
|
187
|
-
featuresAlert: undefined,
|
|
188
|
-
}),
|
|
302
|
+
connectivityEntry: {
|
|
303
|
+
type: Array,
|
|
304
|
+
default: [],
|
|
189
305
|
},
|
|
190
306
|
envVars: {
|
|
191
307
|
type: Object,
|
|
@@ -195,53 +311,43 @@ export default {
|
|
|
195
311
|
type: Array,
|
|
196
312
|
default: () => [],
|
|
197
313
|
},
|
|
198
|
-
useDOIFormatter: {
|
|
199
|
-
type: Boolean,
|
|
200
|
-
default: true,
|
|
201
|
-
},
|
|
202
314
|
},
|
|
203
315
|
data: function () {
|
|
204
316
|
return {
|
|
205
317
|
controller: undefined,
|
|
206
318
|
activeSpecies: undefined,
|
|
319
|
+
pubmedSearchUrl: '',
|
|
207
320
|
loading: false,
|
|
208
321
|
activeView: 'listView',
|
|
322
|
+
facetList: [],
|
|
209
323
|
showToolip: false,
|
|
210
324
|
showDetails: false,
|
|
211
325
|
originDescriptions: {
|
|
212
326
|
motor: 'is the location of the initial cell body of the circuit',
|
|
213
327
|
sensory: 'is the location of the initial cell body in the PNS circuit',
|
|
214
328
|
},
|
|
215
|
-
origins: [],
|
|
216
|
-
originsWithDatasets: [],
|
|
217
|
-
components: [],
|
|
218
329
|
componentsWithDatasets: [],
|
|
219
|
-
destinations: [],
|
|
220
|
-
destinationsWithDatasets: [],
|
|
221
|
-
connectivityFromMap: null,
|
|
222
330
|
uberons: [{ id: undefined, name: undefined }],
|
|
223
331
|
connectivityError: null,
|
|
224
332
|
timeoutID: undefined,
|
|
225
333
|
graphViewLoaded: false,
|
|
226
334
|
updatedCopyContent: '',
|
|
227
|
-
|
|
228
|
-
connectivitySource: 'sckan',
|
|
229
|
-
mapuuid: '',
|
|
230
|
-
mapId: '',
|
|
231
|
-
dualConnectionSource: false,
|
|
232
|
-
flatmapApi: '',
|
|
335
|
+
entryIndex: 0
|
|
233
336
|
}
|
|
234
337
|
},
|
|
235
338
|
watch: {
|
|
236
|
-
|
|
339
|
+
availableAnatomyFacets: {
|
|
237
340
|
handler: function (val) {
|
|
238
|
-
this.
|
|
341
|
+
this.convertFacetsToList(val)
|
|
239
342
|
},
|
|
240
343
|
immediate: true,
|
|
241
344
|
deep: true,
|
|
242
|
-
}
|
|
345
|
+
},
|
|
243
346
|
},
|
|
244
347
|
computed: {
|
|
348
|
+
entry: function () {
|
|
349
|
+
return this.connectivityEntry[this.entryIndex];
|
|
350
|
+
},
|
|
245
351
|
resources: function () {
|
|
246
352
|
let resources = [];
|
|
247
353
|
if (this.entry && this.entry.hyperlinks) {
|
|
@@ -269,17 +375,85 @@ export default {
|
|
|
269
375
|
text += ' species'
|
|
270
376
|
return text
|
|
271
377
|
},
|
|
378
|
+
sckanVersion: function () {
|
|
379
|
+
return this.entry.knowledgeSource
|
|
380
|
+
},
|
|
381
|
+
previousLabel: function () {
|
|
382
|
+
if (this.entryIndex === 0) {
|
|
383
|
+
return "This is the first item"
|
|
384
|
+
}
|
|
385
|
+
return this.connectivityEntry[this.entryIndex - 1].title
|
|
386
|
+
},
|
|
387
|
+
nextLabel: function () {
|
|
388
|
+
if (this.entryIndex === this.connectivityEntry.length - 1) {
|
|
389
|
+
return "This is the last item"
|
|
390
|
+
}
|
|
391
|
+
return this.connectivityEntry[this.entryIndex + 1].title
|
|
392
|
+
}
|
|
272
393
|
},
|
|
273
394
|
methods: {
|
|
395
|
+
previous: function () {
|
|
396
|
+
if (this.entryIndex !== 0) {
|
|
397
|
+
this.entryIndex = this.entryIndex - 1;
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
next: function () {
|
|
401
|
+
if (this.entryIndex !== this.connectivityEntry.length - 1) {
|
|
402
|
+
this.entryIndex = this.entryIndex + 1;
|
|
403
|
+
}
|
|
404
|
+
},
|
|
274
405
|
titleCase: function (title) {
|
|
275
406
|
return titleCase(title)
|
|
276
407
|
},
|
|
277
408
|
capitalise: function (text) {
|
|
278
409
|
return capitalise(text)
|
|
279
410
|
},
|
|
280
|
-
|
|
411
|
+
openUrl: function (url) {
|
|
412
|
+
window.open(url, '_blank')
|
|
413
|
+
},
|
|
414
|
+
openAll: function () {
|
|
415
|
+
EventBus.emit('onConnectivityActionClick', {
|
|
416
|
+
type: 'Facets',
|
|
417
|
+
labels: this.entry.componentsWithDatasets.map((a) => a.name.toLowerCase()),
|
|
418
|
+
})
|
|
419
|
+
},
|
|
420
|
+
openAxons: function () {
|
|
421
|
+
EventBus.emit('onConnectivityActionClick', {
|
|
422
|
+
type: 'Facets',
|
|
423
|
+
labels: this.entry.destinationsWithDatasets.map((a) => a.name.toLowerCase()),
|
|
424
|
+
})
|
|
425
|
+
},
|
|
426
|
+
// shouldShowExploreButton: Checks if the feature is in the list of available anatomy facets
|
|
427
|
+
shouldShowExploreButton: function (features) {
|
|
428
|
+
for (let i = 0; i < features.length; i++) {
|
|
429
|
+
if (this.facetList.includes(features[i].name.toLowerCase())) {
|
|
430
|
+
return true
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return false
|
|
434
|
+
},
|
|
435
|
+
// convertFacetsToList: Converts the available anatomy facets to a list for easy searching
|
|
436
|
+
convertFacetsToList: function (facets) {
|
|
437
|
+
facets.forEach((facet) => {
|
|
438
|
+
if(facet.children) {
|
|
439
|
+
this.convertFacetsToList(facet.children)
|
|
440
|
+
} else {
|
|
441
|
+
this.facetList.push(facet.label.toLowerCase())
|
|
442
|
+
}
|
|
443
|
+
})
|
|
444
|
+
},
|
|
445
|
+
openDendrites: function () {
|
|
446
|
+
EventBus.emit('onConnectivityActionClick', {
|
|
447
|
+
type: 'Facets',
|
|
448
|
+
labels: this.entry.originsWithDatasets.map((a) => a.name.toLowerCase()),
|
|
449
|
+
})
|
|
450
|
+
},
|
|
451
|
+
pubmedSearchUrlUpdate: function (val) {
|
|
452
|
+
this.pubmedSearchUrl = val
|
|
453
|
+
},
|
|
454
|
+
showConnectivity: function () {
|
|
281
455
|
// move the map center to highlighted area
|
|
282
|
-
const featureIds = entry.featureId || [];
|
|
456
|
+
const featureIds = this.entry.featureId || [];
|
|
283
457
|
// connected to flatmapvuer > moveMap(featureIds) function
|
|
284
458
|
this.$emit('show-connectivity', featureIds);
|
|
285
459
|
},
|
|
@@ -367,28 +541,28 @@ export default {
|
|
|
367
541
|
}
|
|
368
542
|
|
|
369
543
|
// Origins
|
|
370
|
-
if (this.origins?.length) {
|
|
544
|
+
if (this.entry.origins?.length) {
|
|
371
545
|
const title = 'Origin';
|
|
372
|
-
const origins = this.origins;
|
|
373
|
-
const originsWithDatasets = this.originsWithDatasets;
|
|
546
|
+
const origins = this.entry.origins;
|
|
547
|
+
const originsWithDatasets = this.entry.originsWithDatasets;
|
|
374
548
|
const transformedOrigins = transformData(title, origins, originsWithDatasets);
|
|
375
549
|
contentArray.push(transformedOrigins);
|
|
376
550
|
}
|
|
377
551
|
|
|
378
552
|
// Components
|
|
379
|
-
if (this.components?.length) {
|
|
553
|
+
if (this.entry.components?.length) {
|
|
380
554
|
const title = 'Components';
|
|
381
|
-
const components = this.components;
|
|
382
|
-
const componentsWithDatasets = this.componentsWithDatasets;
|
|
555
|
+
const components = this.entry.components;
|
|
556
|
+
const componentsWithDatasets = this.entry.componentsWithDatasets;
|
|
383
557
|
const transformedComponents = transformData(title, components, componentsWithDatasets);
|
|
384
558
|
contentArray.push(transformedComponents);
|
|
385
559
|
}
|
|
386
560
|
|
|
387
561
|
// Destination
|
|
388
|
-
if (this.destinations?.length) {
|
|
562
|
+
if (this.entry.destinations?.length) {
|
|
389
563
|
const title = 'Destination';
|
|
390
|
-
const destinations = this.destinations;
|
|
391
|
-
const destinationsWithDatasets = this.destinationsWithDatasets;
|
|
564
|
+
const destinations = this.entry.destinations;
|
|
565
|
+
const destinationsWithDatasets = this.entry.destinationsWithDatasets;
|
|
392
566
|
const transformedDestinations = transformData(title, destinations, destinationsWithDatasets);
|
|
393
567
|
contentArray.push(transformedDestinations);
|
|
394
568
|
}
|
|
@@ -408,9 +582,9 @@ export default {
|
|
|
408
582
|
},
|
|
409
583
|
toggleConnectivityTooltip: function (name, option) {
|
|
410
584
|
const allWithDatasets = [
|
|
411
|
-
...this.componentsWithDatasets,
|
|
412
|
-
...this.destinationsWithDatasets,
|
|
413
|
-
...this.originsWithDatasets,
|
|
585
|
+
...this.entry.componentsWithDatasets,
|
|
586
|
+
...this.entry.destinationsWithDatasets,
|
|
587
|
+
...this.entry.originsWithDatasets,
|
|
414
588
|
];
|
|
415
589
|
const names = name.split(','); // some features have more than one value
|
|
416
590
|
const data = [];
|
|
@@ -486,73 +660,9 @@ export default {
|
|
|
486
660
|
this.connectivityError = null;
|
|
487
661
|
}, ERROR_TIMEOUT);
|
|
488
662
|
},
|
|
489
|
-
updateConnectionsData: function (source) {
|
|
490
|
-
this.origins = source.origins;
|
|
491
|
-
this.components = source.components;
|
|
492
|
-
this.destinations = source.destinations;
|
|
493
|
-
this.originsWithDatasets = source.originsWithDatasets;
|
|
494
|
-
this.componentsWithDatasets = source.componentsWithDatasets;
|
|
495
|
-
this.destinationsWithDatasets = source.destinationsWithDatasets;
|
|
496
|
-
|
|
497
|
-
this.updatedCopyContent = this.getUpdateCopyContent();
|
|
498
|
-
},
|
|
499
|
-
onConnectivitySourceChange: function (val) {
|
|
500
|
-
if (this.connectivitySource === 'map') {
|
|
501
|
-
this.getConnectionsFromMap(this.mapuuid, this.entry.featureId[0])
|
|
502
|
-
.then((response) => {
|
|
503
|
-
this.connectivityFromMap = response;
|
|
504
|
-
processConnectivity(this.flatmapApi, this.sckanVersion, response)
|
|
505
|
-
.then((result) => {
|
|
506
|
-
const mapSource = {
|
|
507
|
-
origins: result.labels.origins,
|
|
508
|
-
components: result.labels.components,
|
|
509
|
-
destinations: result.labels.destinations,
|
|
510
|
-
originsWithDatasets: result.withDatasets.originsWithDatasets,
|
|
511
|
-
componentsWithDatasets: result.withDatasets.componentsWithDatasets,
|
|
512
|
-
destinationsWithDatasets: result.withDatasets.destinationsWithDatasets,
|
|
513
|
-
}
|
|
514
|
-
this.updateConnectionsData(mapSource);
|
|
515
|
-
})
|
|
516
|
-
});
|
|
517
|
-
} else {
|
|
518
|
-
this.connectivityFromMap = null;
|
|
519
|
-
this.updateConnectionsData(this.entry);
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
getConnectionsFromMap: async function (mapuuid, pathId) {
|
|
523
|
-
const url = this.flatmapApi + `flatmap/${mapuuid}/connectivity/${pathId}`;
|
|
524
|
-
|
|
525
|
-
try {
|
|
526
|
-
const response = await fetch(url);
|
|
527
|
-
if (!response.ok) {
|
|
528
|
-
throw new Error(`Response status: ${response.status}`);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
return await response.json();
|
|
532
|
-
} catch (error) {
|
|
533
|
-
throw new Error(error);
|
|
534
|
-
}
|
|
535
|
-
},
|
|
536
|
-
onToggleConnectivityTooltip: function (data) {
|
|
537
|
-
const {name, option} = data;
|
|
538
|
-
this.toggleConnectivityTooltip(name, option);
|
|
539
|
-
},
|
|
540
|
-
onConnectivityActionClick: function (data) {
|
|
541
|
-
EventBus.emit('onConnectivityActionClick', data);
|
|
542
|
-
},
|
|
543
663
|
},
|
|
544
664
|
mounted: function () {
|
|
545
|
-
this.
|
|
546
|
-
this.mapuuid = this.entry['mapuuid'];
|
|
547
|
-
this.mapId = this.entry['mapId'];
|
|
548
|
-
this.flatmapApi = this.envVars.FLATMAPAPI_LOCATION;
|
|
549
|
-
this.updateConnectionsData(this.entry);
|
|
550
|
-
|
|
551
|
-
// TODO: only rat flatmap has dual connections now
|
|
552
|
-
if (this.mapId === 'rat-flatmap') {
|
|
553
|
-
this.dualConnectionSource = true;
|
|
554
|
-
}
|
|
555
|
-
|
|
665
|
+
this.updatedCopyContent = this.getUpdateCopyContent();
|
|
556
666
|
EventBus.on('connectivity-graph-error', (errorInfo) => {
|
|
557
667
|
this.pushConnectivityError(errorInfo);
|
|
558
668
|
});
|
|
@@ -580,6 +690,11 @@ export default {
|
|
|
580
690
|
}
|
|
581
691
|
}
|
|
582
692
|
|
|
693
|
+
.button-container {
|
|
694
|
+
display: flex;
|
|
695
|
+
justify-content: space-between;
|
|
696
|
+
}
|
|
697
|
+
|
|
583
698
|
.title {
|
|
584
699
|
text-align: left;
|
|
585
700
|
// width: 16em;
|
|
@@ -633,8 +748,17 @@ export default {
|
|
|
633
748
|
}
|
|
634
749
|
}
|
|
635
750
|
|
|
751
|
+
.info,
|
|
636
752
|
.alert {
|
|
637
753
|
color: #8300bf;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.info {
|
|
757
|
+
transform: rotate(180deg);
|
|
758
|
+
margin-left: 8px;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.alert {
|
|
638
762
|
margin-left: 5px;
|
|
639
763
|
vertical-align: text-bottom;
|
|
640
764
|
|
|
@@ -694,6 +818,39 @@ export default {
|
|
|
694
818
|
text-transform: uppercase;
|
|
695
819
|
}
|
|
696
820
|
|
|
821
|
+
.attribute-content {
|
|
822
|
+
font-size: 14px;
|
|
823
|
+
font-weight: 500;
|
|
824
|
+
transition: color 0.25s ease;
|
|
825
|
+
position: relative;
|
|
826
|
+
cursor: default;
|
|
827
|
+
|
|
828
|
+
&:hover {
|
|
829
|
+
color: $app-primary-color;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
+ .attribute-content {
|
|
833
|
+
&::before {
|
|
834
|
+
content: "";
|
|
835
|
+
width: 90%;
|
|
836
|
+
height: 1px;
|
|
837
|
+
background-color: var(--el-border-color);
|
|
838
|
+
position: absolute;
|
|
839
|
+
top: 0;
|
|
840
|
+
left: 0;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
&:last-of-type {
|
|
845
|
+
margin-bottom: 0.5em;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.popover-container {
|
|
850
|
+
height: 100%;
|
|
851
|
+
width: 100%;
|
|
852
|
+
}
|
|
853
|
+
|
|
697
854
|
.main {
|
|
698
855
|
.el-button.is-round {
|
|
699
856
|
border-radius: 4px;
|
|
@@ -750,12 +907,6 @@ export default {
|
|
|
750
907
|
margin-top: 0 !important;
|
|
751
908
|
margin-left: 10px !important;
|
|
752
909
|
}
|
|
753
|
-
|
|
754
|
-
> div:first-child {
|
|
755
|
-
display: flex;
|
|
756
|
-
align-items: center;
|
|
757
|
-
gap: 0.5rem;
|
|
758
|
-
}
|
|
759
910
|
}
|
|
760
911
|
|
|
761
912
|
.population-display {
|
|
@@ -766,23 +917,6 @@ export default {
|
|
|
766
917
|
justify-content: space-between;
|
|
767
918
|
border-bottom: 1px solid $app-primary-color;
|
|
768
919
|
padding-bottom: 0.5rem !important;
|
|
769
|
-
|
|
770
|
-
&.population-display-toolbar {
|
|
771
|
-
flex-direction: column !important;
|
|
772
|
-
align-items: start;
|
|
773
|
-
|
|
774
|
-
.buttons-row {
|
|
775
|
-
display: flex;
|
|
776
|
-
flex-direction: row;
|
|
777
|
-
align-items: center;
|
|
778
|
-
justify-content: space-between;
|
|
779
|
-
width: 100%;
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
.el-radio {
|
|
784
|
-
margin-right: 1rem;
|
|
785
|
-
}
|
|
786
920
|
}
|
|
787
921
|
|
|
788
922
|
.tooltip-container {
|
|
@@ -904,4 +1038,25 @@ export default {
|
|
|
904
1038
|
margin-top: -1.25rem;
|
|
905
1039
|
}
|
|
906
1040
|
}
|
|
1041
|
+
|
|
1042
|
+
.connectivity-error-container {
|
|
1043
|
+
position: sticky;
|
|
1044
|
+
bottom: 0.5rem;
|
|
1045
|
+
width: 100%;
|
|
1046
|
+
min-height: 31px; // placeholder
|
|
1047
|
+
margin-top: -10px !important;
|
|
1048
|
+
display: flex;
|
|
1049
|
+
flex-direction: row;
|
|
1050
|
+
align-items: center;
|
|
1051
|
+
justify-content: center;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.connectivity-error {
|
|
1055
|
+
width: fit-content;
|
|
1056
|
+
font-size: 12px;
|
|
1057
|
+
padding: 0.25rem 0.5rem;
|
|
1058
|
+
background-color: var(--el-color-error-light-9);
|
|
1059
|
+
border-radius: var(--el-border-radius-small);
|
|
1060
|
+
border: 1px solid var(--el-color-error);
|
|
1061
|
+
}
|
|
907
1062
|
</style>
|