@abi-software/map-side-bar 2.3.1 → 2.4.0-alpha-1
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/.eslintrc.js +12 -12
- package/.postcssrc.json +5 -5
- package/LICENSE +201 -201
- package/README.md +168 -168
- package/cypress.config.js +23 -23
- package/dist/data/pmr-sample.json +3181 -0
- package/dist/map-side-bar.js +15142 -9024
- package/dist/map-side-bar.umd.cjs +50 -103
- package/dist/style.css +1 -1
- package/package.json +77 -77
- package/public/data/pmr-sample.json +3181 -0
- package/reporter-config.json +9 -9
- package/src/App.vue +266 -265
- package/src/algolia/algolia.js +255 -242
- package/src/algolia/utils.js +100 -100
- package/src/assets/_variables.scss +43 -43
- package/src/assets/styles.scss +6 -6
- package/src/components/BadgesGroup.vue +124 -124
- package/src/components/ConnectivityInfo.vue +619 -619
- package/src/components/DatasetCard.vue +367 -357
- package/src/components/EventBus.js +3 -3
- package/src/components/ExternalResourceCard.vue +113 -113
- package/src/components/FlatmapDatasetCard.vue +171 -0
- package/src/components/ImageGallery.vue +542 -542
- package/src/components/PMRDatasetCard.vue +237 -0
- package/src/components/SearchFilters.vue +1023 -1006
- package/src/components/SearchHistory.vue +175 -175
- package/src/components/SideBar.vue +436 -436
- package/src/components/SidebarContent.vue +730 -603
- package/src/components/Tabs.vue +145 -145
- package/src/components/allPaths.js +5928 -0
- package/src/components/index.js +8 -8
- package/src/components/pmrTest.js +4 -0
- package/src/components/species-map.js +8 -8
- package/src/components.d.ts +2 -0
- package/src/exampleConnectivityInput.js +291 -291
- package/src/flatmapQueries/flatmapQueries.js +169 -0
- package/src/main.js +9 -9
- package/src/mixins/S3Bucket.vue +37 -37
- package/src/mixins/mixedPageCalculation.vue +78 -0
- package/static.json +6 -6
- package/vite.config.js +55 -55
- package/vuese-generator.js +65 -65
package/src/components/Tabs.vue
CHANGED
|
@@ -1,145 +1,145 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tab-container">
|
|
3
|
-
<div
|
|
4
|
-
class="title"
|
|
5
|
-
v-for="title in tabTitles"
|
|
6
|
-
:key="title.id"
|
|
7
|
-
:class="{ 'active-tab': title.id == activeId }"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
10
|
-
class="title-text-table"
|
|
11
|
-
v-bind:class="{ highlightText: title.id == activeId }"
|
|
12
|
-
v-on:click="titleClicked(title.id, title.type)"
|
|
13
|
-
>
|
|
14
|
-
<div class="title-text">
|
|
15
|
-
{{ title.title }}
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
<el-button
|
|
19
|
-
v-if="title.id === 2"
|
|
20
|
-
@click="tabClose(title.id)"
|
|
21
|
-
class="button-tab-close"
|
|
22
|
-
aria-label="Close"
|
|
23
|
-
>
|
|
24
|
-
×
|
|
25
|
-
<span class="visually-hidden">Close</span>
|
|
26
|
-
</el-button>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script>
|
|
32
|
-
/* eslint-disable no-alert, no-console */
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
name: 'Tabs',
|
|
36
|
-
props: {
|
|
37
|
-
tabTitles: {
|
|
38
|
-
type: Array,
|
|
39
|
-
default: () => [],
|
|
40
|
-
},
|
|
41
|
-
activeId: {
|
|
42
|
-
type: Number,
|
|
43
|
-
default: 1,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
methods: {
|
|
47
|
-
titleClicked: function (id, type) {
|
|
48
|
-
this.$emit('titleClicked', {id, type})
|
|
49
|
-
},
|
|
50
|
-
tabClose: function (id) {
|
|
51
|
-
this.$emit('tab-close', id);
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<style lang="scss" scoped>
|
|
58
|
-
$tab-height: 30px;
|
|
59
|
-
|
|
60
|
-
.tab-container {
|
|
61
|
-
height: $tab-height;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: row;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.title {
|
|
67
|
-
height: $tab-height;
|
|
68
|
-
border: 1px solid var(--el-border-color);
|
|
69
|
-
border-top-color: transparent;
|
|
70
|
-
background-color: white;
|
|
71
|
-
display: flex;
|
|
72
|
-
width: fit-content;
|
|
73
|
-
align-items: center;
|
|
74
|
-
position: relative;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.title-text {
|
|
79
|
-
text-align: center;
|
|
80
|
-
display: table-cell;
|
|
81
|
-
vertical-align: middle;
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
padding: 0 1rem;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.title-text-table {
|
|
87
|
-
display: table;
|
|
88
|
-
height: 100%;
|
|
89
|
-
width: 100%;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.parent-dialog:hover .title-text {
|
|
93
|
-
color: $app-primary-color;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.title:hover,
|
|
97
|
-
.active-tab {
|
|
98
|
-
background-color: #f9f2fc;
|
|
99
|
-
border: solid #8300bf;
|
|
100
|
-
border-width: 1px 1px .125em;
|
|
101
|
-
color: #8300bf;
|
|
102
|
-
font-weight: 500;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.highlightText {
|
|
106
|
-
color: $app-primary-color;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.button-tab-close {
|
|
110
|
-
width: 20px !important;
|
|
111
|
-
height: 20px !important;
|
|
112
|
-
line-height: 20px !important;
|
|
113
|
-
padding: 0 !important;
|
|
114
|
-
padding-right: 4px !important;
|
|
115
|
-
font-size: 24px !important;
|
|
116
|
-
color: $app-primary-color !important;
|
|
117
|
-
border: 0 none !important;
|
|
118
|
-
box-shadow: none !important;
|
|
119
|
-
outline: none !important;
|
|
120
|
-
background-color: transparent !important;
|
|
121
|
-
|
|
122
|
-
:deep(> span) {
|
|
123
|
-
height: $tab-height - 2 !important; // tab height minus border
|
|
124
|
-
font-family: Arial !important; // to fix font alignment on different browsers
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&:hover,
|
|
128
|
-
&:focus {
|
|
129
|
-
border: 0 none !important;
|
|
130
|
-
outline: none !important;
|
|
131
|
-
box-shadow: none !important;
|
|
132
|
-
background-color: transparent !important;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.visually-hidden {
|
|
137
|
-
clip: rect(0 0 0 0);
|
|
138
|
-
clip-path: inset(50%);
|
|
139
|
-
height: 1px;
|
|
140
|
-
overflow: hidden;
|
|
141
|
-
position: absolute;
|
|
142
|
-
white-space: nowrap;
|
|
143
|
-
width: 1px;
|
|
144
|
-
}
|
|
145
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tab-container">
|
|
3
|
+
<div
|
|
4
|
+
class="title"
|
|
5
|
+
v-for="title in tabTitles"
|
|
6
|
+
:key="title.id"
|
|
7
|
+
:class="{ 'active-tab': title.id == activeId }"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="title-text-table"
|
|
11
|
+
v-bind:class="{ highlightText: title.id == activeId }"
|
|
12
|
+
v-on:click="titleClicked(title.id, title.type)"
|
|
13
|
+
>
|
|
14
|
+
<div class="title-text">
|
|
15
|
+
{{ title.title }}
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<el-button
|
|
19
|
+
v-if="title.id === 2"
|
|
20
|
+
@click="tabClose(title.id)"
|
|
21
|
+
class="button-tab-close"
|
|
22
|
+
aria-label="Close"
|
|
23
|
+
>
|
|
24
|
+
×
|
|
25
|
+
<span class="visually-hidden">Close</span>
|
|
26
|
+
</el-button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
/* eslint-disable no-alert, no-console */
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: 'Tabs',
|
|
36
|
+
props: {
|
|
37
|
+
tabTitles: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default: () => [],
|
|
40
|
+
},
|
|
41
|
+
activeId: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 1,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
titleClicked: function (id, type) {
|
|
48
|
+
this.$emit('titleClicked', {id, type})
|
|
49
|
+
},
|
|
50
|
+
tabClose: function (id) {
|
|
51
|
+
this.$emit('tab-close', id);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<style lang="scss" scoped>
|
|
58
|
+
$tab-height: 30px;
|
|
59
|
+
|
|
60
|
+
.tab-container {
|
|
61
|
+
height: $tab-height;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.title {
|
|
67
|
+
height: $tab-height;
|
|
68
|
+
border: 1px solid var(--el-border-color);
|
|
69
|
+
border-top-color: transparent;
|
|
70
|
+
background-color: white;
|
|
71
|
+
display: flex;
|
|
72
|
+
width: fit-content;
|
|
73
|
+
align-items: center;
|
|
74
|
+
position: relative;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.title-text {
|
|
79
|
+
text-align: center;
|
|
80
|
+
display: table-cell;
|
|
81
|
+
vertical-align: middle;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
padding: 0 1rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.title-text-table {
|
|
87
|
+
display: table;
|
|
88
|
+
height: 100%;
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.parent-dialog:hover .title-text {
|
|
93
|
+
color: $app-primary-color;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.title:hover,
|
|
97
|
+
.active-tab {
|
|
98
|
+
background-color: #f9f2fc;
|
|
99
|
+
border: solid #8300bf;
|
|
100
|
+
border-width: 1px 1px .125em;
|
|
101
|
+
color: #8300bf;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.highlightText {
|
|
106
|
+
color: $app-primary-color;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.button-tab-close {
|
|
110
|
+
width: 20px !important;
|
|
111
|
+
height: 20px !important;
|
|
112
|
+
line-height: 20px !important;
|
|
113
|
+
padding: 0 !important;
|
|
114
|
+
padding-right: 4px !important;
|
|
115
|
+
font-size: 24px !important;
|
|
116
|
+
color: $app-primary-color !important;
|
|
117
|
+
border: 0 none !important;
|
|
118
|
+
box-shadow: none !important;
|
|
119
|
+
outline: none !important;
|
|
120
|
+
background-color: transparent !important;
|
|
121
|
+
|
|
122
|
+
:deep(> span) {
|
|
123
|
+
height: $tab-height - 2 !important; // tab height minus border
|
|
124
|
+
font-family: Arial !important; // to fix font alignment on different browsers
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:hover,
|
|
128
|
+
&:focus {
|
|
129
|
+
border: 0 none !important;
|
|
130
|
+
outline: none !important;
|
|
131
|
+
box-shadow: none !important;
|
|
132
|
+
background-color: transparent !important;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.visually-hidden {
|
|
137
|
+
clip: rect(0 0 0 0);
|
|
138
|
+
clip-path: inset(50%);
|
|
139
|
+
height: 1px;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
position: absolute;
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
width: 1px;
|
|
144
|
+
}
|
|
145
|
+
</style>
|