@abi-software/map-side-bar 2.5.0-beta.7 → 2.5.0-beta.9
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 +4630 -4648
- package/dist/map-side-bar.umd.cjs +106 -106
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ConnectivityInfo.vue +10 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/map-side-bar",
|
|
3
|
-
"version": "2.5.0-beta.
|
|
3
|
+
"version": "2.5.0-beta.9",
|
|
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.2.1-beta.
|
|
42
|
+
"@abi-software/map-utilities": "^1.2.1-beta.3",
|
|
43
43
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
44
44
|
"@element-plus/icons-vue": "^2.3.1",
|
|
45
45
|
"algoliasearch": "^4.10.5",
|
|
@@ -104,12 +104,10 @@
|
|
|
104
104
|
<div
|
|
105
105
|
v-for="(origin, i) in entry.origins"
|
|
106
106
|
class="attribute-content"
|
|
107
|
-
:class="{'active': origin === selectedConnectivity}"
|
|
108
107
|
:origin-item-label="origin"
|
|
109
108
|
:key="origin"
|
|
110
109
|
@mouseenter="toggleConnectivityTooltip(origin, {show: true})"
|
|
111
110
|
@mouseleave="toggleConnectivityTooltip(origin, {show: false})"
|
|
112
|
-
@click="selectConnectivity(origin)"
|
|
113
111
|
>
|
|
114
112
|
{{ capitalise(origin) }}
|
|
115
113
|
</div>
|
|
@@ -135,12 +133,10 @@
|
|
|
135
133
|
<div
|
|
136
134
|
v-for="(component, i) in entry.components"
|
|
137
135
|
class="attribute-content"
|
|
138
|
-
:class="{'active': component === selectedConnectivity}"
|
|
139
136
|
:component-item-label="component"
|
|
140
137
|
:key="component"
|
|
141
138
|
@mouseenter="toggleConnectivityTooltip(component, {show: true})"
|
|
142
139
|
@mouseleave="toggleConnectivityTooltip(component, {show: false})"
|
|
143
|
-
@click="selectConnectivity(component)"
|
|
144
140
|
>
|
|
145
141
|
{{ capitalise(component) }}
|
|
146
142
|
</div>
|
|
@@ -168,12 +164,10 @@
|
|
|
168
164
|
<div
|
|
169
165
|
v-for="(destination, i) in entry.destinations"
|
|
170
166
|
class="attribute-content"
|
|
171
|
-
:class="{'active': destination === selectedConnectivity}"
|
|
172
167
|
:destination-item-label="destination"
|
|
173
168
|
:key="destination"
|
|
174
169
|
@mouseenter="toggleConnectivityTooltip(destination, {show: true})"
|
|
175
170
|
@mouseleave="toggleConnectivityTooltip(destination, {show: false})"
|
|
176
|
-
@click="selectConnectivity(destination)"
|
|
177
171
|
>
|
|
178
172
|
{{ capitalise(destination) }}
|
|
179
173
|
</div>
|
|
@@ -219,7 +213,6 @@
|
|
|
219
213
|
<connectivity-graph
|
|
220
214
|
:entry="entry.featureId[0]"
|
|
221
215
|
:mapServer="envVars.FLATMAPAPI_LOCATION"
|
|
222
|
-
:selectedConnectivityData="selectedConnectivityData"
|
|
223
216
|
@tap-node="onTapNode"
|
|
224
217
|
ref="connectivityGraphRef"
|
|
225
218
|
/>
|
|
@@ -309,9 +302,8 @@ export default {
|
|
|
309
302
|
},
|
|
310
303
|
componentsWithDatasets: [],
|
|
311
304
|
uberons: [{ id: undefined, name: undefined }],
|
|
312
|
-
selectedConnectivity: '',
|
|
313
|
-
selectedConnectivityData: [],
|
|
314
305
|
connectivityError: null,
|
|
306
|
+
timeoutID: undefined,
|
|
315
307
|
}
|
|
316
308
|
},
|
|
317
309
|
watch: {
|
|
@@ -426,13 +418,7 @@ export default {
|
|
|
426
418
|
onTapNode: function (data) {
|
|
427
419
|
// save selected state for list view
|
|
428
420
|
const name = data.map(t => t.label).join(', ');
|
|
429
|
-
this.
|
|
430
|
-
this.toggleConnectivityTooltip(name, {show: true, type: 'click'});
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* This event is triggered by connectivity-graph's `tap-node` event.
|
|
434
|
-
*/
|
|
435
|
-
this.$emit('connectivity-component-click', data);
|
|
421
|
+
this.toggleConnectivityTooltip(name, {show: true});
|
|
436
422
|
},
|
|
437
423
|
getUpdateCopyContent: function () {
|
|
438
424
|
if (!this.entry) {
|
|
@@ -529,12 +515,6 @@ export default {
|
|
|
529
515
|
return contentArray.join('\n\n<br>');
|
|
530
516
|
},
|
|
531
517
|
toggleConnectivityTooltip: function (name, option) {
|
|
532
|
-
// if there has selected item
|
|
533
|
-
if (!option.show && this.selectedConnectivity) {
|
|
534
|
-
name = this.selectedConnectivity;
|
|
535
|
-
option.show = true;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
518
|
const allWithDatasets = [
|
|
539
519
|
...this.entry.componentsWithDatasets,
|
|
540
520
|
...this.entry.destinationsWithDatasets,
|
|
@@ -557,23 +537,8 @@ export default {
|
|
|
557
537
|
});
|
|
558
538
|
}
|
|
559
539
|
|
|
560
|
-
// saved state for graph view
|
|
561
|
-
this.selectedConnectivityData = data;
|
|
562
540
|
// type: to show error only for click event
|
|
563
|
-
this.$emit('connectivity-component-click',
|
|
564
|
-
data,
|
|
565
|
-
type: option.type
|
|
566
|
-
});
|
|
567
|
-
},
|
|
568
|
-
selectConnectivity: function (name) {
|
|
569
|
-
// clicking on the same item will unselect it
|
|
570
|
-
if (this.selectedConnectivity === name) {
|
|
571
|
-
this.selectedConnectivity = '';
|
|
572
|
-
this.toggleConnectivityTooltip(name, {show: false});
|
|
573
|
-
} else {
|
|
574
|
-
this.selectedConnectivity = name;
|
|
575
|
-
this.toggleConnectivityTooltip(name, {show: true, type: 'click'});
|
|
576
|
-
}
|
|
541
|
+
this.$emit('connectivity-component-click', data);
|
|
577
542
|
},
|
|
578
543
|
getErrorConnectivities: function (errorData) {
|
|
579
544
|
const errorDataToEmit = [...new Set(errorData)];
|
|
@@ -621,7 +586,11 @@ export default {
|
|
|
621
586
|
// error for list view
|
|
622
587
|
this.connectivityError = {...connectivityError};
|
|
623
588
|
|
|
624
|
-
|
|
589
|
+
if (this.timeoutID) {
|
|
590
|
+
clearTimeout(this.timeoutID);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
this.timeoutID = setTimeout(() => {
|
|
625
594
|
this.connectivityError = null;
|
|
626
595
|
}, ERROR_TIMEOUT);
|
|
627
596
|
},
|
|
@@ -774,28 +743,15 @@ export default {
|
|
|
774
743
|
|
|
775
744
|
.attribute-content {
|
|
776
745
|
font-size: 14px;
|
|
746
|
+
font-weight: 500;
|
|
777
747
|
transition: color 0.25s ease;
|
|
778
748
|
position: relative;
|
|
779
|
-
cursor:
|
|
749
|
+
cursor: default;
|
|
780
750
|
|
|
781
|
-
&.active,
|
|
782
751
|
&:hover {
|
|
783
|
-
font-weight: 500;
|
|
784
752
|
color: $app-primary-color;
|
|
785
753
|
}
|
|
786
754
|
|
|
787
|
-
&.active {
|
|
788
|
-
font-weight: 600;
|
|
789
|
-
|
|
790
|
-
&::after {
|
|
791
|
-
content: "📌";
|
|
792
|
-
display: inline-block;
|
|
793
|
-
width: 1em;
|
|
794
|
-
font-size: 0.75em;
|
|
795
|
-
padding-left: 4px;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
|
|
799
755
|
+ .attribute-content {
|
|
800
756
|
&::before {
|
|
801
757
|
content: "";
|