@abi-software/flatmapvuer 0.5.9 → 0.6.0-vue3-0
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/babel.config.js +0 -14
- package/dist/favicon.ico +0 -0
- package/dist/flatmapvuer.js +69542 -0
- package/dist/flatmapvuer.umd.cjs +1021 -0
- package/dist/index.html +17 -0
- package/dist/style.css +1 -0
- package/package.json +29 -21
- package/src/App.vue +180 -105
- package/src/assets/styles.scss +2 -3
- package/src/components/AnnotationTool.vue +193 -153
- package/src/components/EventBus.js +3 -3
- package/src/components/ExternalResourceCard.vue +39 -30
- package/src/components/FlatmapVuer.vue +734 -676
- package/src/components/MultiFlatmapVuer.vue +313 -246
- package/src/components/ProvenancePopup.vue +195 -121
- package/src/components/SelectionsGroup.vue +93 -84
- package/src/components/Tooltip.vue +11 -13
- package/src/components/TreeControls.vue +67 -64
- package/src/components/index.js +4 -7
- package/src/components/legends/DynamicLegends.vue +13 -19
- package/src/components/legends/SvgLegends.vue +72 -27
- package/src/components.d.ts +46 -0
- package/src/icons/flatmap-marker.js +1 -1
- package/src/icons/fonts/mapicon-species.eot +0 -0
- package/src/icons/fonts/mapicon-species.svg +0 -0
- package/src/icons/yellowstar.js +2 -2
- package/src/legends/legend.svg +0 -0
- package/src/main.js +2 -6
- package/src/services/flatmapQueries.js +175 -139
- package/vite.config.js +76 -0
- package/vue.config.js +14 -0
- package/CHANGELOG.md +0 -402
- package/dist/demo.html +0 -10
- package/dist/flatmapvuer.common.js +0 -22741
- package/dist/flatmapvuer.common.js.map +0 -1
- package/dist/flatmapvuer.css +0 -1
- package/dist/flatmapvuer.umd.js +0 -22751
- package/dist/flatmapvuer.umd.js.map +0 -1
- package/dist/flatmapvuer.umd.min.js +0 -4
- package/dist/flatmapvuer.umd.min.js.map +0 -1
- package/package-lock.json +0 -18473
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="selections-container">
|
|
3
3
|
<el-row>
|
|
4
4
|
<el-col :span="12">
|
|
5
|
-
<div class="checkall-display-text">{{title}}</div>
|
|
5
|
+
<div class="checkall-display-text">{{ title }}</div>
|
|
6
6
|
</el-col>
|
|
7
7
|
<el-col :span="12">
|
|
8
8
|
<el-checkbox
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
:indeterminate="isIndeterminate"
|
|
12
12
|
v-model="checkAll"
|
|
13
13
|
@change="handleCheckAllChange"
|
|
14
|
-
|
|
14
|
+
>Display all</el-checkbox
|
|
15
|
+
>
|
|
15
16
|
</el-col>
|
|
16
17
|
</el-row>
|
|
17
18
|
<el-checkbox-group
|
|
@@ -21,20 +22,25 @@
|
|
|
21
22
|
@change="handleCheckedItemsChange"
|
|
22
23
|
>
|
|
23
24
|
<div class="checkbox-group-inner">
|
|
24
|
-
<el-row
|
|
25
|
+
<el-row
|
|
26
|
+
v-for="item in selections"
|
|
27
|
+
:key="item[identifierKey]"
|
|
28
|
+
:label="item[identifierKey]"
|
|
29
|
+
>
|
|
25
30
|
<div class="checkbox-container">
|
|
26
31
|
<el-checkbox
|
|
27
32
|
class="my-checkbox"
|
|
28
33
|
:label="item[identifierKey]"
|
|
29
34
|
@change="visibilityToggle(item[identifierKey], $event)"
|
|
30
|
-
:checked="!('enabled' in item) ||
|
|
35
|
+
:checked="!('enabled' in item) || item.enabled === true"
|
|
36
|
+
>
|
|
31
37
|
<el-row class="checkbox-row">
|
|
32
|
-
<el-col :span="4">
|
|
33
|
-
|
|
38
|
+
<el-col :span="4" v-if="hasLineStyles(item)">
|
|
39
|
+
<div class="path-visual" :style="getLineStyles(item)"></div>
|
|
34
40
|
</el-col>
|
|
35
41
|
<el-col :span="20">
|
|
36
42
|
<div :style="getBackgroundStyles(item)">
|
|
37
|
-
{{item[labelKey]}}
|
|
43
|
+
{{ item[labelKey] }}
|
|
38
44
|
</div>
|
|
39
45
|
</el-col>
|
|
40
46
|
</el-row>
|
|
@@ -48,125 +54,123 @@
|
|
|
48
54
|
|
|
49
55
|
<script>
|
|
50
56
|
/* eslint-disable no-alert, no-console */
|
|
51
|
-
import Vue from "vue";
|
|
52
57
|
import {
|
|
53
|
-
Checkbox,
|
|
54
|
-
CheckboxGroup,
|
|
55
|
-
Col,
|
|
56
|
-
Row
|
|
57
|
-
} from
|
|
58
|
-
import lang from "element-ui/lib/locale/lang/en";
|
|
59
|
-
import locale from "element-ui/lib/locale";
|
|
60
|
-
|
|
61
|
-
locale.use(lang);
|
|
62
|
-
Vue.use(Checkbox);
|
|
63
|
-
Vue.use(CheckboxGroup);
|
|
64
|
-
Vue.use(Col);
|
|
65
|
-
Vue.use(Row);
|
|
66
|
-
|
|
58
|
+
ElCheckbox as Checkbox,
|
|
59
|
+
ElCheckboxGroup as CheckboxGroup,
|
|
60
|
+
ElCol as Col,
|
|
61
|
+
ElRow as Row,
|
|
62
|
+
} from 'element-plus'
|
|
67
63
|
|
|
68
64
|
export default {
|
|
69
|
-
name:
|
|
65
|
+
name: 'SelectionsGroup',
|
|
66
|
+
components: {
|
|
67
|
+
Checkbox,
|
|
68
|
+
CheckboxGroup,
|
|
69
|
+
Col,
|
|
70
|
+
Row,
|
|
71
|
+
},
|
|
70
72
|
methods: {
|
|
71
73
|
/**
|
|
72
74
|
* Function to toggle paths to default.
|
|
73
75
|
* Also called when the associated button is pressed.
|
|
74
76
|
*/
|
|
75
|
-
reset: function() {
|
|
76
|
-
this.checkAll = true
|
|
77
|
-
this.checkedItems = []
|
|
78
|
-
this.selections.forEach(item => {
|
|
77
|
+
reset: function () {
|
|
78
|
+
this.checkAll = true
|
|
79
|
+
this.checkedItems = []
|
|
80
|
+
this.selections.forEach((item) => {
|
|
79
81
|
if (!('enabled' in item) || item.enabled === true) {
|
|
80
|
-
this.checkedItems.push(item[this.identifierKey])
|
|
82
|
+
this.checkedItems.push(item[this.identifierKey])
|
|
81
83
|
} else {
|
|
82
|
-
this.checkAll = false
|
|
84
|
+
this.checkAll = false
|
|
83
85
|
}
|
|
84
|
-
})
|
|
86
|
+
})
|
|
85
87
|
},
|
|
86
|
-
visibilityToggle: function(key, value) {
|
|
87
|
-
this.$emit(
|
|
88
|
+
visibilityToggle: function (key, value) {
|
|
89
|
+
this.$emit('changed', { key, value })
|
|
88
90
|
},
|
|
89
|
-
handleCheckedItemsChange: function(value) {
|
|
90
|
-
let checkedCount = value.length
|
|
91
|
-
this.checkAll = checkedCount === this.selections.length
|
|
91
|
+
handleCheckedItemsChange: function (value) {
|
|
92
|
+
let checkedCount = value.length
|
|
93
|
+
this.checkAll = checkedCount === this.selections.length
|
|
92
94
|
},
|
|
93
|
-
handleCheckAllChange: function(val) {
|
|
94
|
-
this.checkedItems = val
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
handleCheckAllChange: function (val) {
|
|
96
|
+
this.checkedItems = val
|
|
97
|
+
? this.selections.map((a) => a[this.identifierKey])
|
|
98
|
+
: []
|
|
99
|
+
this.$emit('checkAll', {
|
|
100
|
+
keys: this.selections.map((a) => a[this.identifierKey]),
|
|
101
|
+
value: val,
|
|
102
|
+
})
|
|
100
103
|
},
|
|
101
|
-
getBackgroundStyles: function(item) {
|
|
102
|
-
if ('colour' in item && this.colourStyle ===
|
|
103
|
-
return { background: item.colour }
|
|
104
|
+
getBackgroundStyles: function (item) {
|
|
105
|
+
if ('colour' in item && this.colourStyle === 'background') {
|
|
106
|
+
return { background: item.colour }
|
|
104
107
|
}
|
|
105
|
-
return {}
|
|
108
|
+
return {}
|
|
106
109
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return { background
|
|
110
|
+
hasLineStyles: function(item) {
|
|
111
|
+
return 'colour' in item && this.colourStyle === 'line'
|
|
112
|
+
},
|
|
113
|
+
getLineStyles: function (item) {
|
|
114
|
+
if ('colour' in item && this.colourStyle === 'line') {
|
|
115
|
+
if ('dashed' in item && item.dashed === true) {
|
|
116
|
+
const background = `repeating-linear-gradient(90deg,${item.colour},${item.colour} 6px,transparent 0,transparent 9px)`
|
|
117
|
+
return { background }
|
|
118
|
+
} else {
|
|
119
|
+
return { background: item.colour }
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
|
-
return { display:
|
|
118
|
-
}
|
|
122
|
+
return { display: 'None' }
|
|
123
|
+
},
|
|
119
124
|
},
|
|
120
125
|
props: {
|
|
121
126
|
colourStyle: {
|
|
122
127
|
type: String,
|
|
123
|
-
default:
|
|
128
|
+
default: 'line',
|
|
124
129
|
},
|
|
125
130
|
identifierKey: {
|
|
126
131
|
type: String,
|
|
127
|
-
default:
|
|
132
|
+
default: 'id',
|
|
128
133
|
},
|
|
129
134
|
labelKey: {
|
|
130
135
|
type: String,
|
|
131
|
-
default:
|
|
136
|
+
default: 'label',
|
|
132
137
|
},
|
|
133
138
|
title: {
|
|
134
139
|
type: String,
|
|
135
|
-
default:
|
|
140
|
+
default: '',
|
|
136
141
|
},
|
|
137
142
|
selections: {
|
|
138
143
|
type: Array,
|
|
139
|
-
default: function() {
|
|
140
|
-
return []
|
|
144
|
+
default: function () {
|
|
145
|
+
return []
|
|
141
146
|
},
|
|
142
147
|
},
|
|
143
148
|
},
|
|
144
149
|
computed: {
|
|
145
|
-
isIndeterminate: function() {
|
|
146
|
-
const count = this.checkedItems.length
|
|
147
|
-
if (
|
|
148
|
-
return false
|
|
150
|
+
isIndeterminate: function () {
|
|
151
|
+
const count = this.checkedItems.length
|
|
152
|
+
if (count === 0 || this.checkAll) {
|
|
153
|
+
return false
|
|
149
154
|
}
|
|
150
|
-
return true
|
|
151
|
-
}
|
|
155
|
+
return true
|
|
156
|
+
},
|
|
152
157
|
},
|
|
153
|
-
data: function() {
|
|
158
|
+
data: function () {
|
|
154
159
|
return {
|
|
155
160
|
checkedItems: [],
|
|
156
161
|
checkAll: true,
|
|
157
|
-
}
|
|
162
|
+
}
|
|
158
163
|
},
|
|
159
|
-
mounted: function() {
|
|
160
|
-
this.reset()
|
|
161
|
-
}
|
|
162
|
-
}
|
|
164
|
+
mounted: function () {
|
|
165
|
+
this.reset()
|
|
166
|
+
},
|
|
167
|
+
}
|
|
163
168
|
</script>
|
|
164
169
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
@
|
|
168
|
-
@
|
|
169
|
-
@import "~element-ui/packages/theme-chalk/src/row";
|
|
170
|
+
<style lang="scss" scoped>
|
|
171
|
+
@use 'element-plus/theme-chalk/src/checkbox';
|
|
172
|
+
@use 'element-plus/theme-chalk/src/checkbox-group';
|
|
173
|
+
@use 'element-plus/theme-chalk/src/row';
|
|
170
174
|
|
|
171
175
|
.path-visual {
|
|
172
176
|
margin: 3px 0;
|
|
@@ -192,12 +196,14 @@ export default {
|
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
.all-checkbox {
|
|
199
|
+
height:20px;
|
|
195
200
|
float: right;
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
.checkbox-container {
|
|
199
204
|
display: flex;
|
|
200
205
|
cursor: pointer;
|
|
206
|
+
width: 100%;
|
|
201
207
|
}
|
|
202
208
|
|
|
203
209
|
.checkbox-group {
|
|
@@ -216,7 +222,7 @@ export default {
|
|
|
216
222
|
padding: 18px;
|
|
217
223
|
}
|
|
218
224
|
|
|
219
|
-
|
|
225
|
+
:deep(.el-checkbox__label) {
|
|
220
226
|
padding-left: 5px;
|
|
221
227
|
color: $app-primary-color;
|
|
222
228
|
font-size: 12px;
|
|
@@ -226,7 +232,7 @@ export default {
|
|
|
226
232
|
width: 100%;
|
|
227
233
|
}
|
|
228
234
|
|
|
229
|
-
|
|
235
|
+
:deep(.el-checkbox__input) {
|
|
230
236
|
&.is-indeterminate,
|
|
231
237
|
&.is-checked {
|
|
232
238
|
.el-checkbox__inner {
|
|
@@ -236,7 +242,12 @@ export default {
|
|
|
236
242
|
}
|
|
237
243
|
}
|
|
238
244
|
|
|
239
|
-
|
|
245
|
+
:deep(.el-row) {
|
|
246
|
+
height:20px;
|
|
247
|
+
margin-bottom: 0;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:deep(.el-checkbox__label) {
|
|
240
251
|
color: $app-primary-color !important;
|
|
241
252
|
}
|
|
242
253
|
|
|
@@ -244,6 +255,4 @@ export default {
|
|
|
244
255
|
width: 100%;
|
|
245
256
|
top: 2px;
|
|
246
257
|
}
|
|
247
|
-
|
|
248
258
|
</style>
|
|
249
|
-
|
|
@@ -1,47 +1,45 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tooltip-container">
|
|
3
3
|
<template v-if="annotationDisplay">
|
|
4
|
-
<annotation-tool :annotationEntry="annotationEntry"/>
|
|
4
|
+
<annotation-tool :annotationEntry="annotationEntry" />
|
|
5
5
|
</template>
|
|
6
6
|
<template v-else>
|
|
7
|
-
<provenance-popup :entry="entry"/>
|
|
7
|
+
<provenance-popup :entry="entry" />
|
|
8
8
|
</template>
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
<script>
|
|
14
13
|
/* eslint-disable no-alert, no-console */
|
|
15
|
-
import AnnotationTool from
|
|
16
|
-
import ProvenancePopup from
|
|
14
|
+
import AnnotationTool from './AnnotationTool.vue'
|
|
15
|
+
import ProvenancePopup from './ProvenancePopup.vue'
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
|
-
name:
|
|
18
|
+
name: 'Tooltip',
|
|
20
19
|
components: {
|
|
21
20
|
AnnotationTool,
|
|
22
21
|
ProvenancePopup,
|
|
23
22
|
},
|
|
24
|
-
props: {
|
|
23
|
+
props: {
|
|
25
24
|
entry: {
|
|
26
25
|
type: Object,
|
|
27
26
|
},
|
|
28
27
|
annotationDisplay: {
|
|
29
28
|
type: Boolean,
|
|
30
|
-
default: false
|
|
29
|
+
default: false,
|
|
31
30
|
},
|
|
32
31
|
annotationEntry: {
|
|
33
32
|
type: Object,
|
|
34
33
|
},
|
|
35
34
|
},
|
|
36
|
-
}
|
|
35
|
+
}
|
|
37
36
|
</script>
|
|
38
37
|
|
|
39
|
-
<style
|
|
40
|
-
|
|
38
|
+
<style lang="scss" scoped>
|
|
41
39
|
.tooltip-container {
|
|
42
|
-
text-align:justify;
|
|
40
|
+
text-align: justify;
|
|
43
41
|
border-radius: 4px;
|
|
44
|
-
box-shadow: 0 1px 2px rgba(0,0,0
|
|
42
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
45
43
|
pointer-events: auto;
|
|
46
44
|
background: #fff;
|
|
47
45
|
border: 1px solid $app-primary-color;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
<div class="container">
|
|
3
3
|
<el-row>
|
|
4
4
|
<el-col :span="12">
|
|
5
|
-
<div class="title-text">
|
|
6
|
-
Systems
|
|
7
|
-
</div>
|
|
5
|
+
<div class="title-text">Systems</div>
|
|
8
6
|
</el-col>
|
|
9
7
|
</el-row>
|
|
10
8
|
<div class="tree-container">
|
|
@@ -18,20 +16,21 @@
|
|
|
18
16
|
:default-expanded-keys="defaultExpandedKeys"
|
|
19
17
|
@check="checkChanged"
|
|
20
18
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
<template #default="{ node, data }">
|
|
20
|
+
<span
|
|
21
|
+
class="region-tree-node"
|
|
22
|
+
:class="{
|
|
23
|
+
activeItem: nodeIsActive(data),
|
|
24
|
+
hoverItem: nodeIsHover(data),
|
|
25
|
+
}"
|
|
26
|
+
@click="changeActiveByNode(data)"
|
|
27
|
+
@mouseover="changeHoverByNode(data)"
|
|
28
|
+
>
|
|
29
|
+
<div :style="getBackgroundStyles(data)">
|
|
30
|
+
{{ node.label }}
|
|
31
|
+
</div>
|
|
32
|
+
</span>
|
|
33
|
+
</template>
|
|
35
34
|
</el-tree>
|
|
36
35
|
</div>
|
|
37
36
|
</div>
|
|
@@ -39,86 +38,89 @@
|
|
|
39
38
|
|
|
40
39
|
<script>
|
|
41
40
|
/* eslint-disable no-alert, no-console */
|
|
42
|
-
import
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Vue.use(ColorPicker);
|
|
50
|
-
Vue.use(Row);
|
|
51
|
-
Vue.use(Tree);
|
|
41
|
+
import {
|
|
42
|
+
ElCheckbox as Checkbox,
|
|
43
|
+
ElCheckboxGroup as CheckboxGroup,
|
|
44
|
+
ElColorPicker as ColorPicker,
|
|
45
|
+
ElRow as Row,
|
|
46
|
+
ElTree as Tree,
|
|
47
|
+
} from 'element-plus'
|
|
52
48
|
|
|
53
49
|
/**
|
|
54
50
|
* A vue component for toggling visibility of various regions.
|
|
55
51
|
*/
|
|
56
52
|
export default {
|
|
57
|
-
name:
|
|
53
|
+
name: 'TreeControls',
|
|
54
|
+
components: {
|
|
55
|
+
Checkbox,
|
|
56
|
+
CheckboxGroup,
|
|
57
|
+
ColorPicker,
|
|
58
|
+
Row,
|
|
59
|
+
Tree,
|
|
60
|
+
},
|
|
58
61
|
props: {
|
|
59
62
|
treeData: {
|
|
60
63
|
type: Array,
|
|
61
64
|
default: function () {
|
|
62
|
-
return []
|
|
63
|
-
}
|
|
65
|
+
return []
|
|
66
|
+
},
|
|
64
67
|
},
|
|
65
68
|
active: {
|
|
66
69
|
type: String,
|
|
67
|
-
default:
|
|
70
|
+
default: '',
|
|
68
71
|
},
|
|
69
72
|
hover: {
|
|
70
73
|
type: String,
|
|
71
|
-
default:
|
|
72
|
-
}
|
|
74
|
+
default: '',
|
|
75
|
+
},
|
|
73
76
|
},
|
|
74
77
|
data: function () {
|
|
75
78
|
return {
|
|
76
|
-
defaultExpandedKeys: [
|
|
77
|
-
}
|
|
79
|
+
defaultExpandedKeys: ['All'],
|
|
80
|
+
}
|
|
78
81
|
},
|
|
79
82
|
destroyed: function () {
|
|
80
|
-
this.sortedPrimitiveGroups = undefined
|
|
83
|
+
this.sortedPrimitiveGroups = undefined
|
|
81
84
|
},
|
|
82
85
|
methods: {
|
|
83
|
-
nodeIsActive: function(data) {
|
|
84
|
-
return this.active === data.models
|
|
86
|
+
nodeIsActive: function (data) {
|
|
87
|
+
return this.active === data.models
|
|
85
88
|
},
|
|
86
|
-
nodeIsHover: function(data) {
|
|
87
|
-
return this.hover === data.models
|
|
89
|
+
nodeIsHover: function (data) {
|
|
90
|
+
return this.hover === data.models
|
|
88
91
|
},
|
|
89
|
-
changeActiveByNode: function(data) {
|
|
92
|
+
changeActiveByNode: function (data) {
|
|
90
93
|
if (data.models) {
|
|
91
|
-
this.$emit(
|
|
94
|
+
this.$emit('change-active', data.models)
|
|
92
95
|
}
|
|
93
96
|
},
|
|
94
|
-
changeHoverByNode: function() {
|
|
97
|
+
changeHoverByNode: function () {
|
|
95
98
|
//if (data.models) {
|
|
96
99
|
// this.$emit("change-active", data.models);
|
|
97
100
|
//}
|
|
98
101
|
},
|
|
99
102
|
checkChanged: function (node, data) {
|
|
100
|
-
const isChecked = data.checkedKeys.includes(node.key)
|
|
101
|
-
if (node.key ===
|
|
102
|
-
this.$emit(
|
|
103
|
+
const isChecked = data.checkedKeys.includes(node.key)
|
|
104
|
+
if (node.key === 'All') {
|
|
105
|
+
this.$emit('checkAll', isChecked)
|
|
103
106
|
} else {
|
|
104
|
-
this.$emit(
|
|
107
|
+
this.$emit('changed', { key: node.key, value: isChecked })
|
|
105
108
|
}
|
|
106
109
|
},
|
|
107
|
-
getBackgroundStyles: function(node) {
|
|
110
|
+
getBackgroundStyles: function (node) {
|
|
108
111
|
if ('colour' in node) {
|
|
109
|
-
return { background: node.colour }
|
|
112
|
+
return { background: node.colour }
|
|
110
113
|
}
|
|
111
|
-
return {}
|
|
114
|
+
return {}
|
|
112
115
|
},
|
|
113
116
|
},
|
|
114
|
-
}
|
|
117
|
+
}
|
|
115
118
|
</script>
|
|
116
119
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
@
|
|
120
|
-
@
|
|
121
|
-
@import "~element-ui/packages/theme-chalk/src/tree";
|
|
120
|
+
<style lang="scss" scoped>
|
|
121
|
+
@use 'element-plus/theme-chalk/src/checkbox';
|
|
122
|
+
@use 'element-plus/theme-chalk/src/row';
|
|
123
|
+
@use 'element-plus/theme-chalk/src/tree';
|
|
122
124
|
|
|
123
125
|
.checkbox-container {
|
|
124
126
|
display: flex;
|
|
@@ -165,7 +167,7 @@ export default {
|
|
|
165
167
|
margin-top: 6px;
|
|
166
168
|
scrollbar-width: thin;
|
|
167
169
|
|
|
168
|
-
|
|
170
|
+
:deep(.el-tree) {
|
|
169
171
|
max-height: 240px;
|
|
170
172
|
min-height: 130px;
|
|
171
173
|
overflow: auto;
|
|
@@ -179,12 +181,12 @@ export default {
|
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
:deep(.el-tree-node__content) {
|
|
183
185
|
height: 22px;
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
188
|
|
|
187
|
-
|
|
189
|
+
:deep(.el-checkbox__input) {
|
|
188
190
|
&.is-indeterminate,
|
|
189
191
|
&.is-checked {
|
|
190
192
|
.el-checkbox__inner {
|
|
@@ -194,11 +196,15 @@ export default {
|
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
|
|
197
|
-
|
|
199
|
+
:deep(
|
|
200
|
+
.el-tree-node__children
|
|
201
|
+
.el-tree-node__children
|
|
202
|
+
.el-tree-node__content
|
|
203
|
+
> label.el-checkbox) {
|
|
198
204
|
display: none;
|
|
199
205
|
}
|
|
200
206
|
|
|
201
|
-
|
|
207
|
+
:deep(.el-checkbox__label) {
|
|
202
208
|
padding-left: 5px;
|
|
203
209
|
color: $app-primary-color !important;
|
|
204
210
|
font-size: 12px;
|
|
@@ -220,12 +226,9 @@ export default {
|
|
|
220
226
|
padding-left: 0px;
|
|
221
227
|
background-color: #fff;
|
|
222
228
|
width: 100%;
|
|
223
|
-
|
|
224
229
|
}
|
|
225
230
|
|
|
226
231
|
.hoverItem {
|
|
227
232
|
background-color: #eee !important;
|
|
228
233
|
}
|
|
229
|
-
|
|
230
234
|
</style>
|
|
231
|
-
|
package/src/components/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// The Vue build version to load with the `import` command
|
|
2
2
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
3
|
-
import FlatmapVuer from
|
|
4
|
-
import MultiFlatmapVuer from
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
FlatmapVuer,
|
|
8
|
-
MultiFlatmapVuer
|
|
9
|
-
};
|
|
3
|
+
import FlatmapVuer from './FlatmapVuer.vue'
|
|
4
|
+
import MultiFlatmapVuer from './MultiFlatmapVuer.vue'
|
|
5
|
+
|
|
6
|
+
export { FlatmapVuer, MultiFlatmapVuer }
|
|
@@ -27,48 +27,43 @@
|
|
|
27
27
|
|
|
28
28
|
<script>
|
|
29
29
|
/* eslint-disable no-alert, no-console */
|
|
30
|
-
import Vue from
|
|
31
|
-
import { Col, Row } from
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
locale.use(lang);
|
|
36
|
-
Vue.use(Col);
|
|
37
|
-
Vue.use(Row);
|
|
30
|
+
import Vue from 'vue'
|
|
31
|
+
import { ElCol as Col, ElRow as Row } from 'element-plus'
|
|
32
|
+
Vue.use(Col)
|
|
33
|
+
Vue.use(Row)
|
|
38
34
|
|
|
39
35
|
export default {
|
|
40
|
-
name:
|
|
36
|
+
name: 'DynamicLegends',
|
|
41
37
|
props: {
|
|
42
38
|
identifierKey: {
|
|
43
39
|
type: String,
|
|
44
|
-
default:
|
|
40
|
+
default: 'id',
|
|
45
41
|
},
|
|
46
42
|
colourKey: {
|
|
47
43
|
type: String,
|
|
48
|
-
default:
|
|
44
|
+
default: 'colour',
|
|
49
45
|
},
|
|
50
46
|
title: {
|
|
51
47
|
type: String,
|
|
52
|
-
default:
|
|
48
|
+
default: '',
|
|
53
49
|
},
|
|
54
50
|
lists: {
|
|
55
51
|
type: Array,
|
|
56
52
|
default: function () {
|
|
57
|
-
return []
|
|
53
|
+
return []
|
|
58
54
|
},
|
|
59
55
|
},
|
|
60
56
|
},
|
|
61
57
|
methods: {
|
|
62
58
|
capitalise: function (label) {
|
|
63
|
-
return label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
|
|
59
|
+
return label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
|
|
64
60
|
},
|
|
65
61
|
},
|
|
66
|
-
}
|
|
62
|
+
}
|
|
67
63
|
</script>
|
|
68
64
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
@import "~element-ui/packages/theme-chalk/src/row";
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
@use 'element-plus/theme-chalk/src/row';
|
|
72
67
|
|
|
73
68
|
.legends-visual {
|
|
74
69
|
margin: 2px;
|
|
@@ -109,4 +104,3 @@ export default {
|
|
|
109
104
|
padding: 18px;
|
|
110
105
|
}
|
|
111
106
|
</style>
|
|
112
|
-
|